Skip to content

Commit

Permalink
Merge pull request #22 from Doczilla-APP/improvements
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
TriPSs authored Jul 31, 2024
2 parents 29e1c45 + 0e25786 commit 82014bb
Show file tree
Hide file tree
Showing 34 changed files with 346 additions and 246 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@swc/core": "^1.6.13",
"@swc/core": "^1.7.3",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.10",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"axios-mock-adapter": "^1.22.0",
"eslint": "9.7.0",
"eslint": "9.8.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"jest": "^29.7.0",
"openapi-typescript-codegen": "^0.29.0",
"ts-jest": "^29.2.2",
"tsup": "^8.1.1",
"ts-jest": "^29.2.3",
"tsup": "^8.2.3",
"typescript": "^5.5"
},
"packageManager": "[email protected]",
Expand Down
6 changes: 5 additions & 1 deletion src/generated/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand All @@ -14,6 +14,10 @@ export type { InternalServerErrorResponse } from './models/InternalServerErrorRe
export type { PageAuthentication } from './models/PageAuthentication';
export { PageCookie } from './models/PageCookie';
export { PageOptions } from './models/PageOptions';
export type { PageWaitForFunction } from './models/PageWaitForFunction';
export type { PageWaitForFunctionOptions } from './models/PageWaitForFunctionOptions';
export type { PageWaitForSelector } from './models/PageWaitForSelector';
export type { PageWaitForSelectorOptions } from './models/PageWaitForSelectorOptions';
export type { PayloadTooLargeResponse } from './models/PayloadTooLargeResponse';
export type { PDFMargin } from './models/PDFMargin';
export { PdfOptions } from './models/PdfOptions';
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/AsyncJob.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/AsyncPdf.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/AsyncScreenshot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/BadRequestResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/CreatePdf.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/CreateScreenshot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/ForbiddenResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/InternalServerErrorResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/PDFMargin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/PageAuthentication.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
4 changes: 2 additions & 2 deletions src/generated/models/PageCookie.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand All @@ -16,7 +16,7 @@ export type PageCookie = {
*/
domain: string;
/**
* The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
* The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie. Should include the scheme, e.g. `https://`
*/
url?: string | null;
/**
Expand Down
18 changes: 16 additions & 2 deletions src/generated/models/PageOptions.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { PageAuthentication } from './PageAuthentication';
import type { PageCookie } from './PageCookie';
import type { PageWaitForFunction } from './PageWaitForFunction';
import type { PageWaitForSelector } from './PageWaitForSelector';
export type PageOptions = {
/**
* URL to go to.
* URL to go to. Should include the scheme, e.g. `https://`
*/
url?: string | null;
/**
Expand All @@ -30,6 +32,18 @@ export type PageOptions = {
* - `networkidle2` waits till there are no more than 2 network connections for at least `500` ms.
*/
waitUntil?: PageOptions.waitUntil;
/**
* Wait for a certain amount of milliseconds before the request continues.
*/
waitForMilliseconds?: number | null;
/**
* Wait for the [selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) to appear in page. If the [selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) doesn't appear after the `timeout` milliseconds of waiting, the request will continue.
*/
waitForSelector?: PageWaitForSelector | null;
/**
* Wait for the `pageFunction` to execute in the page. If the `pageFunction` doesn't execute successfully after the `timeout` milliseconds of waiting, the request will continue.
*/
waitForFunction?: PageWaitForFunction | null;
/**
* An object containing additional HTTP headers to be sent with every request. All header values must be strings.
*/
Expand Down
16 changes: 16 additions & 0 deletions src/generated/models/PageWaitForFunction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { PageWaitForFunctionOptions } from './PageWaitForFunctionOptions';
export type PageWaitForFunction = {
/**
* Function to be evaluated in browser context until it returns a truthy value.
*/
pageFunction: string;
/**
* Options for configuring waiting behavior.
*/
options?: PageWaitForFunctionOptions | null;
};

17 changes: 17 additions & 0 deletions src/generated/models/PageWaitForFunctionOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type PageWaitForFunctionOptions = {
/**
* An interval at which the `pageFunction` is executed, defaults to `raf`. If `polling` is a number, then it is treated as an interval in milliseconds at which the function would be executed. If `polling` is a string, then it can be one of the following values:
* - `raf` to constantly execute `pageFunction` in `requestAnimationFrame` callback. This is the tightest polling mode which is suitable to observe styling changes.
* - `mutation` to execute `pageFunction` on every DOM mutation.
*/
polling?: ('raf' | 'mutation' | number);
/**
* Maximum time to wait in milliseconds.
*/
timeout?: number;
};

16 changes: 16 additions & 0 deletions src/generated/models/PageWaitForSelector.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { PageWaitForSelectorOptions } from './PageWaitForSelectorOptions';
export type PageWaitForSelector = {
/**
* The [selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) of an element to wait for.
*/
selector: string;
/**
* Options for configuring waiting behavior.
*/
options?: PageWaitForSelectorOptions | null;
};

25 changes: 25 additions & 0 deletions src/generated/models/PageWaitForSelectorOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type PageWaitForSelectorOptions = {
/**
* Wait for the selected element to be present in DOM and to be visibleAn element is considered to be visible if all of the following is true:
* - the element has [computed styles](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle)
* - the element has a non-empty [bounding client rect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect)
* - the element's [visibility](https://developer.mozilla.org/en-US/docs/Web/CSS/visibility) is not `hidden` or `collapse`
*/
visible?: boolean;
/**
* Wait for the selected element to not be found in the DOM or to be hidden.An element is considered to be hidden if at least one of the following is true:
* - the element has no [computed styles](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle)
* - the element has an empty [bounding client rect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect)
* - the element's [visibility](https://developer.mozilla.org/en-US/docs/Web/CSS/visibility) is `hidden` or `collapse`
*/
hidden?: boolean;
/**
* Maximum time to wait in milliseconds.
*/
timeout?: number;
};

2 changes: 1 addition & 1 deletion src/generated/models/PayloadTooLargeResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
4 changes: 2 additions & 2 deletions src/generated/models/PdfOptions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down Expand Up @@ -75,7 +75,7 @@ export type PdfOptions = {
omitBackground?: boolean;
/**
* Generate document outline.
* If this is enabled the PDF will also be tagged (accessible)
* If this is enabled the PDF will also be tagged (accessible).
*/
outline?: boolean;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/ScreenshotClip.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
4 changes: 2 additions & 2 deletions src/generated/models/ScreenshotOptions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down Expand Up @@ -41,7 +41,7 @@ export type ScreenshotOptions = {
*/
clip?: ScreenshotClip | null;
/**
* It captures the DOM element matching the given CSS selector. This will overwrite the `clip` property and set `fullPage` to `false`.
* It captures the DOM element matching the given CSS [selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors). This will overwrite the `clip` property and set `fullPage` to `false`.
*/
element?: string | null;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/ScreenshotOverlay.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/ScreenshotViewport.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
4 changes: 2 additions & 2 deletions src/generated/models/StorageOptions.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type StorageOptions = {
/**
* Pre-signed url to upload the generated pdf/screenshot to.
* Pre-signed url to upload the generated pdf/screenshot to. Should include the scheme, e.g. `https://`
*/
preSignedUrl: string;
};
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/SubscriptionLimitReachedResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
4 changes: 2 additions & 2 deletions src/generated/models/SyncJob.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand All @@ -12,7 +12,7 @@ export type SyncJob = {
*/
status: SyncJob.status;
/**
* URL to the generated file (will be null if `storage.signedUrl` is used). This url is valid for 1 hour, after that the file will be deleted from our storage.
* URL to the generated file (will be `null` if `storage.signedUrl` is used). This url is valid for 1 hour, after that the file will be deleted from our storage.
*/
fileUrl?: string | null;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/SyncPdf.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/SyncScreenshot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/TooManyRequestsResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
2 changes: 1 addition & 1 deletion src/generated/models/UnauthorizedResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand Down
6 changes: 3 additions & 3 deletions src/generated/models/WebhookEvent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand All @@ -12,7 +12,7 @@ export type WebhookEvent = {
*/
status: WebhookEvent.status;
/**
* URL to the generated file (will be null if `storage.signedUrl` is used). This url is valid for 1 hour, after that the file will be deleted from our storage.
* URL to the generated file (will be `null` if `storage.signedUrl` is used). This url is valid for 1 hour, after that the file will be deleted from our storage.
*/
fileUrl?: string | null;
/**
Expand All @@ -23,7 +23,7 @@ export type WebhookEvent = {
*/
signedUrlStatus?: string | null;
/**
* The generated file base64 encoded (will be null if `storage.signedUrl` is used).
* The generated file base64 encoded (will be `null` if `storage.signedUrl` is used).
*/
fileBase64?: string | null;
/**
Expand Down
4 changes: 2 additions & 2 deletions src/generated/models/WebhookOptions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Expand All @@ -10,7 +10,7 @@ export type WebhookOptions = {
*/
receiveType?: WebhookOptions.receiveType;
/**
* The webhook's URL.
* The webhook's URL. Should include the scheme, e.g. `https://`
*/
url: string;
/**
Expand Down
Loading

0 comments on commit 82014bb

Please sign in to comment.