commit 7529bf2b9f308865e8989a9cdc9689169a0d43f1 Author: Kiran K Date: Sun Apr 14 11:24:56 2024 +0530 Generate SDK using Speakeasy diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..4d160bd --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,28 @@ +/* eslint-env node */ +module.exports = { + root: true, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:import/recommended", + "plugin:import/typescript", + ], + parser: "@typescript-eslint/parser", + plugins: ["@typescript-eslint"], + settings: { + "import/resolver": { + typescript: true, + node: true, + }, + }, + rules: { + // Handled by typescript compiler + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-explicit-any": "off", + "import/no-named-as-default-member": "off", + + "import/no-default-export": "error", + }, +}; diff --git a/.genignore b/.genignore new file mode 100644 index 0000000..4240105 --- /dev/null +++ b/.genignore @@ -0,0 +1 @@ +src/index.ts diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..113eead --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# This allows generated code to be indexed correctly +*.ts linguist-generated=false \ No newline at end of file diff --git a/.github/workflows/sdk_generation.yaml b/.github/workflows/sdk_generation.yaml new file mode 100644 index 0000000..485a52a --- /dev/null +++ b/.github/workflows/sdk_generation.yaml @@ -0,0 +1,26 @@ +name: Generate +permissions: + checks: write + contents: write + pull-requests: write + statuses: write +"on": + workflow_dispatch: + inputs: + force: + description: Force generation of SDKs + type: boolean + default: false + schedule: + - cron: 0 0 * * * +jobs: + generate: + uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 + with: + force: ${{ github.event.inputs.force }} + mode: pr + speakeasy_version: latest + secrets: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + npm_token: ${{ secrets.NPM_TOKEN }} + speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.github/workflows/sdk_publish.yaml b/.github/workflows/sdk_publish.yaml new file mode 100644 index 0000000..e19b279 --- /dev/null +++ b/.github/workflows/sdk_publish.yaml @@ -0,0 +1,15 @@ +name: Publish +"on": + push: + branches: + - main + paths: + - RELEASES.md + - '*/RELEASES.md' +jobs: + publish: + uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15 + secrets: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + npm_token: ${{ secrets.NPM_TOKEN }} + speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cc2681a --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +/models +/models/errors +/types +/lib +/sdk +/hooks +/index.* +/cjs +/node_modules +/.tsbuildinfo diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..e8a556c --- /dev/null +++ b/.npmignore @@ -0,0 +1,8 @@ +/* +/docs/**/*.md +!/**/*.ts +!/**/*.js +!/**/*.map + +/.eslintrc.js +/cjs diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock new file mode 100755 index 0000000..2839da5 --- /dev/null +++ b/.speakeasy/gen.lock @@ -0,0 +1,214 @@ +lockVersion: 2.0.0 +id: f28179cc-ef59-426d-9e85-60cec22fc642 +management: + docChecksum: a7672fcdce994905df2837c38c661ab7 + docVersion: 0.0.1 + speakeasyVersion: 1.250.0 + generationVersion: 2.304.1 + releaseVersion: 0.22.2 + configChecksum: fa330c5c21c9392968bfd8861ad91570 + repoURL: https://github.com/dubinc/dub-node.git + installationURL: https://github.com/dubinc/dub-node + published: true +features: + typescript: + acceptHeaders: 2.81.1 + constsAndDefaults: 0.1.5 + core: 3.7.1 + deprecations: 2.81.1 + flattening: 2.81.1 + globalSecurity: 2.82.9 + globalServerURLs: 2.82.4 + globals: 2.82.1 + hiddenGlobals: 0.1.0 + nameOverrides: 2.81.2 + responseFormat: 0.2.3 + unions: 2.85.3 +generatedFiles: + - src/sdk/links.ts + - src/sdk/qrcodes.ts + - src/sdk/analytics.ts + - src/sdk/workspaces.ts + - src/sdk/tags.ts + - src/sdk/metatags.ts + - src/sdk/sdk.ts + - .eslintrc.js + - .npmignore + - RUNTIMES.md + - package.json + - src/lib/base64.ts + - src/lib/config.ts + - src/lib/encodings.ts + - src/lib/http.ts + - src/lib/retries.ts + - src/lib/schemas.ts + - src/lib/sdks.ts + - src/lib/security.ts + - src/lib/url.ts + - src/sdk/index.ts + - src/models/errors/sdkerror.ts + - src/models/errors/sdkvalidationerror.ts + - src/types/blobs.ts + - src/types/index.ts + - src/types/operations.ts + - src/types/rfcdate.ts + - tsconfig.json + - src/models/components/linkschema.ts + - src/models/components/tagschema.ts + - src/models/components/workspaceschema.ts + - src/models/components/security.ts + - src/models/errors/badrequest.ts + - src/models/errors/unauthorized.ts + - src/models/errors/forbidden.ts + - src/models/errors/notfound.ts + - src/models/errors/conflict.ts + - src/models/errors/inviteexpired.ts + - src/models/errors/unprocessableentity.ts + - src/models/errors/ratelimitexceeded.ts + - src/models/errors/internalservererror.ts + - src/models/operations/getlinks.ts + - src/models/operations/createlink.ts + - src/models/operations/getlinkscount.ts + - src/models/operations/getlinkinfo.ts + - src/models/operations/editlink.ts + - src/models/operations/deletelink.ts + - src/models/operations/bulkcreatelinks.ts + - src/models/operations/getqrcode.ts + - src/models/operations/getclicksanalytics.ts + - src/models/operations/gettimeseriesanalytics.ts + - src/models/operations/getcountryanalytics.ts + - src/models/operations/getcityanalytics.ts + - src/models/operations/getdeviceanalytics.ts + - src/models/operations/getbrowseranalytics.ts + - src/models/operations/getosanalytics.ts + - src/models/operations/getrefereranalytics.ts + - src/models/operations/gettoplinks.ts + - src/models/operations/gettopurls.ts + - src/models/operations/createworkspace.ts + - src/models/operations/getworkspace.ts + - src/models/operations/gettags.ts + - src/models/operations/createtag.ts + - src/models/operations/getmetatags.ts + - src/models/errors/index.ts + - src/models/components/index.ts + - src/models/operations/index.ts + - docs/models/components/geo.md + - docs/models/components/linkschema.md + - docs/models/components/color.md + - docs/models/components/tagschema.md + - docs/models/components/plan.md + - docs/models/components/role.md + - docs/models/components/users.md + - docs/models/components/domains.md + - docs/models/components/workspaceschema.md + - docs/models/components/security.md + - docs/models/errors/code.md + - docs/models/errors/errort.md + - docs/models/errors/badrequest.md + - docs/models/errors/unauthorizedcode.md + - docs/models/errors/unauthorizederror.md + - docs/models/errors/unauthorized.md + - docs/models/errors/forbiddencode.md + - docs/models/errors/forbiddenerror.md + - docs/models/errors/forbidden.md + - docs/models/errors/notfoundcode.md + - docs/models/errors/notfounderror.md + - docs/models/errors/notfound.md + - docs/models/errors/conflictcode.md + - docs/models/errors/conflicterror.md + - docs/models/errors/conflict.md + - docs/models/errors/inviteexpiredcode.md + - docs/models/errors/inviteexpirederror.md + - docs/models/errors/inviteexpired.md + - docs/models/errors/unprocessableentitycode.md + - docs/models/errors/unprocessableentityerror.md + - docs/models/errors/unprocessableentity.md + - docs/models/errors/ratelimitexceededcode.md + - docs/models/errors/ratelimitexceedederror.md + - docs/models/errors/ratelimitexceeded.md + - docs/models/errors/internalservererrorcode.md + - docs/models/errors/internalservererrorerror.md + - docs/models/errors/internalservererror.md + - docs/models/operations/queryparamtagids.md + - docs/models/operations/sort.md + - docs/models/operations/getlinksrequest.md + - docs/models/operations/tagids.md + - docs/models/operations/geo.md + - docs/models/operations/createlinkrequestbody.md + - docs/models/operations/getlinkscountqueryparamtagids.md + - docs/models/operations/two.md + - docs/models/operations/one.md + - docs/models/operations/groupby.md + - docs/models/operations/getlinkscountrequest.md + - docs/models/operations/getlinkinforequest.md + - docs/models/operations/editlinktagids.md + - docs/models/operations/editlinkgeo.md + - docs/models/operations/editlinkrequestbody.md + - docs/models/operations/editlinkrequest.md + - docs/models/operations/deletelinkrequest.md + - docs/models/operations/deletelinkresponsebody.md + - docs/models/operations/bulkcreatelinkstagids.md + - docs/models/operations/bulkcreatelinksgeo.md + - docs/models/operations/requestbody.md + - docs/models/operations/level.md + - docs/models/operations/getqrcoderequest.md + - docs/models/operations/interval.md + - docs/models/operations/country.md + - docs/models/operations/getclicksanalyticsrequest.md + - docs/models/operations/queryparaminterval.md + - docs/models/operations/queryparamcountry.md + - docs/models/operations/gettimeseriesanalyticsrequest.md + - docs/models/operations/responsebody.md + - docs/models/operations/getcountryanalyticsqueryparaminterval.md + - docs/models/operations/getcountryanalyticsqueryparamcountry.md + - docs/models/operations/getcountryanalyticsrequest.md + - docs/models/operations/getcountryanalyticscountry.md + - docs/models/operations/getcountryanalyticsresponsebody.md + - docs/models/operations/getcityanalyticsqueryparaminterval.md + - docs/models/operations/getcityanalyticsqueryparamcountry.md + - docs/models/operations/getcityanalyticsrequest.md + - docs/models/operations/getcityanalyticscountry.md + - docs/models/operations/getcityanalyticsresponsebody.md + - docs/models/operations/getdeviceanalyticsqueryparaminterval.md + - docs/models/operations/getdeviceanalyticsqueryparamcountry.md + - docs/models/operations/getdeviceanalyticsrequest.md + - docs/models/operations/getdeviceanalyticsresponsebody.md + - docs/models/operations/getbrowseranalyticsqueryparaminterval.md + - docs/models/operations/getbrowseranalyticsqueryparamcountry.md + - docs/models/operations/getbrowseranalyticsrequest.md + - docs/models/operations/getbrowseranalyticsresponsebody.md + - docs/models/operations/getosanalyticsqueryparaminterval.md + - docs/models/operations/getosanalyticsqueryparamcountry.md + - docs/models/operations/getosanalyticsrequest.md + - docs/models/operations/getosanalyticsresponsebody.md + - docs/models/operations/getrefereranalyticsqueryparaminterval.md + - docs/models/operations/getrefereranalyticsqueryparamcountry.md + - docs/models/operations/getrefereranalyticsrequest.md + - docs/models/operations/getrefereranalyticsresponsebody.md + - docs/models/operations/gettoplinksqueryparaminterval.md + - docs/models/operations/gettoplinksqueryparamcountry.md + - docs/models/operations/gettoplinksrequest.md + - docs/models/operations/gettoplinksresponsebody.md + - docs/models/operations/gettopurlsqueryparaminterval.md + - docs/models/operations/gettopurlsqueryparamcountry.md + - docs/models/operations/gettopurlsrequest.md + - docs/models/operations/gettopurlsresponsebody.md + - docs/models/operations/createworkspacerequestbody.md + - docs/models/operations/getworkspacerequest.md + - docs/models/operations/gettagsrequest.md + - docs/models/operations/color.md + - docs/models/operations/createtagrequestbody.md + - docs/models/operations/getmetatagsrequest.md + - docs/models/operations/getmetatagsresponsebody.md + - docs/sdks/dub/README.md + - docs/sdks/links/README.md + - docs/sdks/qrcodes/README.md + - docs/sdks/analytics/README.md + - docs/sdks/workspaces/README.md + - docs/sdks/tags/README.md + - docs/sdks/metatags/README.md + - USAGE.md + - .gitattributes + - src/hooks/hooks.ts + - src/hooks/types.ts + - src/hooks/index.ts diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml new file mode 100755 index 0000000..f2332b6 --- /dev/null +++ b/.speakeasy/gen.yaml @@ -0,0 +1,39 @@ +configVersion: 2.0.0 +generation: + sdkClassName: dub + maintainOpenAPIOrder: true + usageSnippets: + optionalPropertyRendering: withExample + useClassNamesForArrayFields: true + fixes: + nameResolutionDec2023: true + parameterOrderingFeb2024: true + requestResponseComponentNamesFeb2024: true + auth: + oAuth2ClientCredentialsEnabled: false +typescript: + version: 0.22.2 + additionalDependencies: + dependencies: {} + devDependencies: + '@types/node': ^20.12.7 + vitest: 1.4.0 + peerDependencies: {} + author: Dub + clientServerStatusCodesAsErrors: true + enumFormat: union + flattenGlobalSecurity: true + imports: + option: openapi + paths: + callbacks: models/callbacks + errors: models/errors + operations: models/operations + shared: models/components + webhooks: models/webhooks + inputModelSuffix: input + maxMethodParams: 0 + outputModelSuffix: output + packageName: dub + responseFormat: flat + templateVersion: v2 diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml new file mode 100644 index 0000000..fbf54db --- /dev/null +++ b/.speakeasy/workflow.yaml @@ -0,0 +1,12 @@ +workflowVersion: 1.0.0 +sources: + my-first-source: + inputs: + - location: https://api.dub.co +targets: + my-first-target: + target: typescript + source: my-first-source + publish: + npm: + token: $npm_token diff --git a/README.md b/README.md new file mode 100644 index 0000000..0c2ada8 --- /dev/null +++ b/README.md @@ -0,0 +1,360 @@ +# dub + +
+ + + + +
+ + +## SDK Installation + +### NPM + +```bash +npm add dub +``` + +### Yarn + +```bash +yarn add dub +``` + + + +## Requirements + +For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md). + + + +## SDK Example Usage + +### Example + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.links.list({ + tagIds: [""], + }); + + // Handle the result + console.log(result); +} + +run(); + +``` + + + +## Available Resources and Operations + +### [links](docs/sdks/links/README.md) + +* [list](docs/sdks/links/README.md#list) - Retrieve a list of links +* [create](docs/sdks/links/README.md#create) - Create a new link +* [count](docs/sdks/links/README.md#count) - Retrieve the number of links +* [get](docs/sdks/links/README.md#get) - Retrieve a link +* [update](docs/sdks/links/README.md#update) - Edit a link +* [delete](docs/sdks/links/README.md#delete) - Delete a link +* [createMany](docs/sdks/links/README.md#createmany) - Bulk create links + +### [qrCodes](docs/sdks/qrcodes/README.md) + +* [get](docs/sdks/qrcodes/README.md#get) - Retrieve a QR code + +### [analytics](docs/sdks/analytics/README.md) + +* [clicks](docs/sdks/analytics/README.md#clicks) - Retrieve clicks analytics +* [timeseries](docs/sdks/analytics/README.md#timeseries) - Retrieve timeseries analytics +* [countries](docs/sdks/analytics/README.md#countries) - Retrieve country analytics +* [cities](docs/sdks/analytics/README.md#cities) - Retrieve city analytics +* [devices](docs/sdks/analytics/README.md#devices) - Retrieve device analytics +* [browsers](docs/sdks/analytics/README.md#browsers) - Retrieve browser analytics +* [os](docs/sdks/analytics/README.md#os) - Retrieve OS analytics +* [referers](docs/sdks/analytics/README.md#referers) - Retrieve referer analytics +* [topLinks](docs/sdks/analytics/README.md#toplinks) - Retrieve top links +* [topUrls](docs/sdks/analytics/README.md#topurls) - Retrieve top URLs + +### [workspaces](docs/sdks/workspaces/README.md) + +* [list](docs/sdks/workspaces/README.md#list) - Retrieve a list of workspaces +* [create](docs/sdks/workspaces/README.md#create) - Create a workspace +* [get](docs/sdks/workspaces/README.md#get) - Retrieve a workspace + +### [tags](docs/sdks/tags/README.md) + +* [list](docs/sdks/tags/README.md#list) - Retrieve a list of tags +* [create](docs/sdks/tags/README.md#create) - Create a new tag + +### [metatags](docs/sdks/metatags/README.md) + +* [get](docs/sdks/metatags/README.md#get) - Retrieve the metatags for a URL + + + +## Error Handling + +All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type. + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging. + + +```typescript +import { Dub } from "dub"; +import * as errors from "dub/models/errors"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + let result; + try { + result = await sdk.links.list({ + tagIds: [""], + }); + } catch (err) { + switch (true) { + case err instanceof errors.SDKValidationError: { + // Validation errors can be pretty-printed + console.error(err.pretty()); + // Raw value may also be inspected + console.error(err.rawValue); + return; + } + case err instanceof errors.BadRequest: { + console.error(err); // handle exception + return; + } + case err instanceof errors.Unauthorized: { + console.error(err); // handle exception + return; + } + case err instanceof errors.Forbidden: { + console.error(err); // handle exception + return; + } + case err instanceof errors.NotFound: { + console.error(err); // handle exception + return; + } + case err instanceof errors.Conflict: { + console.error(err); // handle exception + return; + } + case err instanceof errors.InviteExpired: { + console.error(err); // handle exception + return; + } + case err instanceof errors.UnprocessableEntity: { + console.error(err); // handle exception + return; + } + case err instanceof errors.RateLimitExceeded: { + console.error(err); // handle exception + return; + } + case err instanceof errors.InternalServerError: { + console.error(err); // handle exception + return; + } + default: { + throw err; + } + } + } + + // Handle the result + console.log(result); +} + +run(); + +``` + + + +## Server Selection + +### Select Server by Index + +You can override the default server globally by passing a server index to the `serverIdx` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: + +| # | Server | Variables | +| - | ------ | --------- | +| 0 | `https://api.dub.co` | None | + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + serverIdx: 0, + token: "", + workspaceId: "", + }); + + const result = await sdk.links.list({ + tagIds: [""], + }); + + // Handle the result + console.log(result); +} + +run(); + +``` + + +### Override Server URL Per-Client + +The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example: + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + serverURL: "https://api.dub.co", + token: "", + workspaceId: "", + }); + + const result = await sdk.links.list({ + tagIds: [""], + }); + + // Handle the result + console.log(result); +} + +run(); + +``` + + + +## Custom HTTP Client + +The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native +[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This +client is a thin wrapper around `fetch` and provides the ability to attach hooks +around the request lifecycle that can be used to modify the request or handle +errors and response. + +The `HTTPClient` constructor takes an optional `fetcher` argument that can be +used to integrate a third-party HTTP client or when writing tests to mock out +the HTTP client and feed in fixtures. + +The following example shows how to use the `"beforeRequest"` hook to to add a +custom header and a timeout to requests and how to use the `"requestError"` hook +to log errors: + +```typescript +import { Dub } from "dub"; +import { HTTPClient } from "dub/lib/http"; + +const httpClient = new HTTPClient({ + // fetcher takes a function that has the same signature as native `fetch`. + fetcher: (request) => { + return fetch(request); + } +}); + +httpClient.addHook("beforeRequest", (request) => { + const nextRequest = new Request(request, { + signal: request.signal || AbortSignal.timeout(5000); + }); + + nextRequest.headers.set("x-custom-header", "custom value"); + + return nextRequest; +}); + +httpClient.addHook("requestError", (error, request) => { + console.group("Request Error"); + console.log("Reason:", `${error}`); + console.log("Endpoint:", `${request.method} ${request.url}`); + console.groupEnd(); +}); + +const sdk = new Dub({ httpClient }); +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| ----------- | ----------- | ----------- | +| `token` | http | HTTP Bearer | + +To authenticate with the API the `token` parameter must be set when initializing the SDK client instance. For example: +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.links.list({ + tagIds: [""], + }); + + // Handle the result + console.log(result); +} + +run(); + +``` + + + + +# Development + +## Maturity + +This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage +to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally +looking for the latest version. + +## Contributions + +While we value open-source contributions to this SDK, this library is generated programmatically. +Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release! + +### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks) diff --git a/RELEASES.md b/RELEASES.md new file mode 100644 index 0000000..6a8a997 --- /dev/null +++ b/RELEASES.md @@ -0,0 +1,79 @@ + + +## 2024-04-10 09:37:10 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.245.0 (2.301.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.20.0] . + +## 2024-04-10 09:52:35 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.245.0 (2.301.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.20.1] . +### Releases +- [NPM v0.20.1] https://www.npmjs.com/package/dub/v/0.20.1 - . + +## 2024-04-10 11:35:07 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.246.0 (2.302.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.20.2] . +### Releases +- [NPM v0.20.2] https://www.npmjs.com/package/dub/v/0.20.2 - . + +## 2024-04-10 16:28:04 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.246.1 (2.302.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.20.3] . +### Releases +- [NPM v0.20.3] https://www.npmjs.com/package/dub/v/0.20.3 - . + +## 2024-04-11 09:53:32 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.246.1 (2.302.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.21.0] . +### Releases +- [NPM v0.21.0] https://www.npmjs.com/package/dub/v/0.21.0 - . + +## 2024-04-11 11:04:25 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.246.1 (2.302.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.22.0] . +### Releases +- [NPM v0.22.0] https://www.npmjs.com/package/dub/v/0.22.0 - . + +## 2024-04-11 17:45:24 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.250.0 (2.304.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.22.1] . +### Releases +- [NPM v0.22.1] https://www.npmjs.com/package/dub/v/0.22.1 - . + +## 2024-04-11 19:45:03 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.250.0 (2.304.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.22.2] . +### Releases +- [NPM v0.22.2] https://www.npmjs.com/package/dub/v/0.22.2 - . \ No newline at end of file diff --git a/RUNTIMES.md b/RUNTIMES.md new file mode 100644 index 0000000..71fa3da --- /dev/null +++ b/RUNTIMES.md @@ -0,0 +1,22 @@ +# Supported JavaScript runtimes + +This SDK is intended to be used in JavaScript runtimes that support the following features: + +* [Web Fetch API][web-fetch] +* [Web Streams API](web-streams) and in particular `ReadableStream` +* [Async iterables][async-iter] using `Symbol.asyncIterator` + +[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API +[web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API +[async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols + +Runtime environments that are explicitly supported are: + +- Evergreen browsers which include: Chrome, Safari, Edge, Firefox +- Node.js active and maintenance LTS releases + - Currently, this is v18 and v20 +- Bun v1 and above +- Deno v1.39 + - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming]) + +[deno-file-streaming]: https://github.com/denoland/deno/issues/11018 diff --git a/USAGE.md b/USAGE.md new file mode 100644 index 0000000..9065849 --- /dev/null +++ b/USAGE.md @@ -0,0 +1,22 @@ + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.links.list({ + tagIds: [""], + }); + + // Handle the result + console.log(result); +} + +run(); + +``` + \ No newline at end of file diff --git a/docs/models/components/color.md b/docs/models/components/color.md new file mode 100644 index 0000000..daf69eb --- /dev/null +++ b/docs/models/components/color.md @@ -0,0 +1,16 @@ +# Color + +The color of the tag. + + +## Values + +| Name | Value | +| -------- | -------- | +| `Red` | red | +| `Yellow` | yellow | +| `Green` | green | +| `Blue` | blue | +| `Purple` | purple | +| `Pink` | pink | +| `Brown` | brown | \ No newline at end of file diff --git a/docs/models/components/domains.md b/docs/models/components/domains.md new file mode 100644 index 0000000..0ef224a --- /dev/null +++ b/docs/models/components/domains.md @@ -0,0 +1,9 @@ +# Domains + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `slug` | *string* | :heavy_check_mark: | The domain of the workspace. | +| `primary` | *boolean* | :heavy_check_mark: | Indicates if the domain is the primary domain. | \ No newline at end of file diff --git a/docs/models/components/geo.md b/docs/models/components/geo.md new file mode 100644 index 0000000..e486745 --- /dev/null +++ b/docs/models/components/geo.md @@ -0,0 +1,259 @@ +# Geo + +Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `af` | *string* | :heavy_minus_sign: | N/A | +| `al` | *string* | :heavy_minus_sign: | N/A | +| `dz` | *string* | :heavy_minus_sign: | N/A | +| `as` | *string* | :heavy_minus_sign: | N/A | +| `ad` | *string* | :heavy_minus_sign: | N/A | +| `ao` | *string* | :heavy_minus_sign: | N/A | +| `ai` | *string* | :heavy_minus_sign: | N/A | +| `aq` | *string* | :heavy_minus_sign: | N/A | +| `ag` | *string* | :heavy_minus_sign: | N/A | +| `ar` | *string* | :heavy_minus_sign: | N/A | +| `am` | *string* | :heavy_minus_sign: | N/A | +| `aw` | *string* | :heavy_minus_sign: | N/A | +| `au` | *string* | :heavy_minus_sign: | N/A | +| `at` | *string* | :heavy_minus_sign: | N/A | +| `az` | *string* | :heavy_minus_sign: | N/A | +| `bs` | *string* | :heavy_minus_sign: | N/A | +| `bh` | *string* | :heavy_minus_sign: | N/A | +| `bd` | *string* | :heavy_minus_sign: | N/A | +| `bb` | *string* | :heavy_minus_sign: | N/A | +| `by` | *string* | :heavy_minus_sign: | N/A | +| `be` | *string* | :heavy_minus_sign: | N/A | +| `bz` | *string* | :heavy_minus_sign: | N/A | +| `bj` | *string* | :heavy_minus_sign: | N/A | +| `bm` | *string* | :heavy_minus_sign: | N/A | +| `bt` | *string* | :heavy_minus_sign: | N/A | +| `bo` | *string* | :heavy_minus_sign: | N/A | +| `ba` | *string* | :heavy_minus_sign: | N/A | +| `bw` | *string* | :heavy_minus_sign: | N/A | +| `bv` | *string* | :heavy_minus_sign: | N/A | +| `br` | *string* | :heavy_minus_sign: | N/A | +| `io` | *string* | :heavy_minus_sign: | N/A | +| `bn` | *string* | :heavy_minus_sign: | N/A | +| `bg` | *string* | :heavy_minus_sign: | N/A | +| `bf` | *string* | :heavy_minus_sign: | N/A | +| `bi` | *string* | :heavy_minus_sign: | N/A | +| `kh` | *string* | :heavy_minus_sign: | N/A | +| `cm` | *string* | :heavy_minus_sign: | N/A | +| `ca` | *string* | :heavy_minus_sign: | N/A | +| `cv` | *string* | :heavy_minus_sign: | N/A | +| `ky` | *string* | :heavy_minus_sign: | N/A | +| `cf` | *string* | :heavy_minus_sign: | N/A | +| `td` | *string* | :heavy_minus_sign: | N/A | +| `cl` | *string* | :heavy_minus_sign: | N/A | +| `cn` | *string* | :heavy_minus_sign: | N/A | +| `cx` | *string* | :heavy_minus_sign: | N/A | +| `cc` | *string* | :heavy_minus_sign: | N/A | +| `co` | *string* | :heavy_minus_sign: | N/A | +| `km` | *string* | :heavy_minus_sign: | N/A | +| `cg` | *string* | :heavy_minus_sign: | N/A | +| `cd` | *string* | :heavy_minus_sign: | N/A | +| `ck` | *string* | :heavy_minus_sign: | N/A | +| `cr` | *string* | :heavy_minus_sign: | N/A | +| `ci` | *string* | :heavy_minus_sign: | N/A | +| `hr` | *string* | :heavy_minus_sign: | N/A | +| `cu` | *string* | :heavy_minus_sign: | N/A | +| `cy` | *string* | :heavy_minus_sign: | N/A | +| `cz` | *string* | :heavy_minus_sign: | N/A | +| `dk` | *string* | :heavy_minus_sign: | N/A | +| `dj` | *string* | :heavy_minus_sign: | N/A | +| `dm` | *string* | :heavy_minus_sign: | N/A | +| `do` | *string* | :heavy_minus_sign: | N/A | +| `ec` | *string* | :heavy_minus_sign: | N/A | +| `eg` | *string* | :heavy_minus_sign: | N/A | +| `sv` | *string* | :heavy_minus_sign: | N/A | +| `gq` | *string* | :heavy_minus_sign: | N/A | +| `er` | *string* | :heavy_minus_sign: | N/A | +| `ee` | *string* | :heavy_minus_sign: | N/A | +| `et` | *string* | :heavy_minus_sign: | N/A | +| `fk` | *string* | :heavy_minus_sign: | N/A | +| `fo` | *string* | :heavy_minus_sign: | N/A | +| `fj` | *string* | :heavy_minus_sign: | N/A | +| `fi` | *string* | :heavy_minus_sign: | N/A | +| `fr` | *string* | :heavy_minus_sign: | N/A | +| `gf` | *string* | :heavy_minus_sign: | N/A | +| `pf` | *string* | :heavy_minus_sign: | N/A | +| `tf` | *string* | :heavy_minus_sign: | N/A | +| `ga` | *string* | :heavy_minus_sign: | N/A | +| `gm` | *string* | :heavy_minus_sign: | N/A | +| `ge` | *string* | :heavy_minus_sign: | N/A | +| `de` | *string* | :heavy_minus_sign: | N/A | +| `gh` | *string* | :heavy_minus_sign: | N/A | +| `gi` | *string* | :heavy_minus_sign: | N/A | +| `gr` | *string* | :heavy_minus_sign: | N/A | +| `gl` | *string* | :heavy_minus_sign: | N/A | +| `gd` | *string* | :heavy_minus_sign: | N/A | +| `gp` | *string* | :heavy_minus_sign: | N/A | +| `gu` | *string* | :heavy_minus_sign: | N/A | +| `gt` | *string* | :heavy_minus_sign: | N/A | +| `gn` | *string* | :heavy_minus_sign: | N/A | +| `gw` | *string* | :heavy_minus_sign: | N/A | +| `gy` | *string* | :heavy_minus_sign: | N/A | +| `ht` | *string* | :heavy_minus_sign: | N/A | +| `hm` | *string* | :heavy_minus_sign: | N/A | +| `va` | *string* | :heavy_minus_sign: | N/A | +| `hn` | *string* | :heavy_minus_sign: | N/A | +| `hk` | *string* | :heavy_minus_sign: | N/A | +| `hu` | *string* | :heavy_minus_sign: | N/A | +| `is` | *string* | :heavy_minus_sign: | N/A | +| `in` | *string* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `ir` | *string* | :heavy_minus_sign: | N/A | +| `iq` | *string* | :heavy_minus_sign: | N/A | +| `ie` | *string* | :heavy_minus_sign: | N/A | +| `il` | *string* | :heavy_minus_sign: | N/A | +| `it` | *string* | :heavy_minus_sign: | N/A | +| `jm` | *string* | :heavy_minus_sign: | N/A | +| `jp` | *string* | :heavy_minus_sign: | N/A | +| `jo` | *string* | :heavy_minus_sign: | N/A | +| `kz` | *string* | :heavy_minus_sign: | N/A | +| `ke` | *string* | :heavy_minus_sign: | N/A | +| `ki` | *string* | :heavy_minus_sign: | N/A | +| `kp` | *string* | :heavy_minus_sign: | N/A | +| `kr` | *string* | :heavy_minus_sign: | N/A | +| `kw` | *string* | :heavy_minus_sign: | N/A | +| `kg` | *string* | :heavy_minus_sign: | N/A | +| `la` | *string* | :heavy_minus_sign: | N/A | +| `lv` | *string* | :heavy_minus_sign: | N/A | +| `lb` | *string* | :heavy_minus_sign: | N/A | +| `ls` | *string* | :heavy_minus_sign: | N/A | +| `lr` | *string* | :heavy_minus_sign: | N/A | +| `ly` | *string* | :heavy_minus_sign: | N/A | +| `li` | *string* | :heavy_minus_sign: | N/A | +| `lt` | *string* | :heavy_minus_sign: | N/A | +| `lu` | *string* | :heavy_minus_sign: | N/A | +| `mo` | *string* | :heavy_minus_sign: | N/A | +| `mg` | *string* | :heavy_minus_sign: | N/A | +| `mw` | *string* | :heavy_minus_sign: | N/A | +| `my` | *string* | :heavy_minus_sign: | N/A | +| `mv` | *string* | :heavy_minus_sign: | N/A | +| `ml` | *string* | :heavy_minus_sign: | N/A | +| `mt` | *string* | :heavy_minus_sign: | N/A | +| `mh` | *string* | :heavy_minus_sign: | N/A | +| `mq` | *string* | :heavy_minus_sign: | N/A | +| `mr` | *string* | :heavy_minus_sign: | N/A | +| `mu` | *string* | :heavy_minus_sign: | N/A | +| `yt` | *string* | :heavy_minus_sign: | N/A | +| `mx` | *string* | :heavy_minus_sign: | N/A | +| `fm` | *string* | :heavy_minus_sign: | N/A | +| `md` | *string* | :heavy_minus_sign: | N/A | +| `mc` | *string* | :heavy_minus_sign: | N/A | +| `mn` | *string* | :heavy_minus_sign: | N/A | +| `ms` | *string* | :heavy_minus_sign: | N/A | +| `ma` | *string* | :heavy_minus_sign: | N/A | +| `mz` | *string* | :heavy_minus_sign: | N/A | +| `mm` | *string* | :heavy_minus_sign: | N/A | +| `na` | *string* | :heavy_minus_sign: | N/A | +| `nr` | *string* | :heavy_minus_sign: | N/A | +| `np` | *string* | :heavy_minus_sign: | N/A | +| `nl` | *string* | :heavy_minus_sign: | N/A | +| `nc` | *string* | :heavy_minus_sign: | N/A | +| `nz` | *string* | :heavy_minus_sign: | N/A | +| `ni` | *string* | :heavy_minus_sign: | N/A | +| `ne` | *string* | :heavy_minus_sign: | N/A | +| `ng` | *string* | :heavy_minus_sign: | N/A | +| `nu` | *string* | :heavy_minus_sign: | N/A | +| `nf` | *string* | :heavy_minus_sign: | N/A | +| `mk` | *string* | :heavy_minus_sign: | N/A | +| `mp` | *string* | :heavy_minus_sign: | N/A | +| `no` | *string* | :heavy_minus_sign: | N/A | +| `om` | *string* | :heavy_minus_sign: | N/A | +| `pk` | *string* | :heavy_minus_sign: | N/A | +| `pw` | *string* | :heavy_minus_sign: | N/A | +| `ps` | *string* | :heavy_minus_sign: | N/A | +| `pa` | *string* | :heavy_minus_sign: | N/A | +| `pg` | *string* | :heavy_minus_sign: | N/A | +| `py` | *string* | :heavy_minus_sign: | N/A | +| `pe` | *string* | :heavy_minus_sign: | N/A | +| `ph` | *string* | :heavy_minus_sign: | N/A | +| `pn` | *string* | :heavy_minus_sign: | N/A | +| `pl` | *string* | :heavy_minus_sign: | N/A | +| `pt` | *string* | :heavy_minus_sign: | N/A | +| `pr` | *string* | :heavy_minus_sign: | N/A | +| `qa` | *string* | :heavy_minus_sign: | N/A | +| `re` | *string* | :heavy_minus_sign: | N/A | +| `ro` | *string* | :heavy_minus_sign: | N/A | +| `ru` | *string* | :heavy_minus_sign: | N/A | +| `rw` | *string* | :heavy_minus_sign: | N/A | +| `sh` | *string* | :heavy_minus_sign: | N/A | +| `kn` | *string* | :heavy_minus_sign: | N/A | +| `lc` | *string* | :heavy_minus_sign: | N/A | +| `pm` | *string* | :heavy_minus_sign: | N/A | +| `vc` | *string* | :heavy_minus_sign: | N/A | +| `ws` | *string* | :heavy_minus_sign: | N/A | +| `sm` | *string* | :heavy_minus_sign: | N/A | +| `st` | *string* | :heavy_minus_sign: | N/A | +| `sa` | *string* | :heavy_minus_sign: | N/A | +| `sn` | *string* | :heavy_minus_sign: | N/A | +| `sc` | *string* | :heavy_minus_sign: | N/A | +| `sl` | *string* | :heavy_minus_sign: | N/A | +| `sg` | *string* | :heavy_minus_sign: | N/A | +| `sk` | *string* | :heavy_minus_sign: | N/A | +| `si` | *string* | :heavy_minus_sign: | N/A | +| `sb` | *string* | :heavy_minus_sign: | N/A | +| `so` | *string* | :heavy_minus_sign: | N/A | +| `za` | *string* | :heavy_minus_sign: | N/A | +| `gs` | *string* | :heavy_minus_sign: | N/A | +| `es` | *string* | :heavy_minus_sign: | N/A | +| `lk` | *string* | :heavy_minus_sign: | N/A | +| `sd` | *string* | :heavy_minus_sign: | N/A | +| `sr` | *string* | :heavy_minus_sign: | N/A | +| `sj` | *string* | :heavy_minus_sign: | N/A | +| `sz` | *string* | :heavy_minus_sign: | N/A | +| `se` | *string* | :heavy_minus_sign: | N/A | +| `ch` | *string* | :heavy_minus_sign: | N/A | +| `sy` | *string* | :heavy_minus_sign: | N/A | +| `tw` | *string* | :heavy_minus_sign: | N/A | +| `tj` | *string* | :heavy_minus_sign: | N/A | +| `tz` | *string* | :heavy_minus_sign: | N/A | +| `th` | *string* | :heavy_minus_sign: | N/A | +| `tl` | *string* | :heavy_minus_sign: | N/A | +| `tg` | *string* | :heavy_minus_sign: | N/A | +| `tk` | *string* | :heavy_minus_sign: | N/A | +| `to` | *string* | :heavy_minus_sign: | N/A | +| `tt` | *string* | :heavy_minus_sign: | N/A | +| `tn` | *string* | :heavy_minus_sign: | N/A | +| `tr` | *string* | :heavy_minus_sign: | N/A | +| `tm` | *string* | :heavy_minus_sign: | N/A | +| `tc` | *string* | :heavy_minus_sign: | N/A | +| `tv` | *string* | :heavy_minus_sign: | N/A | +| `ug` | *string* | :heavy_minus_sign: | N/A | +| `ua` | *string* | :heavy_minus_sign: | N/A | +| `ae` | *string* | :heavy_minus_sign: | N/A | +| `gb` | *string* | :heavy_minus_sign: | N/A | +| `us` | *string* | :heavy_minus_sign: | N/A | +| `um` | *string* | :heavy_minus_sign: | N/A | +| `uy` | *string* | :heavy_minus_sign: | N/A | +| `uz` | *string* | :heavy_minus_sign: | N/A | +| `vu` | *string* | :heavy_minus_sign: | N/A | +| `ve` | *string* | :heavy_minus_sign: | N/A | +| `vn` | *string* | :heavy_minus_sign: | N/A | +| `vg` | *string* | :heavy_minus_sign: | N/A | +| `vi` | *string* | :heavy_minus_sign: | N/A | +| `wf` | *string* | :heavy_minus_sign: | N/A | +| `eh` | *string* | :heavy_minus_sign: | N/A | +| `ye` | *string* | :heavy_minus_sign: | N/A | +| `zm` | *string* | :heavy_minus_sign: | N/A | +| `zw` | *string* | :heavy_minus_sign: | N/A | +| `ax` | *string* | :heavy_minus_sign: | N/A | +| `bq` | *string* | :heavy_minus_sign: | N/A | +| `cw` | *string* | :heavy_minus_sign: | N/A | +| `gg` | *string* | :heavy_minus_sign: | N/A | +| `im` | *string* | :heavy_minus_sign: | N/A | +| `je` | *string* | :heavy_minus_sign: | N/A | +| `me` | *string* | :heavy_minus_sign: | N/A | +| `bl` | *string* | :heavy_minus_sign: | N/A | +| `mf` | *string* | :heavy_minus_sign: | N/A | +| `rs` | *string* | :heavy_minus_sign: | N/A | +| `sx` | *string* | :heavy_minus_sign: | N/A | +| `ss` | *string* | :heavy_minus_sign: | N/A | +| `xk` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/linkschema.md b/docs/models/components/linkschema.md new file mode 100644 index 0000000..4264a44 --- /dev/null +++ b/docs/models/components/linkschema.md @@ -0,0 +1,41 @@ +# LinkSchema + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link. | +| `domain` | *string* | :heavy_check_mark: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | +| `key` | *string* | :heavy_check_mark: | The short link slug. If not provided, a random 7-character slug will be generated. | +| `url` | *string* | :heavy_check_mark: | The destination URL of the short link. | +| `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. | +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The date and time when the short link will expire in ISO-8601 format. | +| `expiredUrl` | *string* | :heavy_check_mark: | The URL to redirect to when the short link has expired. | +| `password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | +| `proxy` | *boolean* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | +| `title` | *string* | :heavy_check_mark: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `description` | *string* | :heavy_check_mark: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `image` | *string* | :heavy_check_mark: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | +| `ios` | *string* | :heavy_check_mark: | The iOS destination URL for the short link for iOS device targeting. | +| `android` | *string* | :heavy_check_mark: | The Android destination URL for the short link for Android device targeting. | +| `geo` | [components.Geo](../../models/components/geo.md) | :heavy_check_mark: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo | +| `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | +| ~~`tagId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. | +| `tags` | [components.TagSchema](../../models/components/tagschema.md)[] | :heavy_check_mark: | The tags assigned to the short link. | +| `comments` | *string* | :heavy_check_mark: | The comments for the short link. | +| `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | +| `qrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | +| `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | +| `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | +| `utmCampaign` | *string* | :heavy_check_mark: | The UTM campaign of the short link. | +| `utmTerm` | *string* | :heavy_check_mark: | The UTM term of the short link. | +| `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | +| `userId` | *string* | :heavy_check_mark: | The user ID of the creator of the short link. | +| `workspaceId` | *string* | :heavy_check_mark: | The workspace ID of the short link. | +| `clicks` | *number* | :heavy_minus_sign: | The number of clicks on the short link. | +| `lastClicked` | *string* | :heavy_check_mark: | The date and time when the short link was last clicked. | +| `createdAt` | *string* | :heavy_check_mark: | The date and time when the short link was created. | +| `updatedAt` | *string* | :heavy_check_mark: | The date and time when the short link was last updated. | +| ~~`projectId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The project ID of the short link. This field is deprecated – use `workspaceId` instead. | \ No newline at end of file diff --git a/docs/models/components/plan.md b/docs/models/components/plan.md new file mode 100644 index 0000000..4fa64b4 --- /dev/null +++ b/docs/models/components/plan.md @@ -0,0 +1,16 @@ +# Plan + +The plan of the workspace. + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `Free` | free | +| `Pro` | pro | +| `Business` | business | +| `BusinessPlus` | business plus | +| `BusinessExtra` | business extra | +| `BusinessMax` | business max | +| `Enterprise` | enterprise | \ No newline at end of file diff --git a/docs/models/components/role.md b/docs/models/components/role.md new file mode 100644 index 0000000..b31a2d0 --- /dev/null +++ b/docs/models/components/role.md @@ -0,0 +1,11 @@ +# Role + +The role of the authenticated user in the workspace. + + +## Values + +| Name | Value | +| -------- | -------- | +| `Owner` | owner | +| `Member` | member | \ No newline at end of file diff --git a/docs/models/components/security.md b/docs/models/components/security.md new file mode 100644 index 0000000..4100ff7 --- /dev/null +++ b/docs/models/components/security.md @@ -0,0 +1,8 @@ +# Security + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `token` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/tagschema.md b/docs/models/components/tagschema.md new file mode 100644 index 0000000..ecebdfb --- /dev/null +++ b/docs/models/components/tagschema.md @@ -0,0 +1,10 @@ +# TagSchema + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the tag. | +| `name` | *string* | :heavy_check_mark: | The name of the tag. | +| `color` | [components.Color](../../models/components/color.md) | :heavy_check_mark: | The color of the tag. | \ No newline at end of file diff --git a/docs/models/components/users.md b/docs/models/components/users.md new file mode 100644 index 0000000..785c101 --- /dev/null +++ b/docs/models/components/users.md @@ -0,0 +1,8 @@ +# Users + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `role` | [components.Role](../../models/components/role.md) | :heavy_check_mark: | The role of the authenticated user in the workspace. | \ No newline at end of file diff --git a/docs/models/components/workspaceschema.md b/docs/models/components/workspaceschema.md new file mode 100644 index 0000000..7924e62 --- /dev/null +++ b/docs/models/components/workspaceschema.md @@ -0,0 +1,24 @@ +# WorkspaceSchema + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | The unique ID of the workspace. | +| `name` | *string* | :heavy_check_mark: | The name of the workspace. | +| `slug` | *string* | :heavy_check_mark: | The slug of the workspace. | +| `logo` | *string* | :heavy_minus_sign: | The logo of the workspace. | +| `usage` | *number* | :heavy_check_mark: | The usage of the workspace. | +| `usageLimit` | *number* | :heavy_check_mark: | The usage limit of the workspace. | +| `linksUsage` | *number* | :heavy_check_mark: | The links usage of the workspace. | +| `linksLimit` | *number* | :heavy_check_mark: | The links limit of the workspace. | +| `domainsLimit` | *number* | :heavy_check_mark: | The domains limit of the workspace. | +| `tagsLimit` | *number* | :heavy_check_mark: | The tags limit of the workspace. | +| `usersLimit` | *number* | :heavy_check_mark: | The users limit of the workspace. | +| `plan` | [components.Plan](../../models/components/plan.md) | :heavy_check_mark: | The plan of the workspace. | +| `stripeId` | *string* | :heavy_check_mark: | The Stripe ID of the workspace. | +| `billingCycleStart` | *number* | :heavy_check_mark: | The date and time when the billing cycle starts for the workspace. | +| `createdAt` | *string* | :heavy_check_mark: | The date and time when the workspace was created. | +| `users` | [components.Users](../../models/components/users.md)[] | :heavy_check_mark: | The role of the authenticated user in the workspace. | +| `domains` | [components.Domains](../../models/components/domains.md)[] | :heavy_check_mark: | The domains of the workspace. | \ No newline at end of file diff --git a/docs/models/errors/badrequest.md b/docs/models/errors/badrequest.md new file mode 100644 index 0000000..fb4f9cd --- /dev/null +++ b/docs/models/errors/badrequest.md @@ -0,0 +1,10 @@ +# BadRequest + +The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `error` | [errors.ErrorT](../../models/errors/errort.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/code.md b/docs/models/errors/code.md new file mode 100644 index 0000000..a9b8b0e --- /dev/null +++ b/docs/models/errors/code.md @@ -0,0 +1,10 @@ +# Code + +A short code indicating the error code returned. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `BadRequest` | bad_request | \ No newline at end of file diff --git a/docs/models/errors/conflict.md b/docs/models/errors/conflict.md new file mode 100644 index 0000000..0d34b80 --- /dev/null +++ b/docs/models/errors/conflict.md @@ -0,0 +1,10 @@ +# Conflict + +This response is sent when a request conflicts with the current state of the server. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `error` | [errors.ConflictError](../../models/errors/conflicterror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/conflictcode.md b/docs/models/errors/conflictcode.md new file mode 100644 index 0000000..926a204 --- /dev/null +++ b/docs/models/errors/conflictcode.md @@ -0,0 +1,10 @@ +# ConflictCode + +A short code indicating the error code returned. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Conflict` | conflict | \ No newline at end of file diff --git a/docs/models/errors/conflicterror.md b/docs/models/errors/conflicterror.md new file mode 100644 index 0000000..8434be8 --- /dev/null +++ b/docs/models/errors/conflicterror.md @@ -0,0 +1,10 @@ +# ConflictError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | [errors.ConflictCode](../../models/errors/conflictcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | conflict | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#conflict | \ No newline at end of file diff --git a/docs/models/errors/errort.md b/docs/models/errors/errort.md new file mode 100644 index 0000000..b8b44f2 --- /dev/null +++ b/docs/models/errors/errort.md @@ -0,0 +1,10 @@ +# ErrorT + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | [errors.Code](../../models/errors/code.md) | :heavy_check_mark: | A short code indicating the error code returned. | bad_request | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#bad_request | \ No newline at end of file diff --git a/docs/models/errors/forbidden.md b/docs/models/errors/forbidden.md new file mode 100644 index 0000000..1017e84 --- /dev/null +++ b/docs/models/errors/forbidden.md @@ -0,0 +1,10 @@ +# Forbidden + +The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `error` | [errors.ForbiddenError](../../models/errors/forbiddenerror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/forbiddencode.md b/docs/models/errors/forbiddencode.md new file mode 100644 index 0000000..85694c2 --- /dev/null +++ b/docs/models/errors/forbiddencode.md @@ -0,0 +1,10 @@ +# ForbiddenCode + +A short code indicating the error code returned. + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Forbidden` | forbidden | \ No newline at end of file diff --git a/docs/models/errors/forbiddenerror.md b/docs/models/errors/forbiddenerror.md new file mode 100644 index 0000000..66e5641 --- /dev/null +++ b/docs/models/errors/forbiddenerror.md @@ -0,0 +1,10 @@ +# ForbiddenError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | [errors.ForbiddenCode](../../models/errors/forbiddencode.md) | :heavy_check_mark: | A short code indicating the error code returned. | forbidden | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#forbidden | \ No newline at end of file diff --git a/docs/models/errors/internalservererror.md b/docs/models/errors/internalservererror.md new file mode 100644 index 0000000..7809e04 --- /dev/null +++ b/docs/models/errors/internalservererror.md @@ -0,0 +1,10 @@ +# InternalServerError + +The server has encountered a situation it does not know how to handle. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `error` | [errors.InternalServerErrorError](../../models/errors/internalservererrorerror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/internalservererrorcode.md b/docs/models/errors/internalservererrorcode.md new file mode 100644 index 0000000..62dac56 --- /dev/null +++ b/docs/models/errors/internalservererrorcode.md @@ -0,0 +1,10 @@ +# InternalServerErrorCode + +A short code indicating the error code returned. + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `InternalServerError` | internal_server_error | \ No newline at end of file diff --git a/docs/models/errors/internalservererrorerror.md b/docs/models/errors/internalservererrorerror.md new file mode 100644 index 0000000..3568e6d --- /dev/null +++ b/docs/models/errors/internalservererrorerror.md @@ -0,0 +1,10 @@ +# InternalServerErrorError + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `code` | [errors.InternalServerErrorCode](../../models/errors/internalservererrorcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | internal_server_error | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#internal_server_error | \ No newline at end of file diff --git a/docs/models/errors/inviteexpired.md b/docs/models/errors/inviteexpired.md new file mode 100644 index 0000000..ff6b95d --- /dev/null +++ b/docs/models/errors/inviteexpired.md @@ -0,0 +1,10 @@ +# InviteExpired + +This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `error` | [errors.InviteExpiredError](../../models/errors/inviteexpirederror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/inviteexpiredcode.md b/docs/models/errors/inviteexpiredcode.md new file mode 100644 index 0000000..6b3fed2 --- /dev/null +++ b/docs/models/errors/inviteexpiredcode.md @@ -0,0 +1,10 @@ +# InviteExpiredCode + +A short code indicating the error code returned. + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `InviteExpired` | invite_expired | \ No newline at end of file diff --git a/docs/models/errors/inviteexpirederror.md b/docs/models/errors/inviteexpirederror.md new file mode 100644 index 0000000..31f1382 --- /dev/null +++ b/docs/models/errors/inviteexpirederror.md @@ -0,0 +1,10 @@ +# InviteExpiredError + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `code` | [errors.InviteExpiredCode](../../models/errors/inviteexpiredcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | invite_expired | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#invite_expired | \ No newline at end of file diff --git a/docs/models/errors/notfound.md b/docs/models/errors/notfound.md new file mode 100644 index 0000000..6d228ba --- /dev/null +++ b/docs/models/errors/notfound.md @@ -0,0 +1,10 @@ +# NotFound + +The server cannot find the requested resource. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `error` | [errors.NotFoundError](../../models/errors/notfounderror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/notfoundcode.md b/docs/models/errors/notfoundcode.md new file mode 100644 index 0000000..f30e73d --- /dev/null +++ b/docs/models/errors/notfoundcode.md @@ -0,0 +1,10 @@ +# NotFoundCode + +A short code indicating the error code returned. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `NotFound` | not_found | \ No newline at end of file diff --git a/docs/models/errors/notfounderror.md b/docs/models/errors/notfounderror.md new file mode 100644 index 0000000..340439d --- /dev/null +++ b/docs/models/errors/notfounderror.md @@ -0,0 +1,10 @@ +# NotFoundError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | [errors.NotFoundCode](../../models/errors/notfoundcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | not_found | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#not_found | \ No newline at end of file diff --git a/docs/models/errors/ratelimitexceeded.md b/docs/models/errors/ratelimitexceeded.md new file mode 100644 index 0000000..dcbf2f8 --- /dev/null +++ b/docs/models/errors/ratelimitexceeded.md @@ -0,0 +1,10 @@ +# RateLimitExceeded + +The user has sent too many requests in a given amount of time ("rate limiting") + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `error` | [errors.RateLimitExceededError](../../models/errors/ratelimitexceedederror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/ratelimitexceededcode.md b/docs/models/errors/ratelimitexceededcode.md new file mode 100644 index 0000000..fafbd54 --- /dev/null +++ b/docs/models/errors/ratelimitexceededcode.md @@ -0,0 +1,10 @@ +# RateLimitExceededCode + +A short code indicating the error code returned. + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `RateLimitExceeded` | rate_limit_exceeded | \ No newline at end of file diff --git a/docs/models/errors/ratelimitexceedederror.md b/docs/models/errors/ratelimitexceedederror.md new file mode 100644 index 0000000..db87525 --- /dev/null +++ b/docs/models/errors/ratelimitexceedederror.md @@ -0,0 +1,10 @@ +# RateLimitExceededError + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `code` | [errors.RateLimitExceededCode](../../models/errors/ratelimitexceededcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | rate_limit_exceeded | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#rate_limit_exceeded | \ No newline at end of file diff --git a/docs/models/errors/unauthorized.md b/docs/models/errors/unauthorized.md new file mode 100644 index 0000000..73b3e0a --- /dev/null +++ b/docs/models/errors/unauthorized.md @@ -0,0 +1,10 @@ +# Unauthorized + +Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `error` | [errors.UnauthorizedError](../../models/errors/unauthorizederror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/unauthorizedcode.md b/docs/models/errors/unauthorizedcode.md new file mode 100644 index 0000000..91777d3 --- /dev/null +++ b/docs/models/errors/unauthorizedcode.md @@ -0,0 +1,10 @@ +# UnauthorizedCode + +A short code indicating the error code returned. + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `Unauthorized` | unauthorized | \ No newline at end of file diff --git a/docs/models/errors/unauthorizederror.md b/docs/models/errors/unauthorizederror.md new file mode 100644 index 0000000..705b175 --- /dev/null +++ b/docs/models/errors/unauthorizederror.md @@ -0,0 +1,10 @@ +# UnauthorizedError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | [errors.UnauthorizedCode](../../models/errors/unauthorizedcode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unauthorized | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unauthorized | \ No newline at end of file diff --git a/docs/models/errors/unprocessableentity.md b/docs/models/errors/unprocessableentity.md new file mode 100644 index 0000000..eeec3f3 --- /dev/null +++ b/docs/models/errors/unprocessableentity.md @@ -0,0 +1,10 @@ +# UnprocessableEntity + +The request was well-formed but was unable to be followed due to semantic errors. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `error` | [errors.UnprocessableEntityError](../../models/errors/unprocessableentityerror.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/unprocessableentitycode.md b/docs/models/errors/unprocessableentitycode.md new file mode 100644 index 0000000..5076e55 --- /dev/null +++ b/docs/models/errors/unprocessableentitycode.md @@ -0,0 +1,10 @@ +# UnprocessableEntityCode + +A short code indicating the error code returned. + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `UnprocessableEntity` | unprocessable_entity | \ No newline at end of file diff --git a/docs/models/errors/unprocessableentityerror.md b/docs/models/errors/unprocessableentityerror.md new file mode 100644 index 0000000..40c7ee9 --- /dev/null +++ b/docs/models/errors/unprocessableentityerror.md @@ -0,0 +1,10 @@ +# UnprocessableEntityError + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `code` | [errors.UnprocessableEntityCode](../../models/errors/unprocessableentitycode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unprocessable_entity | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unprocessable_entity | \ No newline at end of file diff --git a/docs/models/operations/bulkcreatelinksgeo.md b/docs/models/operations/bulkcreatelinksgeo.md new file mode 100644 index 0000000..b9580dd --- /dev/null +++ b/docs/models/operations/bulkcreatelinksgeo.md @@ -0,0 +1,259 @@ +# BulkCreateLinksGeo + +Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `af` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `al` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `as` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ad` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ao` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ai` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `aq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ag` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ar` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `am` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `aw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `au` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `at` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `az` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bs` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `by` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `be` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ba` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `br` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `io` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ca` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ky` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `td` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cx` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `co` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `km` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ck` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ci` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `do` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ec` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `eg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `er` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ee` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `et` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ga` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ge` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `de` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ht` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `va` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `is` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `in` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `id` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ir` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `iq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ie` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `il` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `it` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `jm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `jp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `jo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ke` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ki` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `la` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ls` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ly` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `li` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `my` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ml` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `yt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mx` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `md` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ms` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ma` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `na` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `np` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ni` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ne` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ng` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `no` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `om` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ps` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pa` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `py` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pe` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ph` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `qa` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `re` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ro` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ru` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `rw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ws` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `st` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sa` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `si` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `so` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `za` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gs` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `es` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `se` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ch` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `th` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `to` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ug` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ua` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ae` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `us` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `um` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `uy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `uz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ve` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `wf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `eh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ye` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `zm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `zw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ax` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `im` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `je` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `me` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `rs` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sx` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ss` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `xk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | \ No newline at end of file diff --git a/docs/models/operations/bulkcreatelinkstagids.md b/docs/models/operations/bulkcreatelinkstagids.md new file mode 100644 index 0000000..4a27290 --- /dev/null +++ b/docs/models/operations/bulkcreatelinkstagids.md @@ -0,0 +1,4 @@ +# BulkCreateLinksTagIds + +The unique IDs of the tags assigned to the short link. + diff --git a/docs/models/operations/color.md b/docs/models/operations/color.md new file mode 100644 index 0000000..0e2f0fb --- /dev/null +++ b/docs/models/operations/color.md @@ -0,0 +1,16 @@ +# Color + +The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. + + +## Values + +| Name | Value | +| -------- | -------- | +| `Red` | red | +| `Yellow` | yellow | +| `Green` | green | +| `Blue` | blue | +| `Purple` | purple | +| `Pink` | pink | +| `Brown` | brown | \ No newline at end of file diff --git a/docs/models/operations/country.md b/docs/models/operations/country.md new file mode 100644 index 0000000..e20d602 --- /dev/null +++ b/docs/models/operations/country.md @@ -0,0 +1,259 @@ +# Country + +The country to retrieve analytics for. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/createlinkrequestbody.md b/docs/models/operations/createlinkrequestbody.md new file mode 100644 index 0000000..c2dc356 --- /dev/null +++ b/docs/models/operations/createlinkrequestbody.md @@ -0,0 +1,27 @@ +# CreateLinkRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | +| `key` | *string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | +| `prefix` | *string* | :heavy_minus_sign: | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. | +| `url` | *string* | :heavy_check_mark: | The destination URL of the short link. | +| `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. | +| `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | +| ~~`tagId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | +| `tagIds` | *operations.TagIds* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | +| `comments` | *string* | :heavy_minus_sign: | The comments for the short link. | +| `expiresAt` | *string* | :heavy_minus_sign: | The date and time when the short link will expire at. | +| `expiredUrl` | *string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | +| `password` | *string* | :heavy_minus_sign: | The password required to access the destination URL of the short link. | +| `proxy` | *boolean* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | +| `title` | *string* | :heavy_minus_sign: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `description` | *string* | :heavy_minus_sign: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `image` | *string* | :heavy_minus_sign: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | +| `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | +| `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | +| `geo` | [operations.Geo](../../models/operations/geo.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | \ No newline at end of file diff --git a/docs/models/operations/createtagrequestbody.md b/docs/models/operations/createtagrequestbody.md new file mode 100644 index 0000000..7958117 --- /dev/null +++ b/docs/models/operations/createtagrequestbody.md @@ -0,0 +1,9 @@ +# CreateTagRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `tag` | *string* | :heavy_check_mark: | The name of the tag to create. | +| `color` | [operations.Color](../../models/operations/color.md) | :heavy_minus_sign: | The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. | \ No newline at end of file diff --git a/docs/models/operations/createworkspacerequestbody.md b/docs/models/operations/createworkspacerequestbody.md new file mode 100644 index 0000000..e4d5651 --- /dev/null +++ b/docs/models/operations/createworkspacerequestbody.md @@ -0,0 +1,10 @@ +# CreateWorkspaceRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | N/A | +| `domain` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletelinkrequest.md b/docs/models/operations/deletelinkrequest.md new file mode 100644 index 0000000..4543f62 --- /dev/null +++ b/docs/models/operations/deletelinkrequest.md @@ -0,0 +1,8 @@ +# DeleteLinkRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `linkId` | *string* | :heavy_check_mark: | The id of the link to delete. You can get this via the `getLinkInfo` endpoint. | \ No newline at end of file diff --git a/docs/models/operations/deletelinkresponsebody.md b/docs/models/operations/deletelinkresponsebody.md new file mode 100644 index 0000000..a0b56d8 --- /dev/null +++ b/docs/models/operations/deletelinkresponsebody.md @@ -0,0 +1,10 @@ +# DeleteLinkResponseBody + +The deleted link + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the link. | \ No newline at end of file diff --git a/docs/models/operations/editlinkgeo.md b/docs/models/operations/editlinkgeo.md new file mode 100644 index 0000000..e6fc8e8 --- /dev/null +++ b/docs/models/operations/editlinkgeo.md @@ -0,0 +1,259 @@ +# EditLinkGeo + +Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `af` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `al` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `as` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ad` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ao` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ai` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `aq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ag` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ar` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `am` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `aw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `au` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `at` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `az` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bs` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `by` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `be` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ba` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `br` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `io` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ca` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ky` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `td` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cx` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `co` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `km` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ck` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ci` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `do` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ec` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `eg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `er` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ee` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `et` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ga` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ge` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `de` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ht` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `va` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `is` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `in` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `id` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ir` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `iq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ie` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `il` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `it` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `jm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `jp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `jo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ke` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ki` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `la` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ls` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ly` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `li` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `my` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ml` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `yt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mx` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `md` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ms` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ma` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `na` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `np` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ni` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ne` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ng` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `no` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `om` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ps` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pa` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `py` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pe` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ph` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `qa` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `re` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ro` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ru` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `rw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ws` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `st` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sa` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `si` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `so` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `za` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gs` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `es` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `se` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ch` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `th` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `to` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ug` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ua` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ae` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `us` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `um` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `uy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `uz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ve` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `wf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `eh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ye` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `zm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `zw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ax` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `im` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `je` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `me` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `rs` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sx` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ss` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `xk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | \ No newline at end of file diff --git a/docs/models/operations/editlinkrequest.md b/docs/models/operations/editlinkrequest.md new file mode 100644 index 0000000..34b9e4f --- /dev/null +++ b/docs/models/operations/editlinkrequest.md @@ -0,0 +1,9 @@ +# EditLinkRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `linkId` | *string* | :heavy_check_mark: | The id of the link to edit. You can get this via the `getLinkInfo` endpoint. | +| `requestBody` | [operations.EditLinkRequestBody](../../models/operations/editlinkrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/editlinkrequestbody.md b/docs/models/operations/editlinkrequestbody.md new file mode 100644 index 0000000..a6f600f --- /dev/null +++ b/docs/models/operations/editlinkrequestbody.md @@ -0,0 +1,27 @@ +# EditLinkRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | +| `key` | *string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | +| `prefix` | *string* | :heavy_minus_sign: | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. | +| `url` | *string* | :heavy_check_mark: | The destination URL of the short link. | +| `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. | +| `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | +| ~~`tagId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | +| `tagIds` | *operations.EditLinkTagIds* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | +| `comments` | *string* | :heavy_minus_sign: | The comments for the short link. | +| `expiresAt` | *string* | :heavy_minus_sign: | The date and time when the short link will expire at. | +| `expiredUrl` | *string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | +| `password` | *string* | :heavy_minus_sign: | The password required to access the destination URL of the short link. | +| `proxy` | *boolean* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | +| `title` | *string* | :heavy_minus_sign: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `description` | *string* | :heavy_minus_sign: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `image` | *string* | :heavy_minus_sign: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | +| `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | +| `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | +| `geo` | [operations.EditLinkGeo](../../models/operations/editlinkgeo.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | \ No newline at end of file diff --git a/docs/models/operations/editlinktagids.md b/docs/models/operations/editlinktagids.md new file mode 100644 index 0000000..e7df803 --- /dev/null +++ b/docs/models/operations/editlinktagids.md @@ -0,0 +1,4 @@ +# EditLinkTagIds + +The unique IDs of the tags assigned to the short link. + diff --git a/docs/models/operations/geo.md b/docs/models/operations/geo.md new file mode 100644 index 0000000..415e6b3 --- /dev/null +++ b/docs/models/operations/geo.md @@ -0,0 +1,259 @@ +# Geo + +Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `af` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `al` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `as` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ad` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ao` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ai` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `aq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ag` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ar` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `am` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `aw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `au` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `at` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `az` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bs` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `by` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `be` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ba` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `br` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `io` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ca` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ky` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `td` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cx` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `co` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `km` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ck` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ci` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `dm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `do` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ec` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `eg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `er` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ee` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `et` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ga` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ge` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `de` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ht` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `va` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `hu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `is` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `in` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `id` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ir` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `iq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ie` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `il` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `it` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `jm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `jp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `jo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ke` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ki` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `la` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ls` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ly` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `li` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mo` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `my` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ml` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `yt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mx` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `fm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `md` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ms` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ma` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `na` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `np` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ni` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ne` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ng` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `nf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mp` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `no` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `om` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ps` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pa` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `py` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pe` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ph` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `qa` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `re` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ro` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ru` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `rw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `kn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `pm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ws` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `st` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sa` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `si` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `so` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `za` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gs` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `es` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `lk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sd` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `se` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ch` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tj` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `th` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `to` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tt` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tr` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tc` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `tv` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ug` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ua` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ae` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gb` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `us` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `um` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `uy` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `uz` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vu` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ve` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vn` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `vi` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `wf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `eh` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ye` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `zm` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `zw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ax` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bq` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `cw` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `gg` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `im` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `je` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `me` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `bl` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `mf` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `rs` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `sx` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `ss` | *string* | :heavy_minus_sign: | The destination URL of the short link. | +| `xk` | *string* | :heavy_minus_sign: | The destination URL of the short link. | \ No newline at end of file diff --git a/docs/models/operations/getbrowseranalyticsqueryparamcountry.md b/docs/models/operations/getbrowseranalyticsqueryparamcountry.md new file mode 100644 index 0000000..38bafd6 --- /dev/null +++ b/docs/models/operations/getbrowseranalyticsqueryparamcountry.md @@ -0,0 +1,259 @@ +# GetBrowserAnalyticsQueryParamCountry + +The country to retrieve analytics for. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/getbrowseranalyticsqueryparaminterval.md b/docs/models/operations/getbrowseranalyticsqueryparaminterval.md new file mode 100644 index 0000000..1fc1ba8 --- /dev/null +++ b/docs/models/operations/getbrowseranalyticsqueryparaminterval.md @@ -0,0 +1,15 @@ +# GetBrowserAnalyticsQueryParamInterval + +The interval to retrieve analytics for. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Oneh` | 1h | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getbrowseranalyticsrequest.md b/docs/models/operations/getbrowseranalyticsrequest.md new file mode 100644 index 0000000..1c42df3 --- /dev/null +++ b/docs/models/operations/getbrowseranalyticsrequest.md @@ -0,0 +1,19 @@ +# GetBrowserAnalyticsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetBrowserAnalyticsQueryParamInterval](../../models/operations/getbrowseranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetBrowserAnalyticsQueryParamCountry](../../models/operations/getbrowseranalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file diff --git a/docs/models/operations/getbrowseranalyticsresponsebody.md b/docs/models/operations/getbrowseranalyticsresponsebody.md new file mode 100644 index 0000000..10213f9 --- /dev/null +++ b/docs/models/operations/getbrowseranalyticsresponsebody.md @@ -0,0 +1,9 @@ +# GetBrowserAnalyticsResponseBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `browser` | *string* | :heavy_check_mark: | The name of the browser | +| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this browser | \ No newline at end of file diff --git a/docs/models/operations/getcityanalyticscountry.md b/docs/models/operations/getcityanalyticscountry.md new file mode 100644 index 0000000..484e915 --- /dev/null +++ b/docs/models/operations/getcityanalyticscountry.md @@ -0,0 +1,259 @@ +# GetCityAnalyticsCountry + +The 2-letter country code of the city: https://d.to/geo + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/getcityanalyticsqueryparamcountry.md b/docs/models/operations/getcityanalyticsqueryparamcountry.md new file mode 100644 index 0000000..d72bcfb --- /dev/null +++ b/docs/models/operations/getcityanalyticsqueryparamcountry.md @@ -0,0 +1,259 @@ +# GetCityAnalyticsQueryParamCountry + +The country to retrieve analytics for. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/getcityanalyticsqueryparaminterval.md b/docs/models/operations/getcityanalyticsqueryparaminterval.md new file mode 100644 index 0000000..b806498 --- /dev/null +++ b/docs/models/operations/getcityanalyticsqueryparaminterval.md @@ -0,0 +1,15 @@ +# GetCityAnalyticsQueryParamInterval + +The interval to retrieve analytics for. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Oneh` | 1h | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getcityanalyticsrequest.md b/docs/models/operations/getcityanalyticsrequest.md new file mode 100644 index 0000000..1bb23cb --- /dev/null +++ b/docs/models/operations/getcityanalyticsrequest.md @@ -0,0 +1,19 @@ +# GetCityAnalyticsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetCityAnalyticsQueryParamInterval](../../models/operations/getcityanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetCityAnalyticsQueryParamCountry](../../models/operations/getcityanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file diff --git a/docs/models/operations/getcityanalyticsresponsebody.md b/docs/models/operations/getcityanalyticsresponsebody.md new file mode 100644 index 0000000..c0ee175 --- /dev/null +++ b/docs/models/operations/getcityanalyticsresponsebody.md @@ -0,0 +1,10 @@ +# GetCityAnalyticsResponseBody + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `city` | *string* | :heavy_check_mark: | The name of the city | +| `country` | [operations.GetCityAnalyticsCountry](../../models/operations/getcityanalyticscountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | +| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this city | \ No newline at end of file diff --git a/docs/models/operations/getclicksanalyticsrequest.md b/docs/models/operations/getclicksanalyticsrequest.md new file mode 100644 index 0000000..ef3bc13 --- /dev/null +++ b/docs/models/operations/getclicksanalyticsrequest.md @@ -0,0 +1,19 @@ +# GetClicksAnalyticsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.Interval](../../models/operations/interval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.Country](../../models/operations/country.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file diff --git a/docs/models/operations/getcountryanalyticscountry.md b/docs/models/operations/getcountryanalyticscountry.md new file mode 100644 index 0000000..0c278a1 --- /dev/null +++ b/docs/models/operations/getcountryanalyticscountry.md @@ -0,0 +1,259 @@ +# GetCountryAnalyticsCountry + +The 2-letter country code: https://d.to/geo + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/getcountryanalyticsqueryparamcountry.md b/docs/models/operations/getcountryanalyticsqueryparamcountry.md new file mode 100644 index 0000000..ff86dca --- /dev/null +++ b/docs/models/operations/getcountryanalyticsqueryparamcountry.md @@ -0,0 +1,259 @@ +# GetCountryAnalyticsQueryParamCountry + +The country to retrieve analytics for. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/getcountryanalyticsqueryparaminterval.md b/docs/models/operations/getcountryanalyticsqueryparaminterval.md new file mode 100644 index 0000000..7a4a717 --- /dev/null +++ b/docs/models/operations/getcountryanalyticsqueryparaminterval.md @@ -0,0 +1,15 @@ +# GetCountryAnalyticsQueryParamInterval + +The interval to retrieve analytics for. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Oneh` | 1h | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getcountryanalyticsrequest.md b/docs/models/operations/getcountryanalyticsrequest.md new file mode 100644 index 0000000..15dcc55 --- /dev/null +++ b/docs/models/operations/getcountryanalyticsrequest.md @@ -0,0 +1,19 @@ +# GetCountryAnalyticsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetCountryAnalyticsQueryParamInterval](../../models/operations/getcountryanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetCountryAnalyticsQueryParamCountry](../../models/operations/getcountryanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file diff --git a/docs/models/operations/getcountryanalyticsresponsebody.md b/docs/models/operations/getcountryanalyticsresponsebody.md new file mode 100644 index 0000000..701ad76 --- /dev/null +++ b/docs/models/operations/getcountryanalyticsresponsebody.md @@ -0,0 +1,9 @@ +# GetCountryAnalyticsResponseBody + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `country` | [operations.GetCountryAnalyticsCountry](../../models/operations/getcountryanalyticscountry.md) | :heavy_check_mark: | The 2-letter country code: https://d.to/geo | +| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this country | \ No newline at end of file diff --git a/docs/models/operations/getdeviceanalyticsqueryparamcountry.md b/docs/models/operations/getdeviceanalyticsqueryparamcountry.md new file mode 100644 index 0000000..b38191d --- /dev/null +++ b/docs/models/operations/getdeviceanalyticsqueryparamcountry.md @@ -0,0 +1,259 @@ +# GetDeviceAnalyticsQueryParamCountry + +The country to retrieve analytics for. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/getdeviceanalyticsqueryparaminterval.md b/docs/models/operations/getdeviceanalyticsqueryparaminterval.md new file mode 100644 index 0000000..79b56f3 --- /dev/null +++ b/docs/models/operations/getdeviceanalyticsqueryparaminterval.md @@ -0,0 +1,15 @@ +# GetDeviceAnalyticsQueryParamInterval + +The interval to retrieve analytics for. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Oneh` | 1h | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getdeviceanalyticsrequest.md b/docs/models/operations/getdeviceanalyticsrequest.md new file mode 100644 index 0000000..7c7c4e1 --- /dev/null +++ b/docs/models/operations/getdeviceanalyticsrequest.md @@ -0,0 +1,19 @@ +# GetDeviceAnalyticsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetDeviceAnalyticsQueryParamInterval](../../models/operations/getdeviceanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetDeviceAnalyticsQueryParamCountry](../../models/operations/getdeviceanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file diff --git a/docs/models/operations/getdeviceanalyticsresponsebody.md b/docs/models/operations/getdeviceanalyticsresponsebody.md new file mode 100644 index 0000000..8ef1843 --- /dev/null +++ b/docs/models/operations/getdeviceanalyticsresponsebody.md @@ -0,0 +1,9 @@ +# GetDeviceAnalyticsResponseBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `device` | *string* | :heavy_check_mark: | The name of the device | +| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this device | \ No newline at end of file diff --git a/docs/models/operations/getlinkinforequest.md b/docs/models/operations/getlinkinforequest.md new file mode 100644 index 0000000..07c56e4 --- /dev/null +++ b/docs/models/operations/getlinkinforequest.md @@ -0,0 +1,9 @@ +# GetLinkInfoRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `key` | *string* | :heavy_check_mark: | The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`. | \ No newline at end of file diff --git a/docs/models/operations/getlinkscountqueryparamtagids.md b/docs/models/operations/getlinkscountqueryparamtagids.md new file mode 100644 index 0000000..7e70208 --- /dev/null +++ b/docs/models/operations/getlinkscountqueryparamtagids.md @@ -0,0 +1,4 @@ +# GetLinksCountQueryParamTagIds + +The tag IDs to filter the links by. + diff --git a/docs/models/operations/getlinkscountrequest.md b/docs/models/operations/getlinkscountrequest.md new file mode 100644 index 0000000..7bcf4b2 --- /dev/null +++ b/docs/models/operations/getlinkscountrequest.md @@ -0,0 +1,15 @@ +# GetLinksCountRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `domain` | *string* | :heavy_minus_sign: | The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to filter the links by. This field is deprecated – use `tagIds` instead. | +| `tagIds` | *operations.GetLinksCountQueryParamTagIds* | :heavy_minus_sign: | The tag IDs to filter the links by. | +| `search` | *string* | :heavy_minus_sign: | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. | +| `userId` | *string* | :heavy_minus_sign: | The user ID to filter the links by. | +| `showArchived` | *boolean* | :heavy_minus_sign: | Whether to include archived links in the response. Defaults to `false` if not provided. | +| `withTags` | *boolean* | :heavy_minus_sign: | Whether to include tags in the response. Defaults to `false` if not provided. | +| `groupBy` | *operations.GroupBy* | :heavy_minus_sign: | The field to group the links by. | \ No newline at end of file diff --git a/docs/models/operations/getlinksrequest.md b/docs/models/operations/getlinksrequest.md new file mode 100644 index 0000000..11a11d8 --- /dev/null +++ b/docs/models/operations/getlinksrequest.md @@ -0,0 +1,16 @@ +# GetLinksRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `domain` | *string* | :heavy_minus_sign: | The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to filter the links by. This field is deprecated – use `tagIds` instead. | +| `tagIds` | *operations.QueryParamTagIds* | :heavy_minus_sign: | The tag IDs to filter the links by. | +| `search` | *string* | :heavy_minus_sign: | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. | +| `userId` | *string* | :heavy_minus_sign: | The user ID to filter the links by. | +| `showArchived` | *boolean* | :heavy_minus_sign: | Whether to include archived links in the response. Defaults to `false` if not provided. | +| `withTags` | *boolean* | :heavy_minus_sign: | Whether to include tags in the response. Defaults to `false` if not provided. | +| `sort` | [operations.Sort](../../models/operations/sort.md) | :heavy_minus_sign: | The field to sort the links by. The default is `createdAt`, and sort order is always descending. | +| `page` | *number* | :heavy_minus_sign: | The page number for pagination (each page contains 100 links). | \ No newline at end of file diff --git a/docs/models/operations/getmetatagsrequest.md b/docs/models/operations/getmetatagsrequest.md new file mode 100644 index 0000000..06016f7 --- /dev/null +++ b/docs/models/operations/getmetatagsrequest.md @@ -0,0 +1,8 @@ +# GetMetatagsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `url` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getmetatagsresponsebody.md b/docs/models/operations/getmetatagsresponsebody.md new file mode 100644 index 0000000..5ad62f7 --- /dev/null +++ b/docs/models/operations/getmetatagsresponsebody.md @@ -0,0 +1,12 @@ +# GetMetatagsResponseBody + +The retrieved metatags + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `title` | *string* | :heavy_minus_sign: | The meta title tag for the URL | +| `description` | *string* | :heavy_minus_sign: | The meta description tag for the URL | +| `image` | *string* | :heavy_minus_sign: | The OpenGraph image for the URL | \ No newline at end of file diff --git a/docs/models/operations/getosanalyticsqueryparamcountry.md b/docs/models/operations/getosanalyticsqueryparamcountry.md new file mode 100644 index 0000000..7d2376f --- /dev/null +++ b/docs/models/operations/getosanalyticsqueryparamcountry.md @@ -0,0 +1,259 @@ +# GetOSAnalyticsQueryParamCountry + +The country to retrieve analytics for. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/getosanalyticsqueryparaminterval.md b/docs/models/operations/getosanalyticsqueryparaminterval.md new file mode 100644 index 0000000..1bb5bda --- /dev/null +++ b/docs/models/operations/getosanalyticsqueryparaminterval.md @@ -0,0 +1,15 @@ +# GetOSAnalyticsQueryParamInterval + +The interval to retrieve analytics for. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Oneh` | 1h | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getosanalyticsrequest.md b/docs/models/operations/getosanalyticsrequest.md new file mode 100644 index 0000000..98d2e38 --- /dev/null +++ b/docs/models/operations/getosanalyticsrequest.md @@ -0,0 +1,19 @@ +# GetOSAnalyticsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetOSAnalyticsQueryParamInterval](../../models/operations/getosanalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetOSAnalyticsQueryParamCountry](../../models/operations/getosanalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file diff --git a/docs/models/operations/getosanalyticsresponsebody.md b/docs/models/operations/getosanalyticsresponsebody.md new file mode 100644 index 0000000..e3f8071 --- /dev/null +++ b/docs/models/operations/getosanalyticsresponsebody.md @@ -0,0 +1,9 @@ +# GetOSAnalyticsResponseBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `os` | *string* | :heavy_check_mark: | The name of the OS | +| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this OS | \ No newline at end of file diff --git a/docs/models/operations/getqrcoderequest.md b/docs/models/operations/getqrcoderequest.md new file mode 100644 index 0000000..30c3ee3 --- /dev/null +++ b/docs/models/operations/getqrcoderequest.md @@ -0,0 +1,13 @@ +# GetQRCodeRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `url` | *string* | :heavy_minus_sign: | The URL to generate a QR code for. Defaults to `https://dub.co` if not provided. | +| `size` | *number* | :heavy_minus_sign: | The size of the QR code in pixels. Defaults to `600` if not provided. | +| `level` | [operations.Level](../../models/operations/level.md) | :heavy_minus_sign: | The level of error correction to use for the QR code. Defaults to `L` if not provided. | +| `fgColor` | *string* | :heavy_minus_sign: | The foreground color of the QR code in hex format. Defaults to `#000000` if not provided. | +| `bgColor` | *string* | :heavy_minus_sign: | The background color of the QR code in hex format. Defaults to `#ffffff` if not provided. | +| `includeMargin` | *boolean* | :heavy_minus_sign: | Whether to include a margin around the QR code. Defaults to `false` if not provided. | \ No newline at end of file diff --git a/docs/models/operations/getrefereranalyticsqueryparamcountry.md b/docs/models/operations/getrefereranalyticsqueryparamcountry.md new file mode 100644 index 0000000..8f25812 --- /dev/null +++ b/docs/models/operations/getrefereranalyticsqueryparamcountry.md @@ -0,0 +1,259 @@ +# GetRefererAnalyticsQueryParamCountry + +The country to retrieve analytics for. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/getrefereranalyticsqueryparaminterval.md b/docs/models/operations/getrefereranalyticsqueryparaminterval.md new file mode 100644 index 0000000..6fbafd1 --- /dev/null +++ b/docs/models/operations/getrefereranalyticsqueryparaminterval.md @@ -0,0 +1,15 @@ +# GetRefererAnalyticsQueryParamInterval + +The interval to retrieve analytics for. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Oneh` | 1h | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getrefereranalyticsrequest.md b/docs/models/operations/getrefereranalyticsrequest.md new file mode 100644 index 0000000..9f6e0f3 --- /dev/null +++ b/docs/models/operations/getrefereranalyticsrequest.md @@ -0,0 +1,19 @@ +# GetRefererAnalyticsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetRefererAnalyticsQueryParamInterval](../../models/operations/getrefereranalyticsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetRefererAnalyticsQueryParamCountry](../../models/operations/getrefereranalyticsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file diff --git a/docs/models/operations/getrefereranalyticsresponsebody.md b/docs/models/operations/getrefereranalyticsresponsebody.md new file mode 100644 index 0000000..181738f --- /dev/null +++ b/docs/models/operations/getrefereranalyticsresponsebody.md @@ -0,0 +1,9 @@ +# GetRefererAnalyticsResponseBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `referer` | *string* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` | +| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this referer | \ No newline at end of file diff --git a/docs/models/operations/gettagsrequest.md b/docs/models/operations/gettagsrequest.md new file mode 100644 index 0000000..039d011 --- /dev/null +++ b/docs/models/operations/gettagsrequest.md @@ -0,0 +1,7 @@ +# GetTagsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/gettimeseriesanalyticsrequest.md b/docs/models/operations/gettimeseriesanalyticsrequest.md new file mode 100644 index 0000000..8f4078a --- /dev/null +++ b/docs/models/operations/gettimeseriesanalyticsrequest.md @@ -0,0 +1,19 @@ +# GetTimeseriesAnalyticsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.QueryParamInterval](../../models/operations/queryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.QueryParamCountry](../../models/operations/queryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksqueryparamcountry.md b/docs/models/operations/gettoplinksqueryparamcountry.md new file mode 100644 index 0000000..3ef47a8 --- /dev/null +++ b/docs/models/operations/gettoplinksqueryparamcountry.md @@ -0,0 +1,259 @@ +# GetTopLinksQueryParamCountry + +The country to retrieve analytics for. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksqueryparaminterval.md b/docs/models/operations/gettoplinksqueryparaminterval.md new file mode 100644 index 0000000..4a16001 --- /dev/null +++ b/docs/models/operations/gettoplinksqueryparaminterval.md @@ -0,0 +1,15 @@ +# GetTopLinksQueryParamInterval + +The interval to retrieve analytics for. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Oneh` | 1h | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksrequest.md b/docs/models/operations/gettoplinksrequest.md new file mode 100644 index 0000000..6a2a4fa --- /dev/null +++ b/docs/models/operations/gettoplinksrequest.md @@ -0,0 +1,19 @@ +# GetTopLinksRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetTopLinksQueryParamInterval](../../models/operations/gettoplinksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetTopLinksQueryParamCountry](../../models/operations/gettoplinksqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksresponsebody.md b/docs/models/operations/gettoplinksresponsebody.md new file mode 100644 index 0000000..0896894 --- /dev/null +++ b/docs/models/operations/gettoplinksresponsebody.md @@ -0,0 +1,9 @@ +# GetTopLinksResponseBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `link` | *string* | :heavy_check_mark: | The unique ID of the short link | +| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this link | \ No newline at end of file diff --git a/docs/models/operations/gettopurlsqueryparamcountry.md b/docs/models/operations/gettopurlsqueryparamcountry.md new file mode 100644 index 0000000..7beebe7 --- /dev/null +++ b/docs/models/operations/gettopurlsqueryparamcountry.md @@ -0,0 +1,259 @@ +# GetTopURLsQueryParamCountry + +The country to retrieve analytics for. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/gettopurlsqueryparaminterval.md b/docs/models/operations/gettopurlsqueryparaminterval.md new file mode 100644 index 0000000..ce6c83f --- /dev/null +++ b/docs/models/operations/gettopurlsqueryparaminterval.md @@ -0,0 +1,15 @@ +# GetTopURLsQueryParamInterval + +The interval to retrieve analytics for. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Oneh` | 1h | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/gettopurlsrequest.md b/docs/models/operations/gettopurlsrequest.md new file mode 100644 index 0000000..eb21022 --- /dev/null +++ b/docs/models/operations/gettopurlsrequest.md @@ -0,0 +1,19 @@ +# GetTopURLsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | +| `interval` | [operations.GetTopURLsQueryParamInterval](../../models/operations/gettopurlsqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. | +| `country` | [operations.GetTopURLsQueryParamCountry](../../models/operations/gettopurlsqueryparamcountry.md) | :heavy_minus_sign: | The country to retrieve analytics for. | +| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | +| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | +| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | +| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | +| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | +| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | +| `excludeRoot` | *boolean* | :heavy_minus_sign: | Whether to exclude the root link from the response. | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | \ No newline at end of file diff --git a/docs/models/operations/gettopurlsresponsebody.md b/docs/models/operations/gettopurlsresponsebody.md new file mode 100644 index 0000000..ee01b3d --- /dev/null +++ b/docs/models/operations/gettopurlsresponsebody.md @@ -0,0 +1,9 @@ +# GetTopURLsResponseBody + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `url` | *string* | :heavy_check_mark: | The destination URL | +| `clicks` | *number* | :heavy_check_mark: | The number of clicks from this URL | \ No newline at end of file diff --git a/docs/models/operations/getworkspacerequest.md b/docs/models/operations/getworkspacerequest.md new file mode 100644 index 0000000..b28840c --- /dev/null +++ b/docs/models/operations/getworkspacerequest.md @@ -0,0 +1,8 @@ +# GetWorkspaceRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `idOrSlug` | *string* | :heavy_check_mark: | The ID or slug of the workspace. | \ No newline at end of file diff --git a/docs/models/operations/groupby.md b/docs/models/operations/groupby.md new file mode 100644 index 0000000..57f29de --- /dev/null +++ b/docs/models/operations/groupby.md @@ -0,0 +1,4 @@ +# GroupBy + +The field to group the links by. + diff --git a/docs/models/operations/interval.md b/docs/models/operations/interval.md new file mode 100644 index 0000000..efa8f7c --- /dev/null +++ b/docs/models/operations/interval.md @@ -0,0 +1,15 @@ +# Interval + +The interval to retrieve analytics for. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Oneh` | 1h | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/level.md b/docs/models/operations/level.md new file mode 100644 index 0000000..ff37c9a --- /dev/null +++ b/docs/models/operations/level.md @@ -0,0 +1,13 @@ +# Level + +The level of error correction to use for the QR code. Defaults to `L` if not provided. + + +## Values + +| Name | Value | +| ----- | ----- | +| `L` | L | +| `M` | M | +| `Q` | Q | +| `H` | H | \ No newline at end of file diff --git a/docs/models/operations/one.md b/docs/models/operations/one.md new file mode 100644 index 0000000..187e6eb --- /dev/null +++ b/docs/models/operations/one.md @@ -0,0 +1,8 @@ +# One + + +## Values + +| Name | Value | +| -------- | -------- | +| `Domain` | domain | \ No newline at end of file diff --git a/docs/models/operations/queryparamcountry.md b/docs/models/operations/queryparamcountry.md new file mode 100644 index 0000000..e55054c --- /dev/null +++ b/docs/models/operations/queryparamcountry.md @@ -0,0 +1,259 @@ +# QueryParamCountry + +The country to retrieve analytics for. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/models/operations/queryparaminterval.md b/docs/models/operations/queryparaminterval.md new file mode 100644 index 0000000..0a9b632 --- /dev/null +++ b/docs/models/operations/queryparaminterval.md @@ -0,0 +1,15 @@ +# QueryParamInterval + +The interval to retrieve analytics for. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Oneh` | 1h | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/queryparamtagids.md b/docs/models/operations/queryparamtagids.md new file mode 100644 index 0000000..dcb80e1 --- /dev/null +++ b/docs/models/operations/queryparamtagids.md @@ -0,0 +1,4 @@ +# QueryParamTagIds + +The tag IDs to filter the links by. + diff --git a/docs/models/operations/requestbody.md b/docs/models/operations/requestbody.md new file mode 100644 index 0000000..2742e24 --- /dev/null +++ b/docs/models/operations/requestbody.md @@ -0,0 +1,27 @@ +# RequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `domain` | *string* | :heavy_minus_sign: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | +| `key` | *string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | +| `prefix` | *string* | :heavy_minus_sign: | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. | +| `url` | *string* | :heavy_check_mark: | The destination URL of the short link. | +| `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. | +| `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | +| ~~`tagId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | +| `tagIds` | *operations.BulkCreateLinksTagIds* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | +| `comments` | *string* | :heavy_minus_sign: | The comments for the short link. | +| `expiresAt` | *string* | :heavy_minus_sign: | The date and time when the short link will expire at. | +| `expiredUrl` | *string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | +| `password` | *string* | :heavy_minus_sign: | The password required to access the destination URL of the short link. | +| `proxy` | *boolean* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | +| `title` | *string* | :heavy_minus_sign: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `description` | *string* | :heavy_minus_sign: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `image` | *string* | :heavy_minus_sign: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | +| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | +| `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | +| `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | +| `geo` | [operations.BulkCreateLinksGeo](../../models/operations/bulkcreatelinksgeo.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | \ No newline at end of file diff --git a/docs/models/operations/responsebody.md b/docs/models/operations/responsebody.md new file mode 100644 index 0000000..af29a48 --- /dev/null +++ b/docs/models/operations/responsebody.md @@ -0,0 +1,9 @@ +# ResponseBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `start` | *string* | :heavy_check_mark: | The starting timestamp of the interval | +| `clicks` | *number* | :heavy_check_mark: | The number of clicks in the interval | \ No newline at end of file diff --git a/docs/models/operations/sort.md b/docs/models/operations/sort.md new file mode 100644 index 0000000..4e57289 --- /dev/null +++ b/docs/models/operations/sort.md @@ -0,0 +1,12 @@ +# Sort + +The field to sort the links by. The default is `createdAt`, and sort order is always descending. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `CreatedAt` | createdAt | +| `Clicks` | clicks | +| `LastClicked` | lastClicked | \ No newline at end of file diff --git a/docs/models/operations/tagids.md b/docs/models/operations/tagids.md new file mode 100644 index 0000000..8dca755 --- /dev/null +++ b/docs/models/operations/tagids.md @@ -0,0 +1,4 @@ +# TagIds + +The unique IDs of the tags assigned to the short link. + diff --git a/docs/models/operations/two.md b/docs/models/operations/two.md new file mode 100644 index 0000000..46cb4a6 --- /dev/null +++ b/docs/models/operations/two.md @@ -0,0 +1,8 @@ +# Two + + +## Values + +| Name | Value | +| ------- | ------- | +| `TagId` | tagId | \ No newline at end of file diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md new file mode 100644 index 0000000..8806edb --- /dev/null +++ b/docs/sdks/analytics/README.md @@ -0,0 +1,525 @@ +# Analytics +(*analytics*) + +### Available Operations + +* [clicks](#clicks) - Retrieve clicks analytics +* [timeseries](#timeseries) - Retrieve timeseries analytics +* [countries](#countries) - Retrieve country analytics +* [cities](#cities) - Retrieve city analytics +* [devices](#devices) - Retrieve device analytics +* [browsers](#browsers) - Retrieve browser analytics +* [os](#os) - Retrieve OS analytics +* [referers](#referers) - Retrieve referer analytics +* [topLinks](#toplinks) - Retrieve top links +* [topUrls](#topurls) - Retrieve top URLs + +## clicks + +Retrieve the number of clicks for a link, a domain, or the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.analytics.clicks({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetClicksAnalyticsRequest](../../models/operations/getclicksanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[number](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## timeseries + +Retrieve the number of clicks for a link, a domain, or the authenticated workspace over a period of time. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.analytics.timeseries({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTimeseriesAnalyticsRequest](../../models/operations/gettimeseriesanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.ResponseBody[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## countries + +Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.analytics.countries({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCountryAnalyticsRequest](../../models/operations/getcountryanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetCountryAnalyticsResponseBody[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## cities + +Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.analytics.cities({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCityAnalyticsRequest](../../models/operations/getcityanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetCityAnalyticsResponseBody[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## devices + +Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.analytics.devices({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDeviceAnalyticsRequest](../../models/operations/getdeviceanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetDeviceAnalyticsResponseBody[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## browsers + +Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.analytics.browsers({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBrowserAnalyticsRequest](../../models/operations/getbrowseranalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetBrowserAnalyticsResponseBody[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## os + +Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.analytics.os({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetOSAnalyticsRequest](../../models/operations/getosanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetOSAnalyticsResponseBody[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## referers + +Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.analytics.referers({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetRefererAnalyticsRequest](../../models/operations/getrefereranalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetRefererAnalyticsResponseBody[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## topLinks + +Retrieve the top links by number of clicks for a domain or the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.analytics.topLinks({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTopLinksRequest](../../models/operations/gettoplinksrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetTopLinksResponseBody[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## topUrls + +Retrieve the top URLs by number of clicks for a given short link. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.analytics.topUrls({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTopURLsRequest](../../models/operations/gettopurlsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetTopURLsResponseBody[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/dub/README.md b/docs/sdks/dub/README.md new file mode 100644 index 0000000..15c3115 --- /dev/null +++ b/docs/sdks/dub/README.md @@ -0,0 +1,9 @@ +# Dub SDK + + +## Overview + +Dub.co API: Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs. + +### Available Operations + diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md new file mode 100644 index 0000000..84d7e42 --- /dev/null +++ b/docs/sdks/links/README.md @@ -0,0 +1,402 @@ +# Links +(*links*) + +### Available Operations + +* [list](#list) - Retrieve a list of links +* [create](#create) - Create a new link +* [count](#count) - Retrieve the number of links +* [get](#get) - Retrieve a link +* [update](#update) - Edit a link +* [delete](#delete) - Delete a link +* [createMany](#createmany) - Bulk create links + +## list + +Retrieve a list of links for the authenticated workspace. The list will be paginated and the provided query parameters allow filtering the returned links. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.links.list({ + tagIds: [ + "", + ], + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetLinksRequest](../../models/operations/getlinksrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[components.LinkSchema[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## create + +Create a new link for the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.links.create({ + url: "http://limp-pastry.org", + tagIds: "", + geo: {}, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateLinkRequestBody](../../models/operations/createlinkrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[components.LinkSchema](../../models/components/linkschema.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## count + +Retrieve the number of links for the authenticated workspace. The provided query parameters allow filtering the returned links. + +### Example Usage + +```typescript +import { Dub } from "dub"; +import { One } from "dub/models/operations"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.links.count({ + tagIds: "", + groupBy: One.Domain, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetLinksCountRequest](../../models/operations/getlinkscountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[number](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## get + +Retrieve the info for a link from their domain and key. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.links.get({ + domain: "ringed-blow.name", + key: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetLinkInfoRequest](../../models/operations/getlinkinforequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[components.LinkSchema](../../models/components/linkschema.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## update + +Edit a link for the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const linkId = ""; + const requestBody = { + url: "https://alarming-nondisclosure.com", + tagIds: "", + geo: {}, + }; + + const result = await sdk.links.update(linkId, requestBody); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `linkId` | *string* | :heavy_check_mark: | The id of the link to edit. You can get this via the `getLinkInfo` endpoint. | +| `requestBody` | [operations.EditLinkRequestBody](../../models/operations/editlinkrequestbody.md) | :heavy_minus_sign: | N/A | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[components.LinkSchema](../../models/components/linkschema.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## delete + +Delete a link for the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const linkId = ""; + + const result = await sdk.links.delete(linkId); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `linkId` | *string* | :heavy_check_mark: | The id of the link to delete. You can get this via the `getLinkInfo` endpoint. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.DeleteLinkResponseBody](../../models/operations/deletelinkresponsebody.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## createMany + +Bulk create up to 100 links for the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.links.createMany([ + { + url: "https://positive-plane.info", + tagIds: [ + "", + ], + geo: {}, + }, + ]); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RequestBody[]](../../models/.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[components.LinkSchema[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/metatags/README.md b/docs/sdks/metatags/README.md new file mode 100644 index 0000000..b7decf7 --- /dev/null +++ b/docs/sdks/metatags/README.md @@ -0,0 +1,50 @@ +# Metatags +(*metatags*) + +### Available Operations + +* [get](#get) - Retrieve the metatags for a URL + +## get + +Retrieve the metatags for a URL + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.metatags.get({ + url: "https://brief-micronutrient.org", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetMetatagsRequest](../../models/operations/getmetatagsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[operations.GetMetatagsResponseBody](../../models/operations/getmetatagsresponsebody.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/qrcodes/README.md b/docs/sdks/qrcodes/README.md new file mode 100644 index 0000000..94e6f8f --- /dev/null +++ b/docs/sdks/qrcodes/README.md @@ -0,0 +1,57 @@ +# QRCodes +(*qrCodes*) + +### Available Operations + +* [get](#get) - Retrieve a QR code + +## get + +Retrieve a QR code for a link. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.qrCodes.get({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetQRCodeRequest](../../models/operations/getqrcoderequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[string](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/tags/README.md b/docs/sdks/tags/README.md new file mode 100644 index 0000000..0960327 --- /dev/null +++ b/docs/sdks/tags/README.md @@ -0,0 +1,111 @@ +# Tags +(*tags*) + +### Available Operations + +* [list](#list) - Retrieve a list of tags +* [create](#create) - Create a new tag + +## list + +Retrieve a list of tags for the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.tags.list({}); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTagsRequest](../../models/operations/gettagsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[components.TagSchema[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## create + +Create a new tag for the authenticated workspace. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.tags.create({ + tag: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateTagRequestBody](../../models/operations/createtagrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[components.TagSchema](../../models/components/tagschema.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md new file mode 100644 index 0000000..f248ff5 --- /dev/null +++ b/docs/sdks/workspaces/README.md @@ -0,0 +1,165 @@ +# Workspaces +(*workspaces*) + +### Available Operations + +* [list](#list) - Retrieve a list of workspaces +* [create](#create) - Create a workspace +* [get](#get) - Retrieve a workspace + +## list + +Retrieve a list of workspaces for the authenticated user. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.workspaces.list(); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[components.WorkspaceSchema[]](../../models/.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## create + +Create a new workspace for the authenticated user. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.workspaces.create({ + name: "", + slug: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateWorkspaceRequestBody](../../models/operations/createworkspacerequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[components.WorkspaceSchema](../../models/components/workspaceschema.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## get + +Retrieve a workspace for the authenticated user. + +### Example Usage + +```typescript +import { Dub } from "dub"; + +async function run() { + const sdk = new Dub({ + token: "", + workspaceId: "", + }); + + const result = await sdk.workspaces.get({ + idOrSlug: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetWorkspaceRequest](../../models/operations/getworkspacerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | + + +### Response + +**Promise<[components.WorkspaceSchema](../../models/components/workspaceschema.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.Conflict | 409 | application/json | +| errors.InviteExpired | 410 | application/json | +| errors.UnprocessableEntity | 422 | application/json | +| errors.RateLimitExceeded | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..3ac4ea9 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,4544 @@ +{ + "name": "dub", + "version": "0.22.2", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "dub", + "version": "0.22.2", + "devDependencies": { + "@types/jsonpath": "^0.2.4", + "@types/node": "^20.12.7", + "@typescript-eslint/eslint-plugin": "^6.13.2", + "@typescript-eslint/parser": "^6.13.2", + "eslint": "^8.55.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.0", + "typescript": "^5.3.3", + "vitest": "1.4.0", + "zod": "^3.22.4" + }, + "peerDependencies": { + "zod": ">= 3" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "dev": true + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.1.tgz", + "integrity": "sha512-fH8/o8nSUek8ceQnT7K4EQbSiV7jgkHq81m9lWZFIXjJ7lJzpWXbQFpT/Zh6OZYnpFykvzC3fbEvEAFZu03dPA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.1.tgz", + "integrity": "sha512-Y/9OHLjzkunF+KGEoJr3heiD5X9OLa8sbT1lm0NYeKyaM3oMhhQFvPB0bNZYJwlq93j8Z6wSxh9+cyKQaxS7PQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.1.tgz", + "integrity": "sha512-+kecg3FY84WadgcuSVm6llrABOdQAEbNdnpi5X3UwWiFVhZIZvKgGrF7kmLguvxHNQy+UuRV66cLVl3S+Rkt+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.1.tgz", + "integrity": "sha512-2pYRzEjVqq2TB/UNv47BV/8vQiXkFGVmPFwJb+1E0IFFZbIX8/jo1olxqqMbo6xCXf8kabANhp5bzCij2tFLUA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.1.tgz", + "integrity": "sha512-mS6wQ6Do6/wmrF9aTFVpIJ3/IDXhg1EZcQFYHZLHqw6AzMBjTHWnCG35HxSqUNphh0EHqSM6wRTT8HsL1C0x5g==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.1.tgz", + "integrity": "sha512-p9rGKYkHdFMzhckOTFubfxgyIO1vw//7IIjBBRVzyZebWlzRLeNhqxuSaZ7kCEKVkm/kuC9fVRW9HkC/zNRG2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.1.tgz", + "integrity": "sha512-nDY6Yz5xS/Y4M2i9JLQd3Rofh5OR8Bn8qe3Mv/qCVpHFlwtZSBYSPaU4mrGazWkXrdQ98GB//H0BirGR/SKFSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.1.tgz", + "integrity": "sha512-im7HE4VBL+aDswvcmfx88Mp1soqL9OBsdDBU8NqDEYtkri0qV0THhQsvZtZeNNlLeCUQ16PZyv7cqutjDF35qw==", + "cpu": [ + "ppc64le" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.1.tgz", + "integrity": "sha512-RWdiHuAxWmzPJgaHJdpvUUlDz8sdQz4P2uv367T2JocdDa98iRw2UjIJ4QxSyt077mXZT2X6pKfT2iYtVEvOFw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.1.tgz", + "integrity": "sha512-VMgaGQ5zRX6ZqV/fas65/sUGc9cPmsntq2FiGmayW9KMNfWVG/j0BAqImvU4KTeOOgYSf1F+k6at1UfNONuNjA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.1.tgz", + "integrity": "sha512-9Q7DGjZN+hTdJomaQ3Iub4m6VPu1r94bmK2z3UeWP3dGUecRC54tmVu9vKHTm1bOt3ASoYtEz6JSRLFzrysKlA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.1.tgz", + "integrity": "sha512-JNEG/Ti55413SsreTguSx0LOVKX902OfXIKVg+TCXO6Gjans/k9O6ww9q3oLGjNDaTLxM+IHFMeXy/0RXL5R/g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.1.tgz", + "integrity": "sha512-ryS22I9y0mumlLNwDFYZRDFLwWh3aKaC72CWjFcFvxK0U6v/mOkM5Up1bTbCRAhv3kEIwW2ajROegCIQViUCeA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.1.tgz", + "integrity": "sha512-TdloItiGk+T0mTxKx7Hp279xy30LspMso+GzQvV2maYePMAWdmrzqSNZhUpPj3CGw12aGj57I026PgLCTu8CGg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.1.tgz", + "integrity": "sha512-wQGI+LY/Py20zdUPq+XCem7JcPOyzIJBm3dli+56DJsQOHbnXZFEwgmnC6el1TPAfC8lBT3m+z69RmLykNUbew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, + "node_modules/@types/jsonpath": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@types/jsonpath/-/jsonpath-0.2.4.tgz", + "integrity": "sha512-K3hxB8Blw0qgW6ExKgMbXQv2UPZBoE2GqLpVY+yr7nMD2Pq86lsuIzyAaiQ7eMqFL5B6di6pxSkogLJEyEHoGA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/@vitest/expect": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.4.0.tgz", + "integrity": "sha512-Jths0sWCJZ8BxjKe+p+eKsoqev1/T8lYcrjavEaz8auEJ4jAVY0GwW3JKmdVU4mmNPLPHixh4GNXP7GFtAiDHA==", + "dev": true, + "dependencies": { + "@vitest/spy": "1.4.0", + "@vitest/utils": "1.4.0", + "chai": "^4.3.10" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.4.0.tgz", + "integrity": "sha512-EDYVSmesqlQ4RD2VvWo3hQgTJ7ZrFQ2VSJdfiJiArkCerDAGeyF1i6dHkmySqk573jLp6d/cfqCN+7wUB5tLgg==", + "dev": true, + "dependencies": { + "@vitest/utils": "1.4.0", + "p-limit": "^5.0.0", + "pathe": "^1.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner/node_modules/p-limit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/runner/node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/snapshot": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.4.0.tgz", + "integrity": "sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A==", + "dev": true, + "dependencies": { + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.4.0.tgz", + "integrity": "sha512-Ywau/Qs1DzM/8Uc+yA77CwSegizMlcgTJuYGAi0jujOteJOUf1ujunHThYo243KG9nAyWT3L9ifPYZ5+As/+6Q==", + "dev": true, + "dependencies": { + "tinyspy": "^2.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.4.0.tgz", + "integrity": "sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg==", + "dev": true, + "dependencies": { + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chai": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", + "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/esbuild": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", + "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.0.tgz", + "integrity": "sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/local-pkg": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "dev": true, + "dependencies": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/magic-string": { + "version": "0.30.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.9.tgz", + "integrity": "sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mlly": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.6.1.tgz", + "integrity": "sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==", + "dev": true, + "dependencies": { + "acorn": "^8.11.3", + "pathe": "^1.1.2", + "pkg-types": "^1.0.3", + "ufo": "^1.3.2" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", + "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "dev": true, + "dependencies": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.2.0", + "pathe": "^1.1.0" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.1.tgz", + "integrity": "sha512-4LnHSdd3QK2pa1J6dFbfm1HN0D7vSK/ZuZTsdyUAlA6Rr1yTouUTL13HaDOGJVgby461AhrNGBS7sCGXXtT+SA==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.14.1", + "@rollup/rollup-android-arm64": "4.14.1", + "@rollup/rollup-darwin-arm64": "4.14.1", + "@rollup/rollup-darwin-x64": "4.14.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.14.1", + "@rollup/rollup-linux-arm64-gnu": "4.14.1", + "@rollup/rollup-linux-arm64-musl": "4.14.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.14.1", + "@rollup/rollup-linux-riscv64-gnu": "4.14.1", + "@rollup/rollup-linux-s390x-gnu": "4.14.1", + "@rollup/rollup-linux-x64-gnu": "4.14.1", + "@rollup/rollup-linux-x64-musl": "4.14.1", + "@rollup/rollup-win32-arm64-msvc": "4.14.1", + "@rollup/rollup-win32-ia32-msvc": "4.14.1", + "@rollup/rollup-win32-x64-msvc": "4.14.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, + "node_modules/std-env": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "dev": true + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-literal": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.0.tgz", + "integrity": "sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==", + "dev": true, + "dependencies": { + "js-tokens": "^9.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/tinybench": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.6.0.tgz", + "integrity": "sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==", + "dev": true + }, + "node_modules/tinypool": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.3.tgz", + "integrity": "sha512-Ud7uepAklqRH1bvwy22ynrliC7Dljz7Tm8M/0RBUW+YRa4YHhZ6e4PpgE+fu1zr/WqB1kbeuVrdfeuyIBpy4tw==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", + "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ufo": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", + "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==", + "dev": true + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/vite": { + "version": "5.2.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.8.tgz", + "integrity": "sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==", + "dev": true, + "dependencies": { + "esbuild": "^0.20.1", + "postcss": "^8.4.38", + "rollup": "^4.13.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.4.0.tgz", + "integrity": "sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.4.0.tgz", + "integrity": "sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==", + "dev": true, + "dependencies": { + "@vitest/expect": "1.4.0", + "@vitest/runner": "1.4.0", + "@vitest/snapshot": "1.4.0", + "@vitest/spy": "1.4.0", + "@vitest/utils": "1.4.0", + "acorn-walk": "^8.3.2", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.2", + "vite": "^5.0.0", + "vite-node": "1.4.0", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "1.4.0", + "@vitest/ui": "1.4.0", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/why-is-node-running": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..6410d61 --- /dev/null +++ b/package.json @@ -0,0 +1,35 @@ +{ + "name": "dub", + "version": "0.22.2", + "author": "Dub", + "main": "./index.js", + "sideEffects": false, + "repository": { + "type": "git", + "url": "https://github.com/dubinc/dub-node.git" + }, + "scripts": { + "lint": "eslint --max-warnings=0 src", + "build": "tsc", + "prepare": "npm run build" + }, + "keywords": [], + "peerDependencies": { + "zod": ">= 3" + }, + "devDependencies": { + "@types/jsonpath": "^0.2.4", + "@types/node": "^20.12.7", + "@typescript-eslint/eslint-plugin": "^6.13.2", + "@typescript-eslint/parser": "^6.13.2", + "eslint": "^8.55.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.0", + "typescript": "^5.3.3", + "vitest": "1.4.0", + "zod": "^3.22.4" + }, + "dependencies": { + + } +} diff --git a/src/hooks/auth.ts b/src/hooks/auth.ts new file mode 100644 index 0000000..0cf9d63 --- /dev/null +++ b/src/hooks/auth.ts @@ -0,0 +1,23 @@ +import { BeforeRequestHook } from "./types"; + +export const injectAPIKey: BeforeRequestHook = { + beforeRequest: async (_, request) => { + const authz = request.headers.get("Authorization"); + if (authz) { + return request; + } + + let token = ""; + if (typeof process !== "undefined") { + token = process.env["DUB_API_KEY"] ?? ""; + } + + if (!token) { + throw new Error("The DUB_API_KEY environment variable is missing or empty; either provide it, or instantiate the Dub client with an token option, like new Dub({ token: 'My Token' })."); + } + + request.headers.set("Authorization", `Bearer ${token}`); + + return request; + }, +}; diff --git a/src/hooks/base-url.ts b/src/hooks/base-url.ts new file mode 100644 index 0000000..020041a --- /dev/null +++ b/src/hooks/base-url.ts @@ -0,0 +1,24 @@ +import { BeforeRequestHook } from "./types"; + +export const overrideBaseURL: BeforeRequestHook = { + beforeRequest: async (_, request) => { + let baseURL = ""; + if (typeof process !== "undefined") { + baseURL = process.env["DUB_BASE_URL"] ?? ""; + } + if (!baseURL) { + return request; + } + + const clone = new URL(request.url); + const base = new URL(baseURL); + + clone.protocol = base.protocol; + clone.host = base.host; + clone.port = base.port; + clone.username = base.username; + clone.password = base.password; + + return new Request(clone.toString(), request); + }, +}; diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts new file mode 100644 index 0000000..c4eed9f --- /dev/null +++ b/src/hooks/hooks.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeRequestContext, + BeforeRequestHook, + Hooks, + SDKInitHook, + SDKInitOptions, +} from "./types"; + +import { initHooks } from "./registration"; + +export class SDKHooks implements Hooks { + sdkInitHooks: SDKInitHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; + + constructor() { + initHooks(this); + } + + registerSDKInitHook(hook: SDKInitHook) { + this.sdkInitHooks.push(hook); + } + + registerBeforeRequestHook(hook: BeforeRequestHook) { + this.beforeRequestHooks.push(hook); + } + + registerAfterSuccessHook(hook: AfterSuccessHook) { + this.afterSuccessHooks.push(hook); + } + + registerAfterErrorHook(hook: AfterErrorHook) { + this.afterErrorHooks.push(hook); + } + + sdkInit(opts: SDKInitOptions): SDKInitOptions { + return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + } + + async beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise { + let req = request; + + for (const hook of this.beforeRequestHooks) { + req = await hook.beforeRequest(hookCtx, req); + } + + return req; + } + + async afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise { + let res = response; + + for (const hook of this.afterSuccessHooks) { + res = await hook.afterSuccess(hookCtx, res); + } + + return res; + } + + async afterError( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown + ): Promise<{ response: Response | null; error: unknown }> { + let res = response; + let err = error; + + for (const hook of this.afterErrorHooks) { + const result = await hook.afterError(hookCtx, res, err); + res = result.response; + err = result.error; + } + + return { response: res, error: err }; + } +} diff --git a/src/hooks/index.ts b/src/hooks/index.ts new file mode 100644 index 0000000..3df0393 --- /dev/null +++ b/src/hooks/index.ts @@ -0,0 +1,6 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./types"; +export * from "./hooks"; diff --git a/src/hooks/registration.ts b/src/hooks/registration.ts new file mode 100644 index 0000000..93368c5 --- /dev/null +++ b/src/hooks/registration.ts @@ -0,0 +1,18 @@ +import { injectAPIKey } from "./auth"; +import { overrideBaseURL } from "./base-url"; +import { Hooks } from "./types"; + +/* + * This file is only ever generated once on the first generation and then is free to be modified. + * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them + * in this file or in separate files in the hooks folder. + */ + +export function initHooks(hooks: Hooks) { + // Add hooks by calling hooks.register{ClientInit/BeforeRequest/AfterSuccess/AfterError}Hook + // with an instance of a hook that implements that specific Hook interface + // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance + + hooks.registerBeforeRequestHook(injectAPIKey); + hooks.registerBeforeRequestHook(overrideBaseURL); +} diff --git a/src/hooks/types.ts b/src/hooks/types.ts new file mode 100644 index 0000000..62f8e14 --- /dev/null +++ b/src/hooks/types.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { HTTPClient } from "../lib/http"; + +export type HookContext = { + operationID: string; + oAuth2Scopes?: string[]; + securitySource?: any | (() => Promise); +}; + +export type Awaitable = T | Promise; + +export type SDKInitOptions = { + baseURL: URL | null; + client: HTTPClient; +}; +export type BeforeRequestContext = HookContext & {}; +export type AfterSuccessContext = HookContext & {}; +export type AfterErrorContext = HookContext & {}; + +/** + * SDKInitHook is called when the SDK is initializing. The + * hook can return a new baseURL and HTTP client to be used by the SDK. + */ +export interface SDKInitHook { + sdkInit: (opts: SDKInitOptions) => SDKInitOptions; +} + +/** + * BeforeRequestHook is called before the SDK sends a request. The hook can + * modify the request before it is sent or throw an error to stop the request + * from being sent. + */ +export interface BeforeRequestHook { + beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable; +} + +/** + * AfterSuccessHook is called after the SDK receives a response. The hook can + * modify the response before it is handled or throw an error to stop the + * response from being handled. + */ +export interface AfterSuccessHook { + afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable; +} + +/** + * AfterErrorHook is called after the SDK encounters an error, or a + * non-successful response. The hook can modify the response if available + * otherwise modify the error. + */ +export interface AfterErrorHook { + afterError: ( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown + ) => Awaitable<{ + response: Response | null; + error: unknown; + }>; +} + +export interface Hooks { + /** Registers a hook to be used by the SDK for initialization event. */ + registerSDKInitHook(hook: SDKInitHook): void; + /** Registers a hook to be used by the SDK for the before request event. */ + registerBeforeRequestHook(hook: BeforeRequestHook): void; + /** Registers a hook to be used by the SDK for the after success event. */ + registerAfterSuccessHook(hook: AfterSuccessHook): void; + /** Registers a hook to be used by the SDK for the after error event. */ + registerAfterErrorHook(hook: AfterErrorHook): void; +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..0c582ed --- /dev/null +++ b/src/index.ts @@ -0,0 +1,11 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./sdk"; +export * from "./lib/config"; + +import { Dub } from './sdk' + +/** @deprecated Use named export instead: `import { Dub } from "dub";` */ +export default Dub; // eslint-disable-line import/no-default-export diff --git a/src/lib/base64.ts b/src/lib/base64.ts new file mode 100644 index 0000000..cda0764 --- /dev/null +++ b/src/lib/base64.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export function bytesToBase64(u8arr: Uint8Array): string { + return btoa(String.fromCodePoint(...u8arr)); +} + +export function bytesFromBase64(encoded: string): Uint8Array { + return Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0)); +} + +export function stringToBytes(str: string): Uint8Array { + return new TextEncoder().encode(str); +} + +export function stringFromBytes(u8arr: Uint8Array): string { + return new TextDecoder().decode(u8arr); +} + +export function stringToBase64(str: string): string { + return bytesToBase64(stringToBytes(str)); +} + +export function stringFromBase64(b64str: string): string { + return stringFromBytes(bytesFromBase64(b64str)); +} + +export const zodOutbound = z + .instanceof(Uint8Array) + .or(z.string().transform(stringToBytes)); + +export const zodInbound = z + .instanceof(Uint8Array) + .or(z.string().transform(bytesFromBase64)); diff --git a/src/lib/config.ts b/src/lib/config.ts new file mode 100644 index 0000000..1ac83b2 --- /dev/null +++ b/src/lib/config.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { HTTPClient } from "./http"; +import { RetryConfig } from "./retries"; +import { pathToFunc } from "./url"; + +/** + * Contains the list of servers available to the SDK + */ +export const ServerList = [ + /** + * Production API + */ + "https://api.dub.co", +] as const; + +export type SDKOptions = { + token?: string | (() => Promise); + + /** + * Allows setting the workspaceId parameter for all supported operations + */ + workspaceId?: string; + + /** + * Allows setting the projectSlug parameter for all supported operations + */ + projectSlug?: string | undefined; + + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string; + /** + * Allows overriding the default retry config used by the SDK + */ + retryConfig?: RetryConfig; +}; + +export function serverURLFromOptions(options: SDKOptions): URL | null { + let serverURL = options.serverURL; + + const params: Record = {}; + + if (!serverURL) { + const serverIdx = options.serverIdx ?? 0; + if (serverIdx < 0 || serverIdx >= ServerList.length) { + throw new Error(`Invalid server index ${serverIdx}`); + } + serverURL = ServerList[serverIdx] || ""; + } + + const u = pathToFunc(serverURL)(params); + return new URL(u); +} + +export const SDK_METADATA = Object.freeze({ + language: "typescript", + openapiDocVersion: "0.0.1", + sdkVersion: "0.22.2", + genVersion: "2.304.1", + userAgent: "speakeasy-sdk/typescript 0.22.2 2.304.1 0.0.1 dub", +}); diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts new file mode 100644 index 0000000..71ce003 --- /dev/null +++ b/src/lib/encodings.ts @@ -0,0 +1,384 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { bytesToBase64 } from "./base64"; + +export class EncodingError extends Error { + constructor(message: string) { + super(message); + this.name = "EncodingError"; + } +} + +export function encodeMatrix( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }).join(""); + encValue = encValue.slice(1); + } else { + encValue = `${encodeValue(pv)}`; + } + + const keyPrefix = encodeString(pk); + tmp = `${keyPrefix}=${encValue}`; + // trim trailing '=' if value was empty + if (tmp === `${keyPrefix}=`) { + tmp = tmp.slice(0, -1); + } + + // If we end up with the nothing then skip forward + if (!tmp) { + return; + } + + out += `;${tmp}`; + }); + + return out; +} + +export function encodeLabel( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join("."); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `.${encodeString(k)}.${encodeValue(v)}`; + }).join(""); + encValue = encValue.slice(1); + } else { + const k = + options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + encValue = `${k}${encodeValue(pv)}`; + } + + out += `.${encValue}`; + }); + + return out; +} + +function formEncoder(sep: string) { + return ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, + ) => { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + const encodedSep = encodeString(sep); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(encodedSep); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `${encodeString(k)}${encodedSep}${encodeValue(v)}`; + }).join(encodedSep); + } else { + encValue = `${encodeValue(pv)}`; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); + }; +} + +export const encodeForm = formEncoder(","); +export const encodeSpaceDelimited = formEncoder(" "); +export const encodePipeDelimited = formEncoder("|"); + +export function encodeBodyForm( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else if (isPlainObject(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else { + encValue = `${encodeValue(pv)}`; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); +} + +export function encodeDeepObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +) { + if (value == null) { + return ""; + } + + let out = ""; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + if (!isPlainObject(value)) { + throw new EncodingError( + `Value of parameter '${key}' which uses deepObject encoding must be an object`, + ); + } + + Object.entries(value).forEach(([ck, cv]) => { + if (cv === undefined) { + return; + } + + const pk = `${key}[${ck}]`; + + if (isPlainObject(cv)) { + throw new EncodingError( + `Value of parameter field '${pk}' cannot be an array or object.`, + ); + } + + const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; + let encoded = ""; + + encoded = mapDefined(pairs, (v) => { + return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; + }).join("&"); + + out += `&${encoded}`; + }); + + return out.slice(1); +} + +export function encodeJSON( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) { + if (typeof value === "undefined") { + return ""; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encVal = encodeString(JSON.stringify(value, jsonReplacer)); + + return options?.explode ? encVal : `${encodeString(key)}=${encVal}`; +} + +export const encodeSimple = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) => { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + } else if (isPlainObject(pv)) { + tmp = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }).join(""); + tmp = tmp.slice(1); + } else { + const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; + tmp = `${k}${encodeValue(pv)}`; + } + + // If we end up with the nothing then skip forward + if (!tmp) { + return; + } + + out += `,${tmp}`; + }); + + return out.slice(1); +}; + +function explode(key: string, value: unknown): [string, unknown][] { + if (Array.isArray(value)) { + return value.map((v) => [key, v]); + } else if (isPlainObject(value)) { + const o = value ?? {}; + return Object.entries(o).map(([k, v]) => [k, v]); + } else { + return [[key, value]]; + } +} + +function isPlainObject(value: unknown): value is object { + if (typeof value !== "object" || value == null) return false; + const proto = Object.getPrototypeOf(value); + return proto === null || proto === Object.prototype; +} + +function serializeValue(value: unknown): string { + if (value === null) { + return "null"; + } else if (typeof value === "undefined") { + return ""; + } else if (value instanceof Date) { + return value.toISOString(); + } else if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else if (typeof value === "object") { + return JSON.stringify(value, jsonReplacer); + } + + return `${value}`; +} + +function jsonReplacer(_: string, value: unknown) { + if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else { + return value; + } +} + +function mapDefined(inp: T[], mapper: (v: T) => R): R[] { + return inp.reduce((acc, v) => { + if (v === undefined) { + return acc; + } + + const m = mapper(v); + if (m === undefined) { + return acc; + } + + acc.push(m); + + return acc; + }, []); +} + +function mapDefinedEntries( + inp: Iterable<[K, V]>, + mapper: (v: [K, V]) => R, +): R[] { + const acc: R[] = []; + for (const [k, v] of inp) { + if (v === undefined) { + continue; + } + + const m = mapper([k, v]); + if (m === undefined) { + continue; + } + + acc.push(m); + } + + return acc; +} diff --git a/src/lib/http.ts b/src/lib/http.ts new file mode 100644 index 0000000..45ef134 --- /dev/null +++ b/src/lib/http.ts @@ -0,0 +1,215 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export type Fetcher = ( + input: RequestInfo | URL, + init?: RequestInit, +) => Promise; + +type Awaitable = T | Promise; + +const DEFAULT_FETCHER: Fetcher = (input, init) => fetch(input, init); + +export interface HTTPClientOptions { + fetcher?: Fetcher; +} + +type BeforeRequestHook = (req: Request) => Awaitable; +type RequestErrorHook = (err: unknown, req: Request) => Awaitable; +type ResponseHook = (res: Response, req: Request) => Awaitable; + +export class HTTPClient { + private fetcher: Fetcher; + private requestHooks: BeforeRequestHook[] = []; + private requestErrorHooks: RequestErrorHook[] = []; + private responseHooks: ResponseHook[] = []; + + constructor(private options: HTTPClientOptions = {}) { + this.fetcher = options.fetcher || DEFAULT_FETCHER; + } + + async request(request: Request): Promise { + let req = request; + for (const hook of this.requestHooks) { + const nextRequest = await hook(req); + if (nextRequest) { + req = nextRequest; + } + } + + try { + const res = await this.fetcher(req); + + for (const hook of this.responseHooks) { + await hook(res, req); + } + + return res; + } catch (err) { + for (const hook of this.requestErrorHooks) { + await hook(err, req); + } + + throw err; + } + } + + /** + * Registers a hook that is called before a request is made. The hook function + * can mutate the request or return a new request. This may be useful to add + * additional information to request such as request IDs and tracing headers. + */ + addHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** + * Registers a hook that is called when a request cannot be made due to a + * network error. + */ + addHook(hook: "requestError", fn: RequestErrorHook): this; + /** + * Registers a hook that is called when a response has been received from the + * server. + */ + addHook(hook: "response", fn: ResponseHook): this; + addHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ) { + if (args[0] === "beforeRequest") { + this.requestHooks.push(args[1]); + } else if (args[0] === "requestError") { + this.requestErrorHooks.push(args[1]); + } else if (args[0] === "response") { + this.responseHooks.push(args[1]); + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + return this; + } + + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "requestError", fn: RequestErrorHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "response", fn: ResponseHook): this; + removeHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ) { + let target: unknown[]; + if (args[0] === "beforeRequest") { + target = this.requestHooks; + } else if (args[0] === "requestError") { + target = this.requestErrorHooks; + } else if (args[0] === "response") { + target = this.responseHooks; + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + + const index = target.findIndex((v) => v === args[1]); + if (index >= 0) { + target.splice(index, 1); + } + + return this; + } + + clone() { + const child = new HTTPClient(this.options); + child.requestHooks = this.requestHooks.slice(); + child.requestErrorHooks = this.requestErrorHooks.slice(); + child.responseHooks = this.responseHooks.slice(); + + return child; + } +} + +export function matchContentType(response: Response, pattern: string): boolean { + if (pattern === "*" || pattern === "*/*") { + return true; + } + + const contentType = + response.headers.get("content-type") ?? "application/octet-stream"; + + const idx = contentType.split(";").findIndex((raw) => { + const ctype = raw.trim(); + if (ctype === pattern) { + return true; + } + + const parts = ctype.split("/"); + if (parts.length !== 2) { + return false; + } + + return `${parts[0]}/*` === pattern || `*/${parts[1]}` === pattern; + }); + + return idx >= 0; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +export function matchStatusCode( + response: Response, + codes: number | string | (number | string)[], +) { + const actual = `${response.status}`; + const expectedCodes = Array.isArray(codes) ? codes : [codes]; + if (!expectedCodes.length) { + return false; + } + + return expectedCodes.some((ec) => { + const code = `${ec}`; + + if (code === "default") { + return true; + } + + if (!codeRangeRE.test(`${code}`)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +export function matchResponse( + response: Response, + code: number | string | (number | string)[], + contentTypePattern: string, +): boolean { + return ( + matchStatusCode(response, code) && + matchContentType(response, contentTypePattern) + ); +} + +const headerValRE = /, */; +export function unpackHeaders(headers: Headers): Record { + const out: Record = {}; + + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } + + return out; +} diff --git a/src/lib/retries.ts b/src/lib/retries.ts new file mode 100644 index 0000000..ed9b495 --- /dev/null +++ b/src/lib/retries.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export type BackoffStrategy = { + initialInterval: number; + maxInterval: number; + exponent: number; + maxElapsedTime: number; +}; + +const defaultBackoff: BackoffStrategy = { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, +}; + +export type RetryConfig = + | { strategy: "none" } + | { + strategy: "backoff"; + backoff?: BackoffStrategy; + retryConnectionErrors?: boolean; + }; + +class PermanentError extends Error { + inner: unknown; + + constructor(inner: unknown) { + super("Permanent error"); + this.inner = inner; + + Object.setPrototypeOf(this, PermanentError.prototype); + } +} + +class TemporaryError extends Error { + res: Response; + + constructor(res: Response) { + super("Temporary error"); + this.res = res; + + Object.setPrototypeOf(this, TemporaryError.prototype); + } +} + +export async function retry( + fetchFn: () => Promise, + options: { + config: RetryConfig; + statusCodes: string[]; + }, +): Promise { + switch (options.config.strategy) { + case "backoff": + return retryBackoff( + wrapFetcher(fetchFn, { + statusCodes: options.statusCodes, + retryConnectionErrors: !!options.config.retryConnectionErrors, + }), + options.config.backoff ?? defaultBackoff, + ); + default: + return await fetchFn(); + } +} + +function wrapFetcher( + fn: () => Promise, + options: { + statusCodes: string[]; + retryConnectionErrors: boolean; + }, +): () => Promise { + return async () => { + try { + const res = await fn(); + if (isRetryableResponse(res, options.statusCodes)) { + throw new TemporaryError(res); + } + + return res; + } catch (err) { + if (err instanceof TemporaryError) { + throw err; + } + + if ( + options.retryConnectionErrors && + (isTimeoutError(err) || isConnectionError(err)) + ) { + throw err; + } + + throw new PermanentError(err); + } + }; +} + +function isConnectionError(err: unknown) { + if (typeof err !== "object" || err == null) { + return false; + } + + // Covers fetch in Deno as well + const isBrowserErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("failed to fetch"); + + const isNodeErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("fetch failed"); + + const isBunErr = "name" in err && err.name === "ConnectionError"; + + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnreset"; + + return isBrowserErr || isNodeErr || isGenericErr || isBunErr; +} + +function isTimeoutError(err: unknown) { + if (typeof err !== "object" || err == null) { + return false; + } + + // Fetch in browser, Node.js, Bun, Deno + const isNative = "name" in err && err.name === "TimeoutError"; + + // Node.js HTTP client and Axios + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnaborted"; + + return isNative || isGenericErr; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +function isRetryableResponse(res: Response, statusCodes: string[]): boolean { + const actual = `${res.status}`; + + return statusCodes.some((code) => { + if (!codeRangeRE.test(code)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +async function retryBackoff( + fn: () => Promise, + strategy: BackoffStrategy, +): Promise { + const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy; + + const start = Date.now(); + let x = 0; + + // eslint-disable-next-line no-constant-condition + while (true) { + try { + const res = await fn(); + return res; + } catch (err) { + if (err instanceof PermanentError) { + throw err.inner; + } + const elapsed = Date.now() - start; + if (elapsed > maxElapsedTime) { + if (err instanceof TemporaryError) { + return err.res; + } + + throw err; + } + + let retryInterval = 0; + if (err instanceof TemporaryError && err.res && err.res.headers) { + const retryVal = err.res.headers.get("retry-after") || ""; + if (retryVal != "") { + const parsedNumber = Number(retryVal); + if (!isNaN(parsedNumber) && Number.isInteger(parsedNumber)) { + retryInterval = parsedNumber * 1000; + } else { + const parsedDate = Date.parse(retryVal); + if (!isNaN(parsedDate)) { + const deltaMS = parsedDate - Date.now(); + retryInterval = deltaMS > 0 ? Math.ceil(deltaMS) : 0; + } + } + } + } + + if (retryInterval == 0) { + retryInterval = + initialInterval * Math.pow(x, exponent) + Math.random() * 1000; + } + + const d = Math.min(retryInterval, maxInterval); + + await delay(d); + x++; + } + } +} + +async function delay(delay: number): Promise { + return new Promise((resolve) => setTimeout(resolve, delay)); +} diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts new file mode 100644 index 0000000..63ad0ae --- /dev/null +++ b/src/lib/schemas.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { ZodError } from "zod"; +import * as errors from "../models/errors"; + +/** + * Utility function that executes some code which may throw a ZodError. It + * intercepts this error and converts it to an SDKValidationError so as to not + * leak Zod implementation details to user code. + */ +export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMessage: string): Out { + try { + return fn(rawValue); + } catch (err) { + if (err instanceof ZodError) { + throw new errors.SDKValidationError(errorMessage, err, rawValue); + } + throw err; + } +} diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts new file mode 100644 index 0000000..e432c07 --- /dev/null +++ b/src/lib/sdks.ts @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { HTTPClient, matchResponse, matchStatusCode, unpackHeaders } from "./http"; +import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security"; +import { pathToFunc } from "./url"; +import { encodeForm } from "./encodings"; +import { stringToBase64 } from "./base64"; +import { SDKHooks, HookContext } from "../hooks"; + +export type RequestOptions = { + fetchOptions?: Omit; +}; + +type RequestConfig = { + method: string; + path: string; + baseURL?: string | URL; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; +}; + +export class ClientSDK { + private readonly client: HTTPClient; + protected readonly baseURL: URL | null; + protected readonly hooks$: SDKHooks; + + constructor(init: { client: HTTPClient; baseURL: URL | null; hooks: SDKHooks }) { + const url = init.baseURL; + if (url) { + url.pathname = url.pathname.replace(/\/+$/, "") + "/"; + } + + this.hooks$ = init.hooks; + const { baseURL, client } = this.hooks$.sdkInit({ baseURL: url, client: init.client }); + this.baseURL = baseURL; + this.client = client; + } + + protected createRequest$(conf: RequestConfig, options?: RequestOptions) { + const { method, path, query, headers: opHeaders, security } = conf; + + const base = conf.baseURL ?? this.baseURL; + if (!base) { + throw new TypeError("No base URL provided for operation"); + } + const reqURL = new URL(base); + const inputURL = new URL(path, reqURL); + + if (path) { + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + } + + let finalQuery = query || ""; + + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + } + if (secQuery.length) { + finalQuery += `&${secQuery.join("&")}`; + } + + if (finalQuery) { + const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q}`; + } + + const headers = new Headers(opHeaders); + + const username = security?.basic.username; + const password = security?.basic.password; + if (username != null || password != null) { + const encoded = stringToBase64([username || "", password || ""].join(":")); + headers.set("Authorization", `Basic ${encoded}`); + } + + const securityHeaders = new Headers(security?.headers || {}); + for (const [k, v] of securityHeaders) { + headers.set(k, v); + } + + let cookie = headers.get("cookie") || ""; + for (const [k, v] of Object.entries(security?.cookies || {})) { + cookie += `; ${k}=${v}`; + } + cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; + headers.set("cookie", cookie); + + const userHeaders = new Headers(options?.fetchOptions?.headers); + for (const [k, v] of userHeaders) { + headers.set(k, v); + } + + return new Request(reqURL, { + ...options?.fetchOptions, + body: conf.body ?? null, + headers, + method, + }); + } + + protected async do$( + req: Request, + options: { + context: HookContext; + errorCodes: number | string | (number | string)[]; + } + ) { + const { context, errorCodes } = options; + + let response = await this.client.request(await this.hooks$.beforeRequest(context, req)); + + if (this.matchStatusCode(response, errorCodes)) { + const result = await this.hooks$.afterError(context, response, null); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.hooks$.afterSuccess(context, response); + } + + return response; + } + + protected unpackHeaders = unpackHeaders; + + protected matchStatusCode = matchStatusCode; + protected matchResponse = matchResponse; + + protected templateURLComponent = pathToFunc; + + protected resolveSecurity = resolveSecurity; + protected resolveGlobalSecurity = resolveGlobalSecurity; +} diff --git a/src/lib/security.ts b/src/lib/security.ts new file mode 100644 index 0000000..b819443 --- /dev/null +++ b/src/lib/security.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as components from "../models/components"; + +export enum SecurityErrorCode { + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", +} + +export class SecurityError extends Error { + constructor(public code: SecurityErrorCode, message: string) { + super(message); + this.name = "SecurityError"; + } + + static incomplete(): SecurityError { + return new SecurityError( + SecurityErrorCode.Incomplete, + "Security requirements not met in order to perform the operation" + ); + } + static unrecognizedType(type: string): SecurityError { + return new SecurityError( + SecurityErrorCode.UnrecognisedSecurityType, + `Unrecognised security type: ${type}` + ); + } +} + +export type SecurityState = { + basic: { username?: string | undefined; password?: string | undefined }; + headers: Record; + queryParams: Record; + cookies: Record; +}; + +type SecurityInputBasic = { + type: "http:basic"; + value: { username?: string | undefined; password?: string | undefined } | null | undefined; +}; + +type SecurityInputBearer = { + type: "http:bearer"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputAPIKey = { + type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOIDC = { + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2 = { + type: "oauth2"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2ClientCredentials = { + type: "oauth2:client_credentials"; + value: string | null | undefined; + fieldName: "clientID" | "clientSecret"; +}; + +export type SecurityInput = + | SecurityInputBasic + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOAuth2ClientCredentials + | SecurityInputOIDC; + +export function resolveSecurity(...options: SecurityInput[][]): SecurityState | null { + const state: SecurityState = { + basic: { username: "", password: "" }, + headers: {}, + queryParams: {}, + cookies: {}, + }; + + const option = options.find((opts) => { + return opts.every((o) => { + if (o.value == null) { + return false; + } else if (o.type === "http:basic") { + return o.value.username != null || o.value.password != null; + } else if (typeof o.value === "string") { + return !!o.value; + } else { + throw new Error( + `Unrecognized security type: ${o.type} (value type: ${typeof o.value})` + ); + } + }); + }); + if (option == null) { + return null; + } + + option.forEach((spec) => { + if (spec.value == null) { + return; + } + + const { type } = spec; + + switch (type) { + case "apiKey:header": + state.headers[spec.fieldName] = spec.value; + break; + case "apiKey:query": + state.queryParams[spec.fieldName] = spec.value; + break; + case "apiKey:cookie": + state.cookies[spec.fieldName] = spec.value; + break; + case "http:basic": + applyBasic(state, spec); + break; + case "http:bearer": + applyBearer(state, spec); + break; + case "oauth2": + applyBearer(state, spec); + break; + case "oauth2:client_credentials": + break; + case "openIdConnect": + applyBearer(state, spec); + break; + default: + spec satisfies never; + throw SecurityError.unrecognizedType(type); + } + }); + + return state; +} + +function applyBasic(state: SecurityState, spec: SecurityInputBasic) { + if (spec.value == null) { + return; + } + + state.basic = spec.value; +} + +function applyBearer( + state: SecurityState, + spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC +) { + if (spec.value == null) { + return; + } + + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } + + state.headers[spec.fieldName] = value; +} +export function resolveGlobalSecurity(security: Partial | null | undefined) { + return resolveSecurity([ + { + fieldName: "Authorization", + type: "http:bearer", + value: security?.token, + }, + ]); +} diff --git a/src/lib/url.ts b/src/lib/url.ts new file mode 100644 index 0000000..3fc4ecc --- /dev/null +++ b/src/lib/url.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +const hasOwn = Object.prototype.hasOwnProperty; + +export function pathToFunc( + pathPattern: string, + options?: { charEncoding?: "percent" | "none" }, +): (params?: Record) => string { + const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; + + return function buildURLPath(params: Record = {}): string { + return pathPattern.replace(paramRE, function (_, placeholder) { + if (!hasOwn.call(params, placeholder)) { + throw new Error(`Parameter '${placeholder}' is required`); + } + + const value = params[placeholder]; + if (typeof value !== "string" && typeof value !== "number") { + throw new Error( + `Parameter '${placeholder}' must be a string or number`, + ); + } + + return options?.charEncoding === "percent" + ? encodeURIComponent(`${value}`) + : `${value}`; + }); + }; +} diff --git a/src/models/components/index.ts b/src/models/components/index.ts new file mode 100644 index 0000000..385d40d --- /dev/null +++ b/src/models/components/index.ts @@ -0,0 +1,8 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./linkschema"; +export * from "./security"; +export * from "./tagschema"; +export * from "./workspaceschema"; diff --git a/src/models/components/linkschema.ts b/src/models/components/linkschema.ts new file mode 100644 index 0000000..7f93967 --- /dev/null +++ b/src/models/components/linkschema.ts @@ -0,0 +1,2164 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { TagSchema, TagSchema$ } from "./tagschema"; +import * as z from "zod"; + +/** + * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo + */ +export type Geo = { + af?: string | undefined; + al?: string | undefined; + dz?: string | undefined; + as?: string | undefined; + ad?: string | undefined; + ao?: string | undefined; + ai?: string | undefined; + aq?: string | undefined; + ag?: string | undefined; + ar?: string | undefined; + am?: string | undefined; + aw?: string | undefined; + au?: string | undefined; + at?: string | undefined; + az?: string | undefined; + bs?: string | undefined; + bh?: string | undefined; + bd?: string | undefined; + bb?: string | undefined; + by?: string | undefined; + be?: string | undefined; + bz?: string | undefined; + bj?: string | undefined; + bm?: string | undefined; + bt?: string | undefined; + bo?: string | undefined; + ba?: string | undefined; + bw?: string | undefined; + bv?: string | undefined; + br?: string | undefined; + io?: string | undefined; + bn?: string | undefined; + bg?: string | undefined; + bf?: string | undefined; + bi?: string | undefined; + kh?: string | undefined; + cm?: string | undefined; + ca?: string | undefined; + cv?: string | undefined; + ky?: string | undefined; + cf?: string | undefined; + td?: string | undefined; + cl?: string | undefined; + cn?: string | undefined; + cx?: string | undefined; + cc?: string | undefined; + co?: string | undefined; + km?: string | undefined; + cg?: string | undefined; + cd?: string | undefined; + ck?: string | undefined; + cr?: string | undefined; + ci?: string | undefined; + hr?: string | undefined; + cu?: string | undefined; + cy?: string | undefined; + cz?: string | undefined; + dk?: string | undefined; + dj?: string | undefined; + dm?: string | undefined; + do?: string | undefined; + ec?: string | undefined; + eg?: string | undefined; + sv?: string | undefined; + gq?: string | undefined; + er?: string | undefined; + ee?: string | undefined; + et?: string | undefined; + fk?: string | undefined; + fo?: string | undefined; + fj?: string | undefined; + fi?: string | undefined; + fr?: string | undefined; + gf?: string | undefined; + pf?: string | undefined; + tf?: string | undefined; + ga?: string | undefined; + gm?: string | undefined; + ge?: string | undefined; + de?: string | undefined; + gh?: string | undefined; + gi?: string | undefined; + gr?: string | undefined; + gl?: string | undefined; + gd?: string | undefined; + gp?: string | undefined; + gu?: string | undefined; + gt?: string | undefined; + gn?: string | undefined; + gw?: string | undefined; + gy?: string | undefined; + ht?: string | undefined; + hm?: string | undefined; + va?: string | undefined; + hn?: string | undefined; + hk?: string | undefined; + hu?: string | undefined; + is?: string | undefined; + in?: string | undefined; + id?: string | undefined; + ir?: string | undefined; + iq?: string | undefined; + ie?: string | undefined; + il?: string | undefined; + it?: string | undefined; + jm?: string | undefined; + jp?: string | undefined; + jo?: string | undefined; + kz?: string | undefined; + ke?: string | undefined; + ki?: string | undefined; + kp?: string | undefined; + kr?: string | undefined; + kw?: string | undefined; + kg?: string | undefined; + la?: string | undefined; + lv?: string | undefined; + lb?: string | undefined; + ls?: string | undefined; + lr?: string | undefined; + ly?: string | undefined; + li?: string | undefined; + lt?: string | undefined; + lu?: string | undefined; + mo?: string | undefined; + mg?: string | undefined; + mw?: string | undefined; + my?: string | undefined; + mv?: string | undefined; + ml?: string | undefined; + mt?: string | undefined; + mh?: string | undefined; + mq?: string | undefined; + mr?: string | undefined; + mu?: string | undefined; + yt?: string | undefined; + mx?: string | undefined; + fm?: string | undefined; + md?: string | undefined; + mc?: string | undefined; + mn?: string | undefined; + ms?: string | undefined; + ma?: string | undefined; + mz?: string | undefined; + mm?: string | undefined; + na?: string | undefined; + nr?: string | undefined; + np?: string | undefined; + nl?: string | undefined; + nc?: string | undefined; + nz?: string | undefined; + ni?: string | undefined; + ne?: string | undefined; + ng?: string | undefined; + nu?: string | undefined; + nf?: string | undefined; + mk?: string | undefined; + mp?: string | undefined; + no?: string | undefined; + om?: string | undefined; + pk?: string | undefined; + pw?: string | undefined; + ps?: string | undefined; + pa?: string | undefined; + pg?: string | undefined; + py?: string | undefined; + pe?: string | undefined; + ph?: string | undefined; + pn?: string | undefined; + pl?: string | undefined; + pt?: string | undefined; + pr?: string | undefined; + qa?: string | undefined; + re?: string | undefined; + ro?: string | undefined; + ru?: string | undefined; + rw?: string | undefined; + sh?: string | undefined; + kn?: string | undefined; + lc?: string | undefined; + pm?: string | undefined; + vc?: string | undefined; + ws?: string | undefined; + sm?: string | undefined; + st?: string | undefined; + sa?: string | undefined; + sn?: string | undefined; + sc?: string | undefined; + sl?: string | undefined; + sg?: string | undefined; + sk?: string | undefined; + si?: string | undefined; + sb?: string | undefined; + so?: string | undefined; + za?: string | undefined; + gs?: string | undefined; + es?: string | undefined; + lk?: string | undefined; + sd?: string | undefined; + sr?: string | undefined; + sj?: string | undefined; + sz?: string | undefined; + se?: string | undefined; + ch?: string | undefined; + sy?: string | undefined; + tw?: string | undefined; + tj?: string | undefined; + tz?: string | undefined; + th?: string | undefined; + tl?: string | undefined; + tg?: string | undefined; + tk?: string | undefined; + to?: string | undefined; + tt?: string | undefined; + tn?: string | undefined; + tr?: string | undefined; + tm?: string | undefined; + tc?: string | undefined; + tv?: string | undefined; + ug?: string | undefined; + ua?: string | undefined; + ae?: string | undefined; + gb?: string | undefined; + us?: string | undefined; + um?: string | undefined; + uy?: string | undefined; + uz?: string | undefined; + vu?: string | undefined; + ve?: string | undefined; + vn?: string | undefined; + vg?: string | undefined; + vi?: string | undefined; + wf?: string | undefined; + eh?: string | undefined; + ye?: string | undefined; + zm?: string | undefined; + zw?: string | undefined; + ax?: string | undefined; + bq?: string | undefined; + cw?: string | undefined; + gg?: string | undefined; + im?: string | undefined; + je?: string | undefined; + me?: string | undefined; + bl?: string | undefined; + mf?: string | undefined; + rs?: string | undefined; + sx?: string | undefined; + ss?: string | undefined; + xk?: string | undefined; +}; + +export type LinkSchema = { + /** + * The unique ID of the short link. + */ + id: string; + /** + * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). + */ + domain: string; + /** + * The short link slug. If not provided, a random 7-character slug will be generated. + */ + key: string; + /** + * The destination URL of the short link. + */ + url: string; + /** + * Whether the short link is archived. + */ + archived?: boolean | undefined; + /** + * The date and time when the short link will expire in ISO-8601 format. + */ + expiresAt: Date | null; + /** + * The URL to redirect to when the short link has expired. + */ + expiredUrl: string | null; + /** + * The password required to access the destination URL of the short link. + */ + password: string | null; + /** + * Whether the short link uses Custom Social Media Cards feature. + */ + proxy?: boolean | undefined; + /** + * The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + title: string | null; + /** + * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + description: string | null; + /** + * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + image: string | null; + /** + * Whether the short link uses link cloaking. + */ + rewrite?: boolean | undefined; + /** + * The iOS destination URL for the short link for iOS device targeting. + */ + ios: string | null; + /** + * The Android destination URL for the short link for Android device targeting. + */ + android: string | null; + /** + * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo + */ + geo: Geo | null; + /** + * Whether the short link's stats are publicly accessible. + */ + publicStats?: boolean | undefined; + /** + * The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + tagId: string | null; + /** + * The tags assigned to the short link. + */ + tags: Array | null; + /** + * The comments for the short link. + */ + comments: string | null; + /** + * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). + */ + shortLink: string; + /** + * The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). + */ + qrCode: string; + /** + * The UTM source of the short link. + */ + utmSource: string | null; + /** + * The UTM medium of the short link. + */ + utmMedium: string | null; + /** + * The UTM campaign of the short link. + */ + utmCampaign: string | null; + /** + * The UTM term of the short link. + */ + utmTerm: string | null; + /** + * The UTM content of the short link. + */ + utmContent: string | null; + /** + * The user ID of the creator of the short link. + */ + userId: string; + /** + * The workspace ID of the short link. + */ + workspaceId: string; + /** + * The number of clicks on the short link. + */ + clicks?: number | undefined; + /** + * The date and time when the short link was last clicked. + */ + lastClicked: string | null; + /** + * The date and time when the short link was created. + */ + createdAt: string; + /** + * The date and time when the short link was last updated. + */ + updatedAt: string; + /** + * The project ID of the short link. This field is deprecated – use `workspaceId` instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + projectId: string; +}; + +/** @internal */ +export namespace Geo$ { + export type Inbound = { + AF?: string | undefined; + AL?: string | undefined; + DZ?: string | undefined; + AS?: string | undefined; + AD?: string | undefined; + AO?: string | undefined; + AI?: string | undefined; + AQ?: string | undefined; + AG?: string | undefined; + AR?: string | undefined; + AM?: string | undefined; + AW?: string | undefined; + AU?: string | undefined; + AT?: string | undefined; + AZ?: string | undefined; + BS?: string | undefined; + BH?: string | undefined; + BD?: string | undefined; + BB?: string | undefined; + BY?: string | undefined; + BE?: string | undefined; + BZ?: string | undefined; + BJ?: string | undefined; + BM?: string | undefined; + BT?: string | undefined; + BO?: string | undefined; + BA?: string | undefined; + BW?: string | undefined; + BV?: string | undefined; + BR?: string | undefined; + IO?: string | undefined; + BN?: string | undefined; + BG?: string | undefined; + BF?: string | undefined; + BI?: string | undefined; + KH?: string | undefined; + CM?: string | undefined; + CA?: string | undefined; + CV?: string | undefined; + KY?: string | undefined; + CF?: string | undefined; + TD?: string | undefined; + CL?: string | undefined; + CN?: string | undefined; + CX?: string | undefined; + CC?: string | undefined; + CO?: string | undefined; + KM?: string | undefined; + CG?: string | undefined; + CD?: string | undefined; + CK?: string | undefined; + CR?: string | undefined; + CI?: string | undefined; + HR?: string | undefined; + CU?: string | undefined; + CY?: string | undefined; + CZ?: string | undefined; + DK?: string | undefined; + DJ?: string | undefined; + DM?: string | undefined; + DO?: string | undefined; + EC?: string | undefined; + EG?: string | undefined; + SV?: string | undefined; + GQ?: string | undefined; + ER?: string | undefined; + EE?: string | undefined; + ET?: string | undefined; + FK?: string | undefined; + FO?: string | undefined; + FJ?: string | undefined; + FI?: string | undefined; + FR?: string | undefined; + GF?: string | undefined; + PF?: string | undefined; + TF?: string | undefined; + GA?: string | undefined; + GM?: string | undefined; + GE?: string | undefined; + DE?: string | undefined; + GH?: string | undefined; + GI?: string | undefined; + GR?: string | undefined; + GL?: string | undefined; + GD?: string | undefined; + GP?: string | undefined; + GU?: string | undefined; + GT?: string | undefined; + GN?: string | undefined; + GW?: string | undefined; + GY?: string | undefined; + HT?: string | undefined; + HM?: string | undefined; + VA?: string | undefined; + HN?: string | undefined; + HK?: string | undefined; + HU?: string | undefined; + IS?: string | undefined; + IN?: string | undefined; + ID?: string | undefined; + IR?: string | undefined; + IQ?: string | undefined; + IE?: string | undefined; + IL?: string | undefined; + IT?: string | undefined; + JM?: string | undefined; + JP?: string | undefined; + JO?: string | undefined; + KZ?: string | undefined; + KE?: string | undefined; + KI?: string | undefined; + KP?: string | undefined; + KR?: string | undefined; + KW?: string | undefined; + KG?: string | undefined; + LA?: string | undefined; + LV?: string | undefined; + LB?: string | undefined; + LS?: string | undefined; + LR?: string | undefined; + LY?: string | undefined; + LI?: string | undefined; + LT?: string | undefined; + LU?: string | undefined; + MO?: string | undefined; + MG?: string | undefined; + MW?: string | undefined; + MY?: string | undefined; + MV?: string | undefined; + ML?: string | undefined; + MT?: string | undefined; + MH?: string | undefined; + MQ?: string | undefined; + MR?: string | undefined; + MU?: string | undefined; + YT?: string | undefined; + MX?: string | undefined; + FM?: string | undefined; + MD?: string | undefined; + MC?: string | undefined; + MN?: string | undefined; + MS?: string | undefined; + MA?: string | undefined; + MZ?: string | undefined; + MM?: string | undefined; + NA?: string | undefined; + NR?: string | undefined; + NP?: string | undefined; + NL?: string | undefined; + NC?: string | undefined; + NZ?: string | undefined; + NI?: string | undefined; + NE?: string | undefined; + NG?: string | undefined; + NU?: string | undefined; + NF?: string | undefined; + MK?: string | undefined; + MP?: string | undefined; + NO?: string | undefined; + OM?: string | undefined; + PK?: string | undefined; + PW?: string | undefined; + PS?: string | undefined; + PA?: string | undefined; + PG?: string | undefined; + PY?: string | undefined; + PE?: string | undefined; + PH?: string | undefined; + PN?: string | undefined; + PL?: string | undefined; + PT?: string | undefined; + PR?: string | undefined; + QA?: string | undefined; + RE?: string | undefined; + RO?: string | undefined; + RU?: string | undefined; + RW?: string | undefined; + SH?: string | undefined; + KN?: string | undefined; + LC?: string | undefined; + PM?: string | undefined; + VC?: string | undefined; + WS?: string | undefined; + SM?: string | undefined; + ST?: string | undefined; + SA?: string | undefined; + SN?: string | undefined; + SC?: string | undefined; + SL?: string | undefined; + SG?: string | undefined; + SK?: string | undefined; + SI?: string | undefined; + SB?: string | undefined; + SO?: string | undefined; + ZA?: string | undefined; + GS?: string | undefined; + ES?: string | undefined; + LK?: string | undefined; + SD?: string | undefined; + SR?: string | undefined; + SJ?: string | undefined; + SZ?: string | undefined; + SE?: string | undefined; + CH?: string | undefined; + SY?: string | undefined; + TW?: string | undefined; + TJ?: string | undefined; + TZ?: string | undefined; + TH?: string | undefined; + TL?: string | undefined; + TG?: string | undefined; + TK?: string | undefined; + TO?: string | undefined; + TT?: string | undefined; + TN?: string | undefined; + TR?: string | undefined; + TM?: string | undefined; + TC?: string | undefined; + TV?: string | undefined; + UG?: string | undefined; + UA?: string | undefined; + AE?: string | undefined; + GB?: string | undefined; + US?: string | undefined; + UM?: string | undefined; + UY?: string | undefined; + UZ?: string | undefined; + VU?: string | undefined; + VE?: string | undefined; + VN?: string | undefined; + VG?: string | undefined; + VI?: string | undefined; + WF?: string | undefined; + EH?: string | undefined; + YE?: string | undefined; + ZM?: string | undefined; + ZW?: string | undefined; + AX?: string | undefined; + BQ?: string | undefined; + CW?: string | undefined; + GG?: string | undefined; + IM?: string | undefined; + JE?: string | undefined; + ME?: string | undefined; + BL?: string | undefined; + MF?: string | undefined; + RS?: string | undefined; + SX?: string | undefined; + SS?: string | undefined; + XK?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + AF: z.string().optional(), + AL: z.string().optional(), + DZ: z.string().optional(), + AS: z.string().optional(), + AD: z.string().optional(), + AO: z.string().optional(), + AI: z.string().optional(), + AQ: z.string().optional(), + AG: z.string().optional(), + AR: z.string().optional(), + AM: z.string().optional(), + AW: z.string().optional(), + AU: z.string().optional(), + AT: z.string().optional(), + AZ: z.string().optional(), + BS: z.string().optional(), + BH: z.string().optional(), + BD: z.string().optional(), + BB: z.string().optional(), + BY: z.string().optional(), + BE: z.string().optional(), + BZ: z.string().optional(), + BJ: z.string().optional(), + BM: z.string().optional(), + BT: z.string().optional(), + BO: z.string().optional(), + BA: z.string().optional(), + BW: z.string().optional(), + BV: z.string().optional(), + BR: z.string().optional(), + IO: z.string().optional(), + BN: z.string().optional(), + BG: z.string().optional(), + BF: z.string().optional(), + BI: z.string().optional(), + KH: z.string().optional(), + CM: z.string().optional(), + CA: z.string().optional(), + CV: z.string().optional(), + KY: z.string().optional(), + CF: z.string().optional(), + TD: z.string().optional(), + CL: z.string().optional(), + CN: z.string().optional(), + CX: z.string().optional(), + CC: z.string().optional(), + CO: z.string().optional(), + KM: z.string().optional(), + CG: z.string().optional(), + CD: z.string().optional(), + CK: z.string().optional(), + CR: z.string().optional(), + CI: z.string().optional(), + HR: z.string().optional(), + CU: z.string().optional(), + CY: z.string().optional(), + CZ: z.string().optional(), + DK: z.string().optional(), + DJ: z.string().optional(), + DM: z.string().optional(), + DO: z.string().optional(), + EC: z.string().optional(), + EG: z.string().optional(), + SV: z.string().optional(), + GQ: z.string().optional(), + ER: z.string().optional(), + EE: z.string().optional(), + ET: z.string().optional(), + FK: z.string().optional(), + FO: z.string().optional(), + FJ: z.string().optional(), + FI: z.string().optional(), + FR: z.string().optional(), + GF: z.string().optional(), + PF: z.string().optional(), + TF: z.string().optional(), + GA: z.string().optional(), + GM: z.string().optional(), + GE: z.string().optional(), + DE: z.string().optional(), + GH: z.string().optional(), + GI: z.string().optional(), + GR: z.string().optional(), + GL: z.string().optional(), + GD: z.string().optional(), + GP: z.string().optional(), + GU: z.string().optional(), + GT: z.string().optional(), + GN: z.string().optional(), + GW: z.string().optional(), + GY: z.string().optional(), + HT: z.string().optional(), + HM: z.string().optional(), + VA: z.string().optional(), + HN: z.string().optional(), + HK: z.string().optional(), + HU: z.string().optional(), + IS: z.string().optional(), + IN: z.string().optional(), + ID: z.string().optional(), + IR: z.string().optional(), + IQ: z.string().optional(), + IE: z.string().optional(), + IL: z.string().optional(), + IT: z.string().optional(), + JM: z.string().optional(), + JP: z.string().optional(), + JO: z.string().optional(), + KZ: z.string().optional(), + KE: z.string().optional(), + KI: z.string().optional(), + KP: z.string().optional(), + KR: z.string().optional(), + KW: z.string().optional(), + KG: z.string().optional(), + LA: z.string().optional(), + LV: z.string().optional(), + LB: z.string().optional(), + LS: z.string().optional(), + LR: z.string().optional(), + LY: z.string().optional(), + LI: z.string().optional(), + LT: z.string().optional(), + LU: z.string().optional(), + MO: z.string().optional(), + MG: z.string().optional(), + MW: z.string().optional(), + MY: z.string().optional(), + MV: z.string().optional(), + ML: z.string().optional(), + MT: z.string().optional(), + MH: z.string().optional(), + MQ: z.string().optional(), + MR: z.string().optional(), + MU: z.string().optional(), + YT: z.string().optional(), + MX: z.string().optional(), + FM: z.string().optional(), + MD: z.string().optional(), + MC: z.string().optional(), + MN: z.string().optional(), + MS: z.string().optional(), + MA: z.string().optional(), + MZ: z.string().optional(), + MM: z.string().optional(), + NA: z.string().optional(), + NR: z.string().optional(), + NP: z.string().optional(), + NL: z.string().optional(), + NC: z.string().optional(), + NZ: z.string().optional(), + NI: z.string().optional(), + NE: z.string().optional(), + NG: z.string().optional(), + NU: z.string().optional(), + NF: z.string().optional(), + MK: z.string().optional(), + MP: z.string().optional(), + NO: z.string().optional(), + OM: z.string().optional(), + PK: z.string().optional(), + PW: z.string().optional(), + PS: z.string().optional(), + PA: z.string().optional(), + PG: z.string().optional(), + PY: z.string().optional(), + PE: z.string().optional(), + PH: z.string().optional(), + PN: z.string().optional(), + PL: z.string().optional(), + PT: z.string().optional(), + PR: z.string().optional(), + QA: z.string().optional(), + RE: z.string().optional(), + RO: z.string().optional(), + RU: z.string().optional(), + RW: z.string().optional(), + SH: z.string().optional(), + KN: z.string().optional(), + LC: z.string().optional(), + PM: z.string().optional(), + VC: z.string().optional(), + WS: z.string().optional(), + SM: z.string().optional(), + ST: z.string().optional(), + SA: z.string().optional(), + SN: z.string().optional(), + SC: z.string().optional(), + SL: z.string().optional(), + SG: z.string().optional(), + SK: z.string().optional(), + SI: z.string().optional(), + SB: z.string().optional(), + SO: z.string().optional(), + ZA: z.string().optional(), + GS: z.string().optional(), + ES: z.string().optional(), + LK: z.string().optional(), + SD: z.string().optional(), + SR: z.string().optional(), + SJ: z.string().optional(), + SZ: z.string().optional(), + SE: z.string().optional(), + CH: z.string().optional(), + SY: z.string().optional(), + TW: z.string().optional(), + TJ: z.string().optional(), + TZ: z.string().optional(), + TH: z.string().optional(), + TL: z.string().optional(), + TG: z.string().optional(), + TK: z.string().optional(), + TO: z.string().optional(), + TT: z.string().optional(), + TN: z.string().optional(), + TR: z.string().optional(), + TM: z.string().optional(), + TC: z.string().optional(), + TV: z.string().optional(), + UG: z.string().optional(), + UA: z.string().optional(), + AE: z.string().optional(), + GB: z.string().optional(), + US: z.string().optional(), + UM: z.string().optional(), + UY: z.string().optional(), + UZ: z.string().optional(), + VU: z.string().optional(), + VE: z.string().optional(), + VN: z.string().optional(), + VG: z.string().optional(), + VI: z.string().optional(), + WF: z.string().optional(), + EH: z.string().optional(), + YE: z.string().optional(), + ZM: z.string().optional(), + ZW: z.string().optional(), + AX: z.string().optional(), + BQ: z.string().optional(), + CW: z.string().optional(), + GG: z.string().optional(), + IM: z.string().optional(), + JE: z.string().optional(), + ME: z.string().optional(), + BL: z.string().optional(), + MF: z.string().optional(), + RS: z.string().optional(), + SX: z.string().optional(), + SS: z.string().optional(), + XK: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.AF === undefined ? null : { af: v.AF }), + ...(v.AL === undefined ? null : { al: v.AL }), + ...(v.DZ === undefined ? null : { dz: v.DZ }), + ...(v.AS === undefined ? null : { as: v.AS }), + ...(v.AD === undefined ? null : { ad: v.AD }), + ...(v.AO === undefined ? null : { ao: v.AO }), + ...(v.AI === undefined ? null : { ai: v.AI }), + ...(v.AQ === undefined ? null : { aq: v.AQ }), + ...(v.AG === undefined ? null : { ag: v.AG }), + ...(v.AR === undefined ? null : { ar: v.AR }), + ...(v.AM === undefined ? null : { am: v.AM }), + ...(v.AW === undefined ? null : { aw: v.AW }), + ...(v.AU === undefined ? null : { au: v.AU }), + ...(v.AT === undefined ? null : { at: v.AT }), + ...(v.AZ === undefined ? null : { az: v.AZ }), + ...(v.BS === undefined ? null : { bs: v.BS }), + ...(v.BH === undefined ? null : { bh: v.BH }), + ...(v.BD === undefined ? null : { bd: v.BD }), + ...(v.BB === undefined ? null : { bb: v.BB }), + ...(v.BY === undefined ? null : { by: v.BY }), + ...(v.BE === undefined ? null : { be: v.BE }), + ...(v.BZ === undefined ? null : { bz: v.BZ }), + ...(v.BJ === undefined ? null : { bj: v.BJ }), + ...(v.BM === undefined ? null : { bm: v.BM }), + ...(v.BT === undefined ? null : { bt: v.BT }), + ...(v.BO === undefined ? null : { bo: v.BO }), + ...(v.BA === undefined ? null : { ba: v.BA }), + ...(v.BW === undefined ? null : { bw: v.BW }), + ...(v.BV === undefined ? null : { bv: v.BV }), + ...(v.BR === undefined ? null : { br: v.BR }), + ...(v.IO === undefined ? null : { io: v.IO }), + ...(v.BN === undefined ? null : { bn: v.BN }), + ...(v.BG === undefined ? null : { bg: v.BG }), + ...(v.BF === undefined ? null : { bf: v.BF }), + ...(v.BI === undefined ? null : { bi: v.BI }), + ...(v.KH === undefined ? null : { kh: v.KH }), + ...(v.CM === undefined ? null : { cm: v.CM }), + ...(v.CA === undefined ? null : { ca: v.CA }), + ...(v.CV === undefined ? null : { cv: v.CV }), + ...(v.KY === undefined ? null : { ky: v.KY }), + ...(v.CF === undefined ? null : { cf: v.CF }), + ...(v.TD === undefined ? null : { td: v.TD }), + ...(v.CL === undefined ? null : { cl: v.CL }), + ...(v.CN === undefined ? null : { cn: v.CN }), + ...(v.CX === undefined ? null : { cx: v.CX }), + ...(v.CC === undefined ? null : { cc: v.CC }), + ...(v.CO === undefined ? null : { co: v.CO }), + ...(v.KM === undefined ? null : { km: v.KM }), + ...(v.CG === undefined ? null : { cg: v.CG }), + ...(v.CD === undefined ? null : { cd: v.CD }), + ...(v.CK === undefined ? null : { ck: v.CK }), + ...(v.CR === undefined ? null : { cr: v.CR }), + ...(v.CI === undefined ? null : { ci: v.CI }), + ...(v.HR === undefined ? null : { hr: v.HR }), + ...(v.CU === undefined ? null : { cu: v.CU }), + ...(v.CY === undefined ? null : { cy: v.CY }), + ...(v.CZ === undefined ? null : { cz: v.CZ }), + ...(v.DK === undefined ? null : { dk: v.DK }), + ...(v.DJ === undefined ? null : { dj: v.DJ }), + ...(v.DM === undefined ? null : { dm: v.DM }), + ...(v.DO === undefined ? null : { do: v.DO }), + ...(v.EC === undefined ? null : { ec: v.EC }), + ...(v.EG === undefined ? null : { eg: v.EG }), + ...(v.SV === undefined ? null : { sv: v.SV }), + ...(v.GQ === undefined ? null : { gq: v.GQ }), + ...(v.ER === undefined ? null : { er: v.ER }), + ...(v.EE === undefined ? null : { ee: v.EE }), + ...(v.ET === undefined ? null : { et: v.ET }), + ...(v.FK === undefined ? null : { fk: v.FK }), + ...(v.FO === undefined ? null : { fo: v.FO }), + ...(v.FJ === undefined ? null : { fj: v.FJ }), + ...(v.FI === undefined ? null : { fi: v.FI }), + ...(v.FR === undefined ? null : { fr: v.FR }), + ...(v.GF === undefined ? null : { gf: v.GF }), + ...(v.PF === undefined ? null : { pf: v.PF }), + ...(v.TF === undefined ? null : { tf: v.TF }), + ...(v.GA === undefined ? null : { ga: v.GA }), + ...(v.GM === undefined ? null : { gm: v.GM }), + ...(v.GE === undefined ? null : { ge: v.GE }), + ...(v.DE === undefined ? null : { de: v.DE }), + ...(v.GH === undefined ? null : { gh: v.GH }), + ...(v.GI === undefined ? null : { gi: v.GI }), + ...(v.GR === undefined ? null : { gr: v.GR }), + ...(v.GL === undefined ? null : { gl: v.GL }), + ...(v.GD === undefined ? null : { gd: v.GD }), + ...(v.GP === undefined ? null : { gp: v.GP }), + ...(v.GU === undefined ? null : { gu: v.GU }), + ...(v.GT === undefined ? null : { gt: v.GT }), + ...(v.GN === undefined ? null : { gn: v.GN }), + ...(v.GW === undefined ? null : { gw: v.GW }), + ...(v.GY === undefined ? null : { gy: v.GY }), + ...(v.HT === undefined ? null : { ht: v.HT }), + ...(v.HM === undefined ? null : { hm: v.HM }), + ...(v.VA === undefined ? null : { va: v.VA }), + ...(v.HN === undefined ? null : { hn: v.HN }), + ...(v.HK === undefined ? null : { hk: v.HK }), + ...(v.HU === undefined ? null : { hu: v.HU }), + ...(v.IS === undefined ? null : { is: v.IS }), + ...(v.IN === undefined ? null : { in: v.IN }), + ...(v.ID === undefined ? null : { id: v.ID }), + ...(v.IR === undefined ? null : { ir: v.IR }), + ...(v.IQ === undefined ? null : { iq: v.IQ }), + ...(v.IE === undefined ? null : { ie: v.IE }), + ...(v.IL === undefined ? null : { il: v.IL }), + ...(v.IT === undefined ? null : { it: v.IT }), + ...(v.JM === undefined ? null : { jm: v.JM }), + ...(v.JP === undefined ? null : { jp: v.JP }), + ...(v.JO === undefined ? null : { jo: v.JO }), + ...(v.KZ === undefined ? null : { kz: v.KZ }), + ...(v.KE === undefined ? null : { ke: v.KE }), + ...(v.KI === undefined ? null : { ki: v.KI }), + ...(v.KP === undefined ? null : { kp: v.KP }), + ...(v.KR === undefined ? null : { kr: v.KR }), + ...(v.KW === undefined ? null : { kw: v.KW }), + ...(v.KG === undefined ? null : { kg: v.KG }), + ...(v.LA === undefined ? null : { la: v.LA }), + ...(v.LV === undefined ? null : { lv: v.LV }), + ...(v.LB === undefined ? null : { lb: v.LB }), + ...(v.LS === undefined ? null : { ls: v.LS }), + ...(v.LR === undefined ? null : { lr: v.LR }), + ...(v.LY === undefined ? null : { ly: v.LY }), + ...(v.LI === undefined ? null : { li: v.LI }), + ...(v.LT === undefined ? null : { lt: v.LT }), + ...(v.LU === undefined ? null : { lu: v.LU }), + ...(v.MO === undefined ? null : { mo: v.MO }), + ...(v.MG === undefined ? null : { mg: v.MG }), + ...(v.MW === undefined ? null : { mw: v.MW }), + ...(v.MY === undefined ? null : { my: v.MY }), + ...(v.MV === undefined ? null : { mv: v.MV }), + ...(v.ML === undefined ? null : { ml: v.ML }), + ...(v.MT === undefined ? null : { mt: v.MT }), + ...(v.MH === undefined ? null : { mh: v.MH }), + ...(v.MQ === undefined ? null : { mq: v.MQ }), + ...(v.MR === undefined ? null : { mr: v.MR }), + ...(v.MU === undefined ? null : { mu: v.MU }), + ...(v.YT === undefined ? null : { yt: v.YT }), + ...(v.MX === undefined ? null : { mx: v.MX }), + ...(v.FM === undefined ? null : { fm: v.FM }), + ...(v.MD === undefined ? null : { md: v.MD }), + ...(v.MC === undefined ? null : { mc: v.MC }), + ...(v.MN === undefined ? null : { mn: v.MN }), + ...(v.MS === undefined ? null : { ms: v.MS }), + ...(v.MA === undefined ? null : { ma: v.MA }), + ...(v.MZ === undefined ? null : { mz: v.MZ }), + ...(v.MM === undefined ? null : { mm: v.MM }), + ...(v.NA === undefined ? null : { na: v.NA }), + ...(v.NR === undefined ? null : { nr: v.NR }), + ...(v.NP === undefined ? null : { np: v.NP }), + ...(v.NL === undefined ? null : { nl: v.NL }), + ...(v.NC === undefined ? null : { nc: v.NC }), + ...(v.NZ === undefined ? null : { nz: v.NZ }), + ...(v.NI === undefined ? null : { ni: v.NI }), + ...(v.NE === undefined ? null : { ne: v.NE }), + ...(v.NG === undefined ? null : { ng: v.NG }), + ...(v.NU === undefined ? null : { nu: v.NU }), + ...(v.NF === undefined ? null : { nf: v.NF }), + ...(v.MK === undefined ? null : { mk: v.MK }), + ...(v.MP === undefined ? null : { mp: v.MP }), + ...(v.NO === undefined ? null : { no: v.NO }), + ...(v.OM === undefined ? null : { om: v.OM }), + ...(v.PK === undefined ? null : { pk: v.PK }), + ...(v.PW === undefined ? null : { pw: v.PW }), + ...(v.PS === undefined ? null : { ps: v.PS }), + ...(v.PA === undefined ? null : { pa: v.PA }), + ...(v.PG === undefined ? null : { pg: v.PG }), + ...(v.PY === undefined ? null : { py: v.PY }), + ...(v.PE === undefined ? null : { pe: v.PE }), + ...(v.PH === undefined ? null : { ph: v.PH }), + ...(v.PN === undefined ? null : { pn: v.PN }), + ...(v.PL === undefined ? null : { pl: v.PL }), + ...(v.PT === undefined ? null : { pt: v.PT }), + ...(v.PR === undefined ? null : { pr: v.PR }), + ...(v.QA === undefined ? null : { qa: v.QA }), + ...(v.RE === undefined ? null : { re: v.RE }), + ...(v.RO === undefined ? null : { ro: v.RO }), + ...(v.RU === undefined ? null : { ru: v.RU }), + ...(v.RW === undefined ? null : { rw: v.RW }), + ...(v.SH === undefined ? null : { sh: v.SH }), + ...(v.KN === undefined ? null : { kn: v.KN }), + ...(v.LC === undefined ? null : { lc: v.LC }), + ...(v.PM === undefined ? null : { pm: v.PM }), + ...(v.VC === undefined ? null : { vc: v.VC }), + ...(v.WS === undefined ? null : { ws: v.WS }), + ...(v.SM === undefined ? null : { sm: v.SM }), + ...(v.ST === undefined ? null : { st: v.ST }), + ...(v.SA === undefined ? null : { sa: v.SA }), + ...(v.SN === undefined ? null : { sn: v.SN }), + ...(v.SC === undefined ? null : { sc: v.SC }), + ...(v.SL === undefined ? null : { sl: v.SL }), + ...(v.SG === undefined ? null : { sg: v.SG }), + ...(v.SK === undefined ? null : { sk: v.SK }), + ...(v.SI === undefined ? null : { si: v.SI }), + ...(v.SB === undefined ? null : { sb: v.SB }), + ...(v.SO === undefined ? null : { so: v.SO }), + ...(v.ZA === undefined ? null : { za: v.ZA }), + ...(v.GS === undefined ? null : { gs: v.GS }), + ...(v.ES === undefined ? null : { es: v.ES }), + ...(v.LK === undefined ? null : { lk: v.LK }), + ...(v.SD === undefined ? null : { sd: v.SD }), + ...(v.SR === undefined ? null : { sr: v.SR }), + ...(v.SJ === undefined ? null : { sj: v.SJ }), + ...(v.SZ === undefined ? null : { sz: v.SZ }), + ...(v.SE === undefined ? null : { se: v.SE }), + ...(v.CH === undefined ? null : { ch: v.CH }), + ...(v.SY === undefined ? null : { sy: v.SY }), + ...(v.TW === undefined ? null : { tw: v.TW }), + ...(v.TJ === undefined ? null : { tj: v.TJ }), + ...(v.TZ === undefined ? null : { tz: v.TZ }), + ...(v.TH === undefined ? null : { th: v.TH }), + ...(v.TL === undefined ? null : { tl: v.TL }), + ...(v.TG === undefined ? null : { tg: v.TG }), + ...(v.TK === undefined ? null : { tk: v.TK }), + ...(v.TO === undefined ? null : { to: v.TO }), + ...(v.TT === undefined ? null : { tt: v.TT }), + ...(v.TN === undefined ? null : { tn: v.TN }), + ...(v.TR === undefined ? null : { tr: v.TR }), + ...(v.TM === undefined ? null : { tm: v.TM }), + ...(v.TC === undefined ? null : { tc: v.TC }), + ...(v.TV === undefined ? null : { tv: v.TV }), + ...(v.UG === undefined ? null : { ug: v.UG }), + ...(v.UA === undefined ? null : { ua: v.UA }), + ...(v.AE === undefined ? null : { ae: v.AE }), + ...(v.GB === undefined ? null : { gb: v.GB }), + ...(v.US === undefined ? null : { us: v.US }), + ...(v.UM === undefined ? null : { um: v.UM }), + ...(v.UY === undefined ? null : { uy: v.UY }), + ...(v.UZ === undefined ? null : { uz: v.UZ }), + ...(v.VU === undefined ? null : { vu: v.VU }), + ...(v.VE === undefined ? null : { ve: v.VE }), + ...(v.VN === undefined ? null : { vn: v.VN }), + ...(v.VG === undefined ? null : { vg: v.VG }), + ...(v.VI === undefined ? null : { vi: v.VI }), + ...(v.WF === undefined ? null : { wf: v.WF }), + ...(v.EH === undefined ? null : { eh: v.EH }), + ...(v.YE === undefined ? null : { ye: v.YE }), + ...(v.ZM === undefined ? null : { zm: v.ZM }), + ...(v.ZW === undefined ? null : { zw: v.ZW }), + ...(v.AX === undefined ? null : { ax: v.AX }), + ...(v.BQ === undefined ? null : { bq: v.BQ }), + ...(v.CW === undefined ? null : { cw: v.CW }), + ...(v.GG === undefined ? null : { gg: v.GG }), + ...(v.IM === undefined ? null : { im: v.IM }), + ...(v.JE === undefined ? null : { je: v.JE }), + ...(v.ME === undefined ? null : { me: v.ME }), + ...(v.BL === undefined ? null : { bl: v.BL }), + ...(v.MF === undefined ? null : { mf: v.MF }), + ...(v.RS === undefined ? null : { rs: v.RS }), + ...(v.SX === undefined ? null : { sx: v.SX }), + ...(v.SS === undefined ? null : { ss: v.SS }), + ...(v.XK === undefined ? null : { xk: v.XK }), + }; + }); + + export type Outbound = { + AF?: string | undefined; + AL?: string | undefined; + DZ?: string | undefined; + AS?: string | undefined; + AD?: string | undefined; + AO?: string | undefined; + AI?: string | undefined; + AQ?: string | undefined; + AG?: string | undefined; + AR?: string | undefined; + AM?: string | undefined; + AW?: string | undefined; + AU?: string | undefined; + AT?: string | undefined; + AZ?: string | undefined; + BS?: string | undefined; + BH?: string | undefined; + BD?: string | undefined; + BB?: string | undefined; + BY?: string | undefined; + BE?: string | undefined; + BZ?: string | undefined; + BJ?: string | undefined; + BM?: string | undefined; + BT?: string | undefined; + BO?: string | undefined; + BA?: string | undefined; + BW?: string | undefined; + BV?: string | undefined; + BR?: string | undefined; + IO?: string | undefined; + BN?: string | undefined; + BG?: string | undefined; + BF?: string | undefined; + BI?: string | undefined; + KH?: string | undefined; + CM?: string | undefined; + CA?: string | undefined; + CV?: string | undefined; + KY?: string | undefined; + CF?: string | undefined; + TD?: string | undefined; + CL?: string | undefined; + CN?: string | undefined; + CX?: string | undefined; + CC?: string | undefined; + CO?: string | undefined; + KM?: string | undefined; + CG?: string | undefined; + CD?: string | undefined; + CK?: string | undefined; + CR?: string | undefined; + CI?: string | undefined; + HR?: string | undefined; + CU?: string | undefined; + CY?: string | undefined; + CZ?: string | undefined; + DK?: string | undefined; + DJ?: string | undefined; + DM?: string | undefined; + DO?: string | undefined; + EC?: string | undefined; + EG?: string | undefined; + SV?: string | undefined; + GQ?: string | undefined; + ER?: string | undefined; + EE?: string | undefined; + ET?: string | undefined; + FK?: string | undefined; + FO?: string | undefined; + FJ?: string | undefined; + FI?: string | undefined; + FR?: string | undefined; + GF?: string | undefined; + PF?: string | undefined; + TF?: string | undefined; + GA?: string | undefined; + GM?: string | undefined; + GE?: string | undefined; + DE?: string | undefined; + GH?: string | undefined; + GI?: string | undefined; + GR?: string | undefined; + GL?: string | undefined; + GD?: string | undefined; + GP?: string | undefined; + GU?: string | undefined; + GT?: string | undefined; + GN?: string | undefined; + GW?: string | undefined; + GY?: string | undefined; + HT?: string | undefined; + HM?: string | undefined; + VA?: string | undefined; + HN?: string | undefined; + HK?: string | undefined; + HU?: string | undefined; + IS?: string | undefined; + IN?: string | undefined; + ID?: string | undefined; + IR?: string | undefined; + IQ?: string | undefined; + IE?: string | undefined; + IL?: string | undefined; + IT?: string | undefined; + JM?: string | undefined; + JP?: string | undefined; + JO?: string | undefined; + KZ?: string | undefined; + KE?: string | undefined; + KI?: string | undefined; + KP?: string | undefined; + KR?: string | undefined; + KW?: string | undefined; + KG?: string | undefined; + LA?: string | undefined; + LV?: string | undefined; + LB?: string | undefined; + LS?: string | undefined; + LR?: string | undefined; + LY?: string | undefined; + LI?: string | undefined; + LT?: string | undefined; + LU?: string | undefined; + MO?: string | undefined; + MG?: string | undefined; + MW?: string | undefined; + MY?: string | undefined; + MV?: string | undefined; + ML?: string | undefined; + MT?: string | undefined; + MH?: string | undefined; + MQ?: string | undefined; + MR?: string | undefined; + MU?: string | undefined; + YT?: string | undefined; + MX?: string | undefined; + FM?: string | undefined; + MD?: string | undefined; + MC?: string | undefined; + MN?: string | undefined; + MS?: string | undefined; + MA?: string | undefined; + MZ?: string | undefined; + MM?: string | undefined; + NA?: string | undefined; + NR?: string | undefined; + NP?: string | undefined; + NL?: string | undefined; + NC?: string | undefined; + NZ?: string | undefined; + NI?: string | undefined; + NE?: string | undefined; + NG?: string | undefined; + NU?: string | undefined; + NF?: string | undefined; + MK?: string | undefined; + MP?: string | undefined; + NO?: string | undefined; + OM?: string | undefined; + PK?: string | undefined; + PW?: string | undefined; + PS?: string | undefined; + PA?: string | undefined; + PG?: string | undefined; + PY?: string | undefined; + PE?: string | undefined; + PH?: string | undefined; + PN?: string | undefined; + PL?: string | undefined; + PT?: string | undefined; + PR?: string | undefined; + QA?: string | undefined; + RE?: string | undefined; + RO?: string | undefined; + RU?: string | undefined; + RW?: string | undefined; + SH?: string | undefined; + KN?: string | undefined; + LC?: string | undefined; + PM?: string | undefined; + VC?: string | undefined; + WS?: string | undefined; + SM?: string | undefined; + ST?: string | undefined; + SA?: string | undefined; + SN?: string | undefined; + SC?: string | undefined; + SL?: string | undefined; + SG?: string | undefined; + SK?: string | undefined; + SI?: string | undefined; + SB?: string | undefined; + SO?: string | undefined; + ZA?: string | undefined; + GS?: string | undefined; + ES?: string | undefined; + LK?: string | undefined; + SD?: string | undefined; + SR?: string | undefined; + SJ?: string | undefined; + SZ?: string | undefined; + SE?: string | undefined; + CH?: string | undefined; + SY?: string | undefined; + TW?: string | undefined; + TJ?: string | undefined; + TZ?: string | undefined; + TH?: string | undefined; + TL?: string | undefined; + TG?: string | undefined; + TK?: string | undefined; + TO?: string | undefined; + TT?: string | undefined; + TN?: string | undefined; + TR?: string | undefined; + TM?: string | undefined; + TC?: string | undefined; + TV?: string | undefined; + UG?: string | undefined; + UA?: string | undefined; + AE?: string | undefined; + GB?: string | undefined; + US?: string | undefined; + UM?: string | undefined; + UY?: string | undefined; + UZ?: string | undefined; + VU?: string | undefined; + VE?: string | undefined; + VN?: string | undefined; + VG?: string | undefined; + VI?: string | undefined; + WF?: string | undefined; + EH?: string | undefined; + YE?: string | undefined; + ZM?: string | undefined; + ZW?: string | undefined; + AX?: string | undefined; + BQ?: string | undefined; + CW?: string | undefined; + GG?: string | undefined; + IM?: string | undefined; + JE?: string | undefined; + ME?: string | undefined; + BL?: string | undefined; + MF?: string | undefined; + RS?: string | undefined; + SX?: string | undefined; + SS?: string | undefined; + XK?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + af: z.string().optional(), + al: z.string().optional(), + dz: z.string().optional(), + as: z.string().optional(), + ad: z.string().optional(), + ao: z.string().optional(), + ai: z.string().optional(), + aq: z.string().optional(), + ag: z.string().optional(), + ar: z.string().optional(), + am: z.string().optional(), + aw: z.string().optional(), + au: z.string().optional(), + at: z.string().optional(), + az: z.string().optional(), + bs: z.string().optional(), + bh: z.string().optional(), + bd: z.string().optional(), + bb: z.string().optional(), + by: z.string().optional(), + be: z.string().optional(), + bz: z.string().optional(), + bj: z.string().optional(), + bm: z.string().optional(), + bt: z.string().optional(), + bo: z.string().optional(), + ba: z.string().optional(), + bw: z.string().optional(), + bv: z.string().optional(), + br: z.string().optional(), + io: z.string().optional(), + bn: z.string().optional(), + bg: z.string().optional(), + bf: z.string().optional(), + bi: z.string().optional(), + kh: z.string().optional(), + cm: z.string().optional(), + ca: z.string().optional(), + cv: z.string().optional(), + ky: z.string().optional(), + cf: z.string().optional(), + td: z.string().optional(), + cl: z.string().optional(), + cn: z.string().optional(), + cx: z.string().optional(), + cc: z.string().optional(), + co: z.string().optional(), + km: z.string().optional(), + cg: z.string().optional(), + cd: z.string().optional(), + ck: z.string().optional(), + cr: z.string().optional(), + ci: z.string().optional(), + hr: z.string().optional(), + cu: z.string().optional(), + cy: z.string().optional(), + cz: z.string().optional(), + dk: z.string().optional(), + dj: z.string().optional(), + dm: z.string().optional(), + do: z.string().optional(), + ec: z.string().optional(), + eg: z.string().optional(), + sv: z.string().optional(), + gq: z.string().optional(), + er: z.string().optional(), + ee: z.string().optional(), + et: z.string().optional(), + fk: z.string().optional(), + fo: z.string().optional(), + fj: z.string().optional(), + fi: z.string().optional(), + fr: z.string().optional(), + gf: z.string().optional(), + pf: z.string().optional(), + tf: z.string().optional(), + ga: z.string().optional(), + gm: z.string().optional(), + ge: z.string().optional(), + de: z.string().optional(), + gh: z.string().optional(), + gi: z.string().optional(), + gr: z.string().optional(), + gl: z.string().optional(), + gd: z.string().optional(), + gp: z.string().optional(), + gu: z.string().optional(), + gt: z.string().optional(), + gn: z.string().optional(), + gw: z.string().optional(), + gy: z.string().optional(), + ht: z.string().optional(), + hm: z.string().optional(), + va: z.string().optional(), + hn: z.string().optional(), + hk: z.string().optional(), + hu: z.string().optional(), + is: z.string().optional(), + in: z.string().optional(), + id: z.string().optional(), + ir: z.string().optional(), + iq: z.string().optional(), + ie: z.string().optional(), + il: z.string().optional(), + it: z.string().optional(), + jm: z.string().optional(), + jp: z.string().optional(), + jo: z.string().optional(), + kz: z.string().optional(), + ke: z.string().optional(), + ki: z.string().optional(), + kp: z.string().optional(), + kr: z.string().optional(), + kw: z.string().optional(), + kg: z.string().optional(), + la: z.string().optional(), + lv: z.string().optional(), + lb: z.string().optional(), + ls: z.string().optional(), + lr: z.string().optional(), + ly: z.string().optional(), + li: z.string().optional(), + lt: z.string().optional(), + lu: z.string().optional(), + mo: z.string().optional(), + mg: z.string().optional(), + mw: z.string().optional(), + my: z.string().optional(), + mv: z.string().optional(), + ml: z.string().optional(), + mt: z.string().optional(), + mh: z.string().optional(), + mq: z.string().optional(), + mr: z.string().optional(), + mu: z.string().optional(), + yt: z.string().optional(), + mx: z.string().optional(), + fm: z.string().optional(), + md: z.string().optional(), + mc: z.string().optional(), + mn: z.string().optional(), + ms: z.string().optional(), + ma: z.string().optional(), + mz: z.string().optional(), + mm: z.string().optional(), + na: z.string().optional(), + nr: z.string().optional(), + np: z.string().optional(), + nl: z.string().optional(), + nc: z.string().optional(), + nz: z.string().optional(), + ni: z.string().optional(), + ne: z.string().optional(), + ng: z.string().optional(), + nu: z.string().optional(), + nf: z.string().optional(), + mk: z.string().optional(), + mp: z.string().optional(), + no: z.string().optional(), + om: z.string().optional(), + pk: z.string().optional(), + pw: z.string().optional(), + ps: z.string().optional(), + pa: z.string().optional(), + pg: z.string().optional(), + py: z.string().optional(), + pe: z.string().optional(), + ph: z.string().optional(), + pn: z.string().optional(), + pl: z.string().optional(), + pt: z.string().optional(), + pr: z.string().optional(), + qa: z.string().optional(), + re: z.string().optional(), + ro: z.string().optional(), + ru: z.string().optional(), + rw: z.string().optional(), + sh: z.string().optional(), + kn: z.string().optional(), + lc: z.string().optional(), + pm: z.string().optional(), + vc: z.string().optional(), + ws: z.string().optional(), + sm: z.string().optional(), + st: z.string().optional(), + sa: z.string().optional(), + sn: z.string().optional(), + sc: z.string().optional(), + sl: z.string().optional(), + sg: z.string().optional(), + sk: z.string().optional(), + si: z.string().optional(), + sb: z.string().optional(), + so: z.string().optional(), + za: z.string().optional(), + gs: z.string().optional(), + es: z.string().optional(), + lk: z.string().optional(), + sd: z.string().optional(), + sr: z.string().optional(), + sj: z.string().optional(), + sz: z.string().optional(), + se: z.string().optional(), + ch: z.string().optional(), + sy: z.string().optional(), + tw: z.string().optional(), + tj: z.string().optional(), + tz: z.string().optional(), + th: z.string().optional(), + tl: z.string().optional(), + tg: z.string().optional(), + tk: z.string().optional(), + to: z.string().optional(), + tt: z.string().optional(), + tn: z.string().optional(), + tr: z.string().optional(), + tm: z.string().optional(), + tc: z.string().optional(), + tv: z.string().optional(), + ug: z.string().optional(), + ua: z.string().optional(), + ae: z.string().optional(), + gb: z.string().optional(), + us: z.string().optional(), + um: z.string().optional(), + uy: z.string().optional(), + uz: z.string().optional(), + vu: z.string().optional(), + ve: z.string().optional(), + vn: z.string().optional(), + vg: z.string().optional(), + vi: z.string().optional(), + wf: z.string().optional(), + eh: z.string().optional(), + ye: z.string().optional(), + zm: z.string().optional(), + zw: z.string().optional(), + ax: z.string().optional(), + bq: z.string().optional(), + cw: z.string().optional(), + gg: z.string().optional(), + im: z.string().optional(), + je: z.string().optional(), + me: z.string().optional(), + bl: z.string().optional(), + mf: z.string().optional(), + rs: z.string().optional(), + sx: z.string().optional(), + ss: z.string().optional(), + xk: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.af === undefined ? null : { AF: v.af }), + ...(v.al === undefined ? null : { AL: v.al }), + ...(v.dz === undefined ? null : { DZ: v.dz }), + ...(v.as === undefined ? null : { AS: v.as }), + ...(v.ad === undefined ? null : { AD: v.ad }), + ...(v.ao === undefined ? null : { AO: v.ao }), + ...(v.ai === undefined ? null : { AI: v.ai }), + ...(v.aq === undefined ? null : { AQ: v.aq }), + ...(v.ag === undefined ? null : { AG: v.ag }), + ...(v.ar === undefined ? null : { AR: v.ar }), + ...(v.am === undefined ? null : { AM: v.am }), + ...(v.aw === undefined ? null : { AW: v.aw }), + ...(v.au === undefined ? null : { AU: v.au }), + ...(v.at === undefined ? null : { AT: v.at }), + ...(v.az === undefined ? null : { AZ: v.az }), + ...(v.bs === undefined ? null : { BS: v.bs }), + ...(v.bh === undefined ? null : { BH: v.bh }), + ...(v.bd === undefined ? null : { BD: v.bd }), + ...(v.bb === undefined ? null : { BB: v.bb }), + ...(v.by === undefined ? null : { BY: v.by }), + ...(v.be === undefined ? null : { BE: v.be }), + ...(v.bz === undefined ? null : { BZ: v.bz }), + ...(v.bj === undefined ? null : { BJ: v.bj }), + ...(v.bm === undefined ? null : { BM: v.bm }), + ...(v.bt === undefined ? null : { BT: v.bt }), + ...(v.bo === undefined ? null : { BO: v.bo }), + ...(v.ba === undefined ? null : { BA: v.ba }), + ...(v.bw === undefined ? null : { BW: v.bw }), + ...(v.bv === undefined ? null : { BV: v.bv }), + ...(v.br === undefined ? null : { BR: v.br }), + ...(v.io === undefined ? null : { IO: v.io }), + ...(v.bn === undefined ? null : { BN: v.bn }), + ...(v.bg === undefined ? null : { BG: v.bg }), + ...(v.bf === undefined ? null : { BF: v.bf }), + ...(v.bi === undefined ? null : { BI: v.bi }), + ...(v.kh === undefined ? null : { KH: v.kh }), + ...(v.cm === undefined ? null : { CM: v.cm }), + ...(v.ca === undefined ? null : { CA: v.ca }), + ...(v.cv === undefined ? null : { CV: v.cv }), + ...(v.ky === undefined ? null : { KY: v.ky }), + ...(v.cf === undefined ? null : { CF: v.cf }), + ...(v.td === undefined ? null : { TD: v.td }), + ...(v.cl === undefined ? null : { CL: v.cl }), + ...(v.cn === undefined ? null : { CN: v.cn }), + ...(v.cx === undefined ? null : { CX: v.cx }), + ...(v.cc === undefined ? null : { CC: v.cc }), + ...(v.co === undefined ? null : { CO: v.co }), + ...(v.km === undefined ? null : { KM: v.km }), + ...(v.cg === undefined ? null : { CG: v.cg }), + ...(v.cd === undefined ? null : { CD: v.cd }), + ...(v.ck === undefined ? null : { CK: v.ck }), + ...(v.cr === undefined ? null : { CR: v.cr }), + ...(v.ci === undefined ? null : { CI: v.ci }), + ...(v.hr === undefined ? null : { HR: v.hr }), + ...(v.cu === undefined ? null : { CU: v.cu }), + ...(v.cy === undefined ? null : { CY: v.cy }), + ...(v.cz === undefined ? null : { CZ: v.cz }), + ...(v.dk === undefined ? null : { DK: v.dk }), + ...(v.dj === undefined ? null : { DJ: v.dj }), + ...(v.dm === undefined ? null : { DM: v.dm }), + ...(v.do === undefined ? null : { DO: v.do }), + ...(v.ec === undefined ? null : { EC: v.ec }), + ...(v.eg === undefined ? null : { EG: v.eg }), + ...(v.sv === undefined ? null : { SV: v.sv }), + ...(v.gq === undefined ? null : { GQ: v.gq }), + ...(v.er === undefined ? null : { ER: v.er }), + ...(v.ee === undefined ? null : { EE: v.ee }), + ...(v.et === undefined ? null : { ET: v.et }), + ...(v.fk === undefined ? null : { FK: v.fk }), + ...(v.fo === undefined ? null : { FO: v.fo }), + ...(v.fj === undefined ? null : { FJ: v.fj }), + ...(v.fi === undefined ? null : { FI: v.fi }), + ...(v.fr === undefined ? null : { FR: v.fr }), + ...(v.gf === undefined ? null : { GF: v.gf }), + ...(v.pf === undefined ? null : { PF: v.pf }), + ...(v.tf === undefined ? null : { TF: v.tf }), + ...(v.ga === undefined ? null : { GA: v.ga }), + ...(v.gm === undefined ? null : { GM: v.gm }), + ...(v.ge === undefined ? null : { GE: v.ge }), + ...(v.de === undefined ? null : { DE: v.de }), + ...(v.gh === undefined ? null : { GH: v.gh }), + ...(v.gi === undefined ? null : { GI: v.gi }), + ...(v.gr === undefined ? null : { GR: v.gr }), + ...(v.gl === undefined ? null : { GL: v.gl }), + ...(v.gd === undefined ? null : { GD: v.gd }), + ...(v.gp === undefined ? null : { GP: v.gp }), + ...(v.gu === undefined ? null : { GU: v.gu }), + ...(v.gt === undefined ? null : { GT: v.gt }), + ...(v.gn === undefined ? null : { GN: v.gn }), + ...(v.gw === undefined ? null : { GW: v.gw }), + ...(v.gy === undefined ? null : { GY: v.gy }), + ...(v.ht === undefined ? null : { HT: v.ht }), + ...(v.hm === undefined ? null : { HM: v.hm }), + ...(v.va === undefined ? null : { VA: v.va }), + ...(v.hn === undefined ? null : { HN: v.hn }), + ...(v.hk === undefined ? null : { HK: v.hk }), + ...(v.hu === undefined ? null : { HU: v.hu }), + ...(v.is === undefined ? null : { IS: v.is }), + ...(v.in === undefined ? null : { IN: v.in }), + ...(v.id === undefined ? null : { ID: v.id }), + ...(v.ir === undefined ? null : { IR: v.ir }), + ...(v.iq === undefined ? null : { IQ: v.iq }), + ...(v.ie === undefined ? null : { IE: v.ie }), + ...(v.il === undefined ? null : { IL: v.il }), + ...(v.it === undefined ? null : { IT: v.it }), + ...(v.jm === undefined ? null : { JM: v.jm }), + ...(v.jp === undefined ? null : { JP: v.jp }), + ...(v.jo === undefined ? null : { JO: v.jo }), + ...(v.kz === undefined ? null : { KZ: v.kz }), + ...(v.ke === undefined ? null : { KE: v.ke }), + ...(v.ki === undefined ? null : { KI: v.ki }), + ...(v.kp === undefined ? null : { KP: v.kp }), + ...(v.kr === undefined ? null : { KR: v.kr }), + ...(v.kw === undefined ? null : { KW: v.kw }), + ...(v.kg === undefined ? null : { KG: v.kg }), + ...(v.la === undefined ? null : { LA: v.la }), + ...(v.lv === undefined ? null : { LV: v.lv }), + ...(v.lb === undefined ? null : { LB: v.lb }), + ...(v.ls === undefined ? null : { LS: v.ls }), + ...(v.lr === undefined ? null : { LR: v.lr }), + ...(v.ly === undefined ? null : { LY: v.ly }), + ...(v.li === undefined ? null : { LI: v.li }), + ...(v.lt === undefined ? null : { LT: v.lt }), + ...(v.lu === undefined ? null : { LU: v.lu }), + ...(v.mo === undefined ? null : { MO: v.mo }), + ...(v.mg === undefined ? null : { MG: v.mg }), + ...(v.mw === undefined ? null : { MW: v.mw }), + ...(v.my === undefined ? null : { MY: v.my }), + ...(v.mv === undefined ? null : { MV: v.mv }), + ...(v.ml === undefined ? null : { ML: v.ml }), + ...(v.mt === undefined ? null : { MT: v.mt }), + ...(v.mh === undefined ? null : { MH: v.mh }), + ...(v.mq === undefined ? null : { MQ: v.mq }), + ...(v.mr === undefined ? null : { MR: v.mr }), + ...(v.mu === undefined ? null : { MU: v.mu }), + ...(v.yt === undefined ? null : { YT: v.yt }), + ...(v.mx === undefined ? null : { MX: v.mx }), + ...(v.fm === undefined ? null : { FM: v.fm }), + ...(v.md === undefined ? null : { MD: v.md }), + ...(v.mc === undefined ? null : { MC: v.mc }), + ...(v.mn === undefined ? null : { MN: v.mn }), + ...(v.ms === undefined ? null : { MS: v.ms }), + ...(v.ma === undefined ? null : { MA: v.ma }), + ...(v.mz === undefined ? null : { MZ: v.mz }), + ...(v.mm === undefined ? null : { MM: v.mm }), + ...(v.na === undefined ? null : { NA: v.na }), + ...(v.nr === undefined ? null : { NR: v.nr }), + ...(v.np === undefined ? null : { NP: v.np }), + ...(v.nl === undefined ? null : { NL: v.nl }), + ...(v.nc === undefined ? null : { NC: v.nc }), + ...(v.nz === undefined ? null : { NZ: v.nz }), + ...(v.ni === undefined ? null : { NI: v.ni }), + ...(v.ne === undefined ? null : { NE: v.ne }), + ...(v.ng === undefined ? null : { NG: v.ng }), + ...(v.nu === undefined ? null : { NU: v.nu }), + ...(v.nf === undefined ? null : { NF: v.nf }), + ...(v.mk === undefined ? null : { MK: v.mk }), + ...(v.mp === undefined ? null : { MP: v.mp }), + ...(v.no === undefined ? null : { NO: v.no }), + ...(v.om === undefined ? null : { OM: v.om }), + ...(v.pk === undefined ? null : { PK: v.pk }), + ...(v.pw === undefined ? null : { PW: v.pw }), + ...(v.ps === undefined ? null : { PS: v.ps }), + ...(v.pa === undefined ? null : { PA: v.pa }), + ...(v.pg === undefined ? null : { PG: v.pg }), + ...(v.py === undefined ? null : { PY: v.py }), + ...(v.pe === undefined ? null : { PE: v.pe }), + ...(v.ph === undefined ? null : { PH: v.ph }), + ...(v.pn === undefined ? null : { PN: v.pn }), + ...(v.pl === undefined ? null : { PL: v.pl }), + ...(v.pt === undefined ? null : { PT: v.pt }), + ...(v.pr === undefined ? null : { PR: v.pr }), + ...(v.qa === undefined ? null : { QA: v.qa }), + ...(v.re === undefined ? null : { RE: v.re }), + ...(v.ro === undefined ? null : { RO: v.ro }), + ...(v.ru === undefined ? null : { RU: v.ru }), + ...(v.rw === undefined ? null : { RW: v.rw }), + ...(v.sh === undefined ? null : { SH: v.sh }), + ...(v.kn === undefined ? null : { KN: v.kn }), + ...(v.lc === undefined ? null : { LC: v.lc }), + ...(v.pm === undefined ? null : { PM: v.pm }), + ...(v.vc === undefined ? null : { VC: v.vc }), + ...(v.ws === undefined ? null : { WS: v.ws }), + ...(v.sm === undefined ? null : { SM: v.sm }), + ...(v.st === undefined ? null : { ST: v.st }), + ...(v.sa === undefined ? null : { SA: v.sa }), + ...(v.sn === undefined ? null : { SN: v.sn }), + ...(v.sc === undefined ? null : { SC: v.sc }), + ...(v.sl === undefined ? null : { SL: v.sl }), + ...(v.sg === undefined ? null : { SG: v.sg }), + ...(v.sk === undefined ? null : { SK: v.sk }), + ...(v.si === undefined ? null : { SI: v.si }), + ...(v.sb === undefined ? null : { SB: v.sb }), + ...(v.so === undefined ? null : { SO: v.so }), + ...(v.za === undefined ? null : { ZA: v.za }), + ...(v.gs === undefined ? null : { GS: v.gs }), + ...(v.es === undefined ? null : { ES: v.es }), + ...(v.lk === undefined ? null : { LK: v.lk }), + ...(v.sd === undefined ? null : { SD: v.sd }), + ...(v.sr === undefined ? null : { SR: v.sr }), + ...(v.sj === undefined ? null : { SJ: v.sj }), + ...(v.sz === undefined ? null : { SZ: v.sz }), + ...(v.se === undefined ? null : { SE: v.se }), + ...(v.ch === undefined ? null : { CH: v.ch }), + ...(v.sy === undefined ? null : { SY: v.sy }), + ...(v.tw === undefined ? null : { TW: v.tw }), + ...(v.tj === undefined ? null : { TJ: v.tj }), + ...(v.tz === undefined ? null : { TZ: v.tz }), + ...(v.th === undefined ? null : { TH: v.th }), + ...(v.tl === undefined ? null : { TL: v.tl }), + ...(v.tg === undefined ? null : { TG: v.tg }), + ...(v.tk === undefined ? null : { TK: v.tk }), + ...(v.to === undefined ? null : { TO: v.to }), + ...(v.tt === undefined ? null : { TT: v.tt }), + ...(v.tn === undefined ? null : { TN: v.tn }), + ...(v.tr === undefined ? null : { TR: v.tr }), + ...(v.tm === undefined ? null : { TM: v.tm }), + ...(v.tc === undefined ? null : { TC: v.tc }), + ...(v.tv === undefined ? null : { TV: v.tv }), + ...(v.ug === undefined ? null : { UG: v.ug }), + ...(v.ua === undefined ? null : { UA: v.ua }), + ...(v.ae === undefined ? null : { AE: v.ae }), + ...(v.gb === undefined ? null : { GB: v.gb }), + ...(v.us === undefined ? null : { US: v.us }), + ...(v.um === undefined ? null : { UM: v.um }), + ...(v.uy === undefined ? null : { UY: v.uy }), + ...(v.uz === undefined ? null : { UZ: v.uz }), + ...(v.vu === undefined ? null : { VU: v.vu }), + ...(v.ve === undefined ? null : { VE: v.ve }), + ...(v.vn === undefined ? null : { VN: v.vn }), + ...(v.vg === undefined ? null : { VG: v.vg }), + ...(v.vi === undefined ? null : { VI: v.vi }), + ...(v.wf === undefined ? null : { WF: v.wf }), + ...(v.eh === undefined ? null : { EH: v.eh }), + ...(v.ye === undefined ? null : { YE: v.ye }), + ...(v.zm === undefined ? null : { ZM: v.zm }), + ...(v.zw === undefined ? null : { ZW: v.zw }), + ...(v.ax === undefined ? null : { AX: v.ax }), + ...(v.bq === undefined ? null : { BQ: v.bq }), + ...(v.cw === undefined ? null : { CW: v.cw }), + ...(v.gg === undefined ? null : { GG: v.gg }), + ...(v.im === undefined ? null : { IM: v.im }), + ...(v.je === undefined ? null : { JE: v.je }), + ...(v.me === undefined ? null : { ME: v.me }), + ...(v.bl === undefined ? null : { BL: v.bl }), + ...(v.mf === undefined ? null : { MF: v.mf }), + ...(v.rs === undefined ? null : { RS: v.rs }), + ...(v.sx === undefined ? null : { SX: v.sx }), + ...(v.ss === undefined ? null : { SS: v.ss }), + ...(v.xk === undefined ? null : { XK: v.xk }), + }; + }); +} + +/** @internal */ +export namespace LinkSchema$ { + export type Inbound = { + id: string; + domain: string; + key: string; + url: string; + archived?: boolean | undefined; + expiresAt: string | null; + expiredUrl: string | null; + password: string | null; + proxy?: boolean | undefined; + title: string | null; + description: string | null; + image: string | null; + rewrite?: boolean | undefined; + ios: string | null; + android: string | null; + geo: Geo$.Inbound | null; + publicStats?: boolean | undefined; + tagId: string | null; + tags: Array | null; + comments: string | null; + shortLink: string; + qrCode: string; + utm_source: string | null; + utm_medium: string | null; + utm_campaign: string | null; + utm_term: string | null; + utm_content: string | null; + userId: string; + workspaceId: string; + clicks?: number | undefined; + lastClicked: string | null; + createdAt: string; + updatedAt: string; + projectId: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.string(), + domain: z.string(), + key: z.string(), + url: z.string(), + archived: z.boolean().default(false), + expiresAt: z.nullable( + z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)) + ), + expiredUrl: z.nullable(z.string()), + password: z.nullable(z.string()), + proxy: z.boolean().default(false), + title: z.nullable(z.string()), + description: z.nullable(z.string()), + image: z.nullable(z.string()), + rewrite: z.boolean().default(false), + ios: z.nullable(z.string()), + android: z.nullable(z.string()), + geo: z.nullable(z.lazy(() => Geo$.inboundSchema)), + publicStats: z.boolean().default(false), + tagId: z.nullable(z.string()), + tags: z.nullable(z.array(TagSchema$.inboundSchema)), + comments: z.nullable(z.string()), + shortLink: z.string(), + qrCode: z.string(), + utm_source: z.nullable(z.string()), + utm_medium: z.nullable(z.string()), + utm_campaign: z.nullable(z.string()), + utm_term: z.nullable(z.string()), + utm_content: z.nullable(z.string()), + userId: z.string(), + workspaceId: z.string(), + clicks: z.number().default(0), + lastClicked: z.nullable(z.string()), + createdAt: z.string(), + updatedAt: z.string(), + projectId: z.string(), + }) + .transform((v) => { + return { + id: v.id, + domain: v.domain, + key: v.key, + url: v.url, + archived: v.archived, + expiresAt: v.expiresAt, + expiredUrl: v.expiredUrl, + password: v.password, + proxy: v.proxy, + title: v.title, + description: v.description, + image: v.image, + rewrite: v.rewrite, + ios: v.ios, + android: v.android, + geo: v.geo, + publicStats: v.publicStats, + tagId: v.tagId, + tags: v.tags, + comments: v.comments, + shortLink: v.shortLink, + qrCode: v.qrCode, + utmSource: v.utm_source, + utmMedium: v.utm_medium, + utmCampaign: v.utm_campaign, + utmTerm: v.utm_term, + utmContent: v.utm_content, + userId: v.userId, + workspaceId: v.workspaceId, + clicks: v.clicks, + lastClicked: v.lastClicked, + createdAt: v.createdAt, + updatedAt: v.updatedAt, + projectId: v.projectId, + }; + }); + + export type Outbound = { + id: string; + domain: string; + key: string; + url: string; + archived: boolean; + expiresAt: string | null; + expiredUrl: string | null; + password: string | null; + proxy: boolean; + title: string | null; + description: string | null; + image: string | null; + rewrite: boolean; + ios: string | null; + android: string | null; + geo: Geo$.Outbound | null; + publicStats: boolean; + tagId: string | null; + tags: Array | null; + comments: string | null; + shortLink: string; + qrCode: string; + utm_source: string | null; + utm_medium: string | null; + utm_campaign: string | null; + utm_term: string | null; + utm_content: string | null; + userId: string; + workspaceId: string; + clicks: number; + lastClicked: string | null; + createdAt: string; + updatedAt: string; + projectId: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.string(), + domain: z.string(), + key: z.string(), + url: z.string(), + archived: z.boolean().default(false), + expiresAt: z.nullable(z.date().transform((v) => v.toISOString())), + expiredUrl: z.nullable(z.string()), + password: z.nullable(z.string()), + proxy: z.boolean().default(false), + title: z.nullable(z.string()), + description: z.nullable(z.string()), + image: z.nullable(z.string()), + rewrite: z.boolean().default(false), + ios: z.nullable(z.string()), + android: z.nullable(z.string()), + geo: z.nullable(z.lazy(() => Geo$.outboundSchema)), + publicStats: z.boolean().default(false), + tagId: z.nullable(z.string()), + tags: z.nullable(z.array(TagSchema$.outboundSchema)), + comments: z.nullable(z.string()), + shortLink: z.string(), + qrCode: z.string(), + utmSource: z.nullable(z.string()), + utmMedium: z.nullable(z.string()), + utmCampaign: z.nullable(z.string()), + utmTerm: z.nullable(z.string()), + utmContent: z.nullable(z.string()), + userId: z.string(), + workspaceId: z.string(), + clicks: z.number().default(0), + lastClicked: z.nullable(z.string()), + createdAt: z.string(), + updatedAt: z.string(), + projectId: z.string(), + }) + .transform((v) => { + return { + id: v.id, + domain: v.domain, + key: v.key, + url: v.url, + archived: v.archived, + expiresAt: v.expiresAt, + expiredUrl: v.expiredUrl, + password: v.password, + proxy: v.proxy, + title: v.title, + description: v.description, + image: v.image, + rewrite: v.rewrite, + ios: v.ios, + android: v.android, + geo: v.geo, + publicStats: v.publicStats, + tagId: v.tagId, + tags: v.tags, + comments: v.comments, + shortLink: v.shortLink, + qrCode: v.qrCode, + utm_source: v.utmSource, + utm_medium: v.utmMedium, + utm_campaign: v.utmCampaign, + utm_term: v.utmTerm, + utm_content: v.utmContent, + userId: v.userId, + workspaceId: v.workspaceId, + clicks: v.clicks, + lastClicked: v.lastClicked, + createdAt: v.createdAt, + updatedAt: v.updatedAt, + projectId: v.projectId, + }; + }); +} diff --git a/src/models/components/security.ts b/src/models/components/security.ts new file mode 100644 index 0000000..3d70b84 --- /dev/null +++ b/src/models/components/security.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type Security = { + token?: string | undefined; +}; + +/** @internal */ +export namespace Security$ { + export type Inbound = { + token?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + token: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.token === undefined ? null : { token: v.token }), + }; + }); + + export type Outbound = { + token?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + token: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.token === undefined ? null : { token: v.token }), + }; + }); +} diff --git a/src/models/components/tagschema.ts b/src/models/components/tagschema.ts new file mode 100644 index 0000000..bffc65a --- /dev/null +++ b/src/models/components/tagschema.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The color of the tag. + */ +export const Color = { + Red: "red", + Yellow: "yellow", + Green: "green", + Blue: "blue", + Purple: "purple", + Pink: "pink", + Brown: "brown", +} as const; +/** + * The color of the tag. + */ +export type Color = (typeof Color)[keyof typeof Color]; + +export type TagSchema = { + /** + * The unique ID of the tag. + */ + id: string; + /** + * The name of the tag. + */ + name: string; + /** + * The color of the tag. + */ + color: Color; +}; + +/** @internal */ +export const Color$ = z.nativeEnum(Color); + +/** @internal */ +export namespace TagSchema$ { + export type Inbound = { + id: string; + name: string; + color: Color; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.string(), + name: z.string(), + color: Color$, + }) + .transform((v) => { + return { + id: v.id, + name: v.name, + color: v.color, + }; + }); + + export type Outbound = { + id: string; + name: string; + color: Color; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.string(), + name: z.string(), + color: Color$, + }) + .transform((v) => { + return { + id: v.id, + name: v.name, + color: v.color, + }; + }); +} diff --git a/src/models/components/workspaceschema.ts b/src/models/components/workspaceschema.ts new file mode 100644 index 0000000..8148689 --- /dev/null +++ b/src/models/components/workspaceschema.ts @@ -0,0 +1,324 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The plan of the workspace. + */ +export const Plan = { + Free: "free", + Pro: "pro", + Business: "business", + BusinessPlus: "business plus", + BusinessExtra: "business extra", + BusinessMax: "business max", + Enterprise: "enterprise", +} as const; +/** + * The plan of the workspace. + */ +export type Plan = (typeof Plan)[keyof typeof Plan]; + +/** + * The role of the authenticated user in the workspace. + */ +export const Role = { + Owner: "owner", + Member: "member", +} as const; +/** + * The role of the authenticated user in the workspace. + */ +export type Role = (typeof Role)[keyof typeof Role]; + +export type Users = { + /** + * The role of the authenticated user in the workspace. + */ + role: Role; +}; + +export type Domains = { + /** + * The domain of the workspace. + */ + slug: string; + /** + * Indicates if the domain is the primary domain. + */ + primary: boolean; +}; + +export type WorkspaceSchema = { + /** + * The unique ID of the workspace. + */ + id: string; + /** + * The name of the workspace. + */ + name: string; + /** + * The slug of the workspace. + */ + slug: string; + /** + * The logo of the workspace. + */ + logo?: string | null | undefined; + /** + * The usage of the workspace. + */ + usage: number; + /** + * The usage limit of the workspace. + */ + usageLimit: number; + /** + * The links usage of the workspace. + */ + linksUsage: number; + /** + * The links limit of the workspace. + */ + linksLimit: number; + /** + * The domains limit of the workspace. + */ + domainsLimit: number; + /** + * The tags limit of the workspace. + */ + tagsLimit: number; + /** + * The users limit of the workspace. + */ + usersLimit: number; + /** + * The plan of the workspace. + */ + plan: Plan; + /** + * The Stripe ID of the workspace. + */ + stripeId: string | null; + /** + * The date and time when the billing cycle starts for the workspace. + */ + billingCycleStart: number; + /** + * The date and time when the workspace was created. + */ + createdAt: string; + /** + * The role of the authenticated user in the workspace. + */ + users: Array; + /** + * The domains of the workspace. + */ + domains: Array; +}; + +/** @internal */ +export const Plan$ = z.nativeEnum(Plan); + +/** @internal */ +export const Role$ = z.nativeEnum(Role); + +/** @internal */ +export namespace Users$ { + export type Inbound = { + role: Role; + }; + + export const inboundSchema: z.ZodType = z + .object({ + role: Role$, + }) + .transform((v) => { + return { + role: v.role, + }; + }); + + export type Outbound = { + role: Role; + }; + + export const outboundSchema: z.ZodType = z + .object({ + role: Role$, + }) + .transform((v) => { + return { + role: v.role, + }; + }); +} + +/** @internal */ +export namespace Domains$ { + export type Inbound = { + slug: string; + primary: boolean; + }; + + export const inboundSchema: z.ZodType = z + .object({ + slug: z.string(), + primary: z.boolean(), + }) + .transform((v) => { + return { + slug: v.slug, + primary: v.primary, + }; + }); + + export type Outbound = { + slug: string; + primary: boolean; + }; + + export const outboundSchema: z.ZodType = z + .object({ + slug: z.string(), + primary: z.boolean(), + }) + .transform((v) => { + return { + slug: v.slug, + primary: v.primary, + }; + }); +} + +/** @internal */ +export namespace WorkspaceSchema$ { + export type Inbound = { + id: string; + name: string; + slug: string; + logo?: string | null | undefined; + usage: number; + usageLimit: number; + linksUsage: number; + linksLimit: number; + domainsLimit: number; + tagsLimit: number; + usersLimit: number; + plan: Plan; + stripeId: string | null; + billingCycleStart: number; + createdAt: string; + users: Array; + domains: Array; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.string(), + name: z.string(), + slug: z.string(), + logo: z.nullable(z.string()).default(null), + usage: z.number(), + usageLimit: z.number(), + linksUsage: z.number(), + linksLimit: z.number(), + domainsLimit: z.number(), + tagsLimit: z.number(), + usersLimit: z.number(), + plan: Plan$, + stripeId: z.nullable(z.string()), + billingCycleStart: z.number(), + createdAt: z.string(), + users: z.array(z.lazy(() => Users$.inboundSchema)), + domains: z.array(z.lazy(() => Domains$.inboundSchema)), + }) + .transform((v) => { + return { + id: v.id, + name: v.name, + slug: v.slug, + logo: v.logo, + usage: v.usage, + usageLimit: v.usageLimit, + linksUsage: v.linksUsage, + linksLimit: v.linksLimit, + domainsLimit: v.domainsLimit, + tagsLimit: v.tagsLimit, + usersLimit: v.usersLimit, + plan: v.plan, + stripeId: v.stripeId, + billingCycleStart: v.billingCycleStart, + createdAt: v.createdAt, + users: v.users, + domains: v.domains, + }; + }); + + export type Outbound = { + id: string; + name: string; + slug: string; + logo: string | null; + usage: number; + usageLimit: number; + linksUsage: number; + linksLimit: number; + domainsLimit: number; + tagsLimit: number; + usersLimit: number; + plan: Plan; + stripeId: string | null; + billingCycleStart: number; + createdAt: string; + users: Array; + domains: Array; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.string(), + name: z.string(), + slug: z.string(), + logo: z.nullable(z.string()).default(null), + usage: z.number(), + usageLimit: z.number(), + linksUsage: z.number(), + linksLimit: z.number(), + domainsLimit: z.number(), + tagsLimit: z.number(), + usersLimit: z.number(), + plan: Plan$, + stripeId: z.nullable(z.string()), + billingCycleStart: z.number(), + createdAt: z.string(), + users: z.array(z.lazy(() => Users$.outboundSchema)), + domains: z.array(z.lazy(() => Domains$.outboundSchema)), + }) + .transform((v) => { + return { + id: v.id, + name: v.name, + slug: v.slug, + logo: v.logo, + usage: v.usage, + usageLimit: v.usageLimit, + linksUsage: v.linksUsage, + linksLimit: v.linksLimit, + domainsLimit: v.domainsLimit, + tagsLimit: v.tagsLimit, + usersLimit: v.usersLimit, + plan: v.plan, + stripeId: v.stripeId, + billingCycleStart: v.billingCycleStart, + createdAt: v.createdAt, + users: v.users, + domains: v.domains, + }; + }); +} diff --git a/src/models/errors/badrequest.ts b/src/models/errors/badrequest.ts new file mode 100644 index 0000000..041058c --- /dev/null +++ b/src/models/errors/badrequest.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * A short code indicating the error code returned. + */ +export const Code = { + BadRequest: "bad_request", +} as const; +/** + * A short code indicating the error code returned. + */ +export type Code = (typeof Code)[keyof typeof Code]; + +export type ErrorT = { + /** + * A short code indicating the error code returned. + */ + code: Code; + /** + * A human readable explanation of what went wrong. + */ + message: string; + /** + * A link to our documentation with more details about this error code + */ + docUrl?: string | undefined; +}; + +/** + * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). + */ +export type BadRequestData = { + error: ErrorT; +}; + +/** + * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). + */ +export class BadRequest extends Error { + error: ErrorT; + + /** The original data that was passed to this error instance. */ + data$: BadRequestData; + + constructor(err: BadRequestData) { + super(""); + this.data$ = err; + + this.error = err.error; + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "BadRequest"; + } +} + +/** @internal */ +export const Code$ = z.nativeEnum(Code); + +/** @internal */ +export namespace ErrorT$ { + export type Inbound = { + code: Code; + message: string; + doc_url?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: Code$, + message: z.string(), + doc_url: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }), + }; + }); + + export type Outbound = { + code: Code; + message: string; + doc_url?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: Code$, + message: z.string(), + docUrl: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }), + }; + }); +} + +/** @internal */ +export namespace BadRequest$ { + export type Inbound = { + error: ErrorT$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + error: z.lazy(() => ErrorT$.inboundSchema), + }) + .transform((v) => { + return new BadRequest({ + error: v.error, + }); + }); + + export type Outbound = { + error: ErrorT$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(BadRequest) + .transform((v) => v.data$) + .pipe( + z + .object({ + error: z.lazy(() => ErrorT$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }) + ); +} diff --git a/src/models/errors/conflict.ts b/src/models/errors/conflict.ts new file mode 100644 index 0000000..9f48942 --- /dev/null +++ b/src/models/errors/conflict.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * A short code indicating the error code returned. + */ +export const ConflictCode = { + Conflict: "conflict", +} as const; +/** + * A short code indicating the error code returned. + */ +export type ConflictCode = (typeof ConflictCode)[keyof typeof ConflictCode]; + +export type ConflictError = { + /** + * A short code indicating the error code returned. + */ + code: ConflictCode; + /** + * A human readable explanation of what went wrong. + */ + message: string; + /** + * A link to our documentation with more details about this error code + */ + docUrl?: string | undefined; +}; + +/** + * This response is sent when a request conflicts with the current state of the server. + */ +export type ConflictData = { + error: ConflictError; +}; + +/** + * This response is sent when a request conflicts with the current state of the server. + */ +export class Conflict extends Error { + error: ConflictError; + + /** The original data that was passed to this error instance. */ + data$: ConflictData; + + constructor(err: ConflictData) { + super(""); + this.data$ = err; + + this.error = err.error; + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "Conflict"; + } +} + +/** @internal */ +export const ConflictCode$ = z.nativeEnum(ConflictCode); + +/** @internal */ +export namespace ConflictError$ { + export type Inbound = { + code: ConflictCode; + message: string; + doc_url?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: ConflictCode$, + message: z.string(), + doc_url: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }), + }; + }); + + export type Outbound = { + code: ConflictCode; + message: string; + doc_url?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: ConflictCode$, + message: z.string(), + docUrl: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }), + }; + }); +} + +/** @internal */ +export namespace Conflict$ { + export type Inbound = { + error: ConflictError$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + error: z.lazy(() => ConflictError$.inboundSchema), + }) + .transform((v) => { + return new Conflict({ + error: v.error, + }); + }); + + export type Outbound = { + error: ConflictError$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(Conflict) + .transform((v) => v.data$) + .pipe( + z + .object({ + error: z.lazy(() => ConflictError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }) + ); +} diff --git a/src/models/errors/forbidden.ts b/src/models/errors/forbidden.ts new file mode 100644 index 0000000..6de1462 --- /dev/null +++ b/src/models/errors/forbidden.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * A short code indicating the error code returned. + */ +export const ForbiddenCode = { + Forbidden: "forbidden", +} as const; +/** + * A short code indicating the error code returned. + */ +export type ForbiddenCode = (typeof ForbiddenCode)[keyof typeof ForbiddenCode]; + +export type ForbiddenError = { + /** + * A short code indicating the error code returned. + */ + code: ForbiddenCode; + /** + * A human readable explanation of what went wrong. + */ + message: string; + /** + * A link to our documentation with more details about this error code + */ + docUrl?: string | undefined; +}; + +/** + * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. + */ +export type ForbiddenData = { + error: ForbiddenError; +}; + +/** + * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. + */ +export class Forbidden extends Error { + error: ForbiddenError; + + /** The original data that was passed to this error instance. */ + data$: ForbiddenData; + + constructor(err: ForbiddenData) { + super(""); + this.data$ = err; + + this.error = err.error; + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "Forbidden"; + } +} + +/** @internal */ +export const ForbiddenCode$ = z.nativeEnum(ForbiddenCode); + +/** @internal */ +export namespace ForbiddenError$ { + export type Inbound = { + code: ForbiddenCode; + message: string; + doc_url?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: ForbiddenCode$, + message: z.string(), + doc_url: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }), + }; + }); + + export type Outbound = { + code: ForbiddenCode; + message: string; + doc_url?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: ForbiddenCode$, + message: z.string(), + docUrl: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }), + }; + }); +} + +/** @internal */ +export namespace Forbidden$ { + export type Inbound = { + error: ForbiddenError$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + error: z.lazy(() => ForbiddenError$.inboundSchema), + }) + .transform((v) => { + return new Forbidden({ + error: v.error, + }); + }); + + export type Outbound = { + error: ForbiddenError$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(Forbidden) + .transform((v) => v.data$) + .pipe( + z + .object({ + error: z.lazy(() => ForbiddenError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }) + ); +} diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts new file mode 100644 index 0000000..6e1e52b --- /dev/null +++ b/src/models/errors/index.ts @@ -0,0 +1,15 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./badrequest"; +export * from "./conflict"; +export * from "./forbidden"; +export * from "./internalservererror"; +export * from "./inviteexpired"; +export * from "./notfound"; +export * from "./ratelimitexceeded"; +export * from "./sdkerror"; +export * from "./sdkvalidationerror"; +export * from "./unauthorized"; +export * from "./unprocessableentity"; diff --git a/src/models/errors/internalservererror.ts b/src/models/errors/internalservererror.ts new file mode 100644 index 0000000..9df7162 --- /dev/null +++ b/src/models/errors/internalservererror.ts @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * A short code indicating the error code returned. + */ +export const InternalServerErrorCode = { + InternalServerError: "internal_server_error", +} as const; +/** + * A short code indicating the error code returned. + */ +export type InternalServerErrorCode = + (typeof InternalServerErrorCode)[keyof typeof InternalServerErrorCode]; + +export type InternalServerErrorError = { + /** + * A short code indicating the error code returned. + */ + code: InternalServerErrorCode; + /** + * A human readable explanation of what went wrong. + */ + message: string; + /** + * A link to our documentation with more details about this error code + */ + docUrl?: string | undefined; +}; + +/** + * The server has encountered a situation it does not know how to handle. + */ +export type InternalServerErrorData = { + error: InternalServerErrorError; +}; + +/** + * The server has encountered a situation it does not know how to handle. + */ +export class InternalServerError extends Error { + error: InternalServerErrorError; + + /** The original data that was passed to this error instance. */ + data$: InternalServerErrorData; + + constructor(err: InternalServerErrorData) { + super(""); + this.data$ = err; + + this.error = err.error; + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "InternalServerError"; + } +} + +/** @internal */ +export const InternalServerErrorCode$ = z.nativeEnum(InternalServerErrorCode); + +/** @internal */ +export namespace InternalServerErrorError$ { + export type Inbound = { + code: InternalServerErrorCode; + message: string; + doc_url?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: InternalServerErrorCode$, + message: z.string(), + doc_url: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }), + }; + }); + + export type Outbound = { + code: InternalServerErrorCode; + message: string; + doc_url?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: InternalServerErrorCode$, + message: z.string(), + docUrl: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }), + }; + }); +} + +/** @internal */ +export namespace InternalServerError$ { + export type Inbound = { + error: InternalServerErrorError$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + error: z.lazy(() => InternalServerErrorError$.inboundSchema), + }) + .transform((v) => { + return new InternalServerError({ + error: v.error, + }); + }); + + export type Outbound = { + error: InternalServerErrorError$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(InternalServerError) + .transform((v) => v.data$) + .pipe( + z + .object({ + error: z.lazy(() => InternalServerErrorError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }) + ); +} diff --git a/src/models/errors/inviteexpired.ts b/src/models/errors/inviteexpired.ts new file mode 100644 index 0000000..bd30b14 --- /dev/null +++ b/src/models/errors/inviteexpired.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * A short code indicating the error code returned. + */ +export const InviteExpiredCode = { + InviteExpired: "invite_expired", +} as const; +/** + * A short code indicating the error code returned. + */ +export type InviteExpiredCode = (typeof InviteExpiredCode)[keyof typeof InviteExpiredCode]; + +export type InviteExpiredError = { + /** + * A short code indicating the error code returned. + */ + code: InviteExpiredCode; + /** + * A human readable explanation of what went wrong. + */ + message: string; + /** + * A link to our documentation with more details about this error code + */ + docUrl?: string | undefined; +}; + +/** + * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + */ +export type InviteExpiredData = { + error: InviteExpiredError; +}; + +/** + * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + */ +export class InviteExpired extends Error { + error: InviteExpiredError; + + /** The original data that was passed to this error instance. */ + data$: InviteExpiredData; + + constructor(err: InviteExpiredData) { + super(""); + this.data$ = err; + + this.error = err.error; + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "InviteExpired"; + } +} + +/** @internal */ +export const InviteExpiredCode$ = z.nativeEnum(InviteExpiredCode); + +/** @internal */ +export namespace InviteExpiredError$ { + export type Inbound = { + code: InviteExpiredCode; + message: string; + doc_url?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: InviteExpiredCode$, + message: z.string(), + doc_url: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }), + }; + }); + + export type Outbound = { + code: InviteExpiredCode; + message: string; + doc_url?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: InviteExpiredCode$, + message: z.string(), + docUrl: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }), + }; + }); +} + +/** @internal */ +export namespace InviteExpired$ { + export type Inbound = { + error: InviteExpiredError$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + error: z.lazy(() => InviteExpiredError$.inboundSchema), + }) + .transform((v) => { + return new InviteExpired({ + error: v.error, + }); + }); + + export type Outbound = { + error: InviteExpiredError$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(InviteExpired) + .transform((v) => v.data$) + .pipe( + z + .object({ + error: z.lazy(() => InviteExpiredError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }) + ); +} diff --git a/src/models/errors/notfound.ts b/src/models/errors/notfound.ts new file mode 100644 index 0000000..dec2201 --- /dev/null +++ b/src/models/errors/notfound.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * A short code indicating the error code returned. + */ +export const NotFoundCode = { + NotFound: "not_found", +} as const; +/** + * A short code indicating the error code returned. + */ +export type NotFoundCode = (typeof NotFoundCode)[keyof typeof NotFoundCode]; + +export type NotFoundError = { + /** + * A short code indicating the error code returned. + */ + code: NotFoundCode; + /** + * A human readable explanation of what went wrong. + */ + message: string; + /** + * A link to our documentation with more details about this error code + */ + docUrl?: string | undefined; +}; + +/** + * The server cannot find the requested resource. + */ +export type NotFoundData = { + error: NotFoundError; +}; + +/** + * The server cannot find the requested resource. + */ +export class NotFound extends Error { + error: NotFoundError; + + /** The original data that was passed to this error instance. */ + data$: NotFoundData; + + constructor(err: NotFoundData) { + super(""); + this.data$ = err; + + this.error = err.error; + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "NotFound"; + } +} + +/** @internal */ +export const NotFoundCode$ = z.nativeEnum(NotFoundCode); + +/** @internal */ +export namespace NotFoundError$ { + export type Inbound = { + code: NotFoundCode; + message: string; + doc_url?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: NotFoundCode$, + message: z.string(), + doc_url: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }), + }; + }); + + export type Outbound = { + code: NotFoundCode; + message: string; + doc_url?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: NotFoundCode$, + message: z.string(), + docUrl: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }), + }; + }); +} + +/** @internal */ +export namespace NotFound$ { + export type Inbound = { + error: NotFoundError$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + error: z.lazy(() => NotFoundError$.inboundSchema), + }) + .transform((v) => { + return new NotFound({ + error: v.error, + }); + }); + + export type Outbound = { + error: NotFoundError$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(NotFound) + .transform((v) => v.data$) + .pipe( + z + .object({ + error: z.lazy(() => NotFoundError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }) + ); +} diff --git a/src/models/errors/ratelimitexceeded.ts b/src/models/errors/ratelimitexceeded.ts new file mode 100644 index 0000000..e648be9 --- /dev/null +++ b/src/models/errors/ratelimitexceeded.ts @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * A short code indicating the error code returned. + */ +export const RateLimitExceededCode = { + RateLimitExceeded: "rate_limit_exceeded", +} as const; +/** + * A short code indicating the error code returned. + */ +export type RateLimitExceededCode = + (typeof RateLimitExceededCode)[keyof typeof RateLimitExceededCode]; + +export type RateLimitExceededError = { + /** + * A short code indicating the error code returned. + */ + code: RateLimitExceededCode; + /** + * A human readable explanation of what went wrong. + */ + message: string; + /** + * A link to our documentation with more details about this error code + */ + docUrl?: string | undefined; +}; + +/** + * The user has sent too many requests in a given amount of time ("rate limiting") + */ +export type RateLimitExceededData = { + error: RateLimitExceededError; +}; + +/** + * The user has sent too many requests in a given amount of time ("rate limiting") + */ +export class RateLimitExceeded extends Error { + error: RateLimitExceededError; + + /** The original data that was passed to this error instance. */ + data$: RateLimitExceededData; + + constructor(err: RateLimitExceededData) { + super(""); + this.data$ = err; + + this.error = err.error; + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "RateLimitExceeded"; + } +} + +/** @internal */ +export const RateLimitExceededCode$ = z.nativeEnum(RateLimitExceededCode); + +/** @internal */ +export namespace RateLimitExceededError$ { + export type Inbound = { + code: RateLimitExceededCode; + message: string; + doc_url?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: RateLimitExceededCode$, + message: z.string(), + doc_url: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }), + }; + }); + + export type Outbound = { + code: RateLimitExceededCode; + message: string; + doc_url?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: RateLimitExceededCode$, + message: z.string(), + docUrl: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }), + }; + }); +} + +/** @internal */ +export namespace RateLimitExceeded$ { + export type Inbound = { + error: RateLimitExceededError$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + error: z.lazy(() => RateLimitExceededError$.inboundSchema), + }) + .transform((v) => { + return new RateLimitExceeded({ + error: v.error, + }); + }); + + export type Outbound = { + error: RateLimitExceededError$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(RateLimitExceeded) + .transform((v) => v.data$) + .pipe( + z + .object({ + error: z.lazy(() => RateLimitExceededError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }) + ); +} diff --git a/src/models/errors/sdkerror.ts b/src/models/errors/sdkerror.ts new file mode 100644 index 0000000..1f66915 --- /dev/null +++ b/src/models/errors/sdkerror.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export class SDKError extends Error { + public readonly statusCode: number; + + constructor( + message: string, + public readonly rawResponse: Response, + public readonly body: string = "" + ) { + const statusCode = rawResponse.status; + const bodyString = body.length > 0 ? `\n${body}` : ""; + + super(`${message}: Status ${statusCode}${bodyString}`); + + this.statusCode = statusCode; + + this.name = "SDKError"; + } +} diff --git a/src/models/errors/sdkvalidationerror.ts b/src/models/errors/sdkvalidationerror.ts new file mode 100644 index 0000000..fe38e77 --- /dev/null +++ b/src/models/errors/sdkvalidationerror.ts @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export class SDKValidationError extends Error { + /** + * The raw value that failed validation. + */ + public readonly rawValue: unknown; + + constructor(message: string, cause: unknown, rawValue: unknown) { + super(message); + this.name = "SDKValidationError"; + this.cause = cause; + this.rawValue = rawValue; + } + + public override toString() { + return `${this.message}: ${this.cause}`; + } + + /** + * Return a pretty-formatted error message if the underlying validation error + * is a ZodError or some other recognized error type, otherwise return the + * default error message. + */ + public pretty() { + if (this.cause instanceof z.ZodError) { + return `${this.message}\n${formatZodError(this.cause)}`; + } else { + return this.toString(); + } + } +} + +export function formatZodError(err: z.ZodError, level = 0): string { + let pre = " ".repeat(level); + pre = level > 0 ? `│${pre}` : pre; + pre += " ".repeat(level); + + let message = ""; + const append = (str: string) => (message += `\n${pre}${str}`); + + const len = err.issues.length; + const headline = len === 1 ? `${len} issue found` : `${len} issues found`; + + if (len) { + append(`┌ ${headline}:`); + } + + for (const issue of err.issues) { + let path = issue.path.join("."); + path = path ? `.${path}` : ""; + append(`│ • [${path}]: ${issue.message} (${issue.code})`); + switch (issue.code) { + case "invalid_literal": + case "invalid_type": { + append(`│ Want: ${issue.expected}`); + append(`│ Got: ${issue.received}`); + break; + } + case "unrecognized_keys": { + append(`│ Keys: ${issue.keys.join(", ")}`); + break; + } + case "invalid_enum_value": { + append(`│ Allowed: ${issue.options.join(", ")}`); + append(`│ Got: ${issue.received}`); + break; + } + case "invalid_union_discriminator": { + append(`│ Allowed: ${issue.options.join(", ")}`); + break; + } + case "invalid_union": { + const len = issue.unionErrors.length; + append( + `│ ✖︎ Attemped to deserialize into one of ${len} union members:`, + ); + issue.unionErrors.forEach((err, i) => { + append(`│ ✖︎ Member ${i + 1} of ${len}`); + append(`${formatZodError(err, level + 1)}`); + }); + } + } + } + + if (err.issues.length) { + append(`└─*`); + } + + return message.slice(1); +} diff --git a/src/models/errors/unauthorized.ts b/src/models/errors/unauthorized.ts new file mode 100644 index 0000000..e9cd1dd --- /dev/null +++ b/src/models/errors/unauthorized.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * A short code indicating the error code returned. + */ +export const UnauthorizedCode = { + Unauthorized: "unauthorized", +} as const; +/** + * A short code indicating the error code returned. + */ +export type UnauthorizedCode = (typeof UnauthorizedCode)[keyof typeof UnauthorizedCode]; + +export type UnauthorizedError = { + /** + * A short code indicating the error code returned. + */ + code: UnauthorizedCode; + /** + * A human readable explanation of what went wrong. + */ + message: string; + /** + * A link to our documentation with more details about this error code + */ + docUrl?: string | undefined; +}; + +/** + * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + */ +export type UnauthorizedData = { + error: UnauthorizedError; +}; + +/** + * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + */ +export class Unauthorized extends Error { + error: UnauthorizedError; + + /** The original data that was passed to this error instance. */ + data$: UnauthorizedData; + + constructor(err: UnauthorizedData) { + super(""); + this.data$ = err; + + this.error = err.error; + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "Unauthorized"; + } +} + +/** @internal */ +export const UnauthorizedCode$ = z.nativeEnum(UnauthorizedCode); + +/** @internal */ +export namespace UnauthorizedError$ { + export type Inbound = { + code: UnauthorizedCode; + message: string; + doc_url?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: UnauthorizedCode$, + message: z.string(), + doc_url: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }), + }; + }); + + export type Outbound = { + code: UnauthorizedCode; + message: string; + doc_url?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: UnauthorizedCode$, + message: z.string(), + docUrl: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }), + }; + }); +} + +/** @internal */ +export namespace Unauthorized$ { + export type Inbound = { + error: UnauthorizedError$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + error: z.lazy(() => UnauthorizedError$.inboundSchema), + }) + .transform((v) => { + return new Unauthorized({ + error: v.error, + }); + }); + + export type Outbound = { + error: UnauthorizedError$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(Unauthorized) + .transform((v) => v.data$) + .pipe( + z + .object({ + error: z.lazy(() => UnauthorizedError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }) + ); +} diff --git a/src/models/errors/unprocessableentity.ts b/src/models/errors/unprocessableentity.ts new file mode 100644 index 0000000..058b65f --- /dev/null +++ b/src/models/errors/unprocessableentity.ts @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * A short code indicating the error code returned. + */ +export const UnprocessableEntityCode = { + UnprocessableEntity: "unprocessable_entity", +} as const; +/** + * A short code indicating the error code returned. + */ +export type UnprocessableEntityCode = + (typeof UnprocessableEntityCode)[keyof typeof UnprocessableEntityCode]; + +export type UnprocessableEntityError = { + /** + * A short code indicating the error code returned. + */ + code: UnprocessableEntityCode; + /** + * A human readable explanation of what went wrong. + */ + message: string; + /** + * A link to our documentation with more details about this error code + */ + docUrl?: string | undefined; +}; + +/** + * The request was well-formed but was unable to be followed due to semantic errors. + */ +export type UnprocessableEntityData = { + error: UnprocessableEntityError; +}; + +/** + * The request was well-formed but was unable to be followed due to semantic errors. + */ +export class UnprocessableEntity extends Error { + error: UnprocessableEntityError; + + /** The original data that was passed to this error instance. */ + data$: UnprocessableEntityData; + + constructor(err: UnprocessableEntityData) { + super(""); + this.data$ = err; + + this.error = err.error; + + this.message = + "message" in err && typeof err.message === "string" + ? err.message + : "API error occurred"; + + this.name = "UnprocessableEntity"; + } +} + +/** @internal */ +export const UnprocessableEntityCode$ = z.nativeEnum(UnprocessableEntityCode); + +/** @internal */ +export namespace UnprocessableEntityError$ { + export type Inbound = { + code: UnprocessableEntityCode; + message: string; + doc_url?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + code: UnprocessableEntityCode$, + message: z.string(), + doc_url: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.doc_url === undefined ? null : { docUrl: v.doc_url }), + }; + }); + + export type Outbound = { + code: UnprocessableEntityCode; + message: string; + doc_url?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + code: UnprocessableEntityCode$, + message: z.string(), + docUrl: z.string().optional(), + }) + .transform((v) => { + return { + code: v.code, + message: v.message, + ...(v.docUrl === undefined ? null : { doc_url: v.docUrl }), + }; + }); +} + +/** @internal */ +export namespace UnprocessableEntity$ { + export type Inbound = { + error: UnprocessableEntityError$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + error: z.lazy(() => UnprocessableEntityError$.inboundSchema), + }) + .transform((v) => { + return new UnprocessableEntity({ + error: v.error, + }); + }); + + export type Outbound = { + error: UnprocessableEntityError$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .instanceof(UnprocessableEntity) + .transform((v) => v.data$) + .pipe( + z + .object({ + error: z.lazy(() => UnprocessableEntityError$.outboundSchema), + }) + .transform((v) => { + return { + error: v.error, + }; + }) + ); +} diff --git a/src/models/operations/bulkcreatelinks.ts b/src/models/operations/bulkcreatelinks.ts new file mode 100644 index 0000000..7032229 --- /dev/null +++ b/src/models/operations/bulkcreatelinks.ts @@ -0,0 +1,2785 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The unique IDs of the tags assigned to the short link. + */ +export type BulkCreateLinksTagIds = string | Array; + +/** + * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. + */ +export type BulkCreateLinksGeo = { + /** + * The destination URL of the short link. + */ + af?: string | undefined; + /** + * The destination URL of the short link. + */ + al?: string | undefined; + /** + * The destination URL of the short link. + */ + dz?: string | undefined; + /** + * The destination URL of the short link. + */ + as?: string | undefined; + /** + * The destination URL of the short link. + */ + ad?: string | undefined; + /** + * The destination URL of the short link. + */ + ao?: string | undefined; + /** + * The destination URL of the short link. + */ + ai?: string | undefined; + /** + * The destination URL of the short link. + */ + aq?: string | undefined; + /** + * The destination URL of the short link. + */ + ag?: string | undefined; + /** + * The destination URL of the short link. + */ + ar?: string | undefined; + /** + * The destination URL of the short link. + */ + am?: string | undefined; + /** + * The destination URL of the short link. + */ + aw?: string | undefined; + /** + * The destination URL of the short link. + */ + au?: string | undefined; + /** + * The destination URL of the short link. + */ + at?: string | undefined; + /** + * The destination URL of the short link. + */ + az?: string | undefined; + /** + * The destination URL of the short link. + */ + bs?: string | undefined; + /** + * The destination URL of the short link. + */ + bh?: string | undefined; + /** + * The destination URL of the short link. + */ + bd?: string | undefined; + /** + * The destination URL of the short link. + */ + bb?: string | undefined; + /** + * The destination URL of the short link. + */ + by?: string | undefined; + /** + * The destination URL of the short link. + */ + be?: string | undefined; + /** + * The destination URL of the short link. + */ + bz?: string | undefined; + /** + * The destination URL of the short link. + */ + bj?: string | undefined; + /** + * The destination URL of the short link. + */ + bm?: string | undefined; + /** + * The destination URL of the short link. + */ + bt?: string | undefined; + /** + * The destination URL of the short link. + */ + bo?: string | undefined; + /** + * The destination URL of the short link. + */ + ba?: string | undefined; + /** + * The destination URL of the short link. + */ + bw?: string | undefined; + /** + * The destination URL of the short link. + */ + bv?: string | undefined; + /** + * The destination URL of the short link. + */ + br?: string | undefined; + /** + * The destination URL of the short link. + */ + io?: string | undefined; + /** + * The destination URL of the short link. + */ + bn?: string | undefined; + /** + * The destination URL of the short link. + */ + bg?: string | undefined; + /** + * The destination URL of the short link. + */ + bf?: string | undefined; + /** + * The destination URL of the short link. + */ + bi?: string | undefined; + /** + * The destination URL of the short link. + */ + kh?: string | undefined; + /** + * The destination URL of the short link. + */ + cm?: string | undefined; + /** + * The destination URL of the short link. + */ + ca?: string | undefined; + /** + * The destination URL of the short link. + */ + cv?: string | undefined; + /** + * The destination URL of the short link. + */ + ky?: string | undefined; + /** + * The destination URL of the short link. + */ + cf?: string | undefined; + /** + * The destination URL of the short link. + */ + td?: string | undefined; + /** + * The destination URL of the short link. + */ + cl?: string | undefined; + /** + * The destination URL of the short link. + */ + cn?: string | undefined; + /** + * The destination URL of the short link. + */ + cx?: string | undefined; + /** + * The destination URL of the short link. + */ + cc?: string | undefined; + /** + * The destination URL of the short link. + */ + co?: string | undefined; + /** + * The destination URL of the short link. + */ + km?: string | undefined; + /** + * The destination URL of the short link. + */ + cg?: string | undefined; + /** + * The destination URL of the short link. + */ + cd?: string | undefined; + /** + * The destination URL of the short link. + */ + ck?: string | undefined; + /** + * The destination URL of the short link. + */ + cr?: string | undefined; + /** + * The destination URL of the short link. + */ + ci?: string | undefined; + /** + * The destination URL of the short link. + */ + hr?: string | undefined; + /** + * The destination URL of the short link. + */ + cu?: string | undefined; + /** + * The destination URL of the short link. + */ + cy?: string | undefined; + /** + * The destination URL of the short link. + */ + cz?: string | undefined; + /** + * The destination URL of the short link. + */ + dk?: string | undefined; + /** + * The destination URL of the short link. + */ + dj?: string | undefined; + /** + * The destination URL of the short link. + */ + dm?: string | undefined; + /** + * The destination URL of the short link. + */ + do?: string | undefined; + /** + * The destination URL of the short link. + */ + ec?: string | undefined; + /** + * The destination URL of the short link. + */ + eg?: string | undefined; + /** + * The destination URL of the short link. + */ + sv?: string | undefined; + /** + * The destination URL of the short link. + */ + gq?: string | undefined; + /** + * The destination URL of the short link. + */ + er?: string | undefined; + /** + * The destination URL of the short link. + */ + ee?: string | undefined; + /** + * The destination URL of the short link. + */ + et?: string | undefined; + /** + * The destination URL of the short link. + */ + fk?: string | undefined; + /** + * The destination URL of the short link. + */ + fo?: string | undefined; + /** + * The destination URL of the short link. + */ + fj?: string | undefined; + /** + * The destination URL of the short link. + */ + fi?: string | undefined; + /** + * The destination URL of the short link. + */ + fr?: string | undefined; + /** + * The destination URL of the short link. + */ + gf?: string | undefined; + /** + * The destination URL of the short link. + */ + pf?: string | undefined; + /** + * The destination URL of the short link. + */ + tf?: string | undefined; + /** + * The destination URL of the short link. + */ + ga?: string | undefined; + /** + * The destination URL of the short link. + */ + gm?: string | undefined; + /** + * The destination URL of the short link. + */ + ge?: string | undefined; + /** + * The destination URL of the short link. + */ + de?: string | undefined; + /** + * The destination URL of the short link. + */ + gh?: string | undefined; + /** + * The destination URL of the short link. + */ + gi?: string | undefined; + /** + * The destination URL of the short link. + */ + gr?: string | undefined; + /** + * The destination URL of the short link. + */ + gl?: string | undefined; + /** + * The destination URL of the short link. + */ + gd?: string | undefined; + /** + * The destination URL of the short link. + */ + gp?: string | undefined; + /** + * The destination URL of the short link. + */ + gu?: string | undefined; + /** + * The destination URL of the short link. + */ + gt?: string | undefined; + /** + * The destination URL of the short link. + */ + gn?: string | undefined; + /** + * The destination URL of the short link. + */ + gw?: string | undefined; + /** + * The destination URL of the short link. + */ + gy?: string | undefined; + /** + * The destination URL of the short link. + */ + ht?: string | undefined; + /** + * The destination URL of the short link. + */ + hm?: string | undefined; + /** + * The destination URL of the short link. + */ + va?: string | undefined; + /** + * The destination URL of the short link. + */ + hn?: string | undefined; + /** + * The destination URL of the short link. + */ + hk?: string | undefined; + /** + * The destination URL of the short link. + */ + hu?: string | undefined; + /** + * The destination URL of the short link. + */ + is?: string | undefined; + /** + * The destination URL of the short link. + */ + in?: string | undefined; + /** + * The destination URL of the short link. + */ + id?: string | undefined; + /** + * The destination URL of the short link. + */ + ir?: string | undefined; + /** + * The destination URL of the short link. + */ + iq?: string | undefined; + /** + * The destination URL of the short link. + */ + ie?: string | undefined; + /** + * The destination URL of the short link. + */ + il?: string | undefined; + /** + * The destination URL of the short link. + */ + it?: string | undefined; + /** + * The destination URL of the short link. + */ + jm?: string | undefined; + /** + * The destination URL of the short link. + */ + jp?: string | undefined; + /** + * The destination URL of the short link. + */ + jo?: string | undefined; + /** + * The destination URL of the short link. + */ + kz?: string | undefined; + /** + * The destination URL of the short link. + */ + ke?: string | undefined; + /** + * The destination URL of the short link. + */ + ki?: string | undefined; + /** + * The destination URL of the short link. + */ + kp?: string | undefined; + /** + * The destination URL of the short link. + */ + kr?: string | undefined; + /** + * The destination URL of the short link. + */ + kw?: string | undefined; + /** + * The destination URL of the short link. + */ + kg?: string | undefined; + /** + * The destination URL of the short link. + */ + la?: string | undefined; + /** + * The destination URL of the short link. + */ + lv?: string | undefined; + /** + * The destination URL of the short link. + */ + lb?: string | undefined; + /** + * The destination URL of the short link. + */ + ls?: string | undefined; + /** + * The destination URL of the short link. + */ + lr?: string | undefined; + /** + * The destination URL of the short link. + */ + ly?: string | undefined; + /** + * The destination URL of the short link. + */ + li?: string | undefined; + /** + * The destination URL of the short link. + */ + lt?: string | undefined; + /** + * The destination URL of the short link. + */ + lu?: string | undefined; + /** + * The destination URL of the short link. + */ + mo?: string | undefined; + /** + * The destination URL of the short link. + */ + mg?: string | undefined; + /** + * The destination URL of the short link. + */ + mw?: string | undefined; + /** + * The destination URL of the short link. + */ + my?: string | undefined; + /** + * The destination URL of the short link. + */ + mv?: string | undefined; + /** + * The destination URL of the short link. + */ + ml?: string | undefined; + /** + * The destination URL of the short link. + */ + mt?: string | undefined; + /** + * The destination URL of the short link. + */ + mh?: string | undefined; + /** + * The destination URL of the short link. + */ + mq?: string | undefined; + /** + * The destination URL of the short link. + */ + mr?: string | undefined; + /** + * The destination URL of the short link. + */ + mu?: string | undefined; + /** + * The destination URL of the short link. + */ + yt?: string | undefined; + /** + * The destination URL of the short link. + */ + mx?: string | undefined; + /** + * The destination URL of the short link. + */ + fm?: string | undefined; + /** + * The destination URL of the short link. + */ + md?: string | undefined; + /** + * The destination URL of the short link. + */ + mc?: string | undefined; + /** + * The destination URL of the short link. + */ + mn?: string | undefined; + /** + * The destination URL of the short link. + */ + ms?: string | undefined; + /** + * The destination URL of the short link. + */ + ma?: string | undefined; + /** + * The destination URL of the short link. + */ + mz?: string | undefined; + /** + * The destination URL of the short link. + */ + mm?: string | undefined; + /** + * The destination URL of the short link. + */ + na?: string | undefined; + /** + * The destination URL of the short link. + */ + nr?: string | undefined; + /** + * The destination URL of the short link. + */ + np?: string | undefined; + /** + * The destination URL of the short link. + */ + nl?: string | undefined; + /** + * The destination URL of the short link. + */ + nc?: string | undefined; + /** + * The destination URL of the short link. + */ + nz?: string | undefined; + /** + * The destination URL of the short link. + */ + ni?: string | undefined; + /** + * The destination URL of the short link. + */ + ne?: string | undefined; + /** + * The destination URL of the short link. + */ + ng?: string | undefined; + /** + * The destination URL of the short link. + */ + nu?: string | undefined; + /** + * The destination URL of the short link. + */ + nf?: string | undefined; + /** + * The destination URL of the short link. + */ + mk?: string | undefined; + /** + * The destination URL of the short link. + */ + mp?: string | undefined; + /** + * The destination URL of the short link. + */ + no?: string | undefined; + /** + * The destination URL of the short link. + */ + om?: string | undefined; + /** + * The destination URL of the short link. + */ + pk?: string | undefined; + /** + * The destination URL of the short link. + */ + pw?: string | undefined; + /** + * The destination URL of the short link. + */ + ps?: string | undefined; + /** + * The destination URL of the short link. + */ + pa?: string | undefined; + /** + * The destination URL of the short link. + */ + pg?: string | undefined; + /** + * The destination URL of the short link. + */ + py?: string | undefined; + /** + * The destination URL of the short link. + */ + pe?: string | undefined; + /** + * The destination URL of the short link. + */ + ph?: string | undefined; + /** + * The destination URL of the short link. + */ + pn?: string | undefined; + /** + * The destination URL of the short link. + */ + pl?: string | undefined; + /** + * The destination URL of the short link. + */ + pt?: string | undefined; + /** + * The destination URL of the short link. + */ + pr?: string | undefined; + /** + * The destination URL of the short link. + */ + qa?: string | undefined; + /** + * The destination URL of the short link. + */ + re?: string | undefined; + /** + * The destination URL of the short link. + */ + ro?: string | undefined; + /** + * The destination URL of the short link. + */ + ru?: string | undefined; + /** + * The destination URL of the short link. + */ + rw?: string | undefined; + /** + * The destination URL of the short link. + */ + sh?: string | undefined; + /** + * The destination URL of the short link. + */ + kn?: string | undefined; + /** + * The destination URL of the short link. + */ + lc?: string | undefined; + /** + * The destination URL of the short link. + */ + pm?: string | undefined; + /** + * The destination URL of the short link. + */ + vc?: string | undefined; + /** + * The destination URL of the short link. + */ + ws?: string | undefined; + /** + * The destination URL of the short link. + */ + sm?: string | undefined; + /** + * The destination URL of the short link. + */ + st?: string | undefined; + /** + * The destination URL of the short link. + */ + sa?: string | undefined; + /** + * The destination URL of the short link. + */ + sn?: string | undefined; + /** + * The destination URL of the short link. + */ + sc?: string | undefined; + /** + * The destination URL of the short link. + */ + sl?: string | undefined; + /** + * The destination URL of the short link. + */ + sg?: string | undefined; + /** + * The destination URL of the short link. + */ + sk?: string | undefined; + /** + * The destination URL of the short link. + */ + si?: string | undefined; + /** + * The destination URL of the short link. + */ + sb?: string | undefined; + /** + * The destination URL of the short link. + */ + so?: string | undefined; + /** + * The destination URL of the short link. + */ + za?: string | undefined; + /** + * The destination URL of the short link. + */ + gs?: string | undefined; + /** + * The destination URL of the short link. + */ + es?: string | undefined; + /** + * The destination URL of the short link. + */ + lk?: string | undefined; + /** + * The destination URL of the short link. + */ + sd?: string | undefined; + /** + * The destination URL of the short link. + */ + sr?: string | undefined; + /** + * The destination URL of the short link. + */ + sj?: string | undefined; + /** + * The destination URL of the short link. + */ + sz?: string | undefined; + /** + * The destination URL of the short link. + */ + se?: string | undefined; + /** + * The destination URL of the short link. + */ + ch?: string | undefined; + /** + * The destination URL of the short link. + */ + sy?: string | undefined; + /** + * The destination URL of the short link. + */ + tw?: string | undefined; + /** + * The destination URL of the short link. + */ + tj?: string | undefined; + /** + * The destination URL of the short link. + */ + tz?: string | undefined; + /** + * The destination URL of the short link. + */ + th?: string | undefined; + /** + * The destination URL of the short link. + */ + tl?: string | undefined; + /** + * The destination URL of the short link. + */ + tg?: string | undefined; + /** + * The destination URL of the short link. + */ + tk?: string | undefined; + /** + * The destination URL of the short link. + */ + to?: string | undefined; + /** + * The destination URL of the short link. + */ + tt?: string | undefined; + /** + * The destination URL of the short link. + */ + tn?: string | undefined; + /** + * The destination URL of the short link. + */ + tr?: string | undefined; + /** + * The destination URL of the short link. + */ + tm?: string | undefined; + /** + * The destination URL of the short link. + */ + tc?: string | undefined; + /** + * The destination URL of the short link. + */ + tv?: string | undefined; + /** + * The destination URL of the short link. + */ + ug?: string | undefined; + /** + * The destination URL of the short link. + */ + ua?: string | undefined; + /** + * The destination URL of the short link. + */ + ae?: string | undefined; + /** + * The destination URL of the short link. + */ + gb?: string | undefined; + /** + * The destination URL of the short link. + */ + us?: string | undefined; + /** + * The destination URL of the short link. + */ + um?: string | undefined; + /** + * The destination URL of the short link. + */ + uy?: string | undefined; + /** + * The destination URL of the short link. + */ + uz?: string | undefined; + /** + * The destination URL of the short link. + */ + vu?: string | undefined; + /** + * The destination URL of the short link. + */ + ve?: string | undefined; + /** + * The destination URL of the short link. + */ + vn?: string | undefined; + /** + * The destination URL of the short link. + */ + vg?: string | undefined; + /** + * The destination URL of the short link. + */ + vi?: string | undefined; + /** + * The destination URL of the short link. + */ + wf?: string | undefined; + /** + * The destination URL of the short link. + */ + eh?: string | undefined; + /** + * The destination URL of the short link. + */ + ye?: string | undefined; + /** + * The destination URL of the short link. + */ + zm?: string | undefined; + /** + * The destination URL of the short link. + */ + zw?: string | undefined; + /** + * The destination URL of the short link. + */ + ax?: string | undefined; + /** + * The destination URL of the short link. + */ + bq?: string | undefined; + /** + * The destination URL of the short link. + */ + cw?: string | undefined; + /** + * The destination URL of the short link. + */ + gg?: string | undefined; + /** + * The destination URL of the short link. + */ + im?: string | undefined; + /** + * The destination URL of the short link. + */ + je?: string | undefined; + /** + * The destination URL of the short link. + */ + me?: string | undefined; + /** + * The destination URL of the short link. + */ + bl?: string | undefined; + /** + * The destination URL of the short link. + */ + mf?: string | undefined; + /** + * The destination URL of the short link. + */ + rs?: string | undefined; + /** + * The destination URL of the short link. + */ + sx?: string | undefined; + /** + * The destination URL of the short link. + */ + ss?: string | undefined; + /** + * The destination URL of the short link. + */ + xk?: string | undefined; +}; + +export type RequestBody = { + /** + * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). + */ + domain?: string | undefined; + /** + * The short link slug. If not provided, a random 7-character slug will be generated. + */ + key?: string | undefined; + /** + * The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. + */ + prefix?: string | undefined; + /** + * The destination URL of the short link. + */ + url: string; + /** + * Whether the short link is archived. + */ + archived?: boolean | undefined; + /** + * Whether the short link's stats are publicly accessible. + */ + publicStats?: boolean | undefined; + /** + * The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + tagId?: string | null | undefined; + /** + * The unique IDs of the tags assigned to the short link. + */ + tagIds?: string | Array | undefined; + /** + * The comments for the short link. + */ + comments?: string | null | undefined; + /** + * The date and time when the short link will expire at. + */ + expiresAt?: string | null | undefined; + /** + * The URL to redirect to when the short link has expired. + */ + expiredUrl?: string | null | undefined; + /** + * The password required to access the destination URL of the short link. + */ + password?: string | null | undefined; + /** + * Whether the short link uses Custom Social Media Cards feature. + */ + proxy?: boolean | undefined; + /** + * The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + title?: string | null | undefined; + /** + * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + description?: string | null | undefined; + /** + * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + image?: string | null | undefined; + /** + * Whether the short link uses link cloaking. + */ + rewrite?: boolean | undefined; + /** + * The iOS destination URL for the short link for iOS device targeting. + */ + ios?: string | null | undefined; + /** + * The Android destination URL for the short link for Android device targeting. + */ + android?: string | null | undefined; + /** + * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. + */ + geo?: BulkCreateLinksGeo | null | undefined; +}; + +/** @internal */ +export namespace BulkCreateLinksTagIds$ { + export type Inbound = string | Array; + + export type Outbound = string | Array; + export const inboundSchema: z.ZodType = z.union([ + z.string(), + z.array(z.string()), + ]); + export const outboundSchema: z.ZodType = z.union( + [z.string(), z.array(z.string())] + ); +} + +/** @internal */ +export namespace BulkCreateLinksGeo$ { + export type Inbound = { + AF?: string | undefined; + AL?: string | undefined; + DZ?: string | undefined; + AS?: string | undefined; + AD?: string | undefined; + AO?: string | undefined; + AI?: string | undefined; + AQ?: string | undefined; + AG?: string | undefined; + AR?: string | undefined; + AM?: string | undefined; + AW?: string | undefined; + AU?: string | undefined; + AT?: string | undefined; + AZ?: string | undefined; + BS?: string | undefined; + BH?: string | undefined; + BD?: string | undefined; + BB?: string | undefined; + BY?: string | undefined; + BE?: string | undefined; + BZ?: string | undefined; + BJ?: string | undefined; + BM?: string | undefined; + BT?: string | undefined; + BO?: string | undefined; + BA?: string | undefined; + BW?: string | undefined; + BV?: string | undefined; + BR?: string | undefined; + IO?: string | undefined; + BN?: string | undefined; + BG?: string | undefined; + BF?: string | undefined; + BI?: string | undefined; + KH?: string | undefined; + CM?: string | undefined; + CA?: string | undefined; + CV?: string | undefined; + KY?: string | undefined; + CF?: string | undefined; + TD?: string | undefined; + CL?: string | undefined; + CN?: string | undefined; + CX?: string | undefined; + CC?: string | undefined; + CO?: string | undefined; + KM?: string | undefined; + CG?: string | undefined; + CD?: string | undefined; + CK?: string | undefined; + CR?: string | undefined; + CI?: string | undefined; + HR?: string | undefined; + CU?: string | undefined; + CY?: string | undefined; + CZ?: string | undefined; + DK?: string | undefined; + DJ?: string | undefined; + DM?: string | undefined; + DO?: string | undefined; + EC?: string | undefined; + EG?: string | undefined; + SV?: string | undefined; + GQ?: string | undefined; + ER?: string | undefined; + EE?: string | undefined; + ET?: string | undefined; + FK?: string | undefined; + FO?: string | undefined; + FJ?: string | undefined; + FI?: string | undefined; + FR?: string | undefined; + GF?: string | undefined; + PF?: string | undefined; + TF?: string | undefined; + GA?: string | undefined; + GM?: string | undefined; + GE?: string | undefined; + DE?: string | undefined; + GH?: string | undefined; + GI?: string | undefined; + GR?: string | undefined; + GL?: string | undefined; + GD?: string | undefined; + GP?: string | undefined; + GU?: string | undefined; + GT?: string | undefined; + GN?: string | undefined; + GW?: string | undefined; + GY?: string | undefined; + HT?: string | undefined; + HM?: string | undefined; + VA?: string | undefined; + HN?: string | undefined; + HK?: string | undefined; + HU?: string | undefined; + IS?: string | undefined; + IN?: string | undefined; + ID?: string | undefined; + IR?: string | undefined; + IQ?: string | undefined; + IE?: string | undefined; + IL?: string | undefined; + IT?: string | undefined; + JM?: string | undefined; + JP?: string | undefined; + JO?: string | undefined; + KZ?: string | undefined; + KE?: string | undefined; + KI?: string | undefined; + KP?: string | undefined; + KR?: string | undefined; + KW?: string | undefined; + KG?: string | undefined; + LA?: string | undefined; + LV?: string | undefined; + LB?: string | undefined; + LS?: string | undefined; + LR?: string | undefined; + LY?: string | undefined; + LI?: string | undefined; + LT?: string | undefined; + LU?: string | undefined; + MO?: string | undefined; + MG?: string | undefined; + MW?: string | undefined; + MY?: string | undefined; + MV?: string | undefined; + ML?: string | undefined; + MT?: string | undefined; + MH?: string | undefined; + MQ?: string | undefined; + MR?: string | undefined; + MU?: string | undefined; + YT?: string | undefined; + MX?: string | undefined; + FM?: string | undefined; + MD?: string | undefined; + MC?: string | undefined; + MN?: string | undefined; + MS?: string | undefined; + MA?: string | undefined; + MZ?: string | undefined; + MM?: string | undefined; + NA?: string | undefined; + NR?: string | undefined; + NP?: string | undefined; + NL?: string | undefined; + NC?: string | undefined; + NZ?: string | undefined; + NI?: string | undefined; + NE?: string | undefined; + NG?: string | undefined; + NU?: string | undefined; + NF?: string | undefined; + MK?: string | undefined; + MP?: string | undefined; + NO?: string | undefined; + OM?: string | undefined; + PK?: string | undefined; + PW?: string | undefined; + PS?: string | undefined; + PA?: string | undefined; + PG?: string | undefined; + PY?: string | undefined; + PE?: string | undefined; + PH?: string | undefined; + PN?: string | undefined; + PL?: string | undefined; + PT?: string | undefined; + PR?: string | undefined; + QA?: string | undefined; + RE?: string | undefined; + RO?: string | undefined; + RU?: string | undefined; + RW?: string | undefined; + SH?: string | undefined; + KN?: string | undefined; + LC?: string | undefined; + PM?: string | undefined; + VC?: string | undefined; + WS?: string | undefined; + SM?: string | undefined; + ST?: string | undefined; + SA?: string | undefined; + SN?: string | undefined; + SC?: string | undefined; + SL?: string | undefined; + SG?: string | undefined; + SK?: string | undefined; + SI?: string | undefined; + SB?: string | undefined; + SO?: string | undefined; + ZA?: string | undefined; + GS?: string | undefined; + ES?: string | undefined; + LK?: string | undefined; + SD?: string | undefined; + SR?: string | undefined; + SJ?: string | undefined; + SZ?: string | undefined; + SE?: string | undefined; + CH?: string | undefined; + SY?: string | undefined; + TW?: string | undefined; + TJ?: string | undefined; + TZ?: string | undefined; + TH?: string | undefined; + TL?: string | undefined; + TG?: string | undefined; + TK?: string | undefined; + TO?: string | undefined; + TT?: string | undefined; + TN?: string | undefined; + TR?: string | undefined; + TM?: string | undefined; + TC?: string | undefined; + TV?: string | undefined; + UG?: string | undefined; + UA?: string | undefined; + AE?: string | undefined; + GB?: string | undefined; + US?: string | undefined; + UM?: string | undefined; + UY?: string | undefined; + UZ?: string | undefined; + VU?: string | undefined; + VE?: string | undefined; + VN?: string | undefined; + VG?: string | undefined; + VI?: string | undefined; + WF?: string | undefined; + EH?: string | undefined; + YE?: string | undefined; + ZM?: string | undefined; + ZW?: string | undefined; + AX?: string | undefined; + BQ?: string | undefined; + CW?: string | undefined; + GG?: string | undefined; + IM?: string | undefined; + JE?: string | undefined; + ME?: string | undefined; + BL?: string | undefined; + MF?: string | undefined; + RS?: string | undefined; + SX?: string | undefined; + SS?: string | undefined; + XK?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + AF: z.string().optional(), + AL: z.string().optional(), + DZ: z.string().optional(), + AS: z.string().optional(), + AD: z.string().optional(), + AO: z.string().optional(), + AI: z.string().optional(), + AQ: z.string().optional(), + AG: z.string().optional(), + AR: z.string().optional(), + AM: z.string().optional(), + AW: z.string().optional(), + AU: z.string().optional(), + AT: z.string().optional(), + AZ: z.string().optional(), + BS: z.string().optional(), + BH: z.string().optional(), + BD: z.string().optional(), + BB: z.string().optional(), + BY: z.string().optional(), + BE: z.string().optional(), + BZ: z.string().optional(), + BJ: z.string().optional(), + BM: z.string().optional(), + BT: z.string().optional(), + BO: z.string().optional(), + BA: z.string().optional(), + BW: z.string().optional(), + BV: z.string().optional(), + BR: z.string().optional(), + IO: z.string().optional(), + BN: z.string().optional(), + BG: z.string().optional(), + BF: z.string().optional(), + BI: z.string().optional(), + KH: z.string().optional(), + CM: z.string().optional(), + CA: z.string().optional(), + CV: z.string().optional(), + KY: z.string().optional(), + CF: z.string().optional(), + TD: z.string().optional(), + CL: z.string().optional(), + CN: z.string().optional(), + CX: z.string().optional(), + CC: z.string().optional(), + CO: z.string().optional(), + KM: z.string().optional(), + CG: z.string().optional(), + CD: z.string().optional(), + CK: z.string().optional(), + CR: z.string().optional(), + CI: z.string().optional(), + HR: z.string().optional(), + CU: z.string().optional(), + CY: z.string().optional(), + CZ: z.string().optional(), + DK: z.string().optional(), + DJ: z.string().optional(), + DM: z.string().optional(), + DO: z.string().optional(), + EC: z.string().optional(), + EG: z.string().optional(), + SV: z.string().optional(), + GQ: z.string().optional(), + ER: z.string().optional(), + EE: z.string().optional(), + ET: z.string().optional(), + FK: z.string().optional(), + FO: z.string().optional(), + FJ: z.string().optional(), + FI: z.string().optional(), + FR: z.string().optional(), + GF: z.string().optional(), + PF: z.string().optional(), + TF: z.string().optional(), + GA: z.string().optional(), + GM: z.string().optional(), + GE: z.string().optional(), + DE: z.string().optional(), + GH: z.string().optional(), + GI: z.string().optional(), + GR: z.string().optional(), + GL: z.string().optional(), + GD: z.string().optional(), + GP: z.string().optional(), + GU: z.string().optional(), + GT: z.string().optional(), + GN: z.string().optional(), + GW: z.string().optional(), + GY: z.string().optional(), + HT: z.string().optional(), + HM: z.string().optional(), + VA: z.string().optional(), + HN: z.string().optional(), + HK: z.string().optional(), + HU: z.string().optional(), + IS: z.string().optional(), + IN: z.string().optional(), + ID: z.string().optional(), + IR: z.string().optional(), + IQ: z.string().optional(), + IE: z.string().optional(), + IL: z.string().optional(), + IT: z.string().optional(), + JM: z.string().optional(), + JP: z.string().optional(), + JO: z.string().optional(), + KZ: z.string().optional(), + KE: z.string().optional(), + KI: z.string().optional(), + KP: z.string().optional(), + KR: z.string().optional(), + KW: z.string().optional(), + KG: z.string().optional(), + LA: z.string().optional(), + LV: z.string().optional(), + LB: z.string().optional(), + LS: z.string().optional(), + LR: z.string().optional(), + LY: z.string().optional(), + LI: z.string().optional(), + LT: z.string().optional(), + LU: z.string().optional(), + MO: z.string().optional(), + MG: z.string().optional(), + MW: z.string().optional(), + MY: z.string().optional(), + MV: z.string().optional(), + ML: z.string().optional(), + MT: z.string().optional(), + MH: z.string().optional(), + MQ: z.string().optional(), + MR: z.string().optional(), + MU: z.string().optional(), + YT: z.string().optional(), + MX: z.string().optional(), + FM: z.string().optional(), + MD: z.string().optional(), + MC: z.string().optional(), + MN: z.string().optional(), + MS: z.string().optional(), + MA: z.string().optional(), + MZ: z.string().optional(), + MM: z.string().optional(), + NA: z.string().optional(), + NR: z.string().optional(), + NP: z.string().optional(), + NL: z.string().optional(), + NC: z.string().optional(), + NZ: z.string().optional(), + NI: z.string().optional(), + NE: z.string().optional(), + NG: z.string().optional(), + NU: z.string().optional(), + NF: z.string().optional(), + MK: z.string().optional(), + MP: z.string().optional(), + NO: z.string().optional(), + OM: z.string().optional(), + PK: z.string().optional(), + PW: z.string().optional(), + PS: z.string().optional(), + PA: z.string().optional(), + PG: z.string().optional(), + PY: z.string().optional(), + PE: z.string().optional(), + PH: z.string().optional(), + PN: z.string().optional(), + PL: z.string().optional(), + PT: z.string().optional(), + PR: z.string().optional(), + QA: z.string().optional(), + RE: z.string().optional(), + RO: z.string().optional(), + RU: z.string().optional(), + RW: z.string().optional(), + SH: z.string().optional(), + KN: z.string().optional(), + LC: z.string().optional(), + PM: z.string().optional(), + VC: z.string().optional(), + WS: z.string().optional(), + SM: z.string().optional(), + ST: z.string().optional(), + SA: z.string().optional(), + SN: z.string().optional(), + SC: z.string().optional(), + SL: z.string().optional(), + SG: z.string().optional(), + SK: z.string().optional(), + SI: z.string().optional(), + SB: z.string().optional(), + SO: z.string().optional(), + ZA: z.string().optional(), + GS: z.string().optional(), + ES: z.string().optional(), + LK: z.string().optional(), + SD: z.string().optional(), + SR: z.string().optional(), + SJ: z.string().optional(), + SZ: z.string().optional(), + SE: z.string().optional(), + CH: z.string().optional(), + SY: z.string().optional(), + TW: z.string().optional(), + TJ: z.string().optional(), + TZ: z.string().optional(), + TH: z.string().optional(), + TL: z.string().optional(), + TG: z.string().optional(), + TK: z.string().optional(), + TO: z.string().optional(), + TT: z.string().optional(), + TN: z.string().optional(), + TR: z.string().optional(), + TM: z.string().optional(), + TC: z.string().optional(), + TV: z.string().optional(), + UG: z.string().optional(), + UA: z.string().optional(), + AE: z.string().optional(), + GB: z.string().optional(), + US: z.string().optional(), + UM: z.string().optional(), + UY: z.string().optional(), + UZ: z.string().optional(), + VU: z.string().optional(), + VE: z.string().optional(), + VN: z.string().optional(), + VG: z.string().optional(), + VI: z.string().optional(), + WF: z.string().optional(), + EH: z.string().optional(), + YE: z.string().optional(), + ZM: z.string().optional(), + ZW: z.string().optional(), + AX: z.string().optional(), + BQ: z.string().optional(), + CW: z.string().optional(), + GG: z.string().optional(), + IM: z.string().optional(), + JE: z.string().optional(), + ME: z.string().optional(), + BL: z.string().optional(), + MF: z.string().optional(), + RS: z.string().optional(), + SX: z.string().optional(), + SS: z.string().optional(), + XK: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.AF === undefined ? null : { af: v.AF }), + ...(v.AL === undefined ? null : { al: v.AL }), + ...(v.DZ === undefined ? null : { dz: v.DZ }), + ...(v.AS === undefined ? null : { as: v.AS }), + ...(v.AD === undefined ? null : { ad: v.AD }), + ...(v.AO === undefined ? null : { ao: v.AO }), + ...(v.AI === undefined ? null : { ai: v.AI }), + ...(v.AQ === undefined ? null : { aq: v.AQ }), + ...(v.AG === undefined ? null : { ag: v.AG }), + ...(v.AR === undefined ? null : { ar: v.AR }), + ...(v.AM === undefined ? null : { am: v.AM }), + ...(v.AW === undefined ? null : { aw: v.AW }), + ...(v.AU === undefined ? null : { au: v.AU }), + ...(v.AT === undefined ? null : { at: v.AT }), + ...(v.AZ === undefined ? null : { az: v.AZ }), + ...(v.BS === undefined ? null : { bs: v.BS }), + ...(v.BH === undefined ? null : { bh: v.BH }), + ...(v.BD === undefined ? null : { bd: v.BD }), + ...(v.BB === undefined ? null : { bb: v.BB }), + ...(v.BY === undefined ? null : { by: v.BY }), + ...(v.BE === undefined ? null : { be: v.BE }), + ...(v.BZ === undefined ? null : { bz: v.BZ }), + ...(v.BJ === undefined ? null : { bj: v.BJ }), + ...(v.BM === undefined ? null : { bm: v.BM }), + ...(v.BT === undefined ? null : { bt: v.BT }), + ...(v.BO === undefined ? null : { bo: v.BO }), + ...(v.BA === undefined ? null : { ba: v.BA }), + ...(v.BW === undefined ? null : { bw: v.BW }), + ...(v.BV === undefined ? null : { bv: v.BV }), + ...(v.BR === undefined ? null : { br: v.BR }), + ...(v.IO === undefined ? null : { io: v.IO }), + ...(v.BN === undefined ? null : { bn: v.BN }), + ...(v.BG === undefined ? null : { bg: v.BG }), + ...(v.BF === undefined ? null : { bf: v.BF }), + ...(v.BI === undefined ? null : { bi: v.BI }), + ...(v.KH === undefined ? null : { kh: v.KH }), + ...(v.CM === undefined ? null : { cm: v.CM }), + ...(v.CA === undefined ? null : { ca: v.CA }), + ...(v.CV === undefined ? null : { cv: v.CV }), + ...(v.KY === undefined ? null : { ky: v.KY }), + ...(v.CF === undefined ? null : { cf: v.CF }), + ...(v.TD === undefined ? null : { td: v.TD }), + ...(v.CL === undefined ? null : { cl: v.CL }), + ...(v.CN === undefined ? null : { cn: v.CN }), + ...(v.CX === undefined ? null : { cx: v.CX }), + ...(v.CC === undefined ? null : { cc: v.CC }), + ...(v.CO === undefined ? null : { co: v.CO }), + ...(v.KM === undefined ? null : { km: v.KM }), + ...(v.CG === undefined ? null : { cg: v.CG }), + ...(v.CD === undefined ? null : { cd: v.CD }), + ...(v.CK === undefined ? null : { ck: v.CK }), + ...(v.CR === undefined ? null : { cr: v.CR }), + ...(v.CI === undefined ? null : { ci: v.CI }), + ...(v.HR === undefined ? null : { hr: v.HR }), + ...(v.CU === undefined ? null : { cu: v.CU }), + ...(v.CY === undefined ? null : { cy: v.CY }), + ...(v.CZ === undefined ? null : { cz: v.CZ }), + ...(v.DK === undefined ? null : { dk: v.DK }), + ...(v.DJ === undefined ? null : { dj: v.DJ }), + ...(v.DM === undefined ? null : { dm: v.DM }), + ...(v.DO === undefined ? null : { do: v.DO }), + ...(v.EC === undefined ? null : { ec: v.EC }), + ...(v.EG === undefined ? null : { eg: v.EG }), + ...(v.SV === undefined ? null : { sv: v.SV }), + ...(v.GQ === undefined ? null : { gq: v.GQ }), + ...(v.ER === undefined ? null : { er: v.ER }), + ...(v.EE === undefined ? null : { ee: v.EE }), + ...(v.ET === undefined ? null : { et: v.ET }), + ...(v.FK === undefined ? null : { fk: v.FK }), + ...(v.FO === undefined ? null : { fo: v.FO }), + ...(v.FJ === undefined ? null : { fj: v.FJ }), + ...(v.FI === undefined ? null : { fi: v.FI }), + ...(v.FR === undefined ? null : { fr: v.FR }), + ...(v.GF === undefined ? null : { gf: v.GF }), + ...(v.PF === undefined ? null : { pf: v.PF }), + ...(v.TF === undefined ? null : { tf: v.TF }), + ...(v.GA === undefined ? null : { ga: v.GA }), + ...(v.GM === undefined ? null : { gm: v.GM }), + ...(v.GE === undefined ? null : { ge: v.GE }), + ...(v.DE === undefined ? null : { de: v.DE }), + ...(v.GH === undefined ? null : { gh: v.GH }), + ...(v.GI === undefined ? null : { gi: v.GI }), + ...(v.GR === undefined ? null : { gr: v.GR }), + ...(v.GL === undefined ? null : { gl: v.GL }), + ...(v.GD === undefined ? null : { gd: v.GD }), + ...(v.GP === undefined ? null : { gp: v.GP }), + ...(v.GU === undefined ? null : { gu: v.GU }), + ...(v.GT === undefined ? null : { gt: v.GT }), + ...(v.GN === undefined ? null : { gn: v.GN }), + ...(v.GW === undefined ? null : { gw: v.GW }), + ...(v.GY === undefined ? null : { gy: v.GY }), + ...(v.HT === undefined ? null : { ht: v.HT }), + ...(v.HM === undefined ? null : { hm: v.HM }), + ...(v.VA === undefined ? null : { va: v.VA }), + ...(v.HN === undefined ? null : { hn: v.HN }), + ...(v.HK === undefined ? null : { hk: v.HK }), + ...(v.HU === undefined ? null : { hu: v.HU }), + ...(v.IS === undefined ? null : { is: v.IS }), + ...(v.IN === undefined ? null : { in: v.IN }), + ...(v.ID === undefined ? null : { id: v.ID }), + ...(v.IR === undefined ? null : { ir: v.IR }), + ...(v.IQ === undefined ? null : { iq: v.IQ }), + ...(v.IE === undefined ? null : { ie: v.IE }), + ...(v.IL === undefined ? null : { il: v.IL }), + ...(v.IT === undefined ? null : { it: v.IT }), + ...(v.JM === undefined ? null : { jm: v.JM }), + ...(v.JP === undefined ? null : { jp: v.JP }), + ...(v.JO === undefined ? null : { jo: v.JO }), + ...(v.KZ === undefined ? null : { kz: v.KZ }), + ...(v.KE === undefined ? null : { ke: v.KE }), + ...(v.KI === undefined ? null : { ki: v.KI }), + ...(v.KP === undefined ? null : { kp: v.KP }), + ...(v.KR === undefined ? null : { kr: v.KR }), + ...(v.KW === undefined ? null : { kw: v.KW }), + ...(v.KG === undefined ? null : { kg: v.KG }), + ...(v.LA === undefined ? null : { la: v.LA }), + ...(v.LV === undefined ? null : { lv: v.LV }), + ...(v.LB === undefined ? null : { lb: v.LB }), + ...(v.LS === undefined ? null : { ls: v.LS }), + ...(v.LR === undefined ? null : { lr: v.LR }), + ...(v.LY === undefined ? null : { ly: v.LY }), + ...(v.LI === undefined ? null : { li: v.LI }), + ...(v.LT === undefined ? null : { lt: v.LT }), + ...(v.LU === undefined ? null : { lu: v.LU }), + ...(v.MO === undefined ? null : { mo: v.MO }), + ...(v.MG === undefined ? null : { mg: v.MG }), + ...(v.MW === undefined ? null : { mw: v.MW }), + ...(v.MY === undefined ? null : { my: v.MY }), + ...(v.MV === undefined ? null : { mv: v.MV }), + ...(v.ML === undefined ? null : { ml: v.ML }), + ...(v.MT === undefined ? null : { mt: v.MT }), + ...(v.MH === undefined ? null : { mh: v.MH }), + ...(v.MQ === undefined ? null : { mq: v.MQ }), + ...(v.MR === undefined ? null : { mr: v.MR }), + ...(v.MU === undefined ? null : { mu: v.MU }), + ...(v.YT === undefined ? null : { yt: v.YT }), + ...(v.MX === undefined ? null : { mx: v.MX }), + ...(v.FM === undefined ? null : { fm: v.FM }), + ...(v.MD === undefined ? null : { md: v.MD }), + ...(v.MC === undefined ? null : { mc: v.MC }), + ...(v.MN === undefined ? null : { mn: v.MN }), + ...(v.MS === undefined ? null : { ms: v.MS }), + ...(v.MA === undefined ? null : { ma: v.MA }), + ...(v.MZ === undefined ? null : { mz: v.MZ }), + ...(v.MM === undefined ? null : { mm: v.MM }), + ...(v.NA === undefined ? null : { na: v.NA }), + ...(v.NR === undefined ? null : { nr: v.NR }), + ...(v.NP === undefined ? null : { np: v.NP }), + ...(v.NL === undefined ? null : { nl: v.NL }), + ...(v.NC === undefined ? null : { nc: v.NC }), + ...(v.NZ === undefined ? null : { nz: v.NZ }), + ...(v.NI === undefined ? null : { ni: v.NI }), + ...(v.NE === undefined ? null : { ne: v.NE }), + ...(v.NG === undefined ? null : { ng: v.NG }), + ...(v.NU === undefined ? null : { nu: v.NU }), + ...(v.NF === undefined ? null : { nf: v.NF }), + ...(v.MK === undefined ? null : { mk: v.MK }), + ...(v.MP === undefined ? null : { mp: v.MP }), + ...(v.NO === undefined ? null : { no: v.NO }), + ...(v.OM === undefined ? null : { om: v.OM }), + ...(v.PK === undefined ? null : { pk: v.PK }), + ...(v.PW === undefined ? null : { pw: v.PW }), + ...(v.PS === undefined ? null : { ps: v.PS }), + ...(v.PA === undefined ? null : { pa: v.PA }), + ...(v.PG === undefined ? null : { pg: v.PG }), + ...(v.PY === undefined ? null : { py: v.PY }), + ...(v.PE === undefined ? null : { pe: v.PE }), + ...(v.PH === undefined ? null : { ph: v.PH }), + ...(v.PN === undefined ? null : { pn: v.PN }), + ...(v.PL === undefined ? null : { pl: v.PL }), + ...(v.PT === undefined ? null : { pt: v.PT }), + ...(v.PR === undefined ? null : { pr: v.PR }), + ...(v.QA === undefined ? null : { qa: v.QA }), + ...(v.RE === undefined ? null : { re: v.RE }), + ...(v.RO === undefined ? null : { ro: v.RO }), + ...(v.RU === undefined ? null : { ru: v.RU }), + ...(v.RW === undefined ? null : { rw: v.RW }), + ...(v.SH === undefined ? null : { sh: v.SH }), + ...(v.KN === undefined ? null : { kn: v.KN }), + ...(v.LC === undefined ? null : { lc: v.LC }), + ...(v.PM === undefined ? null : { pm: v.PM }), + ...(v.VC === undefined ? null : { vc: v.VC }), + ...(v.WS === undefined ? null : { ws: v.WS }), + ...(v.SM === undefined ? null : { sm: v.SM }), + ...(v.ST === undefined ? null : { st: v.ST }), + ...(v.SA === undefined ? null : { sa: v.SA }), + ...(v.SN === undefined ? null : { sn: v.SN }), + ...(v.SC === undefined ? null : { sc: v.SC }), + ...(v.SL === undefined ? null : { sl: v.SL }), + ...(v.SG === undefined ? null : { sg: v.SG }), + ...(v.SK === undefined ? null : { sk: v.SK }), + ...(v.SI === undefined ? null : { si: v.SI }), + ...(v.SB === undefined ? null : { sb: v.SB }), + ...(v.SO === undefined ? null : { so: v.SO }), + ...(v.ZA === undefined ? null : { za: v.ZA }), + ...(v.GS === undefined ? null : { gs: v.GS }), + ...(v.ES === undefined ? null : { es: v.ES }), + ...(v.LK === undefined ? null : { lk: v.LK }), + ...(v.SD === undefined ? null : { sd: v.SD }), + ...(v.SR === undefined ? null : { sr: v.SR }), + ...(v.SJ === undefined ? null : { sj: v.SJ }), + ...(v.SZ === undefined ? null : { sz: v.SZ }), + ...(v.SE === undefined ? null : { se: v.SE }), + ...(v.CH === undefined ? null : { ch: v.CH }), + ...(v.SY === undefined ? null : { sy: v.SY }), + ...(v.TW === undefined ? null : { tw: v.TW }), + ...(v.TJ === undefined ? null : { tj: v.TJ }), + ...(v.TZ === undefined ? null : { tz: v.TZ }), + ...(v.TH === undefined ? null : { th: v.TH }), + ...(v.TL === undefined ? null : { tl: v.TL }), + ...(v.TG === undefined ? null : { tg: v.TG }), + ...(v.TK === undefined ? null : { tk: v.TK }), + ...(v.TO === undefined ? null : { to: v.TO }), + ...(v.TT === undefined ? null : { tt: v.TT }), + ...(v.TN === undefined ? null : { tn: v.TN }), + ...(v.TR === undefined ? null : { tr: v.TR }), + ...(v.TM === undefined ? null : { tm: v.TM }), + ...(v.TC === undefined ? null : { tc: v.TC }), + ...(v.TV === undefined ? null : { tv: v.TV }), + ...(v.UG === undefined ? null : { ug: v.UG }), + ...(v.UA === undefined ? null : { ua: v.UA }), + ...(v.AE === undefined ? null : { ae: v.AE }), + ...(v.GB === undefined ? null : { gb: v.GB }), + ...(v.US === undefined ? null : { us: v.US }), + ...(v.UM === undefined ? null : { um: v.UM }), + ...(v.UY === undefined ? null : { uy: v.UY }), + ...(v.UZ === undefined ? null : { uz: v.UZ }), + ...(v.VU === undefined ? null : { vu: v.VU }), + ...(v.VE === undefined ? null : { ve: v.VE }), + ...(v.VN === undefined ? null : { vn: v.VN }), + ...(v.VG === undefined ? null : { vg: v.VG }), + ...(v.VI === undefined ? null : { vi: v.VI }), + ...(v.WF === undefined ? null : { wf: v.WF }), + ...(v.EH === undefined ? null : { eh: v.EH }), + ...(v.YE === undefined ? null : { ye: v.YE }), + ...(v.ZM === undefined ? null : { zm: v.ZM }), + ...(v.ZW === undefined ? null : { zw: v.ZW }), + ...(v.AX === undefined ? null : { ax: v.AX }), + ...(v.BQ === undefined ? null : { bq: v.BQ }), + ...(v.CW === undefined ? null : { cw: v.CW }), + ...(v.GG === undefined ? null : { gg: v.GG }), + ...(v.IM === undefined ? null : { im: v.IM }), + ...(v.JE === undefined ? null : { je: v.JE }), + ...(v.ME === undefined ? null : { me: v.ME }), + ...(v.BL === undefined ? null : { bl: v.BL }), + ...(v.MF === undefined ? null : { mf: v.MF }), + ...(v.RS === undefined ? null : { rs: v.RS }), + ...(v.SX === undefined ? null : { sx: v.SX }), + ...(v.SS === undefined ? null : { ss: v.SS }), + ...(v.XK === undefined ? null : { xk: v.XK }), + }; + }); + + export type Outbound = { + AF?: string | undefined; + AL?: string | undefined; + DZ?: string | undefined; + AS?: string | undefined; + AD?: string | undefined; + AO?: string | undefined; + AI?: string | undefined; + AQ?: string | undefined; + AG?: string | undefined; + AR?: string | undefined; + AM?: string | undefined; + AW?: string | undefined; + AU?: string | undefined; + AT?: string | undefined; + AZ?: string | undefined; + BS?: string | undefined; + BH?: string | undefined; + BD?: string | undefined; + BB?: string | undefined; + BY?: string | undefined; + BE?: string | undefined; + BZ?: string | undefined; + BJ?: string | undefined; + BM?: string | undefined; + BT?: string | undefined; + BO?: string | undefined; + BA?: string | undefined; + BW?: string | undefined; + BV?: string | undefined; + BR?: string | undefined; + IO?: string | undefined; + BN?: string | undefined; + BG?: string | undefined; + BF?: string | undefined; + BI?: string | undefined; + KH?: string | undefined; + CM?: string | undefined; + CA?: string | undefined; + CV?: string | undefined; + KY?: string | undefined; + CF?: string | undefined; + TD?: string | undefined; + CL?: string | undefined; + CN?: string | undefined; + CX?: string | undefined; + CC?: string | undefined; + CO?: string | undefined; + KM?: string | undefined; + CG?: string | undefined; + CD?: string | undefined; + CK?: string | undefined; + CR?: string | undefined; + CI?: string | undefined; + HR?: string | undefined; + CU?: string | undefined; + CY?: string | undefined; + CZ?: string | undefined; + DK?: string | undefined; + DJ?: string | undefined; + DM?: string | undefined; + DO?: string | undefined; + EC?: string | undefined; + EG?: string | undefined; + SV?: string | undefined; + GQ?: string | undefined; + ER?: string | undefined; + EE?: string | undefined; + ET?: string | undefined; + FK?: string | undefined; + FO?: string | undefined; + FJ?: string | undefined; + FI?: string | undefined; + FR?: string | undefined; + GF?: string | undefined; + PF?: string | undefined; + TF?: string | undefined; + GA?: string | undefined; + GM?: string | undefined; + GE?: string | undefined; + DE?: string | undefined; + GH?: string | undefined; + GI?: string | undefined; + GR?: string | undefined; + GL?: string | undefined; + GD?: string | undefined; + GP?: string | undefined; + GU?: string | undefined; + GT?: string | undefined; + GN?: string | undefined; + GW?: string | undefined; + GY?: string | undefined; + HT?: string | undefined; + HM?: string | undefined; + VA?: string | undefined; + HN?: string | undefined; + HK?: string | undefined; + HU?: string | undefined; + IS?: string | undefined; + IN?: string | undefined; + ID?: string | undefined; + IR?: string | undefined; + IQ?: string | undefined; + IE?: string | undefined; + IL?: string | undefined; + IT?: string | undefined; + JM?: string | undefined; + JP?: string | undefined; + JO?: string | undefined; + KZ?: string | undefined; + KE?: string | undefined; + KI?: string | undefined; + KP?: string | undefined; + KR?: string | undefined; + KW?: string | undefined; + KG?: string | undefined; + LA?: string | undefined; + LV?: string | undefined; + LB?: string | undefined; + LS?: string | undefined; + LR?: string | undefined; + LY?: string | undefined; + LI?: string | undefined; + LT?: string | undefined; + LU?: string | undefined; + MO?: string | undefined; + MG?: string | undefined; + MW?: string | undefined; + MY?: string | undefined; + MV?: string | undefined; + ML?: string | undefined; + MT?: string | undefined; + MH?: string | undefined; + MQ?: string | undefined; + MR?: string | undefined; + MU?: string | undefined; + YT?: string | undefined; + MX?: string | undefined; + FM?: string | undefined; + MD?: string | undefined; + MC?: string | undefined; + MN?: string | undefined; + MS?: string | undefined; + MA?: string | undefined; + MZ?: string | undefined; + MM?: string | undefined; + NA?: string | undefined; + NR?: string | undefined; + NP?: string | undefined; + NL?: string | undefined; + NC?: string | undefined; + NZ?: string | undefined; + NI?: string | undefined; + NE?: string | undefined; + NG?: string | undefined; + NU?: string | undefined; + NF?: string | undefined; + MK?: string | undefined; + MP?: string | undefined; + NO?: string | undefined; + OM?: string | undefined; + PK?: string | undefined; + PW?: string | undefined; + PS?: string | undefined; + PA?: string | undefined; + PG?: string | undefined; + PY?: string | undefined; + PE?: string | undefined; + PH?: string | undefined; + PN?: string | undefined; + PL?: string | undefined; + PT?: string | undefined; + PR?: string | undefined; + QA?: string | undefined; + RE?: string | undefined; + RO?: string | undefined; + RU?: string | undefined; + RW?: string | undefined; + SH?: string | undefined; + KN?: string | undefined; + LC?: string | undefined; + PM?: string | undefined; + VC?: string | undefined; + WS?: string | undefined; + SM?: string | undefined; + ST?: string | undefined; + SA?: string | undefined; + SN?: string | undefined; + SC?: string | undefined; + SL?: string | undefined; + SG?: string | undefined; + SK?: string | undefined; + SI?: string | undefined; + SB?: string | undefined; + SO?: string | undefined; + ZA?: string | undefined; + GS?: string | undefined; + ES?: string | undefined; + LK?: string | undefined; + SD?: string | undefined; + SR?: string | undefined; + SJ?: string | undefined; + SZ?: string | undefined; + SE?: string | undefined; + CH?: string | undefined; + SY?: string | undefined; + TW?: string | undefined; + TJ?: string | undefined; + TZ?: string | undefined; + TH?: string | undefined; + TL?: string | undefined; + TG?: string | undefined; + TK?: string | undefined; + TO?: string | undefined; + TT?: string | undefined; + TN?: string | undefined; + TR?: string | undefined; + TM?: string | undefined; + TC?: string | undefined; + TV?: string | undefined; + UG?: string | undefined; + UA?: string | undefined; + AE?: string | undefined; + GB?: string | undefined; + US?: string | undefined; + UM?: string | undefined; + UY?: string | undefined; + UZ?: string | undefined; + VU?: string | undefined; + VE?: string | undefined; + VN?: string | undefined; + VG?: string | undefined; + VI?: string | undefined; + WF?: string | undefined; + EH?: string | undefined; + YE?: string | undefined; + ZM?: string | undefined; + ZW?: string | undefined; + AX?: string | undefined; + BQ?: string | undefined; + CW?: string | undefined; + GG?: string | undefined; + IM?: string | undefined; + JE?: string | undefined; + ME?: string | undefined; + BL?: string | undefined; + MF?: string | undefined; + RS?: string | undefined; + SX?: string | undefined; + SS?: string | undefined; + XK?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + af: z.string().optional(), + al: z.string().optional(), + dz: z.string().optional(), + as: z.string().optional(), + ad: z.string().optional(), + ao: z.string().optional(), + ai: z.string().optional(), + aq: z.string().optional(), + ag: z.string().optional(), + ar: z.string().optional(), + am: z.string().optional(), + aw: z.string().optional(), + au: z.string().optional(), + at: z.string().optional(), + az: z.string().optional(), + bs: z.string().optional(), + bh: z.string().optional(), + bd: z.string().optional(), + bb: z.string().optional(), + by: z.string().optional(), + be: z.string().optional(), + bz: z.string().optional(), + bj: z.string().optional(), + bm: z.string().optional(), + bt: z.string().optional(), + bo: z.string().optional(), + ba: z.string().optional(), + bw: z.string().optional(), + bv: z.string().optional(), + br: z.string().optional(), + io: z.string().optional(), + bn: z.string().optional(), + bg: z.string().optional(), + bf: z.string().optional(), + bi: z.string().optional(), + kh: z.string().optional(), + cm: z.string().optional(), + ca: z.string().optional(), + cv: z.string().optional(), + ky: z.string().optional(), + cf: z.string().optional(), + td: z.string().optional(), + cl: z.string().optional(), + cn: z.string().optional(), + cx: z.string().optional(), + cc: z.string().optional(), + co: z.string().optional(), + km: z.string().optional(), + cg: z.string().optional(), + cd: z.string().optional(), + ck: z.string().optional(), + cr: z.string().optional(), + ci: z.string().optional(), + hr: z.string().optional(), + cu: z.string().optional(), + cy: z.string().optional(), + cz: z.string().optional(), + dk: z.string().optional(), + dj: z.string().optional(), + dm: z.string().optional(), + do: z.string().optional(), + ec: z.string().optional(), + eg: z.string().optional(), + sv: z.string().optional(), + gq: z.string().optional(), + er: z.string().optional(), + ee: z.string().optional(), + et: z.string().optional(), + fk: z.string().optional(), + fo: z.string().optional(), + fj: z.string().optional(), + fi: z.string().optional(), + fr: z.string().optional(), + gf: z.string().optional(), + pf: z.string().optional(), + tf: z.string().optional(), + ga: z.string().optional(), + gm: z.string().optional(), + ge: z.string().optional(), + de: z.string().optional(), + gh: z.string().optional(), + gi: z.string().optional(), + gr: z.string().optional(), + gl: z.string().optional(), + gd: z.string().optional(), + gp: z.string().optional(), + gu: z.string().optional(), + gt: z.string().optional(), + gn: z.string().optional(), + gw: z.string().optional(), + gy: z.string().optional(), + ht: z.string().optional(), + hm: z.string().optional(), + va: z.string().optional(), + hn: z.string().optional(), + hk: z.string().optional(), + hu: z.string().optional(), + is: z.string().optional(), + in: z.string().optional(), + id: z.string().optional(), + ir: z.string().optional(), + iq: z.string().optional(), + ie: z.string().optional(), + il: z.string().optional(), + it: z.string().optional(), + jm: z.string().optional(), + jp: z.string().optional(), + jo: z.string().optional(), + kz: z.string().optional(), + ke: z.string().optional(), + ki: z.string().optional(), + kp: z.string().optional(), + kr: z.string().optional(), + kw: z.string().optional(), + kg: z.string().optional(), + la: z.string().optional(), + lv: z.string().optional(), + lb: z.string().optional(), + ls: z.string().optional(), + lr: z.string().optional(), + ly: z.string().optional(), + li: z.string().optional(), + lt: z.string().optional(), + lu: z.string().optional(), + mo: z.string().optional(), + mg: z.string().optional(), + mw: z.string().optional(), + my: z.string().optional(), + mv: z.string().optional(), + ml: z.string().optional(), + mt: z.string().optional(), + mh: z.string().optional(), + mq: z.string().optional(), + mr: z.string().optional(), + mu: z.string().optional(), + yt: z.string().optional(), + mx: z.string().optional(), + fm: z.string().optional(), + md: z.string().optional(), + mc: z.string().optional(), + mn: z.string().optional(), + ms: z.string().optional(), + ma: z.string().optional(), + mz: z.string().optional(), + mm: z.string().optional(), + na: z.string().optional(), + nr: z.string().optional(), + np: z.string().optional(), + nl: z.string().optional(), + nc: z.string().optional(), + nz: z.string().optional(), + ni: z.string().optional(), + ne: z.string().optional(), + ng: z.string().optional(), + nu: z.string().optional(), + nf: z.string().optional(), + mk: z.string().optional(), + mp: z.string().optional(), + no: z.string().optional(), + om: z.string().optional(), + pk: z.string().optional(), + pw: z.string().optional(), + ps: z.string().optional(), + pa: z.string().optional(), + pg: z.string().optional(), + py: z.string().optional(), + pe: z.string().optional(), + ph: z.string().optional(), + pn: z.string().optional(), + pl: z.string().optional(), + pt: z.string().optional(), + pr: z.string().optional(), + qa: z.string().optional(), + re: z.string().optional(), + ro: z.string().optional(), + ru: z.string().optional(), + rw: z.string().optional(), + sh: z.string().optional(), + kn: z.string().optional(), + lc: z.string().optional(), + pm: z.string().optional(), + vc: z.string().optional(), + ws: z.string().optional(), + sm: z.string().optional(), + st: z.string().optional(), + sa: z.string().optional(), + sn: z.string().optional(), + sc: z.string().optional(), + sl: z.string().optional(), + sg: z.string().optional(), + sk: z.string().optional(), + si: z.string().optional(), + sb: z.string().optional(), + so: z.string().optional(), + za: z.string().optional(), + gs: z.string().optional(), + es: z.string().optional(), + lk: z.string().optional(), + sd: z.string().optional(), + sr: z.string().optional(), + sj: z.string().optional(), + sz: z.string().optional(), + se: z.string().optional(), + ch: z.string().optional(), + sy: z.string().optional(), + tw: z.string().optional(), + tj: z.string().optional(), + tz: z.string().optional(), + th: z.string().optional(), + tl: z.string().optional(), + tg: z.string().optional(), + tk: z.string().optional(), + to: z.string().optional(), + tt: z.string().optional(), + tn: z.string().optional(), + tr: z.string().optional(), + tm: z.string().optional(), + tc: z.string().optional(), + tv: z.string().optional(), + ug: z.string().optional(), + ua: z.string().optional(), + ae: z.string().optional(), + gb: z.string().optional(), + us: z.string().optional(), + um: z.string().optional(), + uy: z.string().optional(), + uz: z.string().optional(), + vu: z.string().optional(), + ve: z.string().optional(), + vn: z.string().optional(), + vg: z.string().optional(), + vi: z.string().optional(), + wf: z.string().optional(), + eh: z.string().optional(), + ye: z.string().optional(), + zm: z.string().optional(), + zw: z.string().optional(), + ax: z.string().optional(), + bq: z.string().optional(), + cw: z.string().optional(), + gg: z.string().optional(), + im: z.string().optional(), + je: z.string().optional(), + me: z.string().optional(), + bl: z.string().optional(), + mf: z.string().optional(), + rs: z.string().optional(), + sx: z.string().optional(), + ss: z.string().optional(), + xk: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.af === undefined ? null : { AF: v.af }), + ...(v.al === undefined ? null : { AL: v.al }), + ...(v.dz === undefined ? null : { DZ: v.dz }), + ...(v.as === undefined ? null : { AS: v.as }), + ...(v.ad === undefined ? null : { AD: v.ad }), + ...(v.ao === undefined ? null : { AO: v.ao }), + ...(v.ai === undefined ? null : { AI: v.ai }), + ...(v.aq === undefined ? null : { AQ: v.aq }), + ...(v.ag === undefined ? null : { AG: v.ag }), + ...(v.ar === undefined ? null : { AR: v.ar }), + ...(v.am === undefined ? null : { AM: v.am }), + ...(v.aw === undefined ? null : { AW: v.aw }), + ...(v.au === undefined ? null : { AU: v.au }), + ...(v.at === undefined ? null : { AT: v.at }), + ...(v.az === undefined ? null : { AZ: v.az }), + ...(v.bs === undefined ? null : { BS: v.bs }), + ...(v.bh === undefined ? null : { BH: v.bh }), + ...(v.bd === undefined ? null : { BD: v.bd }), + ...(v.bb === undefined ? null : { BB: v.bb }), + ...(v.by === undefined ? null : { BY: v.by }), + ...(v.be === undefined ? null : { BE: v.be }), + ...(v.bz === undefined ? null : { BZ: v.bz }), + ...(v.bj === undefined ? null : { BJ: v.bj }), + ...(v.bm === undefined ? null : { BM: v.bm }), + ...(v.bt === undefined ? null : { BT: v.bt }), + ...(v.bo === undefined ? null : { BO: v.bo }), + ...(v.ba === undefined ? null : { BA: v.ba }), + ...(v.bw === undefined ? null : { BW: v.bw }), + ...(v.bv === undefined ? null : { BV: v.bv }), + ...(v.br === undefined ? null : { BR: v.br }), + ...(v.io === undefined ? null : { IO: v.io }), + ...(v.bn === undefined ? null : { BN: v.bn }), + ...(v.bg === undefined ? null : { BG: v.bg }), + ...(v.bf === undefined ? null : { BF: v.bf }), + ...(v.bi === undefined ? null : { BI: v.bi }), + ...(v.kh === undefined ? null : { KH: v.kh }), + ...(v.cm === undefined ? null : { CM: v.cm }), + ...(v.ca === undefined ? null : { CA: v.ca }), + ...(v.cv === undefined ? null : { CV: v.cv }), + ...(v.ky === undefined ? null : { KY: v.ky }), + ...(v.cf === undefined ? null : { CF: v.cf }), + ...(v.td === undefined ? null : { TD: v.td }), + ...(v.cl === undefined ? null : { CL: v.cl }), + ...(v.cn === undefined ? null : { CN: v.cn }), + ...(v.cx === undefined ? null : { CX: v.cx }), + ...(v.cc === undefined ? null : { CC: v.cc }), + ...(v.co === undefined ? null : { CO: v.co }), + ...(v.km === undefined ? null : { KM: v.km }), + ...(v.cg === undefined ? null : { CG: v.cg }), + ...(v.cd === undefined ? null : { CD: v.cd }), + ...(v.ck === undefined ? null : { CK: v.ck }), + ...(v.cr === undefined ? null : { CR: v.cr }), + ...(v.ci === undefined ? null : { CI: v.ci }), + ...(v.hr === undefined ? null : { HR: v.hr }), + ...(v.cu === undefined ? null : { CU: v.cu }), + ...(v.cy === undefined ? null : { CY: v.cy }), + ...(v.cz === undefined ? null : { CZ: v.cz }), + ...(v.dk === undefined ? null : { DK: v.dk }), + ...(v.dj === undefined ? null : { DJ: v.dj }), + ...(v.dm === undefined ? null : { DM: v.dm }), + ...(v.do === undefined ? null : { DO: v.do }), + ...(v.ec === undefined ? null : { EC: v.ec }), + ...(v.eg === undefined ? null : { EG: v.eg }), + ...(v.sv === undefined ? null : { SV: v.sv }), + ...(v.gq === undefined ? null : { GQ: v.gq }), + ...(v.er === undefined ? null : { ER: v.er }), + ...(v.ee === undefined ? null : { EE: v.ee }), + ...(v.et === undefined ? null : { ET: v.et }), + ...(v.fk === undefined ? null : { FK: v.fk }), + ...(v.fo === undefined ? null : { FO: v.fo }), + ...(v.fj === undefined ? null : { FJ: v.fj }), + ...(v.fi === undefined ? null : { FI: v.fi }), + ...(v.fr === undefined ? null : { FR: v.fr }), + ...(v.gf === undefined ? null : { GF: v.gf }), + ...(v.pf === undefined ? null : { PF: v.pf }), + ...(v.tf === undefined ? null : { TF: v.tf }), + ...(v.ga === undefined ? null : { GA: v.ga }), + ...(v.gm === undefined ? null : { GM: v.gm }), + ...(v.ge === undefined ? null : { GE: v.ge }), + ...(v.de === undefined ? null : { DE: v.de }), + ...(v.gh === undefined ? null : { GH: v.gh }), + ...(v.gi === undefined ? null : { GI: v.gi }), + ...(v.gr === undefined ? null : { GR: v.gr }), + ...(v.gl === undefined ? null : { GL: v.gl }), + ...(v.gd === undefined ? null : { GD: v.gd }), + ...(v.gp === undefined ? null : { GP: v.gp }), + ...(v.gu === undefined ? null : { GU: v.gu }), + ...(v.gt === undefined ? null : { GT: v.gt }), + ...(v.gn === undefined ? null : { GN: v.gn }), + ...(v.gw === undefined ? null : { GW: v.gw }), + ...(v.gy === undefined ? null : { GY: v.gy }), + ...(v.ht === undefined ? null : { HT: v.ht }), + ...(v.hm === undefined ? null : { HM: v.hm }), + ...(v.va === undefined ? null : { VA: v.va }), + ...(v.hn === undefined ? null : { HN: v.hn }), + ...(v.hk === undefined ? null : { HK: v.hk }), + ...(v.hu === undefined ? null : { HU: v.hu }), + ...(v.is === undefined ? null : { IS: v.is }), + ...(v.in === undefined ? null : { IN: v.in }), + ...(v.id === undefined ? null : { ID: v.id }), + ...(v.ir === undefined ? null : { IR: v.ir }), + ...(v.iq === undefined ? null : { IQ: v.iq }), + ...(v.ie === undefined ? null : { IE: v.ie }), + ...(v.il === undefined ? null : { IL: v.il }), + ...(v.it === undefined ? null : { IT: v.it }), + ...(v.jm === undefined ? null : { JM: v.jm }), + ...(v.jp === undefined ? null : { JP: v.jp }), + ...(v.jo === undefined ? null : { JO: v.jo }), + ...(v.kz === undefined ? null : { KZ: v.kz }), + ...(v.ke === undefined ? null : { KE: v.ke }), + ...(v.ki === undefined ? null : { KI: v.ki }), + ...(v.kp === undefined ? null : { KP: v.kp }), + ...(v.kr === undefined ? null : { KR: v.kr }), + ...(v.kw === undefined ? null : { KW: v.kw }), + ...(v.kg === undefined ? null : { KG: v.kg }), + ...(v.la === undefined ? null : { LA: v.la }), + ...(v.lv === undefined ? null : { LV: v.lv }), + ...(v.lb === undefined ? null : { LB: v.lb }), + ...(v.ls === undefined ? null : { LS: v.ls }), + ...(v.lr === undefined ? null : { LR: v.lr }), + ...(v.ly === undefined ? null : { LY: v.ly }), + ...(v.li === undefined ? null : { LI: v.li }), + ...(v.lt === undefined ? null : { LT: v.lt }), + ...(v.lu === undefined ? null : { LU: v.lu }), + ...(v.mo === undefined ? null : { MO: v.mo }), + ...(v.mg === undefined ? null : { MG: v.mg }), + ...(v.mw === undefined ? null : { MW: v.mw }), + ...(v.my === undefined ? null : { MY: v.my }), + ...(v.mv === undefined ? null : { MV: v.mv }), + ...(v.ml === undefined ? null : { ML: v.ml }), + ...(v.mt === undefined ? null : { MT: v.mt }), + ...(v.mh === undefined ? null : { MH: v.mh }), + ...(v.mq === undefined ? null : { MQ: v.mq }), + ...(v.mr === undefined ? null : { MR: v.mr }), + ...(v.mu === undefined ? null : { MU: v.mu }), + ...(v.yt === undefined ? null : { YT: v.yt }), + ...(v.mx === undefined ? null : { MX: v.mx }), + ...(v.fm === undefined ? null : { FM: v.fm }), + ...(v.md === undefined ? null : { MD: v.md }), + ...(v.mc === undefined ? null : { MC: v.mc }), + ...(v.mn === undefined ? null : { MN: v.mn }), + ...(v.ms === undefined ? null : { MS: v.ms }), + ...(v.ma === undefined ? null : { MA: v.ma }), + ...(v.mz === undefined ? null : { MZ: v.mz }), + ...(v.mm === undefined ? null : { MM: v.mm }), + ...(v.na === undefined ? null : { NA: v.na }), + ...(v.nr === undefined ? null : { NR: v.nr }), + ...(v.np === undefined ? null : { NP: v.np }), + ...(v.nl === undefined ? null : { NL: v.nl }), + ...(v.nc === undefined ? null : { NC: v.nc }), + ...(v.nz === undefined ? null : { NZ: v.nz }), + ...(v.ni === undefined ? null : { NI: v.ni }), + ...(v.ne === undefined ? null : { NE: v.ne }), + ...(v.ng === undefined ? null : { NG: v.ng }), + ...(v.nu === undefined ? null : { NU: v.nu }), + ...(v.nf === undefined ? null : { NF: v.nf }), + ...(v.mk === undefined ? null : { MK: v.mk }), + ...(v.mp === undefined ? null : { MP: v.mp }), + ...(v.no === undefined ? null : { NO: v.no }), + ...(v.om === undefined ? null : { OM: v.om }), + ...(v.pk === undefined ? null : { PK: v.pk }), + ...(v.pw === undefined ? null : { PW: v.pw }), + ...(v.ps === undefined ? null : { PS: v.ps }), + ...(v.pa === undefined ? null : { PA: v.pa }), + ...(v.pg === undefined ? null : { PG: v.pg }), + ...(v.py === undefined ? null : { PY: v.py }), + ...(v.pe === undefined ? null : { PE: v.pe }), + ...(v.ph === undefined ? null : { PH: v.ph }), + ...(v.pn === undefined ? null : { PN: v.pn }), + ...(v.pl === undefined ? null : { PL: v.pl }), + ...(v.pt === undefined ? null : { PT: v.pt }), + ...(v.pr === undefined ? null : { PR: v.pr }), + ...(v.qa === undefined ? null : { QA: v.qa }), + ...(v.re === undefined ? null : { RE: v.re }), + ...(v.ro === undefined ? null : { RO: v.ro }), + ...(v.ru === undefined ? null : { RU: v.ru }), + ...(v.rw === undefined ? null : { RW: v.rw }), + ...(v.sh === undefined ? null : { SH: v.sh }), + ...(v.kn === undefined ? null : { KN: v.kn }), + ...(v.lc === undefined ? null : { LC: v.lc }), + ...(v.pm === undefined ? null : { PM: v.pm }), + ...(v.vc === undefined ? null : { VC: v.vc }), + ...(v.ws === undefined ? null : { WS: v.ws }), + ...(v.sm === undefined ? null : { SM: v.sm }), + ...(v.st === undefined ? null : { ST: v.st }), + ...(v.sa === undefined ? null : { SA: v.sa }), + ...(v.sn === undefined ? null : { SN: v.sn }), + ...(v.sc === undefined ? null : { SC: v.sc }), + ...(v.sl === undefined ? null : { SL: v.sl }), + ...(v.sg === undefined ? null : { SG: v.sg }), + ...(v.sk === undefined ? null : { SK: v.sk }), + ...(v.si === undefined ? null : { SI: v.si }), + ...(v.sb === undefined ? null : { SB: v.sb }), + ...(v.so === undefined ? null : { SO: v.so }), + ...(v.za === undefined ? null : { ZA: v.za }), + ...(v.gs === undefined ? null : { GS: v.gs }), + ...(v.es === undefined ? null : { ES: v.es }), + ...(v.lk === undefined ? null : { LK: v.lk }), + ...(v.sd === undefined ? null : { SD: v.sd }), + ...(v.sr === undefined ? null : { SR: v.sr }), + ...(v.sj === undefined ? null : { SJ: v.sj }), + ...(v.sz === undefined ? null : { SZ: v.sz }), + ...(v.se === undefined ? null : { SE: v.se }), + ...(v.ch === undefined ? null : { CH: v.ch }), + ...(v.sy === undefined ? null : { SY: v.sy }), + ...(v.tw === undefined ? null : { TW: v.tw }), + ...(v.tj === undefined ? null : { TJ: v.tj }), + ...(v.tz === undefined ? null : { TZ: v.tz }), + ...(v.th === undefined ? null : { TH: v.th }), + ...(v.tl === undefined ? null : { TL: v.tl }), + ...(v.tg === undefined ? null : { TG: v.tg }), + ...(v.tk === undefined ? null : { TK: v.tk }), + ...(v.to === undefined ? null : { TO: v.to }), + ...(v.tt === undefined ? null : { TT: v.tt }), + ...(v.tn === undefined ? null : { TN: v.tn }), + ...(v.tr === undefined ? null : { TR: v.tr }), + ...(v.tm === undefined ? null : { TM: v.tm }), + ...(v.tc === undefined ? null : { TC: v.tc }), + ...(v.tv === undefined ? null : { TV: v.tv }), + ...(v.ug === undefined ? null : { UG: v.ug }), + ...(v.ua === undefined ? null : { UA: v.ua }), + ...(v.ae === undefined ? null : { AE: v.ae }), + ...(v.gb === undefined ? null : { GB: v.gb }), + ...(v.us === undefined ? null : { US: v.us }), + ...(v.um === undefined ? null : { UM: v.um }), + ...(v.uy === undefined ? null : { UY: v.uy }), + ...(v.uz === undefined ? null : { UZ: v.uz }), + ...(v.vu === undefined ? null : { VU: v.vu }), + ...(v.ve === undefined ? null : { VE: v.ve }), + ...(v.vn === undefined ? null : { VN: v.vn }), + ...(v.vg === undefined ? null : { VG: v.vg }), + ...(v.vi === undefined ? null : { VI: v.vi }), + ...(v.wf === undefined ? null : { WF: v.wf }), + ...(v.eh === undefined ? null : { EH: v.eh }), + ...(v.ye === undefined ? null : { YE: v.ye }), + ...(v.zm === undefined ? null : { ZM: v.zm }), + ...(v.zw === undefined ? null : { ZW: v.zw }), + ...(v.ax === undefined ? null : { AX: v.ax }), + ...(v.bq === undefined ? null : { BQ: v.bq }), + ...(v.cw === undefined ? null : { CW: v.cw }), + ...(v.gg === undefined ? null : { GG: v.gg }), + ...(v.im === undefined ? null : { IM: v.im }), + ...(v.je === undefined ? null : { JE: v.je }), + ...(v.me === undefined ? null : { ME: v.me }), + ...(v.bl === undefined ? null : { BL: v.bl }), + ...(v.mf === undefined ? null : { MF: v.mf }), + ...(v.rs === undefined ? null : { RS: v.rs }), + ...(v.sx === undefined ? null : { SX: v.sx }), + ...(v.ss === undefined ? null : { SS: v.ss }), + ...(v.xk === undefined ? null : { XK: v.xk }), + }; + }); +} + +/** @internal */ +export namespace RequestBody$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + prefix?: string | undefined; + url: string; + archived?: boolean | undefined; + publicStats?: boolean | undefined; + tagId?: string | null | undefined; + tagIds?: string | Array | undefined; + comments?: string | null | undefined; + expiresAt?: string | null | undefined; + expiredUrl?: string | null | undefined; + password?: string | null | undefined; + proxy?: boolean | undefined; + title?: string | null | undefined; + description?: string | null | undefined; + image?: string | null | undefined; + rewrite?: boolean | undefined; + ios?: string | null | undefined; + android?: string | null | undefined; + geo?: BulkCreateLinksGeo$.Inbound | null | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + prefix: z.string().optional(), + url: z.string(), + archived: z.boolean().default(false), + publicStats: z.boolean().default(false), + tagId: z.nullable(z.string()).optional(), + tagIds: z.union([z.string(), z.array(z.string())]).optional(), + comments: z.nullable(z.string()).optional(), + expiresAt: z.nullable(z.string()).optional(), + expiredUrl: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), + proxy: z.boolean().default(false), + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + image: z.nullable(z.string()).optional(), + rewrite: z.boolean().default(false), + ios: z.nullable(z.string()).optional(), + android: z.nullable(z.string()).optional(), + geo: z.nullable(z.lazy(() => BulkCreateLinksGeo$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.prefix === undefined ? null : { prefix: v.prefix }), + url: v.url, + archived: v.archived, + publicStats: v.publicStats, + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }), + ...(v.comments === undefined ? null : { comments: v.comments }), + ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }), + ...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }), + ...(v.password === undefined ? null : { password: v.password }), + proxy: v.proxy, + ...(v.title === undefined ? null : { title: v.title }), + ...(v.description === undefined ? null : { description: v.description }), + ...(v.image === undefined ? null : { image: v.image }), + rewrite: v.rewrite, + ...(v.ios === undefined ? null : { ios: v.ios }), + ...(v.android === undefined ? null : { android: v.android }), + ...(v.geo === undefined ? null : { geo: v.geo }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + prefix?: string | undefined; + url: string; + archived: boolean; + publicStats: boolean; + tagId?: string | null | undefined; + tagIds?: string | Array | undefined; + comments?: string | null | undefined; + expiresAt?: string | null | undefined; + expiredUrl?: string | null | undefined; + password?: string | null | undefined; + proxy: boolean; + title?: string | null | undefined; + description?: string | null | undefined; + image?: string | null | undefined; + rewrite: boolean; + ios?: string | null | undefined; + android?: string | null | undefined; + geo?: BulkCreateLinksGeo$.Outbound | null | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + prefix: z.string().optional(), + url: z.string(), + archived: z.boolean().default(false), + publicStats: z.boolean().default(false), + tagId: z.nullable(z.string()).optional(), + tagIds: z.union([z.string(), z.array(z.string())]).optional(), + comments: z.nullable(z.string()).optional(), + expiresAt: z.nullable(z.string()).optional(), + expiredUrl: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), + proxy: z.boolean().default(false), + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + image: z.nullable(z.string()).optional(), + rewrite: z.boolean().default(false), + ios: z.nullable(z.string()).optional(), + android: z.nullable(z.string()).optional(), + geo: z.nullable(z.lazy(() => BulkCreateLinksGeo$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.prefix === undefined ? null : { prefix: v.prefix }), + url: v.url, + archived: v.archived, + publicStats: v.publicStats, + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }), + ...(v.comments === undefined ? null : { comments: v.comments }), + ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }), + ...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }), + ...(v.password === undefined ? null : { password: v.password }), + proxy: v.proxy, + ...(v.title === undefined ? null : { title: v.title }), + ...(v.description === undefined ? null : { description: v.description }), + ...(v.image === undefined ? null : { image: v.image }), + rewrite: v.rewrite, + ...(v.ios === undefined ? null : { ios: v.ios }), + ...(v.android === undefined ? null : { android: v.android }), + ...(v.geo === undefined ? null : { geo: v.geo }), + }; + }); +} diff --git a/src/models/operations/createlink.ts b/src/models/operations/createlink.ts new file mode 100644 index 0000000..c2977b9 --- /dev/null +++ b/src/models/operations/createlink.ts @@ -0,0 +1,2786 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The unique IDs of the tags assigned to the short link. + */ +export type TagIds = string | Array; + +/** + * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. + */ +export type Geo = { + /** + * The destination URL of the short link. + */ + af?: string | undefined; + /** + * The destination URL of the short link. + */ + al?: string | undefined; + /** + * The destination URL of the short link. + */ + dz?: string | undefined; + /** + * The destination URL of the short link. + */ + as?: string | undefined; + /** + * The destination URL of the short link. + */ + ad?: string | undefined; + /** + * The destination URL of the short link. + */ + ao?: string | undefined; + /** + * The destination URL of the short link. + */ + ai?: string | undefined; + /** + * The destination URL of the short link. + */ + aq?: string | undefined; + /** + * The destination URL of the short link. + */ + ag?: string | undefined; + /** + * The destination URL of the short link. + */ + ar?: string | undefined; + /** + * The destination URL of the short link. + */ + am?: string | undefined; + /** + * The destination URL of the short link. + */ + aw?: string | undefined; + /** + * The destination URL of the short link. + */ + au?: string | undefined; + /** + * The destination URL of the short link. + */ + at?: string | undefined; + /** + * The destination URL of the short link. + */ + az?: string | undefined; + /** + * The destination URL of the short link. + */ + bs?: string | undefined; + /** + * The destination URL of the short link. + */ + bh?: string | undefined; + /** + * The destination URL of the short link. + */ + bd?: string | undefined; + /** + * The destination URL of the short link. + */ + bb?: string | undefined; + /** + * The destination URL of the short link. + */ + by?: string | undefined; + /** + * The destination URL of the short link. + */ + be?: string | undefined; + /** + * The destination URL of the short link. + */ + bz?: string | undefined; + /** + * The destination URL of the short link. + */ + bj?: string | undefined; + /** + * The destination URL of the short link. + */ + bm?: string | undefined; + /** + * The destination URL of the short link. + */ + bt?: string | undefined; + /** + * The destination URL of the short link. + */ + bo?: string | undefined; + /** + * The destination URL of the short link. + */ + ba?: string | undefined; + /** + * The destination URL of the short link. + */ + bw?: string | undefined; + /** + * The destination URL of the short link. + */ + bv?: string | undefined; + /** + * The destination URL of the short link. + */ + br?: string | undefined; + /** + * The destination URL of the short link. + */ + io?: string | undefined; + /** + * The destination URL of the short link. + */ + bn?: string | undefined; + /** + * The destination URL of the short link. + */ + bg?: string | undefined; + /** + * The destination URL of the short link. + */ + bf?: string | undefined; + /** + * The destination URL of the short link. + */ + bi?: string | undefined; + /** + * The destination URL of the short link. + */ + kh?: string | undefined; + /** + * The destination URL of the short link. + */ + cm?: string | undefined; + /** + * The destination URL of the short link. + */ + ca?: string | undefined; + /** + * The destination URL of the short link. + */ + cv?: string | undefined; + /** + * The destination URL of the short link. + */ + ky?: string | undefined; + /** + * The destination URL of the short link. + */ + cf?: string | undefined; + /** + * The destination URL of the short link. + */ + td?: string | undefined; + /** + * The destination URL of the short link. + */ + cl?: string | undefined; + /** + * The destination URL of the short link. + */ + cn?: string | undefined; + /** + * The destination URL of the short link. + */ + cx?: string | undefined; + /** + * The destination URL of the short link. + */ + cc?: string | undefined; + /** + * The destination URL of the short link. + */ + co?: string | undefined; + /** + * The destination URL of the short link. + */ + km?: string | undefined; + /** + * The destination URL of the short link. + */ + cg?: string | undefined; + /** + * The destination URL of the short link. + */ + cd?: string | undefined; + /** + * The destination URL of the short link. + */ + ck?: string | undefined; + /** + * The destination URL of the short link. + */ + cr?: string | undefined; + /** + * The destination URL of the short link. + */ + ci?: string | undefined; + /** + * The destination URL of the short link. + */ + hr?: string | undefined; + /** + * The destination URL of the short link. + */ + cu?: string | undefined; + /** + * The destination URL of the short link. + */ + cy?: string | undefined; + /** + * The destination URL of the short link. + */ + cz?: string | undefined; + /** + * The destination URL of the short link. + */ + dk?: string | undefined; + /** + * The destination URL of the short link. + */ + dj?: string | undefined; + /** + * The destination URL of the short link. + */ + dm?: string | undefined; + /** + * The destination URL of the short link. + */ + do?: string | undefined; + /** + * The destination URL of the short link. + */ + ec?: string | undefined; + /** + * The destination URL of the short link. + */ + eg?: string | undefined; + /** + * The destination URL of the short link. + */ + sv?: string | undefined; + /** + * The destination URL of the short link. + */ + gq?: string | undefined; + /** + * The destination URL of the short link. + */ + er?: string | undefined; + /** + * The destination URL of the short link. + */ + ee?: string | undefined; + /** + * The destination URL of the short link. + */ + et?: string | undefined; + /** + * The destination URL of the short link. + */ + fk?: string | undefined; + /** + * The destination URL of the short link. + */ + fo?: string | undefined; + /** + * The destination URL of the short link. + */ + fj?: string | undefined; + /** + * The destination URL of the short link. + */ + fi?: string | undefined; + /** + * The destination URL of the short link. + */ + fr?: string | undefined; + /** + * The destination URL of the short link. + */ + gf?: string | undefined; + /** + * The destination URL of the short link. + */ + pf?: string | undefined; + /** + * The destination URL of the short link. + */ + tf?: string | undefined; + /** + * The destination URL of the short link. + */ + ga?: string | undefined; + /** + * The destination URL of the short link. + */ + gm?: string | undefined; + /** + * The destination URL of the short link. + */ + ge?: string | undefined; + /** + * The destination URL of the short link. + */ + de?: string | undefined; + /** + * The destination URL of the short link. + */ + gh?: string | undefined; + /** + * The destination URL of the short link. + */ + gi?: string | undefined; + /** + * The destination URL of the short link. + */ + gr?: string | undefined; + /** + * The destination URL of the short link. + */ + gl?: string | undefined; + /** + * The destination URL of the short link. + */ + gd?: string | undefined; + /** + * The destination URL of the short link. + */ + gp?: string | undefined; + /** + * The destination URL of the short link. + */ + gu?: string | undefined; + /** + * The destination URL of the short link. + */ + gt?: string | undefined; + /** + * The destination URL of the short link. + */ + gn?: string | undefined; + /** + * The destination URL of the short link. + */ + gw?: string | undefined; + /** + * The destination URL of the short link. + */ + gy?: string | undefined; + /** + * The destination URL of the short link. + */ + ht?: string | undefined; + /** + * The destination URL of the short link. + */ + hm?: string | undefined; + /** + * The destination URL of the short link. + */ + va?: string | undefined; + /** + * The destination URL of the short link. + */ + hn?: string | undefined; + /** + * The destination URL of the short link. + */ + hk?: string | undefined; + /** + * The destination URL of the short link. + */ + hu?: string | undefined; + /** + * The destination URL of the short link. + */ + is?: string | undefined; + /** + * The destination URL of the short link. + */ + in?: string | undefined; + /** + * The destination URL of the short link. + */ + id?: string | undefined; + /** + * The destination URL of the short link. + */ + ir?: string | undefined; + /** + * The destination URL of the short link. + */ + iq?: string | undefined; + /** + * The destination URL of the short link. + */ + ie?: string | undefined; + /** + * The destination URL of the short link. + */ + il?: string | undefined; + /** + * The destination URL of the short link. + */ + it?: string | undefined; + /** + * The destination URL of the short link. + */ + jm?: string | undefined; + /** + * The destination URL of the short link. + */ + jp?: string | undefined; + /** + * The destination URL of the short link. + */ + jo?: string | undefined; + /** + * The destination URL of the short link. + */ + kz?: string | undefined; + /** + * The destination URL of the short link. + */ + ke?: string | undefined; + /** + * The destination URL of the short link. + */ + ki?: string | undefined; + /** + * The destination URL of the short link. + */ + kp?: string | undefined; + /** + * The destination URL of the short link. + */ + kr?: string | undefined; + /** + * The destination URL of the short link. + */ + kw?: string | undefined; + /** + * The destination URL of the short link. + */ + kg?: string | undefined; + /** + * The destination URL of the short link. + */ + la?: string | undefined; + /** + * The destination URL of the short link. + */ + lv?: string | undefined; + /** + * The destination URL of the short link. + */ + lb?: string | undefined; + /** + * The destination URL of the short link. + */ + ls?: string | undefined; + /** + * The destination URL of the short link. + */ + lr?: string | undefined; + /** + * The destination URL of the short link. + */ + ly?: string | undefined; + /** + * The destination URL of the short link. + */ + li?: string | undefined; + /** + * The destination URL of the short link. + */ + lt?: string | undefined; + /** + * The destination URL of the short link. + */ + lu?: string | undefined; + /** + * The destination URL of the short link. + */ + mo?: string | undefined; + /** + * The destination URL of the short link. + */ + mg?: string | undefined; + /** + * The destination URL of the short link. + */ + mw?: string | undefined; + /** + * The destination URL of the short link. + */ + my?: string | undefined; + /** + * The destination URL of the short link. + */ + mv?: string | undefined; + /** + * The destination URL of the short link. + */ + ml?: string | undefined; + /** + * The destination URL of the short link. + */ + mt?: string | undefined; + /** + * The destination URL of the short link. + */ + mh?: string | undefined; + /** + * The destination URL of the short link. + */ + mq?: string | undefined; + /** + * The destination URL of the short link. + */ + mr?: string | undefined; + /** + * The destination URL of the short link. + */ + mu?: string | undefined; + /** + * The destination URL of the short link. + */ + yt?: string | undefined; + /** + * The destination URL of the short link. + */ + mx?: string | undefined; + /** + * The destination URL of the short link. + */ + fm?: string | undefined; + /** + * The destination URL of the short link. + */ + md?: string | undefined; + /** + * The destination URL of the short link. + */ + mc?: string | undefined; + /** + * The destination URL of the short link. + */ + mn?: string | undefined; + /** + * The destination URL of the short link. + */ + ms?: string | undefined; + /** + * The destination URL of the short link. + */ + ma?: string | undefined; + /** + * The destination URL of the short link. + */ + mz?: string | undefined; + /** + * The destination URL of the short link. + */ + mm?: string | undefined; + /** + * The destination URL of the short link. + */ + na?: string | undefined; + /** + * The destination URL of the short link. + */ + nr?: string | undefined; + /** + * The destination URL of the short link. + */ + np?: string | undefined; + /** + * The destination URL of the short link. + */ + nl?: string | undefined; + /** + * The destination URL of the short link. + */ + nc?: string | undefined; + /** + * The destination URL of the short link. + */ + nz?: string | undefined; + /** + * The destination URL of the short link. + */ + ni?: string | undefined; + /** + * The destination URL of the short link. + */ + ne?: string | undefined; + /** + * The destination URL of the short link. + */ + ng?: string | undefined; + /** + * The destination URL of the short link. + */ + nu?: string | undefined; + /** + * The destination URL of the short link. + */ + nf?: string | undefined; + /** + * The destination URL of the short link. + */ + mk?: string | undefined; + /** + * The destination URL of the short link. + */ + mp?: string | undefined; + /** + * The destination URL of the short link. + */ + no?: string | undefined; + /** + * The destination URL of the short link. + */ + om?: string | undefined; + /** + * The destination URL of the short link. + */ + pk?: string | undefined; + /** + * The destination URL of the short link. + */ + pw?: string | undefined; + /** + * The destination URL of the short link. + */ + ps?: string | undefined; + /** + * The destination URL of the short link. + */ + pa?: string | undefined; + /** + * The destination URL of the short link. + */ + pg?: string | undefined; + /** + * The destination URL of the short link. + */ + py?: string | undefined; + /** + * The destination URL of the short link. + */ + pe?: string | undefined; + /** + * The destination URL of the short link. + */ + ph?: string | undefined; + /** + * The destination URL of the short link. + */ + pn?: string | undefined; + /** + * The destination URL of the short link. + */ + pl?: string | undefined; + /** + * The destination URL of the short link. + */ + pt?: string | undefined; + /** + * The destination URL of the short link. + */ + pr?: string | undefined; + /** + * The destination URL of the short link. + */ + qa?: string | undefined; + /** + * The destination URL of the short link. + */ + re?: string | undefined; + /** + * The destination URL of the short link. + */ + ro?: string | undefined; + /** + * The destination URL of the short link. + */ + ru?: string | undefined; + /** + * The destination URL of the short link. + */ + rw?: string | undefined; + /** + * The destination URL of the short link. + */ + sh?: string | undefined; + /** + * The destination URL of the short link. + */ + kn?: string | undefined; + /** + * The destination URL of the short link. + */ + lc?: string | undefined; + /** + * The destination URL of the short link. + */ + pm?: string | undefined; + /** + * The destination URL of the short link. + */ + vc?: string | undefined; + /** + * The destination URL of the short link. + */ + ws?: string | undefined; + /** + * The destination URL of the short link. + */ + sm?: string | undefined; + /** + * The destination URL of the short link. + */ + st?: string | undefined; + /** + * The destination URL of the short link. + */ + sa?: string | undefined; + /** + * The destination URL of the short link. + */ + sn?: string | undefined; + /** + * The destination URL of the short link. + */ + sc?: string | undefined; + /** + * The destination URL of the short link. + */ + sl?: string | undefined; + /** + * The destination URL of the short link. + */ + sg?: string | undefined; + /** + * The destination URL of the short link. + */ + sk?: string | undefined; + /** + * The destination URL of the short link. + */ + si?: string | undefined; + /** + * The destination URL of the short link. + */ + sb?: string | undefined; + /** + * The destination URL of the short link. + */ + so?: string | undefined; + /** + * The destination URL of the short link. + */ + za?: string | undefined; + /** + * The destination URL of the short link. + */ + gs?: string | undefined; + /** + * The destination URL of the short link. + */ + es?: string | undefined; + /** + * The destination URL of the short link. + */ + lk?: string | undefined; + /** + * The destination URL of the short link. + */ + sd?: string | undefined; + /** + * The destination URL of the short link. + */ + sr?: string | undefined; + /** + * The destination URL of the short link. + */ + sj?: string | undefined; + /** + * The destination URL of the short link. + */ + sz?: string | undefined; + /** + * The destination URL of the short link. + */ + se?: string | undefined; + /** + * The destination URL of the short link. + */ + ch?: string | undefined; + /** + * The destination URL of the short link. + */ + sy?: string | undefined; + /** + * The destination URL of the short link. + */ + tw?: string | undefined; + /** + * The destination URL of the short link. + */ + tj?: string | undefined; + /** + * The destination URL of the short link. + */ + tz?: string | undefined; + /** + * The destination URL of the short link. + */ + th?: string | undefined; + /** + * The destination URL of the short link. + */ + tl?: string | undefined; + /** + * The destination URL of the short link. + */ + tg?: string | undefined; + /** + * The destination URL of the short link. + */ + tk?: string | undefined; + /** + * The destination URL of the short link. + */ + to?: string | undefined; + /** + * The destination URL of the short link. + */ + tt?: string | undefined; + /** + * The destination URL of the short link. + */ + tn?: string | undefined; + /** + * The destination URL of the short link. + */ + tr?: string | undefined; + /** + * The destination URL of the short link. + */ + tm?: string | undefined; + /** + * The destination URL of the short link. + */ + tc?: string | undefined; + /** + * The destination URL of the short link. + */ + tv?: string | undefined; + /** + * The destination URL of the short link. + */ + ug?: string | undefined; + /** + * The destination URL of the short link. + */ + ua?: string | undefined; + /** + * The destination URL of the short link. + */ + ae?: string | undefined; + /** + * The destination URL of the short link. + */ + gb?: string | undefined; + /** + * The destination URL of the short link. + */ + us?: string | undefined; + /** + * The destination URL of the short link. + */ + um?: string | undefined; + /** + * The destination URL of the short link. + */ + uy?: string | undefined; + /** + * The destination URL of the short link. + */ + uz?: string | undefined; + /** + * The destination URL of the short link. + */ + vu?: string | undefined; + /** + * The destination URL of the short link. + */ + ve?: string | undefined; + /** + * The destination URL of the short link. + */ + vn?: string | undefined; + /** + * The destination URL of the short link. + */ + vg?: string | undefined; + /** + * The destination URL of the short link. + */ + vi?: string | undefined; + /** + * The destination URL of the short link. + */ + wf?: string | undefined; + /** + * The destination URL of the short link. + */ + eh?: string | undefined; + /** + * The destination URL of the short link. + */ + ye?: string | undefined; + /** + * The destination URL of the short link. + */ + zm?: string | undefined; + /** + * The destination URL of the short link. + */ + zw?: string | undefined; + /** + * The destination URL of the short link. + */ + ax?: string | undefined; + /** + * The destination URL of the short link. + */ + bq?: string | undefined; + /** + * The destination URL of the short link. + */ + cw?: string | undefined; + /** + * The destination URL of the short link. + */ + gg?: string | undefined; + /** + * The destination URL of the short link. + */ + im?: string | undefined; + /** + * The destination URL of the short link. + */ + je?: string | undefined; + /** + * The destination URL of the short link. + */ + me?: string | undefined; + /** + * The destination URL of the short link. + */ + bl?: string | undefined; + /** + * The destination URL of the short link. + */ + mf?: string | undefined; + /** + * The destination URL of the short link. + */ + rs?: string | undefined; + /** + * The destination URL of the short link. + */ + sx?: string | undefined; + /** + * The destination URL of the short link. + */ + ss?: string | undefined; + /** + * The destination URL of the short link. + */ + xk?: string | undefined; +}; + +export type CreateLinkRequestBody = { + /** + * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). + */ + domain?: string | undefined; + /** + * The short link slug. If not provided, a random 7-character slug will be generated. + */ + key?: string | undefined; + /** + * The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. + */ + prefix?: string | undefined; + /** + * The destination URL of the short link. + */ + url: string; + /** + * Whether the short link is archived. + */ + archived?: boolean | undefined; + /** + * Whether the short link's stats are publicly accessible. + */ + publicStats?: boolean | undefined; + /** + * The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + tagId?: string | null | undefined; + /** + * The unique IDs of the tags assigned to the short link. + */ + tagIds?: string | Array | undefined; + /** + * The comments for the short link. + */ + comments?: string | null | undefined; + /** + * The date and time when the short link will expire at. + */ + expiresAt?: string | null | undefined; + /** + * The URL to redirect to when the short link has expired. + */ + expiredUrl?: string | null | undefined; + /** + * The password required to access the destination URL of the short link. + */ + password?: string | null | undefined; + /** + * Whether the short link uses Custom Social Media Cards feature. + */ + proxy?: boolean | undefined; + /** + * The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + title?: string | null | undefined; + /** + * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + description?: string | null | undefined; + /** + * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + image?: string | null | undefined; + /** + * Whether the short link uses link cloaking. + */ + rewrite?: boolean | undefined; + /** + * The iOS destination URL for the short link for iOS device targeting. + */ + ios?: string | null | undefined; + /** + * The Android destination URL for the short link for Android device targeting. + */ + android?: string | null | undefined; + /** + * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. + */ + geo?: Geo | null | undefined; +}; + +/** @internal */ +export namespace TagIds$ { + export type Inbound = string | Array; + + export type Outbound = string | Array; + export const inboundSchema: z.ZodType = z.union([ + z.string(), + z.array(z.string()), + ]); + export const outboundSchema: z.ZodType = z.union([ + z.string(), + z.array(z.string()), + ]); +} + +/** @internal */ +export namespace Geo$ { + export type Inbound = { + AF?: string | undefined; + AL?: string | undefined; + DZ?: string | undefined; + AS?: string | undefined; + AD?: string | undefined; + AO?: string | undefined; + AI?: string | undefined; + AQ?: string | undefined; + AG?: string | undefined; + AR?: string | undefined; + AM?: string | undefined; + AW?: string | undefined; + AU?: string | undefined; + AT?: string | undefined; + AZ?: string | undefined; + BS?: string | undefined; + BH?: string | undefined; + BD?: string | undefined; + BB?: string | undefined; + BY?: string | undefined; + BE?: string | undefined; + BZ?: string | undefined; + BJ?: string | undefined; + BM?: string | undefined; + BT?: string | undefined; + BO?: string | undefined; + BA?: string | undefined; + BW?: string | undefined; + BV?: string | undefined; + BR?: string | undefined; + IO?: string | undefined; + BN?: string | undefined; + BG?: string | undefined; + BF?: string | undefined; + BI?: string | undefined; + KH?: string | undefined; + CM?: string | undefined; + CA?: string | undefined; + CV?: string | undefined; + KY?: string | undefined; + CF?: string | undefined; + TD?: string | undefined; + CL?: string | undefined; + CN?: string | undefined; + CX?: string | undefined; + CC?: string | undefined; + CO?: string | undefined; + KM?: string | undefined; + CG?: string | undefined; + CD?: string | undefined; + CK?: string | undefined; + CR?: string | undefined; + CI?: string | undefined; + HR?: string | undefined; + CU?: string | undefined; + CY?: string | undefined; + CZ?: string | undefined; + DK?: string | undefined; + DJ?: string | undefined; + DM?: string | undefined; + DO?: string | undefined; + EC?: string | undefined; + EG?: string | undefined; + SV?: string | undefined; + GQ?: string | undefined; + ER?: string | undefined; + EE?: string | undefined; + ET?: string | undefined; + FK?: string | undefined; + FO?: string | undefined; + FJ?: string | undefined; + FI?: string | undefined; + FR?: string | undefined; + GF?: string | undefined; + PF?: string | undefined; + TF?: string | undefined; + GA?: string | undefined; + GM?: string | undefined; + GE?: string | undefined; + DE?: string | undefined; + GH?: string | undefined; + GI?: string | undefined; + GR?: string | undefined; + GL?: string | undefined; + GD?: string | undefined; + GP?: string | undefined; + GU?: string | undefined; + GT?: string | undefined; + GN?: string | undefined; + GW?: string | undefined; + GY?: string | undefined; + HT?: string | undefined; + HM?: string | undefined; + VA?: string | undefined; + HN?: string | undefined; + HK?: string | undefined; + HU?: string | undefined; + IS?: string | undefined; + IN?: string | undefined; + ID?: string | undefined; + IR?: string | undefined; + IQ?: string | undefined; + IE?: string | undefined; + IL?: string | undefined; + IT?: string | undefined; + JM?: string | undefined; + JP?: string | undefined; + JO?: string | undefined; + KZ?: string | undefined; + KE?: string | undefined; + KI?: string | undefined; + KP?: string | undefined; + KR?: string | undefined; + KW?: string | undefined; + KG?: string | undefined; + LA?: string | undefined; + LV?: string | undefined; + LB?: string | undefined; + LS?: string | undefined; + LR?: string | undefined; + LY?: string | undefined; + LI?: string | undefined; + LT?: string | undefined; + LU?: string | undefined; + MO?: string | undefined; + MG?: string | undefined; + MW?: string | undefined; + MY?: string | undefined; + MV?: string | undefined; + ML?: string | undefined; + MT?: string | undefined; + MH?: string | undefined; + MQ?: string | undefined; + MR?: string | undefined; + MU?: string | undefined; + YT?: string | undefined; + MX?: string | undefined; + FM?: string | undefined; + MD?: string | undefined; + MC?: string | undefined; + MN?: string | undefined; + MS?: string | undefined; + MA?: string | undefined; + MZ?: string | undefined; + MM?: string | undefined; + NA?: string | undefined; + NR?: string | undefined; + NP?: string | undefined; + NL?: string | undefined; + NC?: string | undefined; + NZ?: string | undefined; + NI?: string | undefined; + NE?: string | undefined; + NG?: string | undefined; + NU?: string | undefined; + NF?: string | undefined; + MK?: string | undefined; + MP?: string | undefined; + NO?: string | undefined; + OM?: string | undefined; + PK?: string | undefined; + PW?: string | undefined; + PS?: string | undefined; + PA?: string | undefined; + PG?: string | undefined; + PY?: string | undefined; + PE?: string | undefined; + PH?: string | undefined; + PN?: string | undefined; + PL?: string | undefined; + PT?: string | undefined; + PR?: string | undefined; + QA?: string | undefined; + RE?: string | undefined; + RO?: string | undefined; + RU?: string | undefined; + RW?: string | undefined; + SH?: string | undefined; + KN?: string | undefined; + LC?: string | undefined; + PM?: string | undefined; + VC?: string | undefined; + WS?: string | undefined; + SM?: string | undefined; + ST?: string | undefined; + SA?: string | undefined; + SN?: string | undefined; + SC?: string | undefined; + SL?: string | undefined; + SG?: string | undefined; + SK?: string | undefined; + SI?: string | undefined; + SB?: string | undefined; + SO?: string | undefined; + ZA?: string | undefined; + GS?: string | undefined; + ES?: string | undefined; + LK?: string | undefined; + SD?: string | undefined; + SR?: string | undefined; + SJ?: string | undefined; + SZ?: string | undefined; + SE?: string | undefined; + CH?: string | undefined; + SY?: string | undefined; + TW?: string | undefined; + TJ?: string | undefined; + TZ?: string | undefined; + TH?: string | undefined; + TL?: string | undefined; + TG?: string | undefined; + TK?: string | undefined; + TO?: string | undefined; + TT?: string | undefined; + TN?: string | undefined; + TR?: string | undefined; + TM?: string | undefined; + TC?: string | undefined; + TV?: string | undefined; + UG?: string | undefined; + UA?: string | undefined; + AE?: string | undefined; + GB?: string | undefined; + US?: string | undefined; + UM?: string | undefined; + UY?: string | undefined; + UZ?: string | undefined; + VU?: string | undefined; + VE?: string | undefined; + VN?: string | undefined; + VG?: string | undefined; + VI?: string | undefined; + WF?: string | undefined; + EH?: string | undefined; + YE?: string | undefined; + ZM?: string | undefined; + ZW?: string | undefined; + AX?: string | undefined; + BQ?: string | undefined; + CW?: string | undefined; + GG?: string | undefined; + IM?: string | undefined; + JE?: string | undefined; + ME?: string | undefined; + BL?: string | undefined; + MF?: string | undefined; + RS?: string | undefined; + SX?: string | undefined; + SS?: string | undefined; + XK?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + AF: z.string().optional(), + AL: z.string().optional(), + DZ: z.string().optional(), + AS: z.string().optional(), + AD: z.string().optional(), + AO: z.string().optional(), + AI: z.string().optional(), + AQ: z.string().optional(), + AG: z.string().optional(), + AR: z.string().optional(), + AM: z.string().optional(), + AW: z.string().optional(), + AU: z.string().optional(), + AT: z.string().optional(), + AZ: z.string().optional(), + BS: z.string().optional(), + BH: z.string().optional(), + BD: z.string().optional(), + BB: z.string().optional(), + BY: z.string().optional(), + BE: z.string().optional(), + BZ: z.string().optional(), + BJ: z.string().optional(), + BM: z.string().optional(), + BT: z.string().optional(), + BO: z.string().optional(), + BA: z.string().optional(), + BW: z.string().optional(), + BV: z.string().optional(), + BR: z.string().optional(), + IO: z.string().optional(), + BN: z.string().optional(), + BG: z.string().optional(), + BF: z.string().optional(), + BI: z.string().optional(), + KH: z.string().optional(), + CM: z.string().optional(), + CA: z.string().optional(), + CV: z.string().optional(), + KY: z.string().optional(), + CF: z.string().optional(), + TD: z.string().optional(), + CL: z.string().optional(), + CN: z.string().optional(), + CX: z.string().optional(), + CC: z.string().optional(), + CO: z.string().optional(), + KM: z.string().optional(), + CG: z.string().optional(), + CD: z.string().optional(), + CK: z.string().optional(), + CR: z.string().optional(), + CI: z.string().optional(), + HR: z.string().optional(), + CU: z.string().optional(), + CY: z.string().optional(), + CZ: z.string().optional(), + DK: z.string().optional(), + DJ: z.string().optional(), + DM: z.string().optional(), + DO: z.string().optional(), + EC: z.string().optional(), + EG: z.string().optional(), + SV: z.string().optional(), + GQ: z.string().optional(), + ER: z.string().optional(), + EE: z.string().optional(), + ET: z.string().optional(), + FK: z.string().optional(), + FO: z.string().optional(), + FJ: z.string().optional(), + FI: z.string().optional(), + FR: z.string().optional(), + GF: z.string().optional(), + PF: z.string().optional(), + TF: z.string().optional(), + GA: z.string().optional(), + GM: z.string().optional(), + GE: z.string().optional(), + DE: z.string().optional(), + GH: z.string().optional(), + GI: z.string().optional(), + GR: z.string().optional(), + GL: z.string().optional(), + GD: z.string().optional(), + GP: z.string().optional(), + GU: z.string().optional(), + GT: z.string().optional(), + GN: z.string().optional(), + GW: z.string().optional(), + GY: z.string().optional(), + HT: z.string().optional(), + HM: z.string().optional(), + VA: z.string().optional(), + HN: z.string().optional(), + HK: z.string().optional(), + HU: z.string().optional(), + IS: z.string().optional(), + IN: z.string().optional(), + ID: z.string().optional(), + IR: z.string().optional(), + IQ: z.string().optional(), + IE: z.string().optional(), + IL: z.string().optional(), + IT: z.string().optional(), + JM: z.string().optional(), + JP: z.string().optional(), + JO: z.string().optional(), + KZ: z.string().optional(), + KE: z.string().optional(), + KI: z.string().optional(), + KP: z.string().optional(), + KR: z.string().optional(), + KW: z.string().optional(), + KG: z.string().optional(), + LA: z.string().optional(), + LV: z.string().optional(), + LB: z.string().optional(), + LS: z.string().optional(), + LR: z.string().optional(), + LY: z.string().optional(), + LI: z.string().optional(), + LT: z.string().optional(), + LU: z.string().optional(), + MO: z.string().optional(), + MG: z.string().optional(), + MW: z.string().optional(), + MY: z.string().optional(), + MV: z.string().optional(), + ML: z.string().optional(), + MT: z.string().optional(), + MH: z.string().optional(), + MQ: z.string().optional(), + MR: z.string().optional(), + MU: z.string().optional(), + YT: z.string().optional(), + MX: z.string().optional(), + FM: z.string().optional(), + MD: z.string().optional(), + MC: z.string().optional(), + MN: z.string().optional(), + MS: z.string().optional(), + MA: z.string().optional(), + MZ: z.string().optional(), + MM: z.string().optional(), + NA: z.string().optional(), + NR: z.string().optional(), + NP: z.string().optional(), + NL: z.string().optional(), + NC: z.string().optional(), + NZ: z.string().optional(), + NI: z.string().optional(), + NE: z.string().optional(), + NG: z.string().optional(), + NU: z.string().optional(), + NF: z.string().optional(), + MK: z.string().optional(), + MP: z.string().optional(), + NO: z.string().optional(), + OM: z.string().optional(), + PK: z.string().optional(), + PW: z.string().optional(), + PS: z.string().optional(), + PA: z.string().optional(), + PG: z.string().optional(), + PY: z.string().optional(), + PE: z.string().optional(), + PH: z.string().optional(), + PN: z.string().optional(), + PL: z.string().optional(), + PT: z.string().optional(), + PR: z.string().optional(), + QA: z.string().optional(), + RE: z.string().optional(), + RO: z.string().optional(), + RU: z.string().optional(), + RW: z.string().optional(), + SH: z.string().optional(), + KN: z.string().optional(), + LC: z.string().optional(), + PM: z.string().optional(), + VC: z.string().optional(), + WS: z.string().optional(), + SM: z.string().optional(), + ST: z.string().optional(), + SA: z.string().optional(), + SN: z.string().optional(), + SC: z.string().optional(), + SL: z.string().optional(), + SG: z.string().optional(), + SK: z.string().optional(), + SI: z.string().optional(), + SB: z.string().optional(), + SO: z.string().optional(), + ZA: z.string().optional(), + GS: z.string().optional(), + ES: z.string().optional(), + LK: z.string().optional(), + SD: z.string().optional(), + SR: z.string().optional(), + SJ: z.string().optional(), + SZ: z.string().optional(), + SE: z.string().optional(), + CH: z.string().optional(), + SY: z.string().optional(), + TW: z.string().optional(), + TJ: z.string().optional(), + TZ: z.string().optional(), + TH: z.string().optional(), + TL: z.string().optional(), + TG: z.string().optional(), + TK: z.string().optional(), + TO: z.string().optional(), + TT: z.string().optional(), + TN: z.string().optional(), + TR: z.string().optional(), + TM: z.string().optional(), + TC: z.string().optional(), + TV: z.string().optional(), + UG: z.string().optional(), + UA: z.string().optional(), + AE: z.string().optional(), + GB: z.string().optional(), + US: z.string().optional(), + UM: z.string().optional(), + UY: z.string().optional(), + UZ: z.string().optional(), + VU: z.string().optional(), + VE: z.string().optional(), + VN: z.string().optional(), + VG: z.string().optional(), + VI: z.string().optional(), + WF: z.string().optional(), + EH: z.string().optional(), + YE: z.string().optional(), + ZM: z.string().optional(), + ZW: z.string().optional(), + AX: z.string().optional(), + BQ: z.string().optional(), + CW: z.string().optional(), + GG: z.string().optional(), + IM: z.string().optional(), + JE: z.string().optional(), + ME: z.string().optional(), + BL: z.string().optional(), + MF: z.string().optional(), + RS: z.string().optional(), + SX: z.string().optional(), + SS: z.string().optional(), + XK: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.AF === undefined ? null : { af: v.AF }), + ...(v.AL === undefined ? null : { al: v.AL }), + ...(v.DZ === undefined ? null : { dz: v.DZ }), + ...(v.AS === undefined ? null : { as: v.AS }), + ...(v.AD === undefined ? null : { ad: v.AD }), + ...(v.AO === undefined ? null : { ao: v.AO }), + ...(v.AI === undefined ? null : { ai: v.AI }), + ...(v.AQ === undefined ? null : { aq: v.AQ }), + ...(v.AG === undefined ? null : { ag: v.AG }), + ...(v.AR === undefined ? null : { ar: v.AR }), + ...(v.AM === undefined ? null : { am: v.AM }), + ...(v.AW === undefined ? null : { aw: v.AW }), + ...(v.AU === undefined ? null : { au: v.AU }), + ...(v.AT === undefined ? null : { at: v.AT }), + ...(v.AZ === undefined ? null : { az: v.AZ }), + ...(v.BS === undefined ? null : { bs: v.BS }), + ...(v.BH === undefined ? null : { bh: v.BH }), + ...(v.BD === undefined ? null : { bd: v.BD }), + ...(v.BB === undefined ? null : { bb: v.BB }), + ...(v.BY === undefined ? null : { by: v.BY }), + ...(v.BE === undefined ? null : { be: v.BE }), + ...(v.BZ === undefined ? null : { bz: v.BZ }), + ...(v.BJ === undefined ? null : { bj: v.BJ }), + ...(v.BM === undefined ? null : { bm: v.BM }), + ...(v.BT === undefined ? null : { bt: v.BT }), + ...(v.BO === undefined ? null : { bo: v.BO }), + ...(v.BA === undefined ? null : { ba: v.BA }), + ...(v.BW === undefined ? null : { bw: v.BW }), + ...(v.BV === undefined ? null : { bv: v.BV }), + ...(v.BR === undefined ? null : { br: v.BR }), + ...(v.IO === undefined ? null : { io: v.IO }), + ...(v.BN === undefined ? null : { bn: v.BN }), + ...(v.BG === undefined ? null : { bg: v.BG }), + ...(v.BF === undefined ? null : { bf: v.BF }), + ...(v.BI === undefined ? null : { bi: v.BI }), + ...(v.KH === undefined ? null : { kh: v.KH }), + ...(v.CM === undefined ? null : { cm: v.CM }), + ...(v.CA === undefined ? null : { ca: v.CA }), + ...(v.CV === undefined ? null : { cv: v.CV }), + ...(v.KY === undefined ? null : { ky: v.KY }), + ...(v.CF === undefined ? null : { cf: v.CF }), + ...(v.TD === undefined ? null : { td: v.TD }), + ...(v.CL === undefined ? null : { cl: v.CL }), + ...(v.CN === undefined ? null : { cn: v.CN }), + ...(v.CX === undefined ? null : { cx: v.CX }), + ...(v.CC === undefined ? null : { cc: v.CC }), + ...(v.CO === undefined ? null : { co: v.CO }), + ...(v.KM === undefined ? null : { km: v.KM }), + ...(v.CG === undefined ? null : { cg: v.CG }), + ...(v.CD === undefined ? null : { cd: v.CD }), + ...(v.CK === undefined ? null : { ck: v.CK }), + ...(v.CR === undefined ? null : { cr: v.CR }), + ...(v.CI === undefined ? null : { ci: v.CI }), + ...(v.HR === undefined ? null : { hr: v.HR }), + ...(v.CU === undefined ? null : { cu: v.CU }), + ...(v.CY === undefined ? null : { cy: v.CY }), + ...(v.CZ === undefined ? null : { cz: v.CZ }), + ...(v.DK === undefined ? null : { dk: v.DK }), + ...(v.DJ === undefined ? null : { dj: v.DJ }), + ...(v.DM === undefined ? null : { dm: v.DM }), + ...(v.DO === undefined ? null : { do: v.DO }), + ...(v.EC === undefined ? null : { ec: v.EC }), + ...(v.EG === undefined ? null : { eg: v.EG }), + ...(v.SV === undefined ? null : { sv: v.SV }), + ...(v.GQ === undefined ? null : { gq: v.GQ }), + ...(v.ER === undefined ? null : { er: v.ER }), + ...(v.EE === undefined ? null : { ee: v.EE }), + ...(v.ET === undefined ? null : { et: v.ET }), + ...(v.FK === undefined ? null : { fk: v.FK }), + ...(v.FO === undefined ? null : { fo: v.FO }), + ...(v.FJ === undefined ? null : { fj: v.FJ }), + ...(v.FI === undefined ? null : { fi: v.FI }), + ...(v.FR === undefined ? null : { fr: v.FR }), + ...(v.GF === undefined ? null : { gf: v.GF }), + ...(v.PF === undefined ? null : { pf: v.PF }), + ...(v.TF === undefined ? null : { tf: v.TF }), + ...(v.GA === undefined ? null : { ga: v.GA }), + ...(v.GM === undefined ? null : { gm: v.GM }), + ...(v.GE === undefined ? null : { ge: v.GE }), + ...(v.DE === undefined ? null : { de: v.DE }), + ...(v.GH === undefined ? null : { gh: v.GH }), + ...(v.GI === undefined ? null : { gi: v.GI }), + ...(v.GR === undefined ? null : { gr: v.GR }), + ...(v.GL === undefined ? null : { gl: v.GL }), + ...(v.GD === undefined ? null : { gd: v.GD }), + ...(v.GP === undefined ? null : { gp: v.GP }), + ...(v.GU === undefined ? null : { gu: v.GU }), + ...(v.GT === undefined ? null : { gt: v.GT }), + ...(v.GN === undefined ? null : { gn: v.GN }), + ...(v.GW === undefined ? null : { gw: v.GW }), + ...(v.GY === undefined ? null : { gy: v.GY }), + ...(v.HT === undefined ? null : { ht: v.HT }), + ...(v.HM === undefined ? null : { hm: v.HM }), + ...(v.VA === undefined ? null : { va: v.VA }), + ...(v.HN === undefined ? null : { hn: v.HN }), + ...(v.HK === undefined ? null : { hk: v.HK }), + ...(v.HU === undefined ? null : { hu: v.HU }), + ...(v.IS === undefined ? null : { is: v.IS }), + ...(v.IN === undefined ? null : { in: v.IN }), + ...(v.ID === undefined ? null : { id: v.ID }), + ...(v.IR === undefined ? null : { ir: v.IR }), + ...(v.IQ === undefined ? null : { iq: v.IQ }), + ...(v.IE === undefined ? null : { ie: v.IE }), + ...(v.IL === undefined ? null : { il: v.IL }), + ...(v.IT === undefined ? null : { it: v.IT }), + ...(v.JM === undefined ? null : { jm: v.JM }), + ...(v.JP === undefined ? null : { jp: v.JP }), + ...(v.JO === undefined ? null : { jo: v.JO }), + ...(v.KZ === undefined ? null : { kz: v.KZ }), + ...(v.KE === undefined ? null : { ke: v.KE }), + ...(v.KI === undefined ? null : { ki: v.KI }), + ...(v.KP === undefined ? null : { kp: v.KP }), + ...(v.KR === undefined ? null : { kr: v.KR }), + ...(v.KW === undefined ? null : { kw: v.KW }), + ...(v.KG === undefined ? null : { kg: v.KG }), + ...(v.LA === undefined ? null : { la: v.LA }), + ...(v.LV === undefined ? null : { lv: v.LV }), + ...(v.LB === undefined ? null : { lb: v.LB }), + ...(v.LS === undefined ? null : { ls: v.LS }), + ...(v.LR === undefined ? null : { lr: v.LR }), + ...(v.LY === undefined ? null : { ly: v.LY }), + ...(v.LI === undefined ? null : { li: v.LI }), + ...(v.LT === undefined ? null : { lt: v.LT }), + ...(v.LU === undefined ? null : { lu: v.LU }), + ...(v.MO === undefined ? null : { mo: v.MO }), + ...(v.MG === undefined ? null : { mg: v.MG }), + ...(v.MW === undefined ? null : { mw: v.MW }), + ...(v.MY === undefined ? null : { my: v.MY }), + ...(v.MV === undefined ? null : { mv: v.MV }), + ...(v.ML === undefined ? null : { ml: v.ML }), + ...(v.MT === undefined ? null : { mt: v.MT }), + ...(v.MH === undefined ? null : { mh: v.MH }), + ...(v.MQ === undefined ? null : { mq: v.MQ }), + ...(v.MR === undefined ? null : { mr: v.MR }), + ...(v.MU === undefined ? null : { mu: v.MU }), + ...(v.YT === undefined ? null : { yt: v.YT }), + ...(v.MX === undefined ? null : { mx: v.MX }), + ...(v.FM === undefined ? null : { fm: v.FM }), + ...(v.MD === undefined ? null : { md: v.MD }), + ...(v.MC === undefined ? null : { mc: v.MC }), + ...(v.MN === undefined ? null : { mn: v.MN }), + ...(v.MS === undefined ? null : { ms: v.MS }), + ...(v.MA === undefined ? null : { ma: v.MA }), + ...(v.MZ === undefined ? null : { mz: v.MZ }), + ...(v.MM === undefined ? null : { mm: v.MM }), + ...(v.NA === undefined ? null : { na: v.NA }), + ...(v.NR === undefined ? null : { nr: v.NR }), + ...(v.NP === undefined ? null : { np: v.NP }), + ...(v.NL === undefined ? null : { nl: v.NL }), + ...(v.NC === undefined ? null : { nc: v.NC }), + ...(v.NZ === undefined ? null : { nz: v.NZ }), + ...(v.NI === undefined ? null : { ni: v.NI }), + ...(v.NE === undefined ? null : { ne: v.NE }), + ...(v.NG === undefined ? null : { ng: v.NG }), + ...(v.NU === undefined ? null : { nu: v.NU }), + ...(v.NF === undefined ? null : { nf: v.NF }), + ...(v.MK === undefined ? null : { mk: v.MK }), + ...(v.MP === undefined ? null : { mp: v.MP }), + ...(v.NO === undefined ? null : { no: v.NO }), + ...(v.OM === undefined ? null : { om: v.OM }), + ...(v.PK === undefined ? null : { pk: v.PK }), + ...(v.PW === undefined ? null : { pw: v.PW }), + ...(v.PS === undefined ? null : { ps: v.PS }), + ...(v.PA === undefined ? null : { pa: v.PA }), + ...(v.PG === undefined ? null : { pg: v.PG }), + ...(v.PY === undefined ? null : { py: v.PY }), + ...(v.PE === undefined ? null : { pe: v.PE }), + ...(v.PH === undefined ? null : { ph: v.PH }), + ...(v.PN === undefined ? null : { pn: v.PN }), + ...(v.PL === undefined ? null : { pl: v.PL }), + ...(v.PT === undefined ? null : { pt: v.PT }), + ...(v.PR === undefined ? null : { pr: v.PR }), + ...(v.QA === undefined ? null : { qa: v.QA }), + ...(v.RE === undefined ? null : { re: v.RE }), + ...(v.RO === undefined ? null : { ro: v.RO }), + ...(v.RU === undefined ? null : { ru: v.RU }), + ...(v.RW === undefined ? null : { rw: v.RW }), + ...(v.SH === undefined ? null : { sh: v.SH }), + ...(v.KN === undefined ? null : { kn: v.KN }), + ...(v.LC === undefined ? null : { lc: v.LC }), + ...(v.PM === undefined ? null : { pm: v.PM }), + ...(v.VC === undefined ? null : { vc: v.VC }), + ...(v.WS === undefined ? null : { ws: v.WS }), + ...(v.SM === undefined ? null : { sm: v.SM }), + ...(v.ST === undefined ? null : { st: v.ST }), + ...(v.SA === undefined ? null : { sa: v.SA }), + ...(v.SN === undefined ? null : { sn: v.SN }), + ...(v.SC === undefined ? null : { sc: v.SC }), + ...(v.SL === undefined ? null : { sl: v.SL }), + ...(v.SG === undefined ? null : { sg: v.SG }), + ...(v.SK === undefined ? null : { sk: v.SK }), + ...(v.SI === undefined ? null : { si: v.SI }), + ...(v.SB === undefined ? null : { sb: v.SB }), + ...(v.SO === undefined ? null : { so: v.SO }), + ...(v.ZA === undefined ? null : { za: v.ZA }), + ...(v.GS === undefined ? null : { gs: v.GS }), + ...(v.ES === undefined ? null : { es: v.ES }), + ...(v.LK === undefined ? null : { lk: v.LK }), + ...(v.SD === undefined ? null : { sd: v.SD }), + ...(v.SR === undefined ? null : { sr: v.SR }), + ...(v.SJ === undefined ? null : { sj: v.SJ }), + ...(v.SZ === undefined ? null : { sz: v.SZ }), + ...(v.SE === undefined ? null : { se: v.SE }), + ...(v.CH === undefined ? null : { ch: v.CH }), + ...(v.SY === undefined ? null : { sy: v.SY }), + ...(v.TW === undefined ? null : { tw: v.TW }), + ...(v.TJ === undefined ? null : { tj: v.TJ }), + ...(v.TZ === undefined ? null : { tz: v.TZ }), + ...(v.TH === undefined ? null : { th: v.TH }), + ...(v.TL === undefined ? null : { tl: v.TL }), + ...(v.TG === undefined ? null : { tg: v.TG }), + ...(v.TK === undefined ? null : { tk: v.TK }), + ...(v.TO === undefined ? null : { to: v.TO }), + ...(v.TT === undefined ? null : { tt: v.TT }), + ...(v.TN === undefined ? null : { tn: v.TN }), + ...(v.TR === undefined ? null : { tr: v.TR }), + ...(v.TM === undefined ? null : { tm: v.TM }), + ...(v.TC === undefined ? null : { tc: v.TC }), + ...(v.TV === undefined ? null : { tv: v.TV }), + ...(v.UG === undefined ? null : { ug: v.UG }), + ...(v.UA === undefined ? null : { ua: v.UA }), + ...(v.AE === undefined ? null : { ae: v.AE }), + ...(v.GB === undefined ? null : { gb: v.GB }), + ...(v.US === undefined ? null : { us: v.US }), + ...(v.UM === undefined ? null : { um: v.UM }), + ...(v.UY === undefined ? null : { uy: v.UY }), + ...(v.UZ === undefined ? null : { uz: v.UZ }), + ...(v.VU === undefined ? null : { vu: v.VU }), + ...(v.VE === undefined ? null : { ve: v.VE }), + ...(v.VN === undefined ? null : { vn: v.VN }), + ...(v.VG === undefined ? null : { vg: v.VG }), + ...(v.VI === undefined ? null : { vi: v.VI }), + ...(v.WF === undefined ? null : { wf: v.WF }), + ...(v.EH === undefined ? null : { eh: v.EH }), + ...(v.YE === undefined ? null : { ye: v.YE }), + ...(v.ZM === undefined ? null : { zm: v.ZM }), + ...(v.ZW === undefined ? null : { zw: v.ZW }), + ...(v.AX === undefined ? null : { ax: v.AX }), + ...(v.BQ === undefined ? null : { bq: v.BQ }), + ...(v.CW === undefined ? null : { cw: v.CW }), + ...(v.GG === undefined ? null : { gg: v.GG }), + ...(v.IM === undefined ? null : { im: v.IM }), + ...(v.JE === undefined ? null : { je: v.JE }), + ...(v.ME === undefined ? null : { me: v.ME }), + ...(v.BL === undefined ? null : { bl: v.BL }), + ...(v.MF === undefined ? null : { mf: v.MF }), + ...(v.RS === undefined ? null : { rs: v.RS }), + ...(v.SX === undefined ? null : { sx: v.SX }), + ...(v.SS === undefined ? null : { ss: v.SS }), + ...(v.XK === undefined ? null : { xk: v.XK }), + }; + }); + + export type Outbound = { + AF?: string | undefined; + AL?: string | undefined; + DZ?: string | undefined; + AS?: string | undefined; + AD?: string | undefined; + AO?: string | undefined; + AI?: string | undefined; + AQ?: string | undefined; + AG?: string | undefined; + AR?: string | undefined; + AM?: string | undefined; + AW?: string | undefined; + AU?: string | undefined; + AT?: string | undefined; + AZ?: string | undefined; + BS?: string | undefined; + BH?: string | undefined; + BD?: string | undefined; + BB?: string | undefined; + BY?: string | undefined; + BE?: string | undefined; + BZ?: string | undefined; + BJ?: string | undefined; + BM?: string | undefined; + BT?: string | undefined; + BO?: string | undefined; + BA?: string | undefined; + BW?: string | undefined; + BV?: string | undefined; + BR?: string | undefined; + IO?: string | undefined; + BN?: string | undefined; + BG?: string | undefined; + BF?: string | undefined; + BI?: string | undefined; + KH?: string | undefined; + CM?: string | undefined; + CA?: string | undefined; + CV?: string | undefined; + KY?: string | undefined; + CF?: string | undefined; + TD?: string | undefined; + CL?: string | undefined; + CN?: string | undefined; + CX?: string | undefined; + CC?: string | undefined; + CO?: string | undefined; + KM?: string | undefined; + CG?: string | undefined; + CD?: string | undefined; + CK?: string | undefined; + CR?: string | undefined; + CI?: string | undefined; + HR?: string | undefined; + CU?: string | undefined; + CY?: string | undefined; + CZ?: string | undefined; + DK?: string | undefined; + DJ?: string | undefined; + DM?: string | undefined; + DO?: string | undefined; + EC?: string | undefined; + EG?: string | undefined; + SV?: string | undefined; + GQ?: string | undefined; + ER?: string | undefined; + EE?: string | undefined; + ET?: string | undefined; + FK?: string | undefined; + FO?: string | undefined; + FJ?: string | undefined; + FI?: string | undefined; + FR?: string | undefined; + GF?: string | undefined; + PF?: string | undefined; + TF?: string | undefined; + GA?: string | undefined; + GM?: string | undefined; + GE?: string | undefined; + DE?: string | undefined; + GH?: string | undefined; + GI?: string | undefined; + GR?: string | undefined; + GL?: string | undefined; + GD?: string | undefined; + GP?: string | undefined; + GU?: string | undefined; + GT?: string | undefined; + GN?: string | undefined; + GW?: string | undefined; + GY?: string | undefined; + HT?: string | undefined; + HM?: string | undefined; + VA?: string | undefined; + HN?: string | undefined; + HK?: string | undefined; + HU?: string | undefined; + IS?: string | undefined; + IN?: string | undefined; + ID?: string | undefined; + IR?: string | undefined; + IQ?: string | undefined; + IE?: string | undefined; + IL?: string | undefined; + IT?: string | undefined; + JM?: string | undefined; + JP?: string | undefined; + JO?: string | undefined; + KZ?: string | undefined; + KE?: string | undefined; + KI?: string | undefined; + KP?: string | undefined; + KR?: string | undefined; + KW?: string | undefined; + KG?: string | undefined; + LA?: string | undefined; + LV?: string | undefined; + LB?: string | undefined; + LS?: string | undefined; + LR?: string | undefined; + LY?: string | undefined; + LI?: string | undefined; + LT?: string | undefined; + LU?: string | undefined; + MO?: string | undefined; + MG?: string | undefined; + MW?: string | undefined; + MY?: string | undefined; + MV?: string | undefined; + ML?: string | undefined; + MT?: string | undefined; + MH?: string | undefined; + MQ?: string | undefined; + MR?: string | undefined; + MU?: string | undefined; + YT?: string | undefined; + MX?: string | undefined; + FM?: string | undefined; + MD?: string | undefined; + MC?: string | undefined; + MN?: string | undefined; + MS?: string | undefined; + MA?: string | undefined; + MZ?: string | undefined; + MM?: string | undefined; + NA?: string | undefined; + NR?: string | undefined; + NP?: string | undefined; + NL?: string | undefined; + NC?: string | undefined; + NZ?: string | undefined; + NI?: string | undefined; + NE?: string | undefined; + NG?: string | undefined; + NU?: string | undefined; + NF?: string | undefined; + MK?: string | undefined; + MP?: string | undefined; + NO?: string | undefined; + OM?: string | undefined; + PK?: string | undefined; + PW?: string | undefined; + PS?: string | undefined; + PA?: string | undefined; + PG?: string | undefined; + PY?: string | undefined; + PE?: string | undefined; + PH?: string | undefined; + PN?: string | undefined; + PL?: string | undefined; + PT?: string | undefined; + PR?: string | undefined; + QA?: string | undefined; + RE?: string | undefined; + RO?: string | undefined; + RU?: string | undefined; + RW?: string | undefined; + SH?: string | undefined; + KN?: string | undefined; + LC?: string | undefined; + PM?: string | undefined; + VC?: string | undefined; + WS?: string | undefined; + SM?: string | undefined; + ST?: string | undefined; + SA?: string | undefined; + SN?: string | undefined; + SC?: string | undefined; + SL?: string | undefined; + SG?: string | undefined; + SK?: string | undefined; + SI?: string | undefined; + SB?: string | undefined; + SO?: string | undefined; + ZA?: string | undefined; + GS?: string | undefined; + ES?: string | undefined; + LK?: string | undefined; + SD?: string | undefined; + SR?: string | undefined; + SJ?: string | undefined; + SZ?: string | undefined; + SE?: string | undefined; + CH?: string | undefined; + SY?: string | undefined; + TW?: string | undefined; + TJ?: string | undefined; + TZ?: string | undefined; + TH?: string | undefined; + TL?: string | undefined; + TG?: string | undefined; + TK?: string | undefined; + TO?: string | undefined; + TT?: string | undefined; + TN?: string | undefined; + TR?: string | undefined; + TM?: string | undefined; + TC?: string | undefined; + TV?: string | undefined; + UG?: string | undefined; + UA?: string | undefined; + AE?: string | undefined; + GB?: string | undefined; + US?: string | undefined; + UM?: string | undefined; + UY?: string | undefined; + UZ?: string | undefined; + VU?: string | undefined; + VE?: string | undefined; + VN?: string | undefined; + VG?: string | undefined; + VI?: string | undefined; + WF?: string | undefined; + EH?: string | undefined; + YE?: string | undefined; + ZM?: string | undefined; + ZW?: string | undefined; + AX?: string | undefined; + BQ?: string | undefined; + CW?: string | undefined; + GG?: string | undefined; + IM?: string | undefined; + JE?: string | undefined; + ME?: string | undefined; + BL?: string | undefined; + MF?: string | undefined; + RS?: string | undefined; + SX?: string | undefined; + SS?: string | undefined; + XK?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + af: z.string().optional(), + al: z.string().optional(), + dz: z.string().optional(), + as: z.string().optional(), + ad: z.string().optional(), + ao: z.string().optional(), + ai: z.string().optional(), + aq: z.string().optional(), + ag: z.string().optional(), + ar: z.string().optional(), + am: z.string().optional(), + aw: z.string().optional(), + au: z.string().optional(), + at: z.string().optional(), + az: z.string().optional(), + bs: z.string().optional(), + bh: z.string().optional(), + bd: z.string().optional(), + bb: z.string().optional(), + by: z.string().optional(), + be: z.string().optional(), + bz: z.string().optional(), + bj: z.string().optional(), + bm: z.string().optional(), + bt: z.string().optional(), + bo: z.string().optional(), + ba: z.string().optional(), + bw: z.string().optional(), + bv: z.string().optional(), + br: z.string().optional(), + io: z.string().optional(), + bn: z.string().optional(), + bg: z.string().optional(), + bf: z.string().optional(), + bi: z.string().optional(), + kh: z.string().optional(), + cm: z.string().optional(), + ca: z.string().optional(), + cv: z.string().optional(), + ky: z.string().optional(), + cf: z.string().optional(), + td: z.string().optional(), + cl: z.string().optional(), + cn: z.string().optional(), + cx: z.string().optional(), + cc: z.string().optional(), + co: z.string().optional(), + km: z.string().optional(), + cg: z.string().optional(), + cd: z.string().optional(), + ck: z.string().optional(), + cr: z.string().optional(), + ci: z.string().optional(), + hr: z.string().optional(), + cu: z.string().optional(), + cy: z.string().optional(), + cz: z.string().optional(), + dk: z.string().optional(), + dj: z.string().optional(), + dm: z.string().optional(), + do: z.string().optional(), + ec: z.string().optional(), + eg: z.string().optional(), + sv: z.string().optional(), + gq: z.string().optional(), + er: z.string().optional(), + ee: z.string().optional(), + et: z.string().optional(), + fk: z.string().optional(), + fo: z.string().optional(), + fj: z.string().optional(), + fi: z.string().optional(), + fr: z.string().optional(), + gf: z.string().optional(), + pf: z.string().optional(), + tf: z.string().optional(), + ga: z.string().optional(), + gm: z.string().optional(), + ge: z.string().optional(), + de: z.string().optional(), + gh: z.string().optional(), + gi: z.string().optional(), + gr: z.string().optional(), + gl: z.string().optional(), + gd: z.string().optional(), + gp: z.string().optional(), + gu: z.string().optional(), + gt: z.string().optional(), + gn: z.string().optional(), + gw: z.string().optional(), + gy: z.string().optional(), + ht: z.string().optional(), + hm: z.string().optional(), + va: z.string().optional(), + hn: z.string().optional(), + hk: z.string().optional(), + hu: z.string().optional(), + is: z.string().optional(), + in: z.string().optional(), + id: z.string().optional(), + ir: z.string().optional(), + iq: z.string().optional(), + ie: z.string().optional(), + il: z.string().optional(), + it: z.string().optional(), + jm: z.string().optional(), + jp: z.string().optional(), + jo: z.string().optional(), + kz: z.string().optional(), + ke: z.string().optional(), + ki: z.string().optional(), + kp: z.string().optional(), + kr: z.string().optional(), + kw: z.string().optional(), + kg: z.string().optional(), + la: z.string().optional(), + lv: z.string().optional(), + lb: z.string().optional(), + ls: z.string().optional(), + lr: z.string().optional(), + ly: z.string().optional(), + li: z.string().optional(), + lt: z.string().optional(), + lu: z.string().optional(), + mo: z.string().optional(), + mg: z.string().optional(), + mw: z.string().optional(), + my: z.string().optional(), + mv: z.string().optional(), + ml: z.string().optional(), + mt: z.string().optional(), + mh: z.string().optional(), + mq: z.string().optional(), + mr: z.string().optional(), + mu: z.string().optional(), + yt: z.string().optional(), + mx: z.string().optional(), + fm: z.string().optional(), + md: z.string().optional(), + mc: z.string().optional(), + mn: z.string().optional(), + ms: z.string().optional(), + ma: z.string().optional(), + mz: z.string().optional(), + mm: z.string().optional(), + na: z.string().optional(), + nr: z.string().optional(), + np: z.string().optional(), + nl: z.string().optional(), + nc: z.string().optional(), + nz: z.string().optional(), + ni: z.string().optional(), + ne: z.string().optional(), + ng: z.string().optional(), + nu: z.string().optional(), + nf: z.string().optional(), + mk: z.string().optional(), + mp: z.string().optional(), + no: z.string().optional(), + om: z.string().optional(), + pk: z.string().optional(), + pw: z.string().optional(), + ps: z.string().optional(), + pa: z.string().optional(), + pg: z.string().optional(), + py: z.string().optional(), + pe: z.string().optional(), + ph: z.string().optional(), + pn: z.string().optional(), + pl: z.string().optional(), + pt: z.string().optional(), + pr: z.string().optional(), + qa: z.string().optional(), + re: z.string().optional(), + ro: z.string().optional(), + ru: z.string().optional(), + rw: z.string().optional(), + sh: z.string().optional(), + kn: z.string().optional(), + lc: z.string().optional(), + pm: z.string().optional(), + vc: z.string().optional(), + ws: z.string().optional(), + sm: z.string().optional(), + st: z.string().optional(), + sa: z.string().optional(), + sn: z.string().optional(), + sc: z.string().optional(), + sl: z.string().optional(), + sg: z.string().optional(), + sk: z.string().optional(), + si: z.string().optional(), + sb: z.string().optional(), + so: z.string().optional(), + za: z.string().optional(), + gs: z.string().optional(), + es: z.string().optional(), + lk: z.string().optional(), + sd: z.string().optional(), + sr: z.string().optional(), + sj: z.string().optional(), + sz: z.string().optional(), + se: z.string().optional(), + ch: z.string().optional(), + sy: z.string().optional(), + tw: z.string().optional(), + tj: z.string().optional(), + tz: z.string().optional(), + th: z.string().optional(), + tl: z.string().optional(), + tg: z.string().optional(), + tk: z.string().optional(), + to: z.string().optional(), + tt: z.string().optional(), + tn: z.string().optional(), + tr: z.string().optional(), + tm: z.string().optional(), + tc: z.string().optional(), + tv: z.string().optional(), + ug: z.string().optional(), + ua: z.string().optional(), + ae: z.string().optional(), + gb: z.string().optional(), + us: z.string().optional(), + um: z.string().optional(), + uy: z.string().optional(), + uz: z.string().optional(), + vu: z.string().optional(), + ve: z.string().optional(), + vn: z.string().optional(), + vg: z.string().optional(), + vi: z.string().optional(), + wf: z.string().optional(), + eh: z.string().optional(), + ye: z.string().optional(), + zm: z.string().optional(), + zw: z.string().optional(), + ax: z.string().optional(), + bq: z.string().optional(), + cw: z.string().optional(), + gg: z.string().optional(), + im: z.string().optional(), + je: z.string().optional(), + me: z.string().optional(), + bl: z.string().optional(), + mf: z.string().optional(), + rs: z.string().optional(), + sx: z.string().optional(), + ss: z.string().optional(), + xk: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.af === undefined ? null : { AF: v.af }), + ...(v.al === undefined ? null : { AL: v.al }), + ...(v.dz === undefined ? null : { DZ: v.dz }), + ...(v.as === undefined ? null : { AS: v.as }), + ...(v.ad === undefined ? null : { AD: v.ad }), + ...(v.ao === undefined ? null : { AO: v.ao }), + ...(v.ai === undefined ? null : { AI: v.ai }), + ...(v.aq === undefined ? null : { AQ: v.aq }), + ...(v.ag === undefined ? null : { AG: v.ag }), + ...(v.ar === undefined ? null : { AR: v.ar }), + ...(v.am === undefined ? null : { AM: v.am }), + ...(v.aw === undefined ? null : { AW: v.aw }), + ...(v.au === undefined ? null : { AU: v.au }), + ...(v.at === undefined ? null : { AT: v.at }), + ...(v.az === undefined ? null : { AZ: v.az }), + ...(v.bs === undefined ? null : { BS: v.bs }), + ...(v.bh === undefined ? null : { BH: v.bh }), + ...(v.bd === undefined ? null : { BD: v.bd }), + ...(v.bb === undefined ? null : { BB: v.bb }), + ...(v.by === undefined ? null : { BY: v.by }), + ...(v.be === undefined ? null : { BE: v.be }), + ...(v.bz === undefined ? null : { BZ: v.bz }), + ...(v.bj === undefined ? null : { BJ: v.bj }), + ...(v.bm === undefined ? null : { BM: v.bm }), + ...(v.bt === undefined ? null : { BT: v.bt }), + ...(v.bo === undefined ? null : { BO: v.bo }), + ...(v.ba === undefined ? null : { BA: v.ba }), + ...(v.bw === undefined ? null : { BW: v.bw }), + ...(v.bv === undefined ? null : { BV: v.bv }), + ...(v.br === undefined ? null : { BR: v.br }), + ...(v.io === undefined ? null : { IO: v.io }), + ...(v.bn === undefined ? null : { BN: v.bn }), + ...(v.bg === undefined ? null : { BG: v.bg }), + ...(v.bf === undefined ? null : { BF: v.bf }), + ...(v.bi === undefined ? null : { BI: v.bi }), + ...(v.kh === undefined ? null : { KH: v.kh }), + ...(v.cm === undefined ? null : { CM: v.cm }), + ...(v.ca === undefined ? null : { CA: v.ca }), + ...(v.cv === undefined ? null : { CV: v.cv }), + ...(v.ky === undefined ? null : { KY: v.ky }), + ...(v.cf === undefined ? null : { CF: v.cf }), + ...(v.td === undefined ? null : { TD: v.td }), + ...(v.cl === undefined ? null : { CL: v.cl }), + ...(v.cn === undefined ? null : { CN: v.cn }), + ...(v.cx === undefined ? null : { CX: v.cx }), + ...(v.cc === undefined ? null : { CC: v.cc }), + ...(v.co === undefined ? null : { CO: v.co }), + ...(v.km === undefined ? null : { KM: v.km }), + ...(v.cg === undefined ? null : { CG: v.cg }), + ...(v.cd === undefined ? null : { CD: v.cd }), + ...(v.ck === undefined ? null : { CK: v.ck }), + ...(v.cr === undefined ? null : { CR: v.cr }), + ...(v.ci === undefined ? null : { CI: v.ci }), + ...(v.hr === undefined ? null : { HR: v.hr }), + ...(v.cu === undefined ? null : { CU: v.cu }), + ...(v.cy === undefined ? null : { CY: v.cy }), + ...(v.cz === undefined ? null : { CZ: v.cz }), + ...(v.dk === undefined ? null : { DK: v.dk }), + ...(v.dj === undefined ? null : { DJ: v.dj }), + ...(v.dm === undefined ? null : { DM: v.dm }), + ...(v.do === undefined ? null : { DO: v.do }), + ...(v.ec === undefined ? null : { EC: v.ec }), + ...(v.eg === undefined ? null : { EG: v.eg }), + ...(v.sv === undefined ? null : { SV: v.sv }), + ...(v.gq === undefined ? null : { GQ: v.gq }), + ...(v.er === undefined ? null : { ER: v.er }), + ...(v.ee === undefined ? null : { EE: v.ee }), + ...(v.et === undefined ? null : { ET: v.et }), + ...(v.fk === undefined ? null : { FK: v.fk }), + ...(v.fo === undefined ? null : { FO: v.fo }), + ...(v.fj === undefined ? null : { FJ: v.fj }), + ...(v.fi === undefined ? null : { FI: v.fi }), + ...(v.fr === undefined ? null : { FR: v.fr }), + ...(v.gf === undefined ? null : { GF: v.gf }), + ...(v.pf === undefined ? null : { PF: v.pf }), + ...(v.tf === undefined ? null : { TF: v.tf }), + ...(v.ga === undefined ? null : { GA: v.ga }), + ...(v.gm === undefined ? null : { GM: v.gm }), + ...(v.ge === undefined ? null : { GE: v.ge }), + ...(v.de === undefined ? null : { DE: v.de }), + ...(v.gh === undefined ? null : { GH: v.gh }), + ...(v.gi === undefined ? null : { GI: v.gi }), + ...(v.gr === undefined ? null : { GR: v.gr }), + ...(v.gl === undefined ? null : { GL: v.gl }), + ...(v.gd === undefined ? null : { GD: v.gd }), + ...(v.gp === undefined ? null : { GP: v.gp }), + ...(v.gu === undefined ? null : { GU: v.gu }), + ...(v.gt === undefined ? null : { GT: v.gt }), + ...(v.gn === undefined ? null : { GN: v.gn }), + ...(v.gw === undefined ? null : { GW: v.gw }), + ...(v.gy === undefined ? null : { GY: v.gy }), + ...(v.ht === undefined ? null : { HT: v.ht }), + ...(v.hm === undefined ? null : { HM: v.hm }), + ...(v.va === undefined ? null : { VA: v.va }), + ...(v.hn === undefined ? null : { HN: v.hn }), + ...(v.hk === undefined ? null : { HK: v.hk }), + ...(v.hu === undefined ? null : { HU: v.hu }), + ...(v.is === undefined ? null : { IS: v.is }), + ...(v.in === undefined ? null : { IN: v.in }), + ...(v.id === undefined ? null : { ID: v.id }), + ...(v.ir === undefined ? null : { IR: v.ir }), + ...(v.iq === undefined ? null : { IQ: v.iq }), + ...(v.ie === undefined ? null : { IE: v.ie }), + ...(v.il === undefined ? null : { IL: v.il }), + ...(v.it === undefined ? null : { IT: v.it }), + ...(v.jm === undefined ? null : { JM: v.jm }), + ...(v.jp === undefined ? null : { JP: v.jp }), + ...(v.jo === undefined ? null : { JO: v.jo }), + ...(v.kz === undefined ? null : { KZ: v.kz }), + ...(v.ke === undefined ? null : { KE: v.ke }), + ...(v.ki === undefined ? null : { KI: v.ki }), + ...(v.kp === undefined ? null : { KP: v.kp }), + ...(v.kr === undefined ? null : { KR: v.kr }), + ...(v.kw === undefined ? null : { KW: v.kw }), + ...(v.kg === undefined ? null : { KG: v.kg }), + ...(v.la === undefined ? null : { LA: v.la }), + ...(v.lv === undefined ? null : { LV: v.lv }), + ...(v.lb === undefined ? null : { LB: v.lb }), + ...(v.ls === undefined ? null : { LS: v.ls }), + ...(v.lr === undefined ? null : { LR: v.lr }), + ...(v.ly === undefined ? null : { LY: v.ly }), + ...(v.li === undefined ? null : { LI: v.li }), + ...(v.lt === undefined ? null : { LT: v.lt }), + ...(v.lu === undefined ? null : { LU: v.lu }), + ...(v.mo === undefined ? null : { MO: v.mo }), + ...(v.mg === undefined ? null : { MG: v.mg }), + ...(v.mw === undefined ? null : { MW: v.mw }), + ...(v.my === undefined ? null : { MY: v.my }), + ...(v.mv === undefined ? null : { MV: v.mv }), + ...(v.ml === undefined ? null : { ML: v.ml }), + ...(v.mt === undefined ? null : { MT: v.mt }), + ...(v.mh === undefined ? null : { MH: v.mh }), + ...(v.mq === undefined ? null : { MQ: v.mq }), + ...(v.mr === undefined ? null : { MR: v.mr }), + ...(v.mu === undefined ? null : { MU: v.mu }), + ...(v.yt === undefined ? null : { YT: v.yt }), + ...(v.mx === undefined ? null : { MX: v.mx }), + ...(v.fm === undefined ? null : { FM: v.fm }), + ...(v.md === undefined ? null : { MD: v.md }), + ...(v.mc === undefined ? null : { MC: v.mc }), + ...(v.mn === undefined ? null : { MN: v.mn }), + ...(v.ms === undefined ? null : { MS: v.ms }), + ...(v.ma === undefined ? null : { MA: v.ma }), + ...(v.mz === undefined ? null : { MZ: v.mz }), + ...(v.mm === undefined ? null : { MM: v.mm }), + ...(v.na === undefined ? null : { NA: v.na }), + ...(v.nr === undefined ? null : { NR: v.nr }), + ...(v.np === undefined ? null : { NP: v.np }), + ...(v.nl === undefined ? null : { NL: v.nl }), + ...(v.nc === undefined ? null : { NC: v.nc }), + ...(v.nz === undefined ? null : { NZ: v.nz }), + ...(v.ni === undefined ? null : { NI: v.ni }), + ...(v.ne === undefined ? null : { NE: v.ne }), + ...(v.ng === undefined ? null : { NG: v.ng }), + ...(v.nu === undefined ? null : { NU: v.nu }), + ...(v.nf === undefined ? null : { NF: v.nf }), + ...(v.mk === undefined ? null : { MK: v.mk }), + ...(v.mp === undefined ? null : { MP: v.mp }), + ...(v.no === undefined ? null : { NO: v.no }), + ...(v.om === undefined ? null : { OM: v.om }), + ...(v.pk === undefined ? null : { PK: v.pk }), + ...(v.pw === undefined ? null : { PW: v.pw }), + ...(v.ps === undefined ? null : { PS: v.ps }), + ...(v.pa === undefined ? null : { PA: v.pa }), + ...(v.pg === undefined ? null : { PG: v.pg }), + ...(v.py === undefined ? null : { PY: v.py }), + ...(v.pe === undefined ? null : { PE: v.pe }), + ...(v.ph === undefined ? null : { PH: v.ph }), + ...(v.pn === undefined ? null : { PN: v.pn }), + ...(v.pl === undefined ? null : { PL: v.pl }), + ...(v.pt === undefined ? null : { PT: v.pt }), + ...(v.pr === undefined ? null : { PR: v.pr }), + ...(v.qa === undefined ? null : { QA: v.qa }), + ...(v.re === undefined ? null : { RE: v.re }), + ...(v.ro === undefined ? null : { RO: v.ro }), + ...(v.ru === undefined ? null : { RU: v.ru }), + ...(v.rw === undefined ? null : { RW: v.rw }), + ...(v.sh === undefined ? null : { SH: v.sh }), + ...(v.kn === undefined ? null : { KN: v.kn }), + ...(v.lc === undefined ? null : { LC: v.lc }), + ...(v.pm === undefined ? null : { PM: v.pm }), + ...(v.vc === undefined ? null : { VC: v.vc }), + ...(v.ws === undefined ? null : { WS: v.ws }), + ...(v.sm === undefined ? null : { SM: v.sm }), + ...(v.st === undefined ? null : { ST: v.st }), + ...(v.sa === undefined ? null : { SA: v.sa }), + ...(v.sn === undefined ? null : { SN: v.sn }), + ...(v.sc === undefined ? null : { SC: v.sc }), + ...(v.sl === undefined ? null : { SL: v.sl }), + ...(v.sg === undefined ? null : { SG: v.sg }), + ...(v.sk === undefined ? null : { SK: v.sk }), + ...(v.si === undefined ? null : { SI: v.si }), + ...(v.sb === undefined ? null : { SB: v.sb }), + ...(v.so === undefined ? null : { SO: v.so }), + ...(v.za === undefined ? null : { ZA: v.za }), + ...(v.gs === undefined ? null : { GS: v.gs }), + ...(v.es === undefined ? null : { ES: v.es }), + ...(v.lk === undefined ? null : { LK: v.lk }), + ...(v.sd === undefined ? null : { SD: v.sd }), + ...(v.sr === undefined ? null : { SR: v.sr }), + ...(v.sj === undefined ? null : { SJ: v.sj }), + ...(v.sz === undefined ? null : { SZ: v.sz }), + ...(v.se === undefined ? null : { SE: v.se }), + ...(v.ch === undefined ? null : { CH: v.ch }), + ...(v.sy === undefined ? null : { SY: v.sy }), + ...(v.tw === undefined ? null : { TW: v.tw }), + ...(v.tj === undefined ? null : { TJ: v.tj }), + ...(v.tz === undefined ? null : { TZ: v.tz }), + ...(v.th === undefined ? null : { TH: v.th }), + ...(v.tl === undefined ? null : { TL: v.tl }), + ...(v.tg === undefined ? null : { TG: v.tg }), + ...(v.tk === undefined ? null : { TK: v.tk }), + ...(v.to === undefined ? null : { TO: v.to }), + ...(v.tt === undefined ? null : { TT: v.tt }), + ...(v.tn === undefined ? null : { TN: v.tn }), + ...(v.tr === undefined ? null : { TR: v.tr }), + ...(v.tm === undefined ? null : { TM: v.tm }), + ...(v.tc === undefined ? null : { TC: v.tc }), + ...(v.tv === undefined ? null : { TV: v.tv }), + ...(v.ug === undefined ? null : { UG: v.ug }), + ...(v.ua === undefined ? null : { UA: v.ua }), + ...(v.ae === undefined ? null : { AE: v.ae }), + ...(v.gb === undefined ? null : { GB: v.gb }), + ...(v.us === undefined ? null : { US: v.us }), + ...(v.um === undefined ? null : { UM: v.um }), + ...(v.uy === undefined ? null : { UY: v.uy }), + ...(v.uz === undefined ? null : { UZ: v.uz }), + ...(v.vu === undefined ? null : { VU: v.vu }), + ...(v.ve === undefined ? null : { VE: v.ve }), + ...(v.vn === undefined ? null : { VN: v.vn }), + ...(v.vg === undefined ? null : { VG: v.vg }), + ...(v.vi === undefined ? null : { VI: v.vi }), + ...(v.wf === undefined ? null : { WF: v.wf }), + ...(v.eh === undefined ? null : { EH: v.eh }), + ...(v.ye === undefined ? null : { YE: v.ye }), + ...(v.zm === undefined ? null : { ZM: v.zm }), + ...(v.zw === undefined ? null : { ZW: v.zw }), + ...(v.ax === undefined ? null : { AX: v.ax }), + ...(v.bq === undefined ? null : { BQ: v.bq }), + ...(v.cw === undefined ? null : { CW: v.cw }), + ...(v.gg === undefined ? null : { GG: v.gg }), + ...(v.im === undefined ? null : { IM: v.im }), + ...(v.je === undefined ? null : { JE: v.je }), + ...(v.me === undefined ? null : { ME: v.me }), + ...(v.bl === undefined ? null : { BL: v.bl }), + ...(v.mf === undefined ? null : { MF: v.mf }), + ...(v.rs === undefined ? null : { RS: v.rs }), + ...(v.sx === undefined ? null : { SX: v.sx }), + ...(v.ss === undefined ? null : { SS: v.ss }), + ...(v.xk === undefined ? null : { XK: v.xk }), + }; + }); +} + +/** @internal */ +export namespace CreateLinkRequestBody$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + prefix?: string | undefined; + url: string; + archived?: boolean | undefined; + publicStats?: boolean | undefined; + tagId?: string | null | undefined; + tagIds?: string | Array | undefined; + comments?: string | null | undefined; + expiresAt?: string | null | undefined; + expiredUrl?: string | null | undefined; + password?: string | null | undefined; + proxy?: boolean | undefined; + title?: string | null | undefined; + description?: string | null | undefined; + image?: string | null | undefined; + rewrite?: boolean | undefined; + ios?: string | null | undefined; + android?: string | null | undefined; + geo?: Geo$.Inbound | null | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + prefix: z.string().optional(), + url: z.string(), + archived: z.boolean().default(false), + publicStats: z.boolean().default(false), + tagId: z.nullable(z.string()).optional(), + tagIds: z.union([z.string(), z.array(z.string())]).optional(), + comments: z.nullable(z.string()).optional(), + expiresAt: z.nullable(z.string()).optional(), + expiredUrl: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), + proxy: z.boolean().default(false), + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + image: z.nullable(z.string()).optional(), + rewrite: z.boolean().default(false), + ios: z.nullable(z.string()).optional(), + android: z.nullable(z.string()).optional(), + geo: z.nullable(z.lazy(() => Geo$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.prefix === undefined ? null : { prefix: v.prefix }), + url: v.url, + archived: v.archived, + publicStats: v.publicStats, + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }), + ...(v.comments === undefined ? null : { comments: v.comments }), + ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }), + ...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }), + ...(v.password === undefined ? null : { password: v.password }), + proxy: v.proxy, + ...(v.title === undefined ? null : { title: v.title }), + ...(v.description === undefined ? null : { description: v.description }), + ...(v.image === undefined ? null : { image: v.image }), + rewrite: v.rewrite, + ...(v.ios === undefined ? null : { ios: v.ios }), + ...(v.android === undefined ? null : { android: v.android }), + ...(v.geo === undefined ? null : { geo: v.geo }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + prefix?: string | undefined; + url: string; + archived: boolean; + publicStats: boolean; + tagId?: string | null | undefined; + tagIds?: string | Array | undefined; + comments?: string | null | undefined; + expiresAt?: string | null | undefined; + expiredUrl?: string | null | undefined; + password?: string | null | undefined; + proxy: boolean; + title?: string | null | undefined; + description?: string | null | undefined; + image?: string | null | undefined; + rewrite: boolean; + ios?: string | null | undefined; + android?: string | null | undefined; + geo?: Geo$.Outbound | null | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + prefix: z.string().optional(), + url: z.string(), + archived: z.boolean().default(false), + publicStats: z.boolean().default(false), + tagId: z.nullable(z.string()).optional(), + tagIds: z.union([z.string(), z.array(z.string())]).optional(), + comments: z.nullable(z.string()).optional(), + expiresAt: z.nullable(z.string()).optional(), + expiredUrl: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), + proxy: z.boolean().default(false), + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + image: z.nullable(z.string()).optional(), + rewrite: z.boolean().default(false), + ios: z.nullable(z.string()).optional(), + android: z.nullable(z.string()).optional(), + geo: z.nullable(z.lazy(() => Geo$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.prefix === undefined ? null : { prefix: v.prefix }), + url: v.url, + archived: v.archived, + publicStats: v.publicStats, + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }), + ...(v.comments === undefined ? null : { comments: v.comments }), + ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }), + ...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }), + ...(v.password === undefined ? null : { password: v.password }), + proxy: v.proxy, + ...(v.title === undefined ? null : { title: v.title }), + ...(v.description === undefined ? null : { description: v.description }), + ...(v.image === undefined ? null : { image: v.image }), + rewrite: v.rewrite, + ...(v.ios === undefined ? null : { ios: v.ios }), + ...(v.android === undefined ? null : { android: v.android }), + ...(v.geo === undefined ? null : { geo: v.geo }), + }; + }); +} diff --git a/src/models/operations/createtag.ts b/src/models/operations/createtag.ts new file mode 100644 index 0000000..f42e8ca --- /dev/null +++ b/src/models/operations/createtag.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. + */ +export const Color = { + Red: "red", + Yellow: "yellow", + Green: "green", + Blue: "blue", + Purple: "purple", + Pink: "pink", + Brown: "brown", +} as const; +/** + * The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. + */ +export type Color = (typeof Color)[keyof typeof Color]; + +export type CreateTagRequestBody = { + /** + * The name of the tag to create. + */ + tag: string; + /** + * The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. + */ + color?: Color | undefined; +}; + +/** @internal */ +export const Color$ = z.nativeEnum(Color); + +/** @internal */ +export namespace CreateTagRequestBody$ { + export type Inbound = { + tag: string; + color?: Color | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + tag: z.string(), + color: Color$.optional(), + }) + .transform((v) => { + return { + tag: v.tag, + ...(v.color === undefined ? null : { color: v.color }), + }; + }); + + export type Outbound = { + tag: string; + color?: Color | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + tag: z.string(), + color: Color$.optional(), + }) + .transform((v) => { + return { + tag: v.tag, + ...(v.color === undefined ? null : { color: v.color }), + }; + }); +} diff --git a/src/models/operations/createworkspace.ts b/src/models/operations/createworkspace.ts new file mode 100644 index 0000000..078c090 --- /dev/null +++ b/src/models/operations/createworkspace.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type CreateWorkspaceRequestBody = { + name: string; + slug: string; + domain?: string | undefined; +}; + +/** @internal */ +export namespace CreateWorkspaceRequestBody$ { + export type Inbound = { + name: string; + slug: string; + domain?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + name: z.string(), + slug: z.string(), + domain: z.string().optional(), + }) + .transform((v) => { + return { + name: v.name, + slug: v.slug, + ...(v.domain === undefined ? null : { domain: v.domain }), + }; + }); + + export type Outbound = { + name: string; + slug: string; + domain?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + name: z.string(), + slug: z.string(), + domain: z.string().optional(), + }) + .transform((v) => { + return { + name: v.name, + slug: v.slug, + ...(v.domain === undefined ? null : { domain: v.domain }), + }; + }); +} diff --git a/src/models/operations/deletelink.ts b/src/models/operations/deletelink.ts new file mode 100644 index 0000000..2128631 --- /dev/null +++ b/src/models/operations/deletelink.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type DeleteLinkRequest = { + /** + * The id of the link to delete. You can get this via the `getLinkInfo` endpoint. + */ + linkId: string; +}; + +/** + * The deleted link + */ +export type DeleteLinkResponseBody = { + /** + * The ID of the link. + */ + id: string; +}; + +/** @internal */ +export namespace DeleteLinkRequest$ { + export type Inbound = { + linkId: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + linkId: z.string(), + }) + .transform((v) => { + return { + linkId: v.linkId, + }; + }); + + export type Outbound = { + linkId: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + linkId: z.string(), + }) + .transform((v) => { + return { + linkId: v.linkId, + }; + }); +} + +/** @internal */ +export namespace DeleteLinkResponseBody$ { + export type Inbound = { + id: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + id: z.string(), + }) + .transform((v) => { + return { + id: v.id, + }; + }); + + export type Outbound = { + id: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + id: z.string(), + }) + .transform((v) => { + return { + id: v.id, + }; + }); +} diff --git a/src/models/operations/editlink.ts b/src/models/operations/editlink.ts new file mode 100644 index 0000000..60dfa40 --- /dev/null +++ b/src/models/operations/editlink.ts @@ -0,0 +1,2831 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The unique IDs of the tags assigned to the short link. + */ +export type EditLinkTagIds = string | Array; + +/** + * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. + */ +export type EditLinkGeo = { + /** + * The destination URL of the short link. + */ + af?: string | undefined; + /** + * The destination URL of the short link. + */ + al?: string | undefined; + /** + * The destination URL of the short link. + */ + dz?: string | undefined; + /** + * The destination URL of the short link. + */ + as?: string | undefined; + /** + * The destination URL of the short link. + */ + ad?: string | undefined; + /** + * The destination URL of the short link. + */ + ao?: string | undefined; + /** + * The destination URL of the short link. + */ + ai?: string | undefined; + /** + * The destination URL of the short link. + */ + aq?: string | undefined; + /** + * The destination URL of the short link. + */ + ag?: string | undefined; + /** + * The destination URL of the short link. + */ + ar?: string | undefined; + /** + * The destination URL of the short link. + */ + am?: string | undefined; + /** + * The destination URL of the short link. + */ + aw?: string | undefined; + /** + * The destination URL of the short link. + */ + au?: string | undefined; + /** + * The destination URL of the short link. + */ + at?: string | undefined; + /** + * The destination URL of the short link. + */ + az?: string | undefined; + /** + * The destination URL of the short link. + */ + bs?: string | undefined; + /** + * The destination URL of the short link. + */ + bh?: string | undefined; + /** + * The destination URL of the short link. + */ + bd?: string | undefined; + /** + * The destination URL of the short link. + */ + bb?: string | undefined; + /** + * The destination URL of the short link. + */ + by?: string | undefined; + /** + * The destination URL of the short link. + */ + be?: string | undefined; + /** + * The destination URL of the short link. + */ + bz?: string | undefined; + /** + * The destination URL of the short link. + */ + bj?: string | undefined; + /** + * The destination URL of the short link. + */ + bm?: string | undefined; + /** + * The destination URL of the short link. + */ + bt?: string | undefined; + /** + * The destination URL of the short link. + */ + bo?: string | undefined; + /** + * The destination URL of the short link. + */ + ba?: string | undefined; + /** + * The destination URL of the short link. + */ + bw?: string | undefined; + /** + * The destination URL of the short link. + */ + bv?: string | undefined; + /** + * The destination URL of the short link. + */ + br?: string | undefined; + /** + * The destination URL of the short link. + */ + io?: string | undefined; + /** + * The destination URL of the short link. + */ + bn?: string | undefined; + /** + * The destination URL of the short link. + */ + bg?: string | undefined; + /** + * The destination URL of the short link. + */ + bf?: string | undefined; + /** + * The destination URL of the short link. + */ + bi?: string | undefined; + /** + * The destination URL of the short link. + */ + kh?: string | undefined; + /** + * The destination URL of the short link. + */ + cm?: string | undefined; + /** + * The destination URL of the short link. + */ + ca?: string | undefined; + /** + * The destination URL of the short link. + */ + cv?: string | undefined; + /** + * The destination URL of the short link. + */ + ky?: string | undefined; + /** + * The destination URL of the short link. + */ + cf?: string | undefined; + /** + * The destination URL of the short link. + */ + td?: string | undefined; + /** + * The destination URL of the short link. + */ + cl?: string | undefined; + /** + * The destination URL of the short link. + */ + cn?: string | undefined; + /** + * The destination URL of the short link. + */ + cx?: string | undefined; + /** + * The destination URL of the short link. + */ + cc?: string | undefined; + /** + * The destination URL of the short link. + */ + co?: string | undefined; + /** + * The destination URL of the short link. + */ + km?: string | undefined; + /** + * The destination URL of the short link. + */ + cg?: string | undefined; + /** + * The destination URL of the short link. + */ + cd?: string | undefined; + /** + * The destination URL of the short link. + */ + ck?: string | undefined; + /** + * The destination URL of the short link. + */ + cr?: string | undefined; + /** + * The destination URL of the short link. + */ + ci?: string | undefined; + /** + * The destination URL of the short link. + */ + hr?: string | undefined; + /** + * The destination URL of the short link. + */ + cu?: string | undefined; + /** + * The destination URL of the short link. + */ + cy?: string | undefined; + /** + * The destination URL of the short link. + */ + cz?: string | undefined; + /** + * The destination URL of the short link. + */ + dk?: string | undefined; + /** + * The destination URL of the short link. + */ + dj?: string | undefined; + /** + * The destination URL of the short link. + */ + dm?: string | undefined; + /** + * The destination URL of the short link. + */ + do?: string | undefined; + /** + * The destination URL of the short link. + */ + ec?: string | undefined; + /** + * The destination URL of the short link. + */ + eg?: string | undefined; + /** + * The destination URL of the short link. + */ + sv?: string | undefined; + /** + * The destination URL of the short link. + */ + gq?: string | undefined; + /** + * The destination URL of the short link. + */ + er?: string | undefined; + /** + * The destination URL of the short link. + */ + ee?: string | undefined; + /** + * The destination URL of the short link. + */ + et?: string | undefined; + /** + * The destination URL of the short link. + */ + fk?: string | undefined; + /** + * The destination URL of the short link. + */ + fo?: string | undefined; + /** + * The destination URL of the short link. + */ + fj?: string | undefined; + /** + * The destination URL of the short link. + */ + fi?: string | undefined; + /** + * The destination URL of the short link. + */ + fr?: string | undefined; + /** + * The destination URL of the short link. + */ + gf?: string | undefined; + /** + * The destination URL of the short link. + */ + pf?: string | undefined; + /** + * The destination URL of the short link. + */ + tf?: string | undefined; + /** + * The destination URL of the short link. + */ + ga?: string | undefined; + /** + * The destination URL of the short link. + */ + gm?: string | undefined; + /** + * The destination URL of the short link. + */ + ge?: string | undefined; + /** + * The destination URL of the short link. + */ + de?: string | undefined; + /** + * The destination URL of the short link. + */ + gh?: string | undefined; + /** + * The destination URL of the short link. + */ + gi?: string | undefined; + /** + * The destination URL of the short link. + */ + gr?: string | undefined; + /** + * The destination URL of the short link. + */ + gl?: string | undefined; + /** + * The destination URL of the short link. + */ + gd?: string | undefined; + /** + * The destination URL of the short link. + */ + gp?: string | undefined; + /** + * The destination URL of the short link. + */ + gu?: string | undefined; + /** + * The destination URL of the short link. + */ + gt?: string | undefined; + /** + * The destination URL of the short link. + */ + gn?: string | undefined; + /** + * The destination URL of the short link. + */ + gw?: string | undefined; + /** + * The destination URL of the short link. + */ + gy?: string | undefined; + /** + * The destination URL of the short link. + */ + ht?: string | undefined; + /** + * The destination URL of the short link. + */ + hm?: string | undefined; + /** + * The destination URL of the short link. + */ + va?: string | undefined; + /** + * The destination URL of the short link. + */ + hn?: string | undefined; + /** + * The destination URL of the short link. + */ + hk?: string | undefined; + /** + * The destination URL of the short link. + */ + hu?: string | undefined; + /** + * The destination URL of the short link. + */ + is?: string | undefined; + /** + * The destination URL of the short link. + */ + in?: string | undefined; + /** + * The destination URL of the short link. + */ + id?: string | undefined; + /** + * The destination URL of the short link. + */ + ir?: string | undefined; + /** + * The destination URL of the short link. + */ + iq?: string | undefined; + /** + * The destination URL of the short link. + */ + ie?: string | undefined; + /** + * The destination URL of the short link. + */ + il?: string | undefined; + /** + * The destination URL of the short link. + */ + it?: string | undefined; + /** + * The destination URL of the short link. + */ + jm?: string | undefined; + /** + * The destination URL of the short link. + */ + jp?: string | undefined; + /** + * The destination URL of the short link. + */ + jo?: string | undefined; + /** + * The destination URL of the short link. + */ + kz?: string | undefined; + /** + * The destination URL of the short link. + */ + ke?: string | undefined; + /** + * The destination URL of the short link. + */ + ki?: string | undefined; + /** + * The destination URL of the short link. + */ + kp?: string | undefined; + /** + * The destination URL of the short link. + */ + kr?: string | undefined; + /** + * The destination URL of the short link. + */ + kw?: string | undefined; + /** + * The destination URL of the short link. + */ + kg?: string | undefined; + /** + * The destination URL of the short link. + */ + la?: string | undefined; + /** + * The destination URL of the short link. + */ + lv?: string | undefined; + /** + * The destination URL of the short link. + */ + lb?: string | undefined; + /** + * The destination URL of the short link. + */ + ls?: string | undefined; + /** + * The destination URL of the short link. + */ + lr?: string | undefined; + /** + * The destination URL of the short link. + */ + ly?: string | undefined; + /** + * The destination URL of the short link. + */ + li?: string | undefined; + /** + * The destination URL of the short link. + */ + lt?: string | undefined; + /** + * The destination URL of the short link. + */ + lu?: string | undefined; + /** + * The destination URL of the short link. + */ + mo?: string | undefined; + /** + * The destination URL of the short link. + */ + mg?: string | undefined; + /** + * The destination URL of the short link. + */ + mw?: string | undefined; + /** + * The destination URL of the short link. + */ + my?: string | undefined; + /** + * The destination URL of the short link. + */ + mv?: string | undefined; + /** + * The destination URL of the short link. + */ + ml?: string | undefined; + /** + * The destination URL of the short link. + */ + mt?: string | undefined; + /** + * The destination URL of the short link. + */ + mh?: string | undefined; + /** + * The destination URL of the short link. + */ + mq?: string | undefined; + /** + * The destination URL of the short link. + */ + mr?: string | undefined; + /** + * The destination URL of the short link. + */ + mu?: string | undefined; + /** + * The destination URL of the short link. + */ + yt?: string | undefined; + /** + * The destination URL of the short link. + */ + mx?: string | undefined; + /** + * The destination URL of the short link. + */ + fm?: string | undefined; + /** + * The destination URL of the short link. + */ + md?: string | undefined; + /** + * The destination URL of the short link. + */ + mc?: string | undefined; + /** + * The destination URL of the short link. + */ + mn?: string | undefined; + /** + * The destination URL of the short link. + */ + ms?: string | undefined; + /** + * The destination URL of the short link. + */ + ma?: string | undefined; + /** + * The destination URL of the short link. + */ + mz?: string | undefined; + /** + * The destination URL of the short link. + */ + mm?: string | undefined; + /** + * The destination URL of the short link. + */ + na?: string | undefined; + /** + * The destination URL of the short link. + */ + nr?: string | undefined; + /** + * The destination URL of the short link. + */ + np?: string | undefined; + /** + * The destination URL of the short link. + */ + nl?: string | undefined; + /** + * The destination URL of the short link. + */ + nc?: string | undefined; + /** + * The destination URL of the short link. + */ + nz?: string | undefined; + /** + * The destination URL of the short link. + */ + ni?: string | undefined; + /** + * The destination URL of the short link. + */ + ne?: string | undefined; + /** + * The destination URL of the short link. + */ + ng?: string | undefined; + /** + * The destination URL of the short link. + */ + nu?: string | undefined; + /** + * The destination URL of the short link. + */ + nf?: string | undefined; + /** + * The destination URL of the short link. + */ + mk?: string | undefined; + /** + * The destination URL of the short link. + */ + mp?: string | undefined; + /** + * The destination URL of the short link. + */ + no?: string | undefined; + /** + * The destination URL of the short link. + */ + om?: string | undefined; + /** + * The destination URL of the short link. + */ + pk?: string | undefined; + /** + * The destination URL of the short link. + */ + pw?: string | undefined; + /** + * The destination URL of the short link. + */ + ps?: string | undefined; + /** + * The destination URL of the short link. + */ + pa?: string | undefined; + /** + * The destination URL of the short link. + */ + pg?: string | undefined; + /** + * The destination URL of the short link. + */ + py?: string | undefined; + /** + * The destination URL of the short link. + */ + pe?: string | undefined; + /** + * The destination URL of the short link. + */ + ph?: string | undefined; + /** + * The destination URL of the short link. + */ + pn?: string | undefined; + /** + * The destination URL of the short link. + */ + pl?: string | undefined; + /** + * The destination URL of the short link. + */ + pt?: string | undefined; + /** + * The destination URL of the short link. + */ + pr?: string | undefined; + /** + * The destination URL of the short link. + */ + qa?: string | undefined; + /** + * The destination URL of the short link. + */ + re?: string | undefined; + /** + * The destination URL of the short link. + */ + ro?: string | undefined; + /** + * The destination URL of the short link. + */ + ru?: string | undefined; + /** + * The destination URL of the short link. + */ + rw?: string | undefined; + /** + * The destination URL of the short link. + */ + sh?: string | undefined; + /** + * The destination URL of the short link. + */ + kn?: string | undefined; + /** + * The destination URL of the short link. + */ + lc?: string | undefined; + /** + * The destination URL of the short link. + */ + pm?: string | undefined; + /** + * The destination URL of the short link. + */ + vc?: string | undefined; + /** + * The destination URL of the short link. + */ + ws?: string | undefined; + /** + * The destination URL of the short link. + */ + sm?: string | undefined; + /** + * The destination URL of the short link. + */ + st?: string | undefined; + /** + * The destination URL of the short link. + */ + sa?: string | undefined; + /** + * The destination URL of the short link. + */ + sn?: string | undefined; + /** + * The destination URL of the short link. + */ + sc?: string | undefined; + /** + * The destination URL of the short link. + */ + sl?: string | undefined; + /** + * The destination URL of the short link. + */ + sg?: string | undefined; + /** + * The destination URL of the short link. + */ + sk?: string | undefined; + /** + * The destination URL of the short link. + */ + si?: string | undefined; + /** + * The destination URL of the short link. + */ + sb?: string | undefined; + /** + * The destination URL of the short link. + */ + so?: string | undefined; + /** + * The destination URL of the short link. + */ + za?: string | undefined; + /** + * The destination URL of the short link. + */ + gs?: string | undefined; + /** + * The destination URL of the short link. + */ + es?: string | undefined; + /** + * The destination URL of the short link. + */ + lk?: string | undefined; + /** + * The destination URL of the short link. + */ + sd?: string | undefined; + /** + * The destination URL of the short link. + */ + sr?: string | undefined; + /** + * The destination URL of the short link. + */ + sj?: string | undefined; + /** + * The destination URL of the short link. + */ + sz?: string | undefined; + /** + * The destination URL of the short link. + */ + se?: string | undefined; + /** + * The destination URL of the short link. + */ + ch?: string | undefined; + /** + * The destination URL of the short link. + */ + sy?: string | undefined; + /** + * The destination URL of the short link. + */ + tw?: string | undefined; + /** + * The destination URL of the short link. + */ + tj?: string | undefined; + /** + * The destination URL of the short link. + */ + tz?: string | undefined; + /** + * The destination URL of the short link. + */ + th?: string | undefined; + /** + * The destination URL of the short link. + */ + tl?: string | undefined; + /** + * The destination URL of the short link. + */ + tg?: string | undefined; + /** + * The destination URL of the short link. + */ + tk?: string | undefined; + /** + * The destination URL of the short link. + */ + to?: string | undefined; + /** + * The destination URL of the short link. + */ + tt?: string | undefined; + /** + * The destination URL of the short link. + */ + tn?: string | undefined; + /** + * The destination URL of the short link. + */ + tr?: string | undefined; + /** + * The destination URL of the short link. + */ + tm?: string | undefined; + /** + * The destination URL of the short link. + */ + tc?: string | undefined; + /** + * The destination URL of the short link. + */ + tv?: string | undefined; + /** + * The destination URL of the short link. + */ + ug?: string | undefined; + /** + * The destination URL of the short link. + */ + ua?: string | undefined; + /** + * The destination URL of the short link. + */ + ae?: string | undefined; + /** + * The destination URL of the short link. + */ + gb?: string | undefined; + /** + * The destination URL of the short link. + */ + us?: string | undefined; + /** + * The destination URL of the short link. + */ + um?: string | undefined; + /** + * The destination URL of the short link. + */ + uy?: string | undefined; + /** + * The destination URL of the short link. + */ + uz?: string | undefined; + /** + * The destination URL of the short link. + */ + vu?: string | undefined; + /** + * The destination URL of the short link. + */ + ve?: string | undefined; + /** + * The destination URL of the short link. + */ + vn?: string | undefined; + /** + * The destination URL of the short link. + */ + vg?: string | undefined; + /** + * The destination URL of the short link. + */ + vi?: string | undefined; + /** + * The destination URL of the short link. + */ + wf?: string | undefined; + /** + * The destination URL of the short link. + */ + eh?: string | undefined; + /** + * The destination URL of the short link. + */ + ye?: string | undefined; + /** + * The destination URL of the short link. + */ + zm?: string | undefined; + /** + * The destination URL of the short link. + */ + zw?: string | undefined; + /** + * The destination URL of the short link. + */ + ax?: string | undefined; + /** + * The destination URL of the short link. + */ + bq?: string | undefined; + /** + * The destination URL of the short link. + */ + cw?: string | undefined; + /** + * The destination URL of the short link. + */ + gg?: string | undefined; + /** + * The destination URL of the short link. + */ + im?: string | undefined; + /** + * The destination URL of the short link. + */ + je?: string | undefined; + /** + * The destination URL of the short link. + */ + me?: string | undefined; + /** + * The destination URL of the short link. + */ + bl?: string | undefined; + /** + * The destination URL of the short link. + */ + mf?: string | undefined; + /** + * The destination URL of the short link. + */ + rs?: string | undefined; + /** + * The destination URL of the short link. + */ + sx?: string | undefined; + /** + * The destination URL of the short link. + */ + ss?: string | undefined; + /** + * The destination URL of the short link. + */ + xk?: string | undefined; +}; + +export type EditLinkRequestBody = { + /** + * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). + */ + domain?: string | undefined; + /** + * The short link slug. If not provided, a random 7-character slug will be generated. + */ + key?: string | undefined; + /** + * The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. + */ + prefix?: string | undefined; + /** + * The destination URL of the short link. + */ + url: string; + /** + * Whether the short link is archived. + */ + archived?: boolean | undefined; + /** + * Whether the short link's stats are publicly accessible. + */ + publicStats?: boolean | undefined; + /** + * The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + tagId?: string | null | undefined; + /** + * The unique IDs of the tags assigned to the short link. + */ + tagIds?: string | Array | undefined; + /** + * The comments for the short link. + */ + comments?: string | null | undefined; + /** + * The date and time when the short link will expire at. + */ + expiresAt?: string | null | undefined; + /** + * The URL to redirect to when the short link has expired. + */ + expiredUrl?: string | null | undefined; + /** + * The password required to access the destination URL of the short link. + */ + password?: string | null | undefined; + /** + * Whether the short link uses Custom Social Media Cards feature. + */ + proxy?: boolean | undefined; + /** + * The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + title?: string | null | undefined; + /** + * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + description?: string | null | undefined; + /** + * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + */ + image?: string | null | undefined; + /** + * Whether the short link uses link cloaking. + */ + rewrite?: boolean | undefined; + /** + * The iOS destination URL for the short link for iOS device targeting. + */ + ios?: string | null | undefined; + /** + * The Android destination URL for the short link for Android device targeting. + */ + android?: string | null | undefined; + /** + * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. + */ + geo?: EditLinkGeo | null | undefined; +}; + +export type EditLinkRequest = { + /** + * The id of the link to edit. You can get this via the `getLinkInfo` endpoint. + */ + linkId: string; + requestBody?: EditLinkRequestBody | undefined; +}; + +/** @internal */ +export namespace EditLinkTagIds$ { + export type Inbound = string | Array; + + export type Outbound = string | Array; + export const inboundSchema: z.ZodType = z.union([ + z.string(), + z.array(z.string()), + ]); + export const outboundSchema: z.ZodType = z.union([ + z.string(), + z.array(z.string()), + ]); +} + +/** @internal */ +export namespace EditLinkGeo$ { + export type Inbound = { + AF?: string | undefined; + AL?: string | undefined; + DZ?: string | undefined; + AS?: string | undefined; + AD?: string | undefined; + AO?: string | undefined; + AI?: string | undefined; + AQ?: string | undefined; + AG?: string | undefined; + AR?: string | undefined; + AM?: string | undefined; + AW?: string | undefined; + AU?: string | undefined; + AT?: string | undefined; + AZ?: string | undefined; + BS?: string | undefined; + BH?: string | undefined; + BD?: string | undefined; + BB?: string | undefined; + BY?: string | undefined; + BE?: string | undefined; + BZ?: string | undefined; + BJ?: string | undefined; + BM?: string | undefined; + BT?: string | undefined; + BO?: string | undefined; + BA?: string | undefined; + BW?: string | undefined; + BV?: string | undefined; + BR?: string | undefined; + IO?: string | undefined; + BN?: string | undefined; + BG?: string | undefined; + BF?: string | undefined; + BI?: string | undefined; + KH?: string | undefined; + CM?: string | undefined; + CA?: string | undefined; + CV?: string | undefined; + KY?: string | undefined; + CF?: string | undefined; + TD?: string | undefined; + CL?: string | undefined; + CN?: string | undefined; + CX?: string | undefined; + CC?: string | undefined; + CO?: string | undefined; + KM?: string | undefined; + CG?: string | undefined; + CD?: string | undefined; + CK?: string | undefined; + CR?: string | undefined; + CI?: string | undefined; + HR?: string | undefined; + CU?: string | undefined; + CY?: string | undefined; + CZ?: string | undefined; + DK?: string | undefined; + DJ?: string | undefined; + DM?: string | undefined; + DO?: string | undefined; + EC?: string | undefined; + EG?: string | undefined; + SV?: string | undefined; + GQ?: string | undefined; + ER?: string | undefined; + EE?: string | undefined; + ET?: string | undefined; + FK?: string | undefined; + FO?: string | undefined; + FJ?: string | undefined; + FI?: string | undefined; + FR?: string | undefined; + GF?: string | undefined; + PF?: string | undefined; + TF?: string | undefined; + GA?: string | undefined; + GM?: string | undefined; + GE?: string | undefined; + DE?: string | undefined; + GH?: string | undefined; + GI?: string | undefined; + GR?: string | undefined; + GL?: string | undefined; + GD?: string | undefined; + GP?: string | undefined; + GU?: string | undefined; + GT?: string | undefined; + GN?: string | undefined; + GW?: string | undefined; + GY?: string | undefined; + HT?: string | undefined; + HM?: string | undefined; + VA?: string | undefined; + HN?: string | undefined; + HK?: string | undefined; + HU?: string | undefined; + IS?: string | undefined; + IN?: string | undefined; + ID?: string | undefined; + IR?: string | undefined; + IQ?: string | undefined; + IE?: string | undefined; + IL?: string | undefined; + IT?: string | undefined; + JM?: string | undefined; + JP?: string | undefined; + JO?: string | undefined; + KZ?: string | undefined; + KE?: string | undefined; + KI?: string | undefined; + KP?: string | undefined; + KR?: string | undefined; + KW?: string | undefined; + KG?: string | undefined; + LA?: string | undefined; + LV?: string | undefined; + LB?: string | undefined; + LS?: string | undefined; + LR?: string | undefined; + LY?: string | undefined; + LI?: string | undefined; + LT?: string | undefined; + LU?: string | undefined; + MO?: string | undefined; + MG?: string | undefined; + MW?: string | undefined; + MY?: string | undefined; + MV?: string | undefined; + ML?: string | undefined; + MT?: string | undefined; + MH?: string | undefined; + MQ?: string | undefined; + MR?: string | undefined; + MU?: string | undefined; + YT?: string | undefined; + MX?: string | undefined; + FM?: string | undefined; + MD?: string | undefined; + MC?: string | undefined; + MN?: string | undefined; + MS?: string | undefined; + MA?: string | undefined; + MZ?: string | undefined; + MM?: string | undefined; + NA?: string | undefined; + NR?: string | undefined; + NP?: string | undefined; + NL?: string | undefined; + NC?: string | undefined; + NZ?: string | undefined; + NI?: string | undefined; + NE?: string | undefined; + NG?: string | undefined; + NU?: string | undefined; + NF?: string | undefined; + MK?: string | undefined; + MP?: string | undefined; + NO?: string | undefined; + OM?: string | undefined; + PK?: string | undefined; + PW?: string | undefined; + PS?: string | undefined; + PA?: string | undefined; + PG?: string | undefined; + PY?: string | undefined; + PE?: string | undefined; + PH?: string | undefined; + PN?: string | undefined; + PL?: string | undefined; + PT?: string | undefined; + PR?: string | undefined; + QA?: string | undefined; + RE?: string | undefined; + RO?: string | undefined; + RU?: string | undefined; + RW?: string | undefined; + SH?: string | undefined; + KN?: string | undefined; + LC?: string | undefined; + PM?: string | undefined; + VC?: string | undefined; + WS?: string | undefined; + SM?: string | undefined; + ST?: string | undefined; + SA?: string | undefined; + SN?: string | undefined; + SC?: string | undefined; + SL?: string | undefined; + SG?: string | undefined; + SK?: string | undefined; + SI?: string | undefined; + SB?: string | undefined; + SO?: string | undefined; + ZA?: string | undefined; + GS?: string | undefined; + ES?: string | undefined; + LK?: string | undefined; + SD?: string | undefined; + SR?: string | undefined; + SJ?: string | undefined; + SZ?: string | undefined; + SE?: string | undefined; + CH?: string | undefined; + SY?: string | undefined; + TW?: string | undefined; + TJ?: string | undefined; + TZ?: string | undefined; + TH?: string | undefined; + TL?: string | undefined; + TG?: string | undefined; + TK?: string | undefined; + TO?: string | undefined; + TT?: string | undefined; + TN?: string | undefined; + TR?: string | undefined; + TM?: string | undefined; + TC?: string | undefined; + TV?: string | undefined; + UG?: string | undefined; + UA?: string | undefined; + AE?: string | undefined; + GB?: string | undefined; + US?: string | undefined; + UM?: string | undefined; + UY?: string | undefined; + UZ?: string | undefined; + VU?: string | undefined; + VE?: string | undefined; + VN?: string | undefined; + VG?: string | undefined; + VI?: string | undefined; + WF?: string | undefined; + EH?: string | undefined; + YE?: string | undefined; + ZM?: string | undefined; + ZW?: string | undefined; + AX?: string | undefined; + BQ?: string | undefined; + CW?: string | undefined; + GG?: string | undefined; + IM?: string | undefined; + JE?: string | undefined; + ME?: string | undefined; + BL?: string | undefined; + MF?: string | undefined; + RS?: string | undefined; + SX?: string | undefined; + SS?: string | undefined; + XK?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + AF: z.string().optional(), + AL: z.string().optional(), + DZ: z.string().optional(), + AS: z.string().optional(), + AD: z.string().optional(), + AO: z.string().optional(), + AI: z.string().optional(), + AQ: z.string().optional(), + AG: z.string().optional(), + AR: z.string().optional(), + AM: z.string().optional(), + AW: z.string().optional(), + AU: z.string().optional(), + AT: z.string().optional(), + AZ: z.string().optional(), + BS: z.string().optional(), + BH: z.string().optional(), + BD: z.string().optional(), + BB: z.string().optional(), + BY: z.string().optional(), + BE: z.string().optional(), + BZ: z.string().optional(), + BJ: z.string().optional(), + BM: z.string().optional(), + BT: z.string().optional(), + BO: z.string().optional(), + BA: z.string().optional(), + BW: z.string().optional(), + BV: z.string().optional(), + BR: z.string().optional(), + IO: z.string().optional(), + BN: z.string().optional(), + BG: z.string().optional(), + BF: z.string().optional(), + BI: z.string().optional(), + KH: z.string().optional(), + CM: z.string().optional(), + CA: z.string().optional(), + CV: z.string().optional(), + KY: z.string().optional(), + CF: z.string().optional(), + TD: z.string().optional(), + CL: z.string().optional(), + CN: z.string().optional(), + CX: z.string().optional(), + CC: z.string().optional(), + CO: z.string().optional(), + KM: z.string().optional(), + CG: z.string().optional(), + CD: z.string().optional(), + CK: z.string().optional(), + CR: z.string().optional(), + CI: z.string().optional(), + HR: z.string().optional(), + CU: z.string().optional(), + CY: z.string().optional(), + CZ: z.string().optional(), + DK: z.string().optional(), + DJ: z.string().optional(), + DM: z.string().optional(), + DO: z.string().optional(), + EC: z.string().optional(), + EG: z.string().optional(), + SV: z.string().optional(), + GQ: z.string().optional(), + ER: z.string().optional(), + EE: z.string().optional(), + ET: z.string().optional(), + FK: z.string().optional(), + FO: z.string().optional(), + FJ: z.string().optional(), + FI: z.string().optional(), + FR: z.string().optional(), + GF: z.string().optional(), + PF: z.string().optional(), + TF: z.string().optional(), + GA: z.string().optional(), + GM: z.string().optional(), + GE: z.string().optional(), + DE: z.string().optional(), + GH: z.string().optional(), + GI: z.string().optional(), + GR: z.string().optional(), + GL: z.string().optional(), + GD: z.string().optional(), + GP: z.string().optional(), + GU: z.string().optional(), + GT: z.string().optional(), + GN: z.string().optional(), + GW: z.string().optional(), + GY: z.string().optional(), + HT: z.string().optional(), + HM: z.string().optional(), + VA: z.string().optional(), + HN: z.string().optional(), + HK: z.string().optional(), + HU: z.string().optional(), + IS: z.string().optional(), + IN: z.string().optional(), + ID: z.string().optional(), + IR: z.string().optional(), + IQ: z.string().optional(), + IE: z.string().optional(), + IL: z.string().optional(), + IT: z.string().optional(), + JM: z.string().optional(), + JP: z.string().optional(), + JO: z.string().optional(), + KZ: z.string().optional(), + KE: z.string().optional(), + KI: z.string().optional(), + KP: z.string().optional(), + KR: z.string().optional(), + KW: z.string().optional(), + KG: z.string().optional(), + LA: z.string().optional(), + LV: z.string().optional(), + LB: z.string().optional(), + LS: z.string().optional(), + LR: z.string().optional(), + LY: z.string().optional(), + LI: z.string().optional(), + LT: z.string().optional(), + LU: z.string().optional(), + MO: z.string().optional(), + MG: z.string().optional(), + MW: z.string().optional(), + MY: z.string().optional(), + MV: z.string().optional(), + ML: z.string().optional(), + MT: z.string().optional(), + MH: z.string().optional(), + MQ: z.string().optional(), + MR: z.string().optional(), + MU: z.string().optional(), + YT: z.string().optional(), + MX: z.string().optional(), + FM: z.string().optional(), + MD: z.string().optional(), + MC: z.string().optional(), + MN: z.string().optional(), + MS: z.string().optional(), + MA: z.string().optional(), + MZ: z.string().optional(), + MM: z.string().optional(), + NA: z.string().optional(), + NR: z.string().optional(), + NP: z.string().optional(), + NL: z.string().optional(), + NC: z.string().optional(), + NZ: z.string().optional(), + NI: z.string().optional(), + NE: z.string().optional(), + NG: z.string().optional(), + NU: z.string().optional(), + NF: z.string().optional(), + MK: z.string().optional(), + MP: z.string().optional(), + NO: z.string().optional(), + OM: z.string().optional(), + PK: z.string().optional(), + PW: z.string().optional(), + PS: z.string().optional(), + PA: z.string().optional(), + PG: z.string().optional(), + PY: z.string().optional(), + PE: z.string().optional(), + PH: z.string().optional(), + PN: z.string().optional(), + PL: z.string().optional(), + PT: z.string().optional(), + PR: z.string().optional(), + QA: z.string().optional(), + RE: z.string().optional(), + RO: z.string().optional(), + RU: z.string().optional(), + RW: z.string().optional(), + SH: z.string().optional(), + KN: z.string().optional(), + LC: z.string().optional(), + PM: z.string().optional(), + VC: z.string().optional(), + WS: z.string().optional(), + SM: z.string().optional(), + ST: z.string().optional(), + SA: z.string().optional(), + SN: z.string().optional(), + SC: z.string().optional(), + SL: z.string().optional(), + SG: z.string().optional(), + SK: z.string().optional(), + SI: z.string().optional(), + SB: z.string().optional(), + SO: z.string().optional(), + ZA: z.string().optional(), + GS: z.string().optional(), + ES: z.string().optional(), + LK: z.string().optional(), + SD: z.string().optional(), + SR: z.string().optional(), + SJ: z.string().optional(), + SZ: z.string().optional(), + SE: z.string().optional(), + CH: z.string().optional(), + SY: z.string().optional(), + TW: z.string().optional(), + TJ: z.string().optional(), + TZ: z.string().optional(), + TH: z.string().optional(), + TL: z.string().optional(), + TG: z.string().optional(), + TK: z.string().optional(), + TO: z.string().optional(), + TT: z.string().optional(), + TN: z.string().optional(), + TR: z.string().optional(), + TM: z.string().optional(), + TC: z.string().optional(), + TV: z.string().optional(), + UG: z.string().optional(), + UA: z.string().optional(), + AE: z.string().optional(), + GB: z.string().optional(), + US: z.string().optional(), + UM: z.string().optional(), + UY: z.string().optional(), + UZ: z.string().optional(), + VU: z.string().optional(), + VE: z.string().optional(), + VN: z.string().optional(), + VG: z.string().optional(), + VI: z.string().optional(), + WF: z.string().optional(), + EH: z.string().optional(), + YE: z.string().optional(), + ZM: z.string().optional(), + ZW: z.string().optional(), + AX: z.string().optional(), + BQ: z.string().optional(), + CW: z.string().optional(), + GG: z.string().optional(), + IM: z.string().optional(), + JE: z.string().optional(), + ME: z.string().optional(), + BL: z.string().optional(), + MF: z.string().optional(), + RS: z.string().optional(), + SX: z.string().optional(), + SS: z.string().optional(), + XK: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.AF === undefined ? null : { af: v.AF }), + ...(v.AL === undefined ? null : { al: v.AL }), + ...(v.DZ === undefined ? null : { dz: v.DZ }), + ...(v.AS === undefined ? null : { as: v.AS }), + ...(v.AD === undefined ? null : { ad: v.AD }), + ...(v.AO === undefined ? null : { ao: v.AO }), + ...(v.AI === undefined ? null : { ai: v.AI }), + ...(v.AQ === undefined ? null : { aq: v.AQ }), + ...(v.AG === undefined ? null : { ag: v.AG }), + ...(v.AR === undefined ? null : { ar: v.AR }), + ...(v.AM === undefined ? null : { am: v.AM }), + ...(v.AW === undefined ? null : { aw: v.AW }), + ...(v.AU === undefined ? null : { au: v.AU }), + ...(v.AT === undefined ? null : { at: v.AT }), + ...(v.AZ === undefined ? null : { az: v.AZ }), + ...(v.BS === undefined ? null : { bs: v.BS }), + ...(v.BH === undefined ? null : { bh: v.BH }), + ...(v.BD === undefined ? null : { bd: v.BD }), + ...(v.BB === undefined ? null : { bb: v.BB }), + ...(v.BY === undefined ? null : { by: v.BY }), + ...(v.BE === undefined ? null : { be: v.BE }), + ...(v.BZ === undefined ? null : { bz: v.BZ }), + ...(v.BJ === undefined ? null : { bj: v.BJ }), + ...(v.BM === undefined ? null : { bm: v.BM }), + ...(v.BT === undefined ? null : { bt: v.BT }), + ...(v.BO === undefined ? null : { bo: v.BO }), + ...(v.BA === undefined ? null : { ba: v.BA }), + ...(v.BW === undefined ? null : { bw: v.BW }), + ...(v.BV === undefined ? null : { bv: v.BV }), + ...(v.BR === undefined ? null : { br: v.BR }), + ...(v.IO === undefined ? null : { io: v.IO }), + ...(v.BN === undefined ? null : { bn: v.BN }), + ...(v.BG === undefined ? null : { bg: v.BG }), + ...(v.BF === undefined ? null : { bf: v.BF }), + ...(v.BI === undefined ? null : { bi: v.BI }), + ...(v.KH === undefined ? null : { kh: v.KH }), + ...(v.CM === undefined ? null : { cm: v.CM }), + ...(v.CA === undefined ? null : { ca: v.CA }), + ...(v.CV === undefined ? null : { cv: v.CV }), + ...(v.KY === undefined ? null : { ky: v.KY }), + ...(v.CF === undefined ? null : { cf: v.CF }), + ...(v.TD === undefined ? null : { td: v.TD }), + ...(v.CL === undefined ? null : { cl: v.CL }), + ...(v.CN === undefined ? null : { cn: v.CN }), + ...(v.CX === undefined ? null : { cx: v.CX }), + ...(v.CC === undefined ? null : { cc: v.CC }), + ...(v.CO === undefined ? null : { co: v.CO }), + ...(v.KM === undefined ? null : { km: v.KM }), + ...(v.CG === undefined ? null : { cg: v.CG }), + ...(v.CD === undefined ? null : { cd: v.CD }), + ...(v.CK === undefined ? null : { ck: v.CK }), + ...(v.CR === undefined ? null : { cr: v.CR }), + ...(v.CI === undefined ? null : { ci: v.CI }), + ...(v.HR === undefined ? null : { hr: v.HR }), + ...(v.CU === undefined ? null : { cu: v.CU }), + ...(v.CY === undefined ? null : { cy: v.CY }), + ...(v.CZ === undefined ? null : { cz: v.CZ }), + ...(v.DK === undefined ? null : { dk: v.DK }), + ...(v.DJ === undefined ? null : { dj: v.DJ }), + ...(v.DM === undefined ? null : { dm: v.DM }), + ...(v.DO === undefined ? null : { do: v.DO }), + ...(v.EC === undefined ? null : { ec: v.EC }), + ...(v.EG === undefined ? null : { eg: v.EG }), + ...(v.SV === undefined ? null : { sv: v.SV }), + ...(v.GQ === undefined ? null : { gq: v.GQ }), + ...(v.ER === undefined ? null : { er: v.ER }), + ...(v.EE === undefined ? null : { ee: v.EE }), + ...(v.ET === undefined ? null : { et: v.ET }), + ...(v.FK === undefined ? null : { fk: v.FK }), + ...(v.FO === undefined ? null : { fo: v.FO }), + ...(v.FJ === undefined ? null : { fj: v.FJ }), + ...(v.FI === undefined ? null : { fi: v.FI }), + ...(v.FR === undefined ? null : { fr: v.FR }), + ...(v.GF === undefined ? null : { gf: v.GF }), + ...(v.PF === undefined ? null : { pf: v.PF }), + ...(v.TF === undefined ? null : { tf: v.TF }), + ...(v.GA === undefined ? null : { ga: v.GA }), + ...(v.GM === undefined ? null : { gm: v.GM }), + ...(v.GE === undefined ? null : { ge: v.GE }), + ...(v.DE === undefined ? null : { de: v.DE }), + ...(v.GH === undefined ? null : { gh: v.GH }), + ...(v.GI === undefined ? null : { gi: v.GI }), + ...(v.GR === undefined ? null : { gr: v.GR }), + ...(v.GL === undefined ? null : { gl: v.GL }), + ...(v.GD === undefined ? null : { gd: v.GD }), + ...(v.GP === undefined ? null : { gp: v.GP }), + ...(v.GU === undefined ? null : { gu: v.GU }), + ...(v.GT === undefined ? null : { gt: v.GT }), + ...(v.GN === undefined ? null : { gn: v.GN }), + ...(v.GW === undefined ? null : { gw: v.GW }), + ...(v.GY === undefined ? null : { gy: v.GY }), + ...(v.HT === undefined ? null : { ht: v.HT }), + ...(v.HM === undefined ? null : { hm: v.HM }), + ...(v.VA === undefined ? null : { va: v.VA }), + ...(v.HN === undefined ? null : { hn: v.HN }), + ...(v.HK === undefined ? null : { hk: v.HK }), + ...(v.HU === undefined ? null : { hu: v.HU }), + ...(v.IS === undefined ? null : { is: v.IS }), + ...(v.IN === undefined ? null : { in: v.IN }), + ...(v.ID === undefined ? null : { id: v.ID }), + ...(v.IR === undefined ? null : { ir: v.IR }), + ...(v.IQ === undefined ? null : { iq: v.IQ }), + ...(v.IE === undefined ? null : { ie: v.IE }), + ...(v.IL === undefined ? null : { il: v.IL }), + ...(v.IT === undefined ? null : { it: v.IT }), + ...(v.JM === undefined ? null : { jm: v.JM }), + ...(v.JP === undefined ? null : { jp: v.JP }), + ...(v.JO === undefined ? null : { jo: v.JO }), + ...(v.KZ === undefined ? null : { kz: v.KZ }), + ...(v.KE === undefined ? null : { ke: v.KE }), + ...(v.KI === undefined ? null : { ki: v.KI }), + ...(v.KP === undefined ? null : { kp: v.KP }), + ...(v.KR === undefined ? null : { kr: v.KR }), + ...(v.KW === undefined ? null : { kw: v.KW }), + ...(v.KG === undefined ? null : { kg: v.KG }), + ...(v.LA === undefined ? null : { la: v.LA }), + ...(v.LV === undefined ? null : { lv: v.LV }), + ...(v.LB === undefined ? null : { lb: v.LB }), + ...(v.LS === undefined ? null : { ls: v.LS }), + ...(v.LR === undefined ? null : { lr: v.LR }), + ...(v.LY === undefined ? null : { ly: v.LY }), + ...(v.LI === undefined ? null : { li: v.LI }), + ...(v.LT === undefined ? null : { lt: v.LT }), + ...(v.LU === undefined ? null : { lu: v.LU }), + ...(v.MO === undefined ? null : { mo: v.MO }), + ...(v.MG === undefined ? null : { mg: v.MG }), + ...(v.MW === undefined ? null : { mw: v.MW }), + ...(v.MY === undefined ? null : { my: v.MY }), + ...(v.MV === undefined ? null : { mv: v.MV }), + ...(v.ML === undefined ? null : { ml: v.ML }), + ...(v.MT === undefined ? null : { mt: v.MT }), + ...(v.MH === undefined ? null : { mh: v.MH }), + ...(v.MQ === undefined ? null : { mq: v.MQ }), + ...(v.MR === undefined ? null : { mr: v.MR }), + ...(v.MU === undefined ? null : { mu: v.MU }), + ...(v.YT === undefined ? null : { yt: v.YT }), + ...(v.MX === undefined ? null : { mx: v.MX }), + ...(v.FM === undefined ? null : { fm: v.FM }), + ...(v.MD === undefined ? null : { md: v.MD }), + ...(v.MC === undefined ? null : { mc: v.MC }), + ...(v.MN === undefined ? null : { mn: v.MN }), + ...(v.MS === undefined ? null : { ms: v.MS }), + ...(v.MA === undefined ? null : { ma: v.MA }), + ...(v.MZ === undefined ? null : { mz: v.MZ }), + ...(v.MM === undefined ? null : { mm: v.MM }), + ...(v.NA === undefined ? null : { na: v.NA }), + ...(v.NR === undefined ? null : { nr: v.NR }), + ...(v.NP === undefined ? null : { np: v.NP }), + ...(v.NL === undefined ? null : { nl: v.NL }), + ...(v.NC === undefined ? null : { nc: v.NC }), + ...(v.NZ === undefined ? null : { nz: v.NZ }), + ...(v.NI === undefined ? null : { ni: v.NI }), + ...(v.NE === undefined ? null : { ne: v.NE }), + ...(v.NG === undefined ? null : { ng: v.NG }), + ...(v.NU === undefined ? null : { nu: v.NU }), + ...(v.NF === undefined ? null : { nf: v.NF }), + ...(v.MK === undefined ? null : { mk: v.MK }), + ...(v.MP === undefined ? null : { mp: v.MP }), + ...(v.NO === undefined ? null : { no: v.NO }), + ...(v.OM === undefined ? null : { om: v.OM }), + ...(v.PK === undefined ? null : { pk: v.PK }), + ...(v.PW === undefined ? null : { pw: v.PW }), + ...(v.PS === undefined ? null : { ps: v.PS }), + ...(v.PA === undefined ? null : { pa: v.PA }), + ...(v.PG === undefined ? null : { pg: v.PG }), + ...(v.PY === undefined ? null : { py: v.PY }), + ...(v.PE === undefined ? null : { pe: v.PE }), + ...(v.PH === undefined ? null : { ph: v.PH }), + ...(v.PN === undefined ? null : { pn: v.PN }), + ...(v.PL === undefined ? null : { pl: v.PL }), + ...(v.PT === undefined ? null : { pt: v.PT }), + ...(v.PR === undefined ? null : { pr: v.PR }), + ...(v.QA === undefined ? null : { qa: v.QA }), + ...(v.RE === undefined ? null : { re: v.RE }), + ...(v.RO === undefined ? null : { ro: v.RO }), + ...(v.RU === undefined ? null : { ru: v.RU }), + ...(v.RW === undefined ? null : { rw: v.RW }), + ...(v.SH === undefined ? null : { sh: v.SH }), + ...(v.KN === undefined ? null : { kn: v.KN }), + ...(v.LC === undefined ? null : { lc: v.LC }), + ...(v.PM === undefined ? null : { pm: v.PM }), + ...(v.VC === undefined ? null : { vc: v.VC }), + ...(v.WS === undefined ? null : { ws: v.WS }), + ...(v.SM === undefined ? null : { sm: v.SM }), + ...(v.ST === undefined ? null : { st: v.ST }), + ...(v.SA === undefined ? null : { sa: v.SA }), + ...(v.SN === undefined ? null : { sn: v.SN }), + ...(v.SC === undefined ? null : { sc: v.SC }), + ...(v.SL === undefined ? null : { sl: v.SL }), + ...(v.SG === undefined ? null : { sg: v.SG }), + ...(v.SK === undefined ? null : { sk: v.SK }), + ...(v.SI === undefined ? null : { si: v.SI }), + ...(v.SB === undefined ? null : { sb: v.SB }), + ...(v.SO === undefined ? null : { so: v.SO }), + ...(v.ZA === undefined ? null : { za: v.ZA }), + ...(v.GS === undefined ? null : { gs: v.GS }), + ...(v.ES === undefined ? null : { es: v.ES }), + ...(v.LK === undefined ? null : { lk: v.LK }), + ...(v.SD === undefined ? null : { sd: v.SD }), + ...(v.SR === undefined ? null : { sr: v.SR }), + ...(v.SJ === undefined ? null : { sj: v.SJ }), + ...(v.SZ === undefined ? null : { sz: v.SZ }), + ...(v.SE === undefined ? null : { se: v.SE }), + ...(v.CH === undefined ? null : { ch: v.CH }), + ...(v.SY === undefined ? null : { sy: v.SY }), + ...(v.TW === undefined ? null : { tw: v.TW }), + ...(v.TJ === undefined ? null : { tj: v.TJ }), + ...(v.TZ === undefined ? null : { tz: v.TZ }), + ...(v.TH === undefined ? null : { th: v.TH }), + ...(v.TL === undefined ? null : { tl: v.TL }), + ...(v.TG === undefined ? null : { tg: v.TG }), + ...(v.TK === undefined ? null : { tk: v.TK }), + ...(v.TO === undefined ? null : { to: v.TO }), + ...(v.TT === undefined ? null : { tt: v.TT }), + ...(v.TN === undefined ? null : { tn: v.TN }), + ...(v.TR === undefined ? null : { tr: v.TR }), + ...(v.TM === undefined ? null : { tm: v.TM }), + ...(v.TC === undefined ? null : { tc: v.TC }), + ...(v.TV === undefined ? null : { tv: v.TV }), + ...(v.UG === undefined ? null : { ug: v.UG }), + ...(v.UA === undefined ? null : { ua: v.UA }), + ...(v.AE === undefined ? null : { ae: v.AE }), + ...(v.GB === undefined ? null : { gb: v.GB }), + ...(v.US === undefined ? null : { us: v.US }), + ...(v.UM === undefined ? null : { um: v.UM }), + ...(v.UY === undefined ? null : { uy: v.UY }), + ...(v.UZ === undefined ? null : { uz: v.UZ }), + ...(v.VU === undefined ? null : { vu: v.VU }), + ...(v.VE === undefined ? null : { ve: v.VE }), + ...(v.VN === undefined ? null : { vn: v.VN }), + ...(v.VG === undefined ? null : { vg: v.VG }), + ...(v.VI === undefined ? null : { vi: v.VI }), + ...(v.WF === undefined ? null : { wf: v.WF }), + ...(v.EH === undefined ? null : { eh: v.EH }), + ...(v.YE === undefined ? null : { ye: v.YE }), + ...(v.ZM === undefined ? null : { zm: v.ZM }), + ...(v.ZW === undefined ? null : { zw: v.ZW }), + ...(v.AX === undefined ? null : { ax: v.AX }), + ...(v.BQ === undefined ? null : { bq: v.BQ }), + ...(v.CW === undefined ? null : { cw: v.CW }), + ...(v.GG === undefined ? null : { gg: v.GG }), + ...(v.IM === undefined ? null : { im: v.IM }), + ...(v.JE === undefined ? null : { je: v.JE }), + ...(v.ME === undefined ? null : { me: v.ME }), + ...(v.BL === undefined ? null : { bl: v.BL }), + ...(v.MF === undefined ? null : { mf: v.MF }), + ...(v.RS === undefined ? null : { rs: v.RS }), + ...(v.SX === undefined ? null : { sx: v.SX }), + ...(v.SS === undefined ? null : { ss: v.SS }), + ...(v.XK === undefined ? null : { xk: v.XK }), + }; + }); + + export type Outbound = { + AF?: string | undefined; + AL?: string | undefined; + DZ?: string | undefined; + AS?: string | undefined; + AD?: string | undefined; + AO?: string | undefined; + AI?: string | undefined; + AQ?: string | undefined; + AG?: string | undefined; + AR?: string | undefined; + AM?: string | undefined; + AW?: string | undefined; + AU?: string | undefined; + AT?: string | undefined; + AZ?: string | undefined; + BS?: string | undefined; + BH?: string | undefined; + BD?: string | undefined; + BB?: string | undefined; + BY?: string | undefined; + BE?: string | undefined; + BZ?: string | undefined; + BJ?: string | undefined; + BM?: string | undefined; + BT?: string | undefined; + BO?: string | undefined; + BA?: string | undefined; + BW?: string | undefined; + BV?: string | undefined; + BR?: string | undefined; + IO?: string | undefined; + BN?: string | undefined; + BG?: string | undefined; + BF?: string | undefined; + BI?: string | undefined; + KH?: string | undefined; + CM?: string | undefined; + CA?: string | undefined; + CV?: string | undefined; + KY?: string | undefined; + CF?: string | undefined; + TD?: string | undefined; + CL?: string | undefined; + CN?: string | undefined; + CX?: string | undefined; + CC?: string | undefined; + CO?: string | undefined; + KM?: string | undefined; + CG?: string | undefined; + CD?: string | undefined; + CK?: string | undefined; + CR?: string | undefined; + CI?: string | undefined; + HR?: string | undefined; + CU?: string | undefined; + CY?: string | undefined; + CZ?: string | undefined; + DK?: string | undefined; + DJ?: string | undefined; + DM?: string | undefined; + DO?: string | undefined; + EC?: string | undefined; + EG?: string | undefined; + SV?: string | undefined; + GQ?: string | undefined; + ER?: string | undefined; + EE?: string | undefined; + ET?: string | undefined; + FK?: string | undefined; + FO?: string | undefined; + FJ?: string | undefined; + FI?: string | undefined; + FR?: string | undefined; + GF?: string | undefined; + PF?: string | undefined; + TF?: string | undefined; + GA?: string | undefined; + GM?: string | undefined; + GE?: string | undefined; + DE?: string | undefined; + GH?: string | undefined; + GI?: string | undefined; + GR?: string | undefined; + GL?: string | undefined; + GD?: string | undefined; + GP?: string | undefined; + GU?: string | undefined; + GT?: string | undefined; + GN?: string | undefined; + GW?: string | undefined; + GY?: string | undefined; + HT?: string | undefined; + HM?: string | undefined; + VA?: string | undefined; + HN?: string | undefined; + HK?: string | undefined; + HU?: string | undefined; + IS?: string | undefined; + IN?: string | undefined; + ID?: string | undefined; + IR?: string | undefined; + IQ?: string | undefined; + IE?: string | undefined; + IL?: string | undefined; + IT?: string | undefined; + JM?: string | undefined; + JP?: string | undefined; + JO?: string | undefined; + KZ?: string | undefined; + KE?: string | undefined; + KI?: string | undefined; + KP?: string | undefined; + KR?: string | undefined; + KW?: string | undefined; + KG?: string | undefined; + LA?: string | undefined; + LV?: string | undefined; + LB?: string | undefined; + LS?: string | undefined; + LR?: string | undefined; + LY?: string | undefined; + LI?: string | undefined; + LT?: string | undefined; + LU?: string | undefined; + MO?: string | undefined; + MG?: string | undefined; + MW?: string | undefined; + MY?: string | undefined; + MV?: string | undefined; + ML?: string | undefined; + MT?: string | undefined; + MH?: string | undefined; + MQ?: string | undefined; + MR?: string | undefined; + MU?: string | undefined; + YT?: string | undefined; + MX?: string | undefined; + FM?: string | undefined; + MD?: string | undefined; + MC?: string | undefined; + MN?: string | undefined; + MS?: string | undefined; + MA?: string | undefined; + MZ?: string | undefined; + MM?: string | undefined; + NA?: string | undefined; + NR?: string | undefined; + NP?: string | undefined; + NL?: string | undefined; + NC?: string | undefined; + NZ?: string | undefined; + NI?: string | undefined; + NE?: string | undefined; + NG?: string | undefined; + NU?: string | undefined; + NF?: string | undefined; + MK?: string | undefined; + MP?: string | undefined; + NO?: string | undefined; + OM?: string | undefined; + PK?: string | undefined; + PW?: string | undefined; + PS?: string | undefined; + PA?: string | undefined; + PG?: string | undefined; + PY?: string | undefined; + PE?: string | undefined; + PH?: string | undefined; + PN?: string | undefined; + PL?: string | undefined; + PT?: string | undefined; + PR?: string | undefined; + QA?: string | undefined; + RE?: string | undefined; + RO?: string | undefined; + RU?: string | undefined; + RW?: string | undefined; + SH?: string | undefined; + KN?: string | undefined; + LC?: string | undefined; + PM?: string | undefined; + VC?: string | undefined; + WS?: string | undefined; + SM?: string | undefined; + ST?: string | undefined; + SA?: string | undefined; + SN?: string | undefined; + SC?: string | undefined; + SL?: string | undefined; + SG?: string | undefined; + SK?: string | undefined; + SI?: string | undefined; + SB?: string | undefined; + SO?: string | undefined; + ZA?: string | undefined; + GS?: string | undefined; + ES?: string | undefined; + LK?: string | undefined; + SD?: string | undefined; + SR?: string | undefined; + SJ?: string | undefined; + SZ?: string | undefined; + SE?: string | undefined; + CH?: string | undefined; + SY?: string | undefined; + TW?: string | undefined; + TJ?: string | undefined; + TZ?: string | undefined; + TH?: string | undefined; + TL?: string | undefined; + TG?: string | undefined; + TK?: string | undefined; + TO?: string | undefined; + TT?: string | undefined; + TN?: string | undefined; + TR?: string | undefined; + TM?: string | undefined; + TC?: string | undefined; + TV?: string | undefined; + UG?: string | undefined; + UA?: string | undefined; + AE?: string | undefined; + GB?: string | undefined; + US?: string | undefined; + UM?: string | undefined; + UY?: string | undefined; + UZ?: string | undefined; + VU?: string | undefined; + VE?: string | undefined; + VN?: string | undefined; + VG?: string | undefined; + VI?: string | undefined; + WF?: string | undefined; + EH?: string | undefined; + YE?: string | undefined; + ZM?: string | undefined; + ZW?: string | undefined; + AX?: string | undefined; + BQ?: string | undefined; + CW?: string | undefined; + GG?: string | undefined; + IM?: string | undefined; + JE?: string | undefined; + ME?: string | undefined; + BL?: string | undefined; + MF?: string | undefined; + RS?: string | undefined; + SX?: string | undefined; + SS?: string | undefined; + XK?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + af: z.string().optional(), + al: z.string().optional(), + dz: z.string().optional(), + as: z.string().optional(), + ad: z.string().optional(), + ao: z.string().optional(), + ai: z.string().optional(), + aq: z.string().optional(), + ag: z.string().optional(), + ar: z.string().optional(), + am: z.string().optional(), + aw: z.string().optional(), + au: z.string().optional(), + at: z.string().optional(), + az: z.string().optional(), + bs: z.string().optional(), + bh: z.string().optional(), + bd: z.string().optional(), + bb: z.string().optional(), + by: z.string().optional(), + be: z.string().optional(), + bz: z.string().optional(), + bj: z.string().optional(), + bm: z.string().optional(), + bt: z.string().optional(), + bo: z.string().optional(), + ba: z.string().optional(), + bw: z.string().optional(), + bv: z.string().optional(), + br: z.string().optional(), + io: z.string().optional(), + bn: z.string().optional(), + bg: z.string().optional(), + bf: z.string().optional(), + bi: z.string().optional(), + kh: z.string().optional(), + cm: z.string().optional(), + ca: z.string().optional(), + cv: z.string().optional(), + ky: z.string().optional(), + cf: z.string().optional(), + td: z.string().optional(), + cl: z.string().optional(), + cn: z.string().optional(), + cx: z.string().optional(), + cc: z.string().optional(), + co: z.string().optional(), + km: z.string().optional(), + cg: z.string().optional(), + cd: z.string().optional(), + ck: z.string().optional(), + cr: z.string().optional(), + ci: z.string().optional(), + hr: z.string().optional(), + cu: z.string().optional(), + cy: z.string().optional(), + cz: z.string().optional(), + dk: z.string().optional(), + dj: z.string().optional(), + dm: z.string().optional(), + do: z.string().optional(), + ec: z.string().optional(), + eg: z.string().optional(), + sv: z.string().optional(), + gq: z.string().optional(), + er: z.string().optional(), + ee: z.string().optional(), + et: z.string().optional(), + fk: z.string().optional(), + fo: z.string().optional(), + fj: z.string().optional(), + fi: z.string().optional(), + fr: z.string().optional(), + gf: z.string().optional(), + pf: z.string().optional(), + tf: z.string().optional(), + ga: z.string().optional(), + gm: z.string().optional(), + ge: z.string().optional(), + de: z.string().optional(), + gh: z.string().optional(), + gi: z.string().optional(), + gr: z.string().optional(), + gl: z.string().optional(), + gd: z.string().optional(), + gp: z.string().optional(), + gu: z.string().optional(), + gt: z.string().optional(), + gn: z.string().optional(), + gw: z.string().optional(), + gy: z.string().optional(), + ht: z.string().optional(), + hm: z.string().optional(), + va: z.string().optional(), + hn: z.string().optional(), + hk: z.string().optional(), + hu: z.string().optional(), + is: z.string().optional(), + in: z.string().optional(), + id: z.string().optional(), + ir: z.string().optional(), + iq: z.string().optional(), + ie: z.string().optional(), + il: z.string().optional(), + it: z.string().optional(), + jm: z.string().optional(), + jp: z.string().optional(), + jo: z.string().optional(), + kz: z.string().optional(), + ke: z.string().optional(), + ki: z.string().optional(), + kp: z.string().optional(), + kr: z.string().optional(), + kw: z.string().optional(), + kg: z.string().optional(), + la: z.string().optional(), + lv: z.string().optional(), + lb: z.string().optional(), + ls: z.string().optional(), + lr: z.string().optional(), + ly: z.string().optional(), + li: z.string().optional(), + lt: z.string().optional(), + lu: z.string().optional(), + mo: z.string().optional(), + mg: z.string().optional(), + mw: z.string().optional(), + my: z.string().optional(), + mv: z.string().optional(), + ml: z.string().optional(), + mt: z.string().optional(), + mh: z.string().optional(), + mq: z.string().optional(), + mr: z.string().optional(), + mu: z.string().optional(), + yt: z.string().optional(), + mx: z.string().optional(), + fm: z.string().optional(), + md: z.string().optional(), + mc: z.string().optional(), + mn: z.string().optional(), + ms: z.string().optional(), + ma: z.string().optional(), + mz: z.string().optional(), + mm: z.string().optional(), + na: z.string().optional(), + nr: z.string().optional(), + np: z.string().optional(), + nl: z.string().optional(), + nc: z.string().optional(), + nz: z.string().optional(), + ni: z.string().optional(), + ne: z.string().optional(), + ng: z.string().optional(), + nu: z.string().optional(), + nf: z.string().optional(), + mk: z.string().optional(), + mp: z.string().optional(), + no: z.string().optional(), + om: z.string().optional(), + pk: z.string().optional(), + pw: z.string().optional(), + ps: z.string().optional(), + pa: z.string().optional(), + pg: z.string().optional(), + py: z.string().optional(), + pe: z.string().optional(), + ph: z.string().optional(), + pn: z.string().optional(), + pl: z.string().optional(), + pt: z.string().optional(), + pr: z.string().optional(), + qa: z.string().optional(), + re: z.string().optional(), + ro: z.string().optional(), + ru: z.string().optional(), + rw: z.string().optional(), + sh: z.string().optional(), + kn: z.string().optional(), + lc: z.string().optional(), + pm: z.string().optional(), + vc: z.string().optional(), + ws: z.string().optional(), + sm: z.string().optional(), + st: z.string().optional(), + sa: z.string().optional(), + sn: z.string().optional(), + sc: z.string().optional(), + sl: z.string().optional(), + sg: z.string().optional(), + sk: z.string().optional(), + si: z.string().optional(), + sb: z.string().optional(), + so: z.string().optional(), + za: z.string().optional(), + gs: z.string().optional(), + es: z.string().optional(), + lk: z.string().optional(), + sd: z.string().optional(), + sr: z.string().optional(), + sj: z.string().optional(), + sz: z.string().optional(), + se: z.string().optional(), + ch: z.string().optional(), + sy: z.string().optional(), + tw: z.string().optional(), + tj: z.string().optional(), + tz: z.string().optional(), + th: z.string().optional(), + tl: z.string().optional(), + tg: z.string().optional(), + tk: z.string().optional(), + to: z.string().optional(), + tt: z.string().optional(), + tn: z.string().optional(), + tr: z.string().optional(), + tm: z.string().optional(), + tc: z.string().optional(), + tv: z.string().optional(), + ug: z.string().optional(), + ua: z.string().optional(), + ae: z.string().optional(), + gb: z.string().optional(), + us: z.string().optional(), + um: z.string().optional(), + uy: z.string().optional(), + uz: z.string().optional(), + vu: z.string().optional(), + ve: z.string().optional(), + vn: z.string().optional(), + vg: z.string().optional(), + vi: z.string().optional(), + wf: z.string().optional(), + eh: z.string().optional(), + ye: z.string().optional(), + zm: z.string().optional(), + zw: z.string().optional(), + ax: z.string().optional(), + bq: z.string().optional(), + cw: z.string().optional(), + gg: z.string().optional(), + im: z.string().optional(), + je: z.string().optional(), + me: z.string().optional(), + bl: z.string().optional(), + mf: z.string().optional(), + rs: z.string().optional(), + sx: z.string().optional(), + ss: z.string().optional(), + xk: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.af === undefined ? null : { AF: v.af }), + ...(v.al === undefined ? null : { AL: v.al }), + ...(v.dz === undefined ? null : { DZ: v.dz }), + ...(v.as === undefined ? null : { AS: v.as }), + ...(v.ad === undefined ? null : { AD: v.ad }), + ...(v.ao === undefined ? null : { AO: v.ao }), + ...(v.ai === undefined ? null : { AI: v.ai }), + ...(v.aq === undefined ? null : { AQ: v.aq }), + ...(v.ag === undefined ? null : { AG: v.ag }), + ...(v.ar === undefined ? null : { AR: v.ar }), + ...(v.am === undefined ? null : { AM: v.am }), + ...(v.aw === undefined ? null : { AW: v.aw }), + ...(v.au === undefined ? null : { AU: v.au }), + ...(v.at === undefined ? null : { AT: v.at }), + ...(v.az === undefined ? null : { AZ: v.az }), + ...(v.bs === undefined ? null : { BS: v.bs }), + ...(v.bh === undefined ? null : { BH: v.bh }), + ...(v.bd === undefined ? null : { BD: v.bd }), + ...(v.bb === undefined ? null : { BB: v.bb }), + ...(v.by === undefined ? null : { BY: v.by }), + ...(v.be === undefined ? null : { BE: v.be }), + ...(v.bz === undefined ? null : { BZ: v.bz }), + ...(v.bj === undefined ? null : { BJ: v.bj }), + ...(v.bm === undefined ? null : { BM: v.bm }), + ...(v.bt === undefined ? null : { BT: v.bt }), + ...(v.bo === undefined ? null : { BO: v.bo }), + ...(v.ba === undefined ? null : { BA: v.ba }), + ...(v.bw === undefined ? null : { BW: v.bw }), + ...(v.bv === undefined ? null : { BV: v.bv }), + ...(v.br === undefined ? null : { BR: v.br }), + ...(v.io === undefined ? null : { IO: v.io }), + ...(v.bn === undefined ? null : { BN: v.bn }), + ...(v.bg === undefined ? null : { BG: v.bg }), + ...(v.bf === undefined ? null : { BF: v.bf }), + ...(v.bi === undefined ? null : { BI: v.bi }), + ...(v.kh === undefined ? null : { KH: v.kh }), + ...(v.cm === undefined ? null : { CM: v.cm }), + ...(v.ca === undefined ? null : { CA: v.ca }), + ...(v.cv === undefined ? null : { CV: v.cv }), + ...(v.ky === undefined ? null : { KY: v.ky }), + ...(v.cf === undefined ? null : { CF: v.cf }), + ...(v.td === undefined ? null : { TD: v.td }), + ...(v.cl === undefined ? null : { CL: v.cl }), + ...(v.cn === undefined ? null : { CN: v.cn }), + ...(v.cx === undefined ? null : { CX: v.cx }), + ...(v.cc === undefined ? null : { CC: v.cc }), + ...(v.co === undefined ? null : { CO: v.co }), + ...(v.km === undefined ? null : { KM: v.km }), + ...(v.cg === undefined ? null : { CG: v.cg }), + ...(v.cd === undefined ? null : { CD: v.cd }), + ...(v.ck === undefined ? null : { CK: v.ck }), + ...(v.cr === undefined ? null : { CR: v.cr }), + ...(v.ci === undefined ? null : { CI: v.ci }), + ...(v.hr === undefined ? null : { HR: v.hr }), + ...(v.cu === undefined ? null : { CU: v.cu }), + ...(v.cy === undefined ? null : { CY: v.cy }), + ...(v.cz === undefined ? null : { CZ: v.cz }), + ...(v.dk === undefined ? null : { DK: v.dk }), + ...(v.dj === undefined ? null : { DJ: v.dj }), + ...(v.dm === undefined ? null : { DM: v.dm }), + ...(v.do === undefined ? null : { DO: v.do }), + ...(v.ec === undefined ? null : { EC: v.ec }), + ...(v.eg === undefined ? null : { EG: v.eg }), + ...(v.sv === undefined ? null : { SV: v.sv }), + ...(v.gq === undefined ? null : { GQ: v.gq }), + ...(v.er === undefined ? null : { ER: v.er }), + ...(v.ee === undefined ? null : { EE: v.ee }), + ...(v.et === undefined ? null : { ET: v.et }), + ...(v.fk === undefined ? null : { FK: v.fk }), + ...(v.fo === undefined ? null : { FO: v.fo }), + ...(v.fj === undefined ? null : { FJ: v.fj }), + ...(v.fi === undefined ? null : { FI: v.fi }), + ...(v.fr === undefined ? null : { FR: v.fr }), + ...(v.gf === undefined ? null : { GF: v.gf }), + ...(v.pf === undefined ? null : { PF: v.pf }), + ...(v.tf === undefined ? null : { TF: v.tf }), + ...(v.ga === undefined ? null : { GA: v.ga }), + ...(v.gm === undefined ? null : { GM: v.gm }), + ...(v.ge === undefined ? null : { GE: v.ge }), + ...(v.de === undefined ? null : { DE: v.de }), + ...(v.gh === undefined ? null : { GH: v.gh }), + ...(v.gi === undefined ? null : { GI: v.gi }), + ...(v.gr === undefined ? null : { GR: v.gr }), + ...(v.gl === undefined ? null : { GL: v.gl }), + ...(v.gd === undefined ? null : { GD: v.gd }), + ...(v.gp === undefined ? null : { GP: v.gp }), + ...(v.gu === undefined ? null : { GU: v.gu }), + ...(v.gt === undefined ? null : { GT: v.gt }), + ...(v.gn === undefined ? null : { GN: v.gn }), + ...(v.gw === undefined ? null : { GW: v.gw }), + ...(v.gy === undefined ? null : { GY: v.gy }), + ...(v.ht === undefined ? null : { HT: v.ht }), + ...(v.hm === undefined ? null : { HM: v.hm }), + ...(v.va === undefined ? null : { VA: v.va }), + ...(v.hn === undefined ? null : { HN: v.hn }), + ...(v.hk === undefined ? null : { HK: v.hk }), + ...(v.hu === undefined ? null : { HU: v.hu }), + ...(v.is === undefined ? null : { IS: v.is }), + ...(v.in === undefined ? null : { IN: v.in }), + ...(v.id === undefined ? null : { ID: v.id }), + ...(v.ir === undefined ? null : { IR: v.ir }), + ...(v.iq === undefined ? null : { IQ: v.iq }), + ...(v.ie === undefined ? null : { IE: v.ie }), + ...(v.il === undefined ? null : { IL: v.il }), + ...(v.it === undefined ? null : { IT: v.it }), + ...(v.jm === undefined ? null : { JM: v.jm }), + ...(v.jp === undefined ? null : { JP: v.jp }), + ...(v.jo === undefined ? null : { JO: v.jo }), + ...(v.kz === undefined ? null : { KZ: v.kz }), + ...(v.ke === undefined ? null : { KE: v.ke }), + ...(v.ki === undefined ? null : { KI: v.ki }), + ...(v.kp === undefined ? null : { KP: v.kp }), + ...(v.kr === undefined ? null : { KR: v.kr }), + ...(v.kw === undefined ? null : { KW: v.kw }), + ...(v.kg === undefined ? null : { KG: v.kg }), + ...(v.la === undefined ? null : { LA: v.la }), + ...(v.lv === undefined ? null : { LV: v.lv }), + ...(v.lb === undefined ? null : { LB: v.lb }), + ...(v.ls === undefined ? null : { LS: v.ls }), + ...(v.lr === undefined ? null : { LR: v.lr }), + ...(v.ly === undefined ? null : { LY: v.ly }), + ...(v.li === undefined ? null : { LI: v.li }), + ...(v.lt === undefined ? null : { LT: v.lt }), + ...(v.lu === undefined ? null : { LU: v.lu }), + ...(v.mo === undefined ? null : { MO: v.mo }), + ...(v.mg === undefined ? null : { MG: v.mg }), + ...(v.mw === undefined ? null : { MW: v.mw }), + ...(v.my === undefined ? null : { MY: v.my }), + ...(v.mv === undefined ? null : { MV: v.mv }), + ...(v.ml === undefined ? null : { ML: v.ml }), + ...(v.mt === undefined ? null : { MT: v.mt }), + ...(v.mh === undefined ? null : { MH: v.mh }), + ...(v.mq === undefined ? null : { MQ: v.mq }), + ...(v.mr === undefined ? null : { MR: v.mr }), + ...(v.mu === undefined ? null : { MU: v.mu }), + ...(v.yt === undefined ? null : { YT: v.yt }), + ...(v.mx === undefined ? null : { MX: v.mx }), + ...(v.fm === undefined ? null : { FM: v.fm }), + ...(v.md === undefined ? null : { MD: v.md }), + ...(v.mc === undefined ? null : { MC: v.mc }), + ...(v.mn === undefined ? null : { MN: v.mn }), + ...(v.ms === undefined ? null : { MS: v.ms }), + ...(v.ma === undefined ? null : { MA: v.ma }), + ...(v.mz === undefined ? null : { MZ: v.mz }), + ...(v.mm === undefined ? null : { MM: v.mm }), + ...(v.na === undefined ? null : { NA: v.na }), + ...(v.nr === undefined ? null : { NR: v.nr }), + ...(v.np === undefined ? null : { NP: v.np }), + ...(v.nl === undefined ? null : { NL: v.nl }), + ...(v.nc === undefined ? null : { NC: v.nc }), + ...(v.nz === undefined ? null : { NZ: v.nz }), + ...(v.ni === undefined ? null : { NI: v.ni }), + ...(v.ne === undefined ? null : { NE: v.ne }), + ...(v.ng === undefined ? null : { NG: v.ng }), + ...(v.nu === undefined ? null : { NU: v.nu }), + ...(v.nf === undefined ? null : { NF: v.nf }), + ...(v.mk === undefined ? null : { MK: v.mk }), + ...(v.mp === undefined ? null : { MP: v.mp }), + ...(v.no === undefined ? null : { NO: v.no }), + ...(v.om === undefined ? null : { OM: v.om }), + ...(v.pk === undefined ? null : { PK: v.pk }), + ...(v.pw === undefined ? null : { PW: v.pw }), + ...(v.ps === undefined ? null : { PS: v.ps }), + ...(v.pa === undefined ? null : { PA: v.pa }), + ...(v.pg === undefined ? null : { PG: v.pg }), + ...(v.py === undefined ? null : { PY: v.py }), + ...(v.pe === undefined ? null : { PE: v.pe }), + ...(v.ph === undefined ? null : { PH: v.ph }), + ...(v.pn === undefined ? null : { PN: v.pn }), + ...(v.pl === undefined ? null : { PL: v.pl }), + ...(v.pt === undefined ? null : { PT: v.pt }), + ...(v.pr === undefined ? null : { PR: v.pr }), + ...(v.qa === undefined ? null : { QA: v.qa }), + ...(v.re === undefined ? null : { RE: v.re }), + ...(v.ro === undefined ? null : { RO: v.ro }), + ...(v.ru === undefined ? null : { RU: v.ru }), + ...(v.rw === undefined ? null : { RW: v.rw }), + ...(v.sh === undefined ? null : { SH: v.sh }), + ...(v.kn === undefined ? null : { KN: v.kn }), + ...(v.lc === undefined ? null : { LC: v.lc }), + ...(v.pm === undefined ? null : { PM: v.pm }), + ...(v.vc === undefined ? null : { VC: v.vc }), + ...(v.ws === undefined ? null : { WS: v.ws }), + ...(v.sm === undefined ? null : { SM: v.sm }), + ...(v.st === undefined ? null : { ST: v.st }), + ...(v.sa === undefined ? null : { SA: v.sa }), + ...(v.sn === undefined ? null : { SN: v.sn }), + ...(v.sc === undefined ? null : { SC: v.sc }), + ...(v.sl === undefined ? null : { SL: v.sl }), + ...(v.sg === undefined ? null : { SG: v.sg }), + ...(v.sk === undefined ? null : { SK: v.sk }), + ...(v.si === undefined ? null : { SI: v.si }), + ...(v.sb === undefined ? null : { SB: v.sb }), + ...(v.so === undefined ? null : { SO: v.so }), + ...(v.za === undefined ? null : { ZA: v.za }), + ...(v.gs === undefined ? null : { GS: v.gs }), + ...(v.es === undefined ? null : { ES: v.es }), + ...(v.lk === undefined ? null : { LK: v.lk }), + ...(v.sd === undefined ? null : { SD: v.sd }), + ...(v.sr === undefined ? null : { SR: v.sr }), + ...(v.sj === undefined ? null : { SJ: v.sj }), + ...(v.sz === undefined ? null : { SZ: v.sz }), + ...(v.se === undefined ? null : { SE: v.se }), + ...(v.ch === undefined ? null : { CH: v.ch }), + ...(v.sy === undefined ? null : { SY: v.sy }), + ...(v.tw === undefined ? null : { TW: v.tw }), + ...(v.tj === undefined ? null : { TJ: v.tj }), + ...(v.tz === undefined ? null : { TZ: v.tz }), + ...(v.th === undefined ? null : { TH: v.th }), + ...(v.tl === undefined ? null : { TL: v.tl }), + ...(v.tg === undefined ? null : { TG: v.tg }), + ...(v.tk === undefined ? null : { TK: v.tk }), + ...(v.to === undefined ? null : { TO: v.to }), + ...(v.tt === undefined ? null : { TT: v.tt }), + ...(v.tn === undefined ? null : { TN: v.tn }), + ...(v.tr === undefined ? null : { TR: v.tr }), + ...(v.tm === undefined ? null : { TM: v.tm }), + ...(v.tc === undefined ? null : { TC: v.tc }), + ...(v.tv === undefined ? null : { TV: v.tv }), + ...(v.ug === undefined ? null : { UG: v.ug }), + ...(v.ua === undefined ? null : { UA: v.ua }), + ...(v.ae === undefined ? null : { AE: v.ae }), + ...(v.gb === undefined ? null : { GB: v.gb }), + ...(v.us === undefined ? null : { US: v.us }), + ...(v.um === undefined ? null : { UM: v.um }), + ...(v.uy === undefined ? null : { UY: v.uy }), + ...(v.uz === undefined ? null : { UZ: v.uz }), + ...(v.vu === undefined ? null : { VU: v.vu }), + ...(v.ve === undefined ? null : { VE: v.ve }), + ...(v.vn === undefined ? null : { VN: v.vn }), + ...(v.vg === undefined ? null : { VG: v.vg }), + ...(v.vi === undefined ? null : { VI: v.vi }), + ...(v.wf === undefined ? null : { WF: v.wf }), + ...(v.eh === undefined ? null : { EH: v.eh }), + ...(v.ye === undefined ? null : { YE: v.ye }), + ...(v.zm === undefined ? null : { ZM: v.zm }), + ...(v.zw === undefined ? null : { ZW: v.zw }), + ...(v.ax === undefined ? null : { AX: v.ax }), + ...(v.bq === undefined ? null : { BQ: v.bq }), + ...(v.cw === undefined ? null : { CW: v.cw }), + ...(v.gg === undefined ? null : { GG: v.gg }), + ...(v.im === undefined ? null : { IM: v.im }), + ...(v.je === undefined ? null : { JE: v.je }), + ...(v.me === undefined ? null : { ME: v.me }), + ...(v.bl === undefined ? null : { BL: v.bl }), + ...(v.mf === undefined ? null : { MF: v.mf }), + ...(v.rs === undefined ? null : { RS: v.rs }), + ...(v.sx === undefined ? null : { SX: v.sx }), + ...(v.ss === undefined ? null : { SS: v.ss }), + ...(v.xk === undefined ? null : { XK: v.xk }), + }; + }); +} + +/** @internal */ +export namespace EditLinkRequestBody$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + prefix?: string | undefined; + url: string; + archived?: boolean | undefined; + publicStats?: boolean | undefined; + tagId?: string | null | undefined; + tagIds?: string | Array | undefined; + comments?: string | null | undefined; + expiresAt?: string | null | undefined; + expiredUrl?: string | null | undefined; + password?: string | null | undefined; + proxy?: boolean | undefined; + title?: string | null | undefined; + description?: string | null | undefined; + image?: string | null | undefined; + rewrite?: boolean | undefined; + ios?: string | null | undefined; + android?: string | null | undefined; + geo?: EditLinkGeo$.Inbound | null | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + prefix: z.string().optional(), + url: z.string(), + archived: z.boolean().default(false), + publicStats: z.boolean().default(false), + tagId: z.nullable(z.string()).optional(), + tagIds: z.union([z.string(), z.array(z.string())]).optional(), + comments: z.nullable(z.string()).optional(), + expiresAt: z.nullable(z.string()).optional(), + expiredUrl: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), + proxy: z.boolean().default(false), + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + image: z.nullable(z.string()).optional(), + rewrite: z.boolean().default(false), + ios: z.nullable(z.string()).optional(), + android: z.nullable(z.string()).optional(), + geo: z.nullable(z.lazy(() => EditLinkGeo$.inboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.prefix === undefined ? null : { prefix: v.prefix }), + url: v.url, + archived: v.archived, + publicStats: v.publicStats, + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }), + ...(v.comments === undefined ? null : { comments: v.comments }), + ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }), + ...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }), + ...(v.password === undefined ? null : { password: v.password }), + proxy: v.proxy, + ...(v.title === undefined ? null : { title: v.title }), + ...(v.description === undefined ? null : { description: v.description }), + ...(v.image === undefined ? null : { image: v.image }), + rewrite: v.rewrite, + ...(v.ios === undefined ? null : { ios: v.ios }), + ...(v.android === undefined ? null : { android: v.android }), + ...(v.geo === undefined ? null : { geo: v.geo }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + prefix?: string | undefined; + url: string; + archived: boolean; + publicStats: boolean; + tagId?: string | null | undefined; + tagIds?: string | Array | undefined; + comments?: string | null | undefined; + expiresAt?: string | null | undefined; + expiredUrl?: string | null | undefined; + password?: string | null | undefined; + proxy: boolean; + title?: string | null | undefined; + description?: string | null | undefined; + image?: string | null | undefined; + rewrite: boolean; + ios?: string | null | undefined; + android?: string | null | undefined; + geo?: EditLinkGeo$.Outbound | null | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + prefix: z.string().optional(), + url: z.string(), + archived: z.boolean().default(false), + publicStats: z.boolean().default(false), + tagId: z.nullable(z.string()).optional(), + tagIds: z.union([z.string(), z.array(z.string())]).optional(), + comments: z.nullable(z.string()).optional(), + expiresAt: z.nullable(z.string()).optional(), + expiredUrl: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), + proxy: z.boolean().default(false), + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + image: z.nullable(z.string()).optional(), + rewrite: z.boolean().default(false), + ios: z.nullable(z.string()).optional(), + android: z.nullable(z.string()).optional(), + geo: z.nullable(z.lazy(() => EditLinkGeo$.outboundSchema)).optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.prefix === undefined ? null : { prefix: v.prefix }), + url: v.url, + archived: v.archived, + publicStats: v.publicStats, + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }), + ...(v.comments === undefined ? null : { comments: v.comments }), + ...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }), + ...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }), + ...(v.password === undefined ? null : { password: v.password }), + proxy: v.proxy, + ...(v.title === undefined ? null : { title: v.title }), + ...(v.description === undefined ? null : { description: v.description }), + ...(v.image === undefined ? null : { image: v.image }), + rewrite: v.rewrite, + ...(v.ios === undefined ? null : { ios: v.ios }), + ...(v.android === undefined ? null : { android: v.android }), + ...(v.geo === undefined ? null : { geo: v.geo }), + }; + }); +} + +/** @internal */ +export namespace EditLinkRequest$ { + export type Inbound = { + linkId: string; + RequestBody?: EditLinkRequestBody$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + linkId: z.string(), + RequestBody: z.lazy(() => EditLinkRequestBody$.inboundSchema).optional(), + }) + .transform((v) => { + return { + linkId: v.linkId, + ...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }), + }; + }); + + export type Outbound = { + linkId: string; + RequestBody?: EditLinkRequestBody$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + linkId: z.string(), + requestBody: z.lazy(() => EditLinkRequestBody$.outboundSchema).optional(), + }) + .transform((v) => { + return { + linkId: v.linkId, + ...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }), + }; + }); +} diff --git a/src/models/operations/getbrowseranalytics.ts b/src/models/operations/getbrowseranalytics.ts new file mode 100644 index 0000000..f9629bb --- /dev/null +++ b/src/models/operations/getbrowseranalytics.ts @@ -0,0 +1,494 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The interval to retrieve analytics for. + */ +export const GetBrowserAnalyticsQueryParamInterval = { + Oneh: "1h", + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + All: "all", +} as const; +/** + * The interval to retrieve analytics for. + */ +export type GetBrowserAnalyticsQueryParamInterval = + (typeof GetBrowserAnalyticsQueryParamInterval)[keyof typeof GetBrowserAnalyticsQueryParamInterval]; + +/** + * The country to retrieve analytics for. + */ +export const GetBrowserAnalyticsQueryParamCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The country to retrieve analytics for. + */ +export type GetBrowserAnalyticsQueryParamCountry = + (typeof GetBrowserAnalyticsQueryParamCountry)[keyof typeof GetBrowserAnalyticsQueryParamCountry]; + +export type GetBrowserAnalyticsRequest = { + /** + * The domain of the short link. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The interval to retrieve analytics for. + */ + interval?: GetBrowserAnalyticsQueryParamInterval | undefined; + /** + * The country to retrieve analytics for. + */ + country?: GetBrowserAnalyticsQueryParamCountry | undefined; + /** + * The city to retrieve analytics for. + */ + city?: string | undefined; + /** + * The device to retrieve analytics for. + */ + device?: string | undefined; + /** + * The browser to retrieve analytics for. + */ + browser?: string | undefined; + /** + * The OS to retrieve analytics for. + */ + os?: string | undefined; + /** + * The referer to retrieve analytics for. + */ + referer?: string | undefined; + /** + * The URL to retrieve analytics for. + */ + url?: string | undefined; + /** + * Whether to exclude the root link from the response. + */ + excludeRoot?: boolean | undefined; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; +}; + +export type GetBrowserAnalyticsResponseBody = { + /** + * The name of the browser + */ + browser: string; + /** + * The number of clicks from this browser + */ + clicks: number; +}; + +/** @internal */ +export const GetBrowserAnalyticsQueryParamInterval$ = z.nativeEnum( + GetBrowserAnalyticsQueryParamInterval +); + +/** @internal */ +export const GetBrowserAnalyticsQueryParamCountry$ = z.nativeEnum( + GetBrowserAnalyticsQueryParamCountry +); + +/** @internal */ +export namespace GetBrowserAnalyticsRequest$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetBrowserAnalyticsQueryParamInterval | undefined; + country?: GetBrowserAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetBrowserAnalyticsQueryParamInterval$.optional(), + country: GetBrowserAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetBrowserAnalyticsQueryParamInterval | undefined; + country?: GetBrowserAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetBrowserAnalyticsQueryParamInterval$.optional(), + country: GetBrowserAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); +} + +/** @internal */ +export namespace GetBrowserAnalyticsResponseBody$ { + export type Inbound = { + browser: string; + clicks: number; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + browser: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + browser: v.browser, + clicks: v.clicks, + }; + }); + + export type Outbound = { + browser: string; + clicks: number; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetBrowserAnalyticsResponseBody + > = z + .object({ + browser: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + browser: v.browser, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/operations/getcityanalytics.ts b/src/models/operations/getcityanalytics.ts new file mode 100644 index 0000000..1917af2 --- /dev/null +++ b/src/models/operations/getcityanalytics.ts @@ -0,0 +1,759 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The interval to retrieve analytics for. + */ +export const GetCityAnalyticsQueryParamInterval = { + Oneh: "1h", + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + All: "all", +} as const; +/** + * The interval to retrieve analytics for. + */ +export type GetCityAnalyticsQueryParamInterval = + (typeof GetCityAnalyticsQueryParamInterval)[keyof typeof GetCityAnalyticsQueryParamInterval]; + +/** + * The country to retrieve analytics for. + */ +export const GetCityAnalyticsQueryParamCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The country to retrieve analytics for. + */ +export type GetCityAnalyticsQueryParamCountry = + (typeof GetCityAnalyticsQueryParamCountry)[keyof typeof GetCityAnalyticsQueryParamCountry]; + +export type GetCityAnalyticsRequest = { + /** + * The domain of the short link. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The interval to retrieve analytics for. + */ + interval?: GetCityAnalyticsQueryParamInterval | undefined; + /** + * The country to retrieve analytics for. + */ + country?: GetCityAnalyticsQueryParamCountry | undefined; + /** + * The city to retrieve analytics for. + */ + city?: string | undefined; + /** + * The device to retrieve analytics for. + */ + device?: string | undefined; + /** + * The browser to retrieve analytics for. + */ + browser?: string | undefined; + /** + * The OS to retrieve analytics for. + */ + os?: string | undefined; + /** + * The referer to retrieve analytics for. + */ + referer?: string | undefined; + /** + * The URL to retrieve analytics for. + */ + url?: string | undefined; + /** + * Whether to exclude the root link from the response. + */ + excludeRoot?: boolean | undefined; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; +}; + +/** + * The 2-letter country code of the city: https://d.to/geo + */ +export const GetCityAnalyticsCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The 2-letter country code of the city: https://d.to/geo + */ +export type GetCityAnalyticsCountry = + (typeof GetCityAnalyticsCountry)[keyof typeof GetCityAnalyticsCountry]; + +export type GetCityAnalyticsResponseBody = { + /** + * The name of the city + */ + city: string; + /** + * The 2-letter country code of the city: https://d.to/geo + */ + country: GetCityAnalyticsCountry; + /** + * The number of clicks from this city + */ + clicks: number; +}; + +/** @internal */ +export const GetCityAnalyticsQueryParamInterval$ = z.nativeEnum(GetCityAnalyticsQueryParamInterval); + +/** @internal */ +export const GetCityAnalyticsQueryParamCountry$ = z.nativeEnum(GetCityAnalyticsQueryParamCountry); + +/** @internal */ +export namespace GetCityAnalyticsRequest$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetCityAnalyticsQueryParamInterval | undefined; + country?: GetCityAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetCityAnalyticsQueryParamInterval$.optional(), + country: GetCityAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetCityAnalyticsQueryParamInterval | undefined; + country?: GetCityAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetCityAnalyticsQueryParamInterval$.optional(), + country: GetCityAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); +} + +/** @internal */ +export const GetCityAnalyticsCountry$ = z.nativeEnum(GetCityAnalyticsCountry); + +/** @internal */ +export namespace GetCityAnalyticsResponseBody$ { + export type Inbound = { + city: string; + country: GetCityAnalyticsCountry; + clicks: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + city: z.string(), + country: GetCityAnalyticsCountry$, + clicks: z.number(), + }) + .transform((v) => { + return { + city: v.city, + country: v.country, + clicks: v.clicks, + }; + }); + + export type Outbound = { + city: string; + country: GetCityAnalyticsCountry; + clicks: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + city: z.string(), + country: GetCityAnalyticsCountry$, + clicks: z.number(), + }) + .transform((v) => { + return { + city: v.city, + country: v.country, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/operations/getclicksanalytics.ts b/src/models/operations/getclicksanalytics.ts new file mode 100644 index 0000000..98512a3 --- /dev/null +++ b/src/models/operations/getclicksanalytics.ts @@ -0,0 +1,435 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The interval to retrieve analytics for. + */ +export const Interval = { + Oneh: "1h", + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + All: "all", +} as const; +/** + * The interval to retrieve analytics for. + */ +export type Interval = (typeof Interval)[keyof typeof Interval]; + +/** + * The country to retrieve analytics for. + */ +export const Country = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The country to retrieve analytics for. + */ +export type Country = (typeof Country)[keyof typeof Country]; + +export type GetClicksAnalyticsRequest = { + /** + * The domain of the short link. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The interval to retrieve analytics for. + */ + interval?: Interval | undefined; + /** + * The country to retrieve analytics for. + */ + country?: Country | undefined; + /** + * The city to retrieve analytics for. + */ + city?: string | undefined; + /** + * The device to retrieve analytics for. + */ + device?: string | undefined; + /** + * The browser to retrieve analytics for. + */ + browser?: string | undefined; + /** + * The OS to retrieve analytics for. + */ + os?: string | undefined; + /** + * The referer to retrieve analytics for. + */ + referer?: string | undefined; + /** + * The URL to retrieve analytics for. + */ + url?: string | undefined; + /** + * Whether to exclude the root link from the response. + */ + excludeRoot?: boolean | undefined; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; +}; + +/** @internal */ +export const Interval$ = z.nativeEnum(Interval); + +/** @internal */ +export const Country$ = z.nativeEnum(Country); + +/** @internal */ +export namespace GetClicksAnalyticsRequest$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: Interval | undefined; + country?: Country | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: Interval$.optional(), + country: Country$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: Interval | undefined; + country?: Country | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: Interval$.optional(), + country: Country$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); +} diff --git a/src/models/operations/getcountryanalytics.ts b/src/models/operations/getcountryanalytics.ts new file mode 100644 index 0000000..37c96e3 --- /dev/null +++ b/src/models/operations/getcountryanalytics.ts @@ -0,0 +1,758 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The interval to retrieve analytics for. + */ +export const GetCountryAnalyticsQueryParamInterval = { + Oneh: "1h", + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + All: "all", +} as const; +/** + * The interval to retrieve analytics for. + */ +export type GetCountryAnalyticsQueryParamInterval = + (typeof GetCountryAnalyticsQueryParamInterval)[keyof typeof GetCountryAnalyticsQueryParamInterval]; + +/** + * The country to retrieve analytics for. + */ +export const GetCountryAnalyticsQueryParamCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The country to retrieve analytics for. + */ +export type GetCountryAnalyticsQueryParamCountry = + (typeof GetCountryAnalyticsQueryParamCountry)[keyof typeof GetCountryAnalyticsQueryParamCountry]; + +export type GetCountryAnalyticsRequest = { + /** + * The domain of the short link. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The interval to retrieve analytics for. + */ + interval?: GetCountryAnalyticsQueryParamInterval | undefined; + /** + * The country to retrieve analytics for. + */ + country?: GetCountryAnalyticsQueryParamCountry | undefined; + /** + * The city to retrieve analytics for. + */ + city?: string | undefined; + /** + * The device to retrieve analytics for. + */ + device?: string | undefined; + /** + * The browser to retrieve analytics for. + */ + browser?: string | undefined; + /** + * The OS to retrieve analytics for. + */ + os?: string | undefined; + /** + * The referer to retrieve analytics for. + */ + referer?: string | undefined; + /** + * The URL to retrieve analytics for. + */ + url?: string | undefined; + /** + * Whether to exclude the root link from the response. + */ + excludeRoot?: boolean | undefined; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; +}; + +/** + * The 2-letter country code: https://d.to/geo + */ +export const GetCountryAnalyticsCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The 2-letter country code: https://d.to/geo + */ +export type GetCountryAnalyticsCountry = + (typeof GetCountryAnalyticsCountry)[keyof typeof GetCountryAnalyticsCountry]; + +export type GetCountryAnalyticsResponseBody = { + /** + * The 2-letter country code: https://d.to/geo + */ + country: GetCountryAnalyticsCountry; + /** + * The number of clicks from this country + */ + clicks: number; +}; + +/** @internal */ +export const GetCountryAnalyticsQueryParamInterval$ = z.nativeEnum( + GetCountryAnalyticsQueryParamInterval +); + +/** @internal */ +export const GetCountryAnalyticsQueryParamCountry$ = z.nativeEnum( + GetCountryAnalyticsQueryParamCountry +); + +/** @internal */ +export namespace GetCountryAnalyticsRequest$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetCountryAnalyticsQueryParamInterval | undefined; + country?: GetCountryAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetCountryAnalyticsQueryParamInterval$.optional(), + country: GetCountryAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetCountryAnalyticsQueryParamInterval | undefined; + country?: GetCountryAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetCountryAnalyticsQueryParamInterval$.optional(), + country: GetCountryAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); +} + +/** @internal */ +export const GetCountryAnalyticsCountry$ = z.nativeEnum(GetCountryAnalyticsCountry); + +/** @internal */ +export namespace GetCountryAnalyticsResponseBody$ { + export type Inbound = { + country: GetCountryAnalyticsCountry; + clicks: number; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + country: GetCountryAnalyticsCountry$, + clicks: z.number(), + }) + .transform((v) => { + return { + country: v.country, + clicks: v.clicks, + }; + }); + + export type Outbound = { + country: GetCountryAnalyticsCountry; + clicks: number; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetCountryAnalyticsResponseBody + > = z + .object({ + country: GetCountryAnalyticsCountry$, + clicks: z.number(), + }) + .transform((v) => { + return { + country: v.country, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/operations/getdeviceanalytics.ts b/src/models/operations/getdeviceanalytics.ts new file mode 100644 index 0000000..5e9fe13 --- /dev/null +++ b/src/models/operations/getdeviceanalytics.ts @@ -0,0 +1,490 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The interval to retrieve analytics for. + */ +export const GetDeviceAnalyticsQueryParamInterval = { + Oneh: "1h", + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + All: "all", +} as const; +/** + * The interval to retrieve analytics for. + */ +export type GetDeviceAnalyticsQueryParamInterval = + (typeof GetDeviceAnalyticsQueryParamInterval)[keyof typeof GetDeviceAnalyticsQueryParamInterval]; + +/** + * The country to retrieve analytics for. + */ +export const GetDeviceAnalyticsQueryParamCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The country to retrieve analytics for. + */ +export type GetDeviceAnalyticsQueryParamCountry = + (typeof GetDeviceAnalyticsQueryParamCountry)[keyof typeof GetDeviceAnalyticsQueryParamCountry]; + +export type GetDeviceAnalyticsRequest = { + /** + * The domain of the short link. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The interval to retrieve analytics for. + */ + interval?: GetDeviceAnalyticsQueryParamInterval | undefined; + /** + * The country to retrieve analytics for. + */ + country?: GetDeviceAnalyticsQueryParamCountry | undefined; + /** + * The city to retrieve analytics for. + */ + city?: string | undefined; + /** + * The device to retrieve analytics for. + */ + device?: string | undefined; + /** + * The browser to retrieve analytics for. + */ + browser?: string | undefined; + /** + * The OS to retrieve analytics for. + */ + os?: string | undefined; + /** + * The referer to retrieve analytics for. + */ + referer?: string | undefined; + /** + * The URL to retrieve analytics for. + */ + url?: string | undefined; + /** + * Whether to exclude the root link from the response. + */ + excludeRoot?: boolean | undefined; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; +}; + +export type GetDeviceAnalyticsResponseBody = { + /** + * The name of the device + */ + device: string; + /** + * The number of clicks from this device + */ + clicks: number; +}; + +/** @internal */ +export const GetDeviceAnalyticsQueryParamInterval$ = z.nativeEnum( + GetDeviceAnalyticsQueryParamInterval +); + +/** @internal */ +export const GetDeviceAnalyticsQueryParamCountry$ = z.nativeEnum( + GetDeviceAnalyticsQueryParamCountry +); + +/** @internal */ +export namespace GetDeviceAnalyticsRequest$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetDeviceAnalyticsQueryParamInterval | undefined; + country?: GetDeviceAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetDeviceAnalyticsQueryParamInterval$.optional(), + country: GetDeviceAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetDeviceAnalyticsQueryParamInterval | undefined; + country?: GetDeviceAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetDeviceAnalyticsQueryParamInterval$.optional(), + country: GetDeviceAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); +} + +/** @internal */ +export namespace GetDeviceAnalyticsResponseBody$ { + export type Inbound = { + device: string; + clicks: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + device: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + device: v.device, + clicks: v.clicks, + }; + }); + + export type Outbound = { + device: string; + clicks: number; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + device: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + device: v.device, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/operations/getlinkinfo.ts b/src/models/operations/getlinkinfo.ts new file mode 100644 index 0000000..f924394 --- /dev/null +++ b/src/models/operations/getlinkinfo.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetLinkInfoRequest = { + domain: string; + /** + * The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`. + */ + key: string; +}; + +/** @internal */ +export namespace GetLinkInfoRequest$ { + export type Inbound = { + domain: string; + key: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string(), + key: z.string(), + }) + .transform((v) => { + return { + domain: v.domain, + key: v.key, + }; + }); + + export type Outbound = { + domain: string; + key: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string(), + key: z.string(), + }) + .transform((v) => { + return { + domain: v.domain, + key: v.key, + }; + }); +} diff --git a/src/models/operations/getlinks.ts b/src/models/operations/getlinks.ts new file mode 100644 index 0000000..0128384 --- /dev/null +++ b/src/models/operations/getlinks.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The tag IDs to filter the links by. + */ +export type QueryParamTagIds = string | Array; + +/** + * The field to sort the links by. The default is `createdAt`, and sort order is always descending. + */ +export const Sort = { + CreatedAt: "createdAt", + Clicks: "clicks", + LastClicked: "lastClicked", +} as const; +/** + * The field to sort the links by. The default is `createdAt`, and sort order is always descending. + */ +export type Sort = (typeof Sort)[keyof typeof Sort]; + +export type GetLinksRequest = { + /** + * The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. + */ + domain?: string | undefined; + /** + * The tag ID to filter the links by. This field is deprecated – use `tagIds` instead. + */ + tagId?: string | undefined; + /** + * The tag IDs to filter the links by. + */ + tagIds?: string | Array | undefined; + /** + * The search term to filter the links by. The search term will be matched against the short link slug and the destination url. + */ + search?: string | undefined; + /** + * The user ID to filter the links by. + */ + userId?: string | undefined; + /** + * Whether to include archived links in the response. Defaults to `false` if not provided. + */ + showArchived?: boolean | undefined; + /** + * Whether to include tags in the response. Defaults to `false` if not provided. + */ + withTags?: boolean | undefined; + /** + * The field to sort the links by. The default is `createdAt`, and sort order is always descending. + */ + sort?: Sort | undefined; + /** + * The page number for pagination (each page contains 100 links). + */ + page?: number | undefined; +}; + +/** @internal */ +export namespace QueryParamTagIds$ { + export type Inbound = string | Array; + + export type Outbound = string | Array; + export const inboundSchema: z.ZodType = z.union([ + z.string(), + z.array(z.string()), + ]); + export const outboundSchema: z.ZodType = z.union([ + z.string(), + z.array(z.string()), + ]); +} + +/** @internal */ +export const Sort$ = z.nativeEnum(Sort); + +/** @internal */ +export namespace GetLinksRequest$ { + export type Inbound = { + domain?: string | undefined; + tagId?: string | undefined; + tagIds?: string | Array | undefined; + search?: string | undefined; + userId?: string | undefined; + showArchived?: boolean | undefined; + withTags?: boolean | undefined; + sort?: Sort | undefined; + page?: number | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + tagId: z.string().optional(), + tagIds: z.union([z.string(), z.array(z.string())]).optional(), + search: z.string().optional(), + userId: z.string().optional(), + showArchived: z.boolean().default(false), + withTags: z.boolean().default(false), + sort: Sort$.default("createdAt"), + page: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }), + ...(v.search === undefined ? null : { search: v.search }), + ...(v.userId === undefined ? null : { userId: v.userId }), + showArchived: v.showArchived, + withTags: v.withTags, + sort: v.sort, + ...(v.page === undefined ? null : { page: v.page }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + tagId?: string | undefined; + tagIds?: string | Array | undefined; + search?: string | undefined; + userId?: string | undefined; + showArchived: boolean; + withTags: boolean; + sort: Sort; + page?: number | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + tagId: z.string().optional(), + tagIds: z.union([z.string(), z.array(z.string())]).optional(), + search: z.string().optional(), + userId: z.string().optional(), + showArchived: z.boolean().default(false), + withTags: z.boolean().default(false), + sort: Sort$.default("createdAt"), + page: z.number().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }), + ...(v.search === undefined ? null : { search: v.search }), + ...(v.userId === undefined ? null : { userId: v.userId }), + showArchived: v.showArchived, + withTags: v.withTags, + sort: v.sort, + ...(v.page === undefined ? null : { page: v.page }), + }; + }); +} diff --git a/src/models/operations/getlinkscount.ts b/src/models/operations/getlinkscount.ts new file mode 100644 index 0000000..26ac70b --- /dev/null +++ b/src/models/operations/getlinkscount.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The tag IDs to filter the links by. + */ +export type GetLinksCountQueryParamTagIds = string | Array; + +export const Two = { + TagId: "tagId", +} as const; +export type Two = (typeof Two)[keyof typeof Two]; + +export const One = { + Domain: "domain", +} as const; +export type One = (typeof One)[keyof typeof One]; + +/** + * The field to group the links by. + */ +export type GroupBy = One | Two; + +export type GetLinksCountRequest = { + /** + * The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. + */ + domain?: string | undefined; + /** + * The tag ID to filter the links by. This field is deprecated – use `tagIds` instead. + */ + tagId?: string | undefined; + /** + * The tag IDs to filter the links by. + */ + tagIds?: string | Array | undefined; + /** + * The search term to filter the links by. The search term will be matched against the short link slug and the destination url. + */ + search?: string | undefined; + /** + * The user ID to filter the links by. + */ + userId?: string | undefined; + /** + * Whether to include archived links in the response. Defaults to `false` if not provided. + */ + showArchived?: boolean | undefined; + /** + * Whether to include tags in the response. Defaults to `false` if not provided. + */ + withTags?: boolean | undefined; + /** + * The field to group the links by. + */ + groupBy?: One | Two | undefined; +}; + +/** @internal */ +export namespace GetLinksCountQueryParamTagIds$ { + export type Inbound = string | Array; + + export type Outbound = string | Array; + export const inboundSchema: z.ZodType = + z.union([z.string(), z.array(z.string())]); + export const outboundSchema: z.ZodType = + z.union([z.string(), z.array(z.string())]); +} + +/** @internal */ +export const Two$ = z.nativeEnum(Two); + +/** @internal */ +export const One$ = z.nativeEnum(One); + +/** @internal */ +export namespace GroupBy$ { + export type Inbound = One | Two; + + export type Outbound = One | Two; + export const inboundSchema: z.ZodType = z.union([One$, Two$]); + export const outboundSchema: z.ZodType = z.union([One$, Two$]); +} + +/** @internal */ +export namespace GetLinksCountRequest$ { + export type Inbound = { + domain?: string | undefined; + tagId?: string | undefined; + tagIds?: string | Array | undefined; + search?: string | undefined; + userId?: string | undefined; + showArchived?: boolean | undefined; + withTags?: boolean | undefined; + groupBy?: One | Two | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + tagId: z.string().optional(), + tagIds: z.union([z.string(), z.array(z.string())]).optional(), + search: z.string().optional(), + userId: z.string().optional(), + showArchived: z.boolean().default(false), + withTags: z.boolean().default(false), + groupBy: z.union([One$, Two$]).optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }), + ...(v.search === undefined ? null : { search: v.search }), + ...(v.userId === undefined ? null : { userId: v.userId }), + showArchived: v.showArchived, + withTags: v.withTags, + ...(v.groupBy === undefined ? null : { groupBy: v.groupBy }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + tagId?: string | undefined; + tagIds?: string | Array | undefined; + search?: string | undefined; + userId?: string | undefined; + showArchived: boolean; + withTags: boolean; + groupBy?: One | Two | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + tagId: z.string().optional(), + tagIds: z.union([z.string(), z.array(z.string())]).optional(), + search: z.string().optional(), + userId: z.string().optional(), + showArchived: z.boolean().default(false), + withTags: z.boolean().default(false), + groupBy: z.union([One$, Two$]).optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.tagIds === undefined ? null : { tagIds: v.tagIds }), + ...(v.search === undefined ? null : { search: v.search }), + ...(v.userId === undefined ? null : { userId: v.userId }), + showArchived: v.showArchived, + withTags: v.withTags, + ...(v.groupBy === undefined ? null : { groupBy: v.groupBy }), + }; + }); +} diff --git a/src/models/operations/getmetatags.ts b/src/models/operations/getmetatags.ts new file mode 100644 index 0000000..bbc0c6f --- /dev/null +++ b/src/models/operations/getmetatags.ts @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetMetatagsRequest = { + url: string; +}; + +/** + * The retrieved metatags + */ +export type GetMetatagsResponseBody = { + /** + * The meta title tag for the URL + */ + title?: string | undefined; + /** + * The meta description tag for the URL + */ + description?: string | undefined; + /** + * The OpenGraph image for the URL + */ + image?: string | undefined; +}; + +/** @internal */ +export namespace GetMetatagsRequest$ { + export type Inbound = { + url: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + url: z.string(), + }) + .transform((v) => { + return { + url: v.url, + }; + }); + + export type Outbound = { + url: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + url: z.string(), + }) + .transform((v) => { + return { + url: v.url, + }; + }); +} + +/** @internal */ +export namespace GetMetatagsResponseBody$ { + export type Inbound = { + title?: string | undefined; + description?: string | undefined; + image?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + title: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.title === undefined ? null : { title: v.title }), + ...(v.description === undefined ? null : { description: v.description }), + ...(v.image === undefined ? null : { image: v.image }), + }; + }); + + export type Outbound = { + title?: string | undefined; + description?: string | undefined; + image?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + title: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.title === undefined ? null : { title: v.title }), + ...(v.description === undefined ? null : { description: v.description }), + ...(v.image === undefined ? null : { image: v.image }), + }; + }); +} diff --git a/src/models/operations/getosanalytics.ts b/src/models/operations/getosanalytics.ts new file mode 100644 index 0000000..cb9780c --- /dev/null +++ b/src/models/operations/getosanalytics.ts @@ -0,0 +1,485 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The interval to retrieve analytics for. + */ +export const GetOSAnalyticsQueryParamInterval = { + Oneh: "1h", + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + All: "all", +} as const; +/** + * The interval to retrieve analytics for. + */ +export type GetOSAnalyticsQueryParamInterval = + (typeof GetOSAnalyticsQueryParamInterval)[keyof typeof GetOSAnalyticsQueryParamInterval]; + +/** + * The country to retrieve analytics for. + */ +export const GetOSAnalyticsQueryParamCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The country to retrieve analytics for. + */ +export type GetOSAnalyticsQueryParamCountry = + (typeof GetOSAnalyticsQueryParamCountry)[keyof typeof GetOSAnalyticsQueryParamCountry]; + +export type GetOSAnalyticsRequest = { + /** + * The domain of the short link. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The interval to retrieve analytics for. + */ + interval?: GetOSAnalyticsQueryParamInterval | undefined; + /** + * The country to retrieve analytics for. + */ + country?: GetOSAnalyticsQueryParamCountry | undefined; + /** + * The city to retrieve analytics for. + */ + city?: string | undefined; + /** + * The device to retrieve analytics for. + */ + device?: string | undefined; + /** + * The browser to retrieve analytics for. + */ + browser?: string | undefined; + /** + * The OS to retrieve analytics for. + */ + os?: string | undefined; + /** + * The referer to retrieve analytics for. + */ + referer?: string | undefined; + /** + * The URL to retrieve analytics for. + */ + url?: string | undefined; + /** + * Whether to exclude the root link from the response. + */ + excludeRoot?: boolean | undefined; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; +}; + +export type GetOSAnalyticsResponseBody = { + /** + * The name of the OS + */ + os: string; + /** + * The number of clicks from this OS + */ + clicks: number; +}; + +/** @internal */ +export const GetOSAnalyticsQueryParamInterval$ = z.nativeEnum(GetOSAnalyticsQueryParamInterval); + +/** @internal */ +export const GetOSAnalyticsQueryParamCountry$ = z.nativeEnum(GetOSAnalyticsQueryParamCountry); + +/** @internal */ +export namespace GetOSAnalyticsRequest$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetOSAnalyticsQueryParamInterval | undefined; + country?: GetOSAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetOSAnalyticsQueryParamInterval$.optional(), + country: GetOSAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetOSAnalyticsQueryParamInterval | undefined; + country?: GetOSAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetOSAnalyticsQueryParamInterval$.optional(), + country: GetOSAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); +} + +/** @internal */ +export namespace GetOSAnalyticsResponseBody$ { + export type Inbound = { + os: string; + clicks: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + os: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + os: v.os, + clicks: v.clicks, + }; + }); + + export type Outbound = { + os: string; + clicks: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + os: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + os: v.os, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/operations/getqrcode.ts b/src/models/operations/getqrcode.ts new file mode 100644 index 0000000..0741e1a --- /dev/null +++ b/src/models/operations/getqrcode.ts @@ -0,0 +1,110 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The level of error correction to use for the QR code. Defaults to `L` if not provided. + */ +export const Level = { + L: "L", + M: "M", + Q: "Q", + H: "H", +} as const; +/** + * The level of error correction to use for the QR code. Defaults to `L` if not provided. + */ +export type Level = (typeof Level)[keyof typeof Level]; + +export type GetQRCodeRequest = { + /** + * The URL to generate a QR code for. Defaults to `https://dub.co` if not provided. + */ + url?: string | undefined; + /** + * The size of the QR code in pixels. Defaults to `600` if not provided. + */ + size?: number | undefined; + /** + * The level of error correction to use for the QR code. Defaults to `L` if not provided. + */ + level?: Level | undefined; + /** + * The foreground color of the QR code in hex format. Defaults to `#000000` if not provided. + */ + fgColor?: string | undefined; + /** + * The background color of the QR code in hex format. Defaults to `#ffffff` if not provided. + */ + bgColor?: string | undefined; + /** + * Whether to include a margin around the QR code. Defaults to `false` if not provided. + */ + includeMargin?: boolean | undefined; +}; + +/** @internal */ +export const Level$ = z.nativeEnum(Level); + +/** @internal */ +export namespace GetQRCodeRequest$ { + export type Inbound = { + url?: string | undefined; + size?: number | undefined; + level?: Level | undefined; + fgColor?: string | undefined; + bgColor?: string | undefined; + includeMargin?: boolean | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + url: z.string().default("https://dub.co"), + size: z.number().default(600), + level: Level$.default("L"), + fgColor: z.string().default("#000000"), + bgColor: z.string().default("#FFFFFF"), + includeMargin: z.boolean().default(false), + }) + .transform((v) => { + return { + url: v.url, + size: v.size, + level: v.level, + fgColor: v.fgColor, + bgColor: v.bgColor, + includeMargin: v.includeMargin, + }; + }); + + export type Outbound = { + url: string; + size: number; + level: Level; + fgColor: string; + bgColor: string; + includeMargin: boolean; + }; + + export const outboundSchema: z.ZodType = z + .object({ + url: z.string().default("https://dub.co"), + size: z.number().default(600), + level: Level$.default("L"), + fgColor: z.string().default("#000000"), + bgColor: z.string().default("#FFFFFF"), + includeMargin: z.boolean().default(false), + }) + .transform((v) => { + return { + url: v.url, + size: v.size, + level: v.level, + fgColor: v.fgColor, + bgColor: v.bgColor, + includeMargin: v.includeMargin, + }; + }); +} diff --git a/src/models/operations/getrefereranalytics.ts b/src/models/operations/getrefereranalytics.ts new file mode 100644 index 0000000..deedee6 --- /dev/null +++ b/src/models/operations/getrefereranalytics.ts @@ -0,0 +1,494 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The interval to retrieve analytics for. + */ +export const GetRefererAnalyticsQueryParamInterval = { + Oneh: "1h", + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + All: "all", +} as const; +/** + * The interval to retrieve analytics for. + */ +export type GetRefererAnalyticsQueryParamInterval = + (typeof GetRefererAnalyticsQueryParamInterval)[keyof typeof GetRefererAnalyticsQueryParamInterval]; + +/** + * The country to retrieve analytics for. + */ +export const GetRefererAnalyticsQueryParamCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The country to retrieve analytics for. + */ +export type GetRefererAnalyticsQueryParamCountry = + (typeof GetRefererAnalyticsQueryParamCountry)[keyof typeof GetRefererAnalyticsQueryParamCountry]; + +export type GetRefererAnalyticsRequest = { + /** + * The domain of the short link. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The interval to retrieve analytics for. + */ + interval?: GetRefererAnalyticsQueryParamInterval | undefined; + /** + * The country to retrieve analytics for. + */ + country?: GetRefererAnalyticsQueryParamCountry | undefined; + /** + * The city to retrieve analytics for. + */ + city?: string | undefined; + /** + * The device to retrieve analytics for. + */ + device?: string | undefined; + /** + * The browser to retrieve analytics for. + */ + browser?: string | undefined; + /** + * The OS to retrieve analytics for. + */ + os?: string | undefined; + /** + * The referer to retrieve analytics for. + */ + referer?: string | undefined; + /** + * The URL to retrieve analytics for. + */ + url?: string | undefined; + /** + * Whether to exclude the root link from the response. + */ + excludeRoot?: boolean | undefined; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; +}; + +export type GetRefererAnalyticsResponseBody = { + /** + * The name of the referer. If unknown, this will be `(direct)` + */ + referer: string; + /** + * The number of clicks from this referer + */ + clicks: number; +}; + +/** @internal */ +export const GetRefererAnalyticsQueryParamInterval$ = z.nativeEnum( + GetRefererAnalyticsQueryParamInterval +); + +/** @internal */ +export const GetRefererAnalyticsQueryParamCountry$ = z.nativeEnum( + GetRefererAnalyticsQueryParamCountry +); + +/** @internal */ +export namespace GetRefererAnalyticsRequest$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetRefererAnalyticsQueryParamInterval | undefined; + country?: GetRefererAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetRefererAnalyticsQueryParamInterval$.optional(), + country: GetRefererAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetRefererAnalyticsQueryParamInterval | undefined; + country?: GetRefererAnalyticsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetRefererAnalyticsQueryParamInterval$.optional(), + country: GetRefererAnalyticsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); +} + +/** @internal */ +export namespace GetRefererAnalyticsResponseBody$ { + export type Inbound = { + referer: string; + clicks: number; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + referer: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + referer: v.referer, + clicks: v.clicks, + }; + }); + + export type Outbound = { + referer: string; + clicks: number; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + GetRefererAnalyticsResponseBody + > = z + .object({ + referer: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + referer: v.referer, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/operations/gettags.ts b/src/models/operations/gettags.ts new file mode 100644 index 0000000..8437ccb --- /dev/null +++ b/src/models/operations/gettags.ts @@ -0,0 +1,18 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetTagsRequest = {}; + +/** @internal */ +export namespace GetTagsRequest$ { + export type Inbound = {}; + + export const inboundSchema: z.ZodType = z.object({}); + + export type Outbound = {}; + + export const outboundSchema: z.ZodType = z.object({}); +} diff --git a/src/models/operations/gettimeseriesanalytics.ts b/src/models/operations/gettimeseriesanalytics.ts new file mode 100644 index 0000000..a7d3c87 --- /dev/null +++ b/src/models/operations/gettimeseriesanalytics.ts @@ -0,0 +1,484 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The interval to retrieve analytics for. + */ +export const QueryParamInterval = { + Oneh: "1h", + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + All: "all", +} as const; +/** + * The interval to retrieve analytics for. + */ +export type QueryParamInterval = (typeof QueryParamInterval)[keyof typeof QueryParamInterval]; + +/** + * The country to retrieve analytics for. + */ +export const QueryParamCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The country to retrieve analytics for. + */ +export type QueryParamCountry = (typeof QueryParamCountry)[keyof typeof QueryParamCountry]; + +export type GetTimeseriesAnalyticsRequest = { + /** + * The domain of the short link. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The interval to retrieve analytics for. + */ + interval?: QueryParamInterval | undefined; + /** + * The country to retrieve analytics for. + */ + country?: QueryParamCountry | undefined; + /** + * The city to retrieve analytics for. + */ + city?: string | undefined; + /** + * The device to retrieve analytics for. + */ + device?: string | undefined; + /** + * The browser to retrieve analytics for. + */ + browser?: string | undefined; + /** + * The OS to retrieve analytics for. + */ + os?: string | undefined; + /** + * The referer to retrieve analytics for. + */ + referer?: string | undefined; + /** + * The URL to retrieve analytics for. + */ + url?: string | undefined; + /** + * Whether to exclude the root link from the response. + */ + excludeRoot?: boolean | undefined; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; +}; + +export type ResponseBody = { + /** + * The starting timestamp of the interval + */ + start: string; + /** + * The number of clicks in the interval + */ + clicks: number; +}; + +/** @internal */ +export const QueryParamInterval$ = z.nativeEnum(QueryParamInterval); + +/** @internal */ +export const QueryParamCountry$ = z.nativeEnum(QueryParamCountry); + +/** @internal */ +export namespace GetTimeseriesAnalyticsRequest$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: QueryParamInterval | undefined; + country?: QueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: QueryParamInterval$.optional(), + country: QueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: QueryParamInterval | undefined; + country?: QueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: QueryParamInterval$.optional(), + country: QueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); +} + +/** @internal */ +export namespace ResponseBody$ { + export type Inbound = { + start: string; + clicks: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + start: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + start: v.start, + clicks: v.clicks, + }; + }); + + export type Outbound = { + start: string; + clicks: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + start: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + start: v.start, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/operations/gettoplinks.ts b/src/models/operations/gettoplinks.ts new file mode 100644 index 0000000..e2e7d3d --- /dev/null +++ b/src/models/operations/gettoplinks.ts @@ -0,0 +1,485 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The interval to retrieve analytics for. + */ +export const GetTopLinksQueryParamInterval = { + Oneh: "1h", + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + All: "all", +} as const; +/** + * The interval to retrieve analytics for. + */ +export type GetTopLinksQueryParamInterval = + (typeof GetTopLinksQueryParamInterval)[keyof typeof GetTopLinksQueryParamInterval]; + +/** + * The country to retrieve analytics for. + */ +export const GetTopLinksQueryParamCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The country to retrieve analytics for. + */ +export type GetTopLinksQueryParamCountry = + (typeof GetTopLinksQueryParamCountry)[keyof typeof GetTopLinksQueryParamCountry]; + +export type GetTopLinksRequest = { + /** + * The domain of the short link. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The interval to retrieve analytics for. + */ + interval?: GetTopLinksQueryParamInterval | undefined; + /** + * The country to retrieve analytics for. + */ + country?: GetTopLinksQueryParamCountry | undefined; + /** + * The city to retrieve analytics for. + */ + city?: string | undefined; + /** + * The device to retrieve analytics for. + */ + device?: string | undefined; + /** + * The browser to retrieve analytics for. + */ + browser?: string | undefined; + /** + * The OS to retrieve analytics for. + */ + os?: string | undefined; + /** + * The referer to retrieve analytics for. + */ + referer?: string | undefined; + /** + * The URL to retrieve analytics for. + */ + url?: string | undefined; + /** + * Whether to exclude the root link from the response. + */ + excludeRoot?: boolean | undefined; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; +}; + +export type GetTopLinksResponseBody = { + /** + * The unique ID of the short link + */ + link: string; + /** + * The number of clicks from this link + */ + clicks: number; +}; + +/** @internal */ +export const GetTopLinksQueryParamInterval$ = z.nativeEnum(GetTopLinksQueryParamInterval); + +/** @internal */ +export const GetTopLinksQueryParamCountry$ = z.nativeEnum(GetTopLinksQueryParamCountry); + +/** @internal */ +export namespace GetTopLinksRequest$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetTopLinksQueryParamInterval | undefined; + country?: GetTopLinksQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetTopLinksQueryParamInterval$.optional(), + country: GetTopLinksQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetTopLinksQueryParamInterval | undefined; + country?: GetTopLinksQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetTopLinksQueryParamInterval$.optional(), + country: GetTopLinksQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); +} + +/** @internal */ +export namespace GetTopLinksResponseBody$ { + export type Inbound = { + link: string; + clicks: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + link: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + link: v.link, + clicks: v.clicks, + }; + }); + + export type Outbound = { + link: string; + clicks: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + link: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + link: v.link, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/operations/gettopurls.ts b/src/models/operations/gettopurls.ts new file mode 100644 index 0000000..f56e617 --- /dev/null +++ b/src/models/operations/gettopurls.ts @@ -0,0 +1,485 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The interval to retrieve analytics for. + */ +export const GetTopURLsQueryParamInterval = { + Oneh: "1h", + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + All: "all", +} as const; +/** + * The interval to retrieve analytics for. + */ +export type GetTopURLsQueryParamInterval = + (typeof GetTopURLsQueryParamInterval)[keyof typeof GetTopURLsQueryParamInterval]; + +/** + * The country to retrieve analytics for. + */ +export const GetTopURLsQueryParamCountry = { + Af: "AF", + Al: "AL", + Dz: "DZ", + As: "AS", + Ad: "AD", + Ao: "AO", + Ai: "AI", + Aq: "AQ", + Ag: "AG", + Ar: "AR", + Am: "AM", + Aw: "AW", + Au: "AU", + At: "AT", + Az: "AZ", + Bs: "BS", + Bh: "BH", + Bd: "BD", + Bb: "BB", + By: "BY", + Be: "BE", + Bz: "BZ", + Bj: "BJ", + Bm: "BM", + Bt: "BT", + Bo: "BO", + Ba: "BA", + Bw: "BW", + Bv: "BV", + Br: "BR", + Io: "IO", + Bn: "BN", + Bg: "BG", + Bf: "BF", + Bi: "BI", + Kh: "KH", + Cm: "CM", + Ca: "CA", + Cv: "CV", + Ky: "KY", + Cf: "CF", + Td: "TD", + Cl: "CL", + Cn: "CN", + Cx: "CX", + Cc: "CC", + Co: "CO", + Km: "KM", + Cg: "CG", + Cd: "CD", + Ck: "CK", + Cr: "CR", + Ci: "CI", + Hr: "HR", + Cu: "CU", + Cy: "CY", + Cz: "CZ", + Dk: "DK", + Dj: "DJ", + Dm: "DM", + Do: "DO", + Ec: "EC", + Eg: "EG", + Sv: "SV", + Gq: "GQ", + Er: "ER", + Ee: "EE", + Et: "ET", + Fk: "FK", + Fo: "FO", + Fj: "FJ", + Fi: "FI", + Fr: "FR", + Gf: "GF", + Pf: "PF", + Tf: "TF", + Ga: "GA", + Gm: "GM", + Ge: "GE", + De: "DE", + Gh: "GH", + Gi: "GI", + Gr: "GR", + Gl: "GL", + Gd: "GD", + Gp: "GP", + Gu: "GU", + Gt: "GT", + Gn: "GN", + Gw: "GW", + Gy: "GY", + Ht: "HT", + Hm: "HM", + Va: "VA", + Hn: "HN", + Hk: "HK", + Hu: "HU", + Is: "IS", + In: "IN", + Id: "ID", + Ir: "IR", + Iq: "IQ", + Ie: "IE", + Il: "IL", + It: "IT", + Jm: "JM", + Jp: "JP", + Jo: "JO", + Kz: "KZ", + Ke: "KE", + Ki: "KI", + Kp: "KP", + Kr: "KR", + Kw: "KW", + Kg: "KG", + La: "LA", + Lv: "LV", + Lb: "LB", + Ls: "LS", + Lr: "LR", + Ly: "LY", + Li: "LI", + Lt: "LT", + Lu: "LU", + Mo: "MO", + Mg: "MG", + Mw: "MW", + My: "MY", + Mv: "MV", + Ml: "ML", + Mt: "MT", + Mh: "MH", + Mq: "MQ", + Mr: "MR", + Mu: "MU", + Yt: "YT", + Mx: "MX", + Fm: "FM", + Md: "MD", + Mc: "MC", + Mn: "MN", + Ms: "MS", + Ma: "MA", + Mz: "MZ", + Mm: "MM", + Na: "NA", + Nr: "NR", + Np: "NP", + Nl: "NL", + Nc: "NC", + Nz: "NZ", + Ni: "NI", + Ne: "NE", + Ng: "NG", + Nu: "NU", + Nf: "NF", + Mk: "MK", + Mp: "MP", + No: "NO", + Om: "OM", + Pk: "PK", + Pw: "PW", + Ps: "PS", + Pa: "PA", + Pg: "PG", + Py: "PY", + Pe: "PE", + Ph: "PH", + Pn: "PN", + Pl: "PL", + Pt: "PT", + Pr: "PR", + Qa: "QA", + Re: "RE", + Ro: "RO", + Ru: "RU", + Rw: "RW", + Sh: "SH", + Kn: "KN", + Lc: "LC", + Pm: "PM", + Vc: "VC", + Ws: "WS", + Sm: "SM", + St: "ST", + Sa: "SA", + Sn: "SN", + Sc: "SC", + Sl: "SL", + Sg: "SG", + Sk: "SK", + Si: "SI", + Sb: "SB", + So: "SO", + Za: "ZA", + Gs: "GS", + Es: "ES", + Lk: "LK", + Sd: "SD", + Sr: "SR", + Sj: "SJ", + Sz: "SZ", + Se: "SE", + Ch: "CH", + Sy: "SY", + Tw: "TW", + Tj: "TJ", + Tz: "TZ", + Th: "TH", + Tl: "TL", + Tg: "TG", + Tk: "TK", + To: "TO", + Tt: "TT", + Tn: "TN", + Tr: "TR", + Tm: "TM", + Tc: "TC", + Tv: "TV", + Ug: "UG", + Ua: "UA", + Ae: "AE", + Gb: "GB", + Us: "US", + Um: "UM", + Uy: "UY", + Uz: "UZ", + Vu: "VU", + Ve: "VE", + Vn: "VN", + Vg: "VG", + Vi: "VI", + Wf: "WF", + Eh: "EH", + Ye: "YE", + Zm: "ZM", + Zw: "ZW", + Ax: "AX", + Bq: "BQ", + Cw: "CW", + Gg: "GG", + Im: "IM", + Je: "JE", + Me: "ME", + Bl: "BL", + Mf: "MF", + Rs: "RS", + Sx: "SX", + Ss: "SS", + Xk: "XK", +} as const; +/** + * The country to retrieve analytics for. + */ +export type GetTopURLsQueryParamCountry = + (typeof GetTopURLsQueryParamCountry)[keyof typeof GetTopURLsQueryParamCountry]; + +export type GetTopURLsRequest = { + /** + * The domain of the short link. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The interval to retrieve analytics for. + */ + interval?: GetTopURLsQueryParamInterval | undefined; + /** + * The country to retrieve analytics for. + */ + country?: GetTopURLsQueryParamCountry | undefined; + /** + * The city to retrieve analytics for. + */ + city?: string | undefined; + /** + * The device to retrieve analytics for. + */ + device?: string | undefined; + /** + * The browser to retrieve analytics for. + */ + browser?: string | undefined; + /** + * The OS to retrieve analytics for. + */ + os?: string | undefined; + /** + * The referer to retrieve analytics for. + */ + referer?: string | undefined; + /** + * The URL to retrieve analytics for. + */ + url?: string | undefined; + /** + * Whether to exclude the root link from the response. + */ + excludeRoot?: boolean | undefined; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; +}; + +export type GetTopURLsResponseBody = { + /** + * The destination URL + */ + url: string; + /** + * The number of clicks from this URL + */ + clicks: number; +}; + +/** @internal */ +export const GetTopURLsQueryParamInterval$ = z.nativeEnum(GetTopURLsQueryParamInterval); + +/** @internal */ +export const GetTopURLsQueryParamCountry$ = z.nativeEnum(GetTopURLsQueryParamCountry); + +/** @internal */ +export namespace GetTopURLsRequest$ { + export type Inbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetTopURLsQueryParamInterval | undefined; + country?: GetTopURLsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetTopURLsQueryParamInterval$.optional(), + country: GetTopURLsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); + + export type Outbound = { + domain?: string | undefined; + key?: string | undefined; + interval?: GetTopURLsQueryParamInterval | undefined; + country?: GetTopURLsQueryParamCountry | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + excludeRoot?: boolean | undefined; + tagId?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + domain: z.string().optional(), + key: z.string().optional(), + interval: GetTopURLsQueryParamInterval$.optional(), + country: GetTopURLsQueryParamCountry$.optional(), + city: z.string().optional(), + device: z.string().optional(), + browser: z.string().optional(), + os: z.string().optional(), + referer: z.string().optional(), + url: z.string().optional(), + excludeRoot: z.boolean().optional(), + tagId: z.string().optional(), + }) + .transform((v) => { + return { + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.country === undefined ? null : { country: v.country }), + ...(v.city === undefined ? null : { city: v.city }), + ...(v.device === undefined ? null : { device: v.device }), + ...(v.browser === undefined ? null : { browser: v.browser }), + ...(v.os === undefined ? null : { os: v.os }), + ...(v.referer === undefined ? null : { referer: v.referer }), + ...(v.url === undefined ? null : { url: v.url }), + ...(v.excludeRoot === undefined ? null : { excludeRoot: v.excludeRoot }), + ...(v.tagId === undefined ? null : { tagId: v.tagId }), + }; + }); +} + +/** @internal */ +export namespace GetTopURLsResponseBody$ { + export type Inbound = { + url: string; + clicks: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + url: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + url: v.url, + clicks: v.clicks, + }; + }); + + export type Outbound = { + url: string; + clicks: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + url: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + url: v.url, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/operations/getworkspace.ts b/src/models/operations/getworkspace.ts new file mode 100644 index 0000000..093102a --- /dev/null +++ b/src/models/operations/getworkspace.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetWorkspaceRequest = { + /** + * The ID or slug of the workspace. + */ + idOrSlug: string; +}; + +/** @internal */ +export namespace GetWorkspaceRequest$ { + export type Inbound = { + idOrSlug: string; + }; + + export const inboundSchema: z.ZodType = z + .object({ + idOrSlug: z.string(), + }) + .transform((v) => { + return { + idOrSlug: v.idOrSlug, + }; + }); + + export type Outbound = { + idOrSlug: string; + }; + + export const outboundSchema: z.ZodType = z + .object({ + idOrSlug: z.string(), + }) + .transform((v) => { + return { + idOrSlug: v.idOrSlug, + }; + }); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts new file mode 100644 index 0000000..31bdf57 --- /dev/null +++ b/src/models/operations/index.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./bulkcreatelinks"; +export * from "./createlink"; +export * from "./createtag"; +export * from "./createworkspace"; +export * from "./deletelink"; +export * from "./editlink"; +export * from "./getbrowseranalytics"; +export * from "./getcityanalytics"; +export * from "./getclicksanalytics"; +export * from "./getcountryanalytics"; +export * from "./getdeviceanalytics"; +export * from "./getlinkinfo"; +export * from "./getlinks"; +export * from "./getlinkscount"; +export * from "./getmetatags"; +export * from "./getosanalytics"; +export * from "./getqrcode"; +export * from "./getrefereranalytics"; +export * from "./gettags"; +export * from "./gettimeseriesanalytics"; +export * from "./gettoplinks"; +export * from "./gettopurls"; +export * from "./getworkspace"; diff --git a/src/sdk/analytics.ts b/src/sdk/analytics.ts new file mode 100644 index 0000000..46a08ee --- /dev/null +++ b/src/sdk/analytics.ts @@ -0,0 +1,2533 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import * as schemas$ from "../lib/schemas"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; +import * as z from "zod"; + +export class Analytics extends ClientSDK { + private readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + let hooks: SDKHooks; + if ( + typeof opt === "object" && + opt != null && + "hooks" in opt && + opt.hooks instanceof SDKHooks + ) { + hooks = opt.hooks; + } else { + hooks = new SDKHooks(); + } + + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + hooks, + }); + + this.options$ = { ...options, hooks }; + void this.options$; + } + + /** + * Retrieve clicks analytics + * + * @remarks + * Retrieve the number of clicks for a link, a domain, or the authenticated workspace. + */ + async clicks( + input: operations.GetClicksAnalyticsRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetClicksAnalyticsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/analytics/clicks")(); + + const query$ = [ + enc$.encodeForm("browser", payload$.browser, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("country", payload$.country, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("excludeRoot", payload$.excludeRoot, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("interval", payload$.interval, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("referer", payload$.referer, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getClicksAnalytics", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z.number().parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve timeseries analytics + * + * @remarks + * Retrieve the number of clicks for a link, a domain, or the authenticated workspace over a period of time. + */ + async timeseries( + input: operations.GetTimeseriesAnalyticsRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetTimeseriesAnalyticsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/analytics/timeseries")(); + + const query$ = [ + enc$.encodeForm("browser", payload$.browser, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("country", payload$.country, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("excludeRoot", payload$.excludeRoot, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("interval", payload$.interval, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("referer", payload$.referer, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getTimeseriesAnalytics", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z.array(operations.ResponseBody$.inboundSchema).parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve country analytics + * + * @remarks + * Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace. + */ + async countries( + input: operations.GetCountryAnalyticsRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetCountryAnalyticsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/analytics/country")(); + + const query$ = [ + enc$.encodeForm("browser", payload$.browser, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("country", payload$.country, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("excludeRoot", payload$.excludeRoot, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("interval", payload$.interval, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("referer", payload$.referer, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getCountryAnalytics", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z + .array(operations.GetCountryAnalyticsResponseBody$.inboundSchema) + .parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve city analytics + * + * @remarks + * Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace. + */ + async cities( + input: operations.GetCityAnalyticsRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetCityAnalyticsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/analytics/city")(); + + const query$ = [ + enc$.encodeForm("browser", payload$.browser, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("country", payload$.country, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("excludeRoot", payload$.excludeRoot, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("interval", payload$.interval, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("referer", payload$.referer, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getCityAnalytics", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z + .array(operations.GetCityAnalyticsResponseBody$.inboundSchema) + .parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve device analytics + * + * @remarks + * Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace. + */ + async devices( + input: operations.GetDeviceAnalyticsRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetDeviceAnalyticsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/analytics/device")(); + + const query$ = [ + enc$.encodeForm("browser", payload$.browser, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("country", payload$.country, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("excludeRoot", payload$.excludeRoot, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("interval", payload$.interval, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("referer", payload$.referer, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getDeviceAnalytics", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z + .array(operations.GetDeviceAnalyticsResponseBody$.inboundSchema) + .parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve browser analytics + * + * @remarks + * Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace. + */ + async browsers( + input: operations.GetBrowserAnalyticsRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetBrowserAnalyticsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/analytics/browser")(); + + const query$ = [ + enc$.encodeForm("browser", payload$.browser, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("country", payload$.country, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("excludeRoot", payload$.excludeRoot, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("interval", payload$.interval, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("referer", payload$.referer, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getBrowserAnalytics", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z + .array(operations.GetBrowserAnalyticsResponseBody$.inboundSchema) + .parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve OS analytics + * + * @remarks + * Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace. + */ + async os( + input: operations.GetOSAnalyticsRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetOSAnalyticsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/analytics/os")(); + + const query$ = [ + enc$.encodeForm("browser", payload$.browser, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("country", payload$.country, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("excludeRoot", payload$.excludeRoot, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("interval", payload$.interval, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("referer", payload$.referer, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getOSAnalytics", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z + .array(operations.GetOSAnalyticsResponseBody$.inboundSchema) + .parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve referer analytics + * + * @remarks + * Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace. + */ + async referers( + input: operations.GetRefererAnalyticsRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetRefererAnalyticsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/analytics/referer")(); + + const query$ = [ + enc$.encodeForm("browser", payload$.browser, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("country", payload$.country, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("excludeRoot", payload$.excludeRoot, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("interval", payload$.interval, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("referer", payload$.referer, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getRefererAnalytics", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z + .array(operations.GetRefererAnalyticsResponseBody$.inboundSchema) + .parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve top links + * + * @remarks + * Retrieve the top links by number of clicks for a domain or the authenticated workspace. + */ + async topLinks( + input: operations.GetTopLinksRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetTopLinksRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/analytics/top_links")(); + + const query$ = [ + enc$.encodeForm("browser", payload$.browser, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("country", payload$.country, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("excludeRoot", payload$.excludeRoot, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("interval", payload$.interval, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("referer", payload$.referer, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getTopLinks", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z.array(operations.GetTopLinksResponseBody$.inboundSchema).parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve top URLs + * + * @remarks + * Retrieve the top URLs by number of clicks for a given short link. + */ + async topUrls( + input: operations.GetTopURLsRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetTopURLsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/analytics/top_urls")(); + + const query$ = [ + enc$.encodeForm("browser", payload$.browser, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("country", payload$.country, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("excludeRoot", payload$.excludeRoot, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("interval", payload$.interval, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("referer", payload$.referer, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getTopURLs", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z.array(operations.GetTopURLsResponseBody$.inboundSchema).parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } +} diff --git a/src/sdk/index.ts b/src/sdk/index.ts new file mode 100644 index 0000000..3130314 --- /dev/null +++ b/src/sdk/index.ts @@ -0,0 +1,5 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export * from "./sdk"; diff --git a/src/sdk/links.ts b/src/sdk/links.ts new file mode 100644 index 0000000..8605c8b --- /dev/null +++ b/src/sdk/links.ts @@ -0,0 +1,1645 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import * as schemas$ from "../lib/schemas"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as components from "../models/components"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; +import * as z from "zod"; + +export class Links extends ClientSDK { + private readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + let hooks: SDKHooks; + if ( + typeof opt === "object" && + opt != null && + "hooks" in opt && + opt.hooks instanceof SDKHooks + ) { + hooks = opt.hooks; + } else { + hooks = new SDKHooks(); + } + + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + hooks, + }); + + this.options$ = { ...options, hooks }; + void this.options$; + } + + /** + * Retrieve a list of links + * + * @remarks + * Retrieve a list of links for the authenticated workspace. The list will be paginated and the provided query parameters allow filtering the returned links. + */ + async list( + input: operations.GetLinksRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetLinksRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/links")(); + + const query$ = [ + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("page", payload$.page, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("search", payload$.search, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("showArchived", payload$.showArchived, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("sort", payload$.sort, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("tagIds", payload$.tagIds, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("userId", payload$.userId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("withTags", payload$.withTags, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getLinks", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z.array(components.LinkSchema$.inboundSchema).parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Create a new link + * + * @remarks + * Create a new link for the authenticated workspace. + */ + async create( + input: operations.CreateLinkRequestBody | undefined, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Content-Type", "application/json"); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.CreateLinkRequestBody$.outboundSchema.optional().parse(value$), + "Input validation failed" + ); + const body$ = + payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true }); + + const path$ = this.templateURLComponent("/links")(); + + const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "createLink", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return components.LinkSchema$.inboundSchema.parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve the number of links + * + * @remarks + * Retrieve the number of links for the authenticated workspace. The provided query parameters allow filtering the returned links. + */ + async count(input: operations.GetLinksCountRequest, options?: RequestOptions): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetLinksCountRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/links/count")(); + + const query$ = [ + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("groupBy", payload$.groupBy, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("search", payload$.search, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("showArchived", payload$.showArchived, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("tagIds", payload$.tagIds, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("userId", payload$.userId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("withTags", payload$.withTags, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getLinksCount", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z.number().parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve a link + * + * @remarks + * Retrieve the info for a link from their domain and key. + */ + async get( + input: operations.GetLinkInfoRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetLinkInfoRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/links/info")(); + + const query$ = [ + enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getLinkInfo", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return components.LinkSchema$.inboundSchema.parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Edit a link + * + * @remarks + * Edit a link for the authenticated workspace. + */ + async update( + linkId: string, + requestBody?: operations.EditLinkRequestBody | undefined, + options?: RequestOptions + ): Promise { + const input$: operations.EditLinkRequest = { + linkId: linkId, + requestBody: requestBody, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Content-Type", "application/json"); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input$, + (value$) => operations.EditLinkRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true }); + + const pathParams$ = { + linkId: enc$.encodeSimple("linkId", payload$.linkId, { + explode: false, + charEncoding: "percent", + }), + }; + const path$ = this.templateURLComponent("/links/{linkId}")(pathParams$); + + const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "editLink", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "PUT", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return components.LinkSchema$.inboundSchema.parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Delete a link + * + * @remarks + * Delete a link for the authenticated workspace. + */ + async delete( + linkId: string, + options?: RequestOptions + ): Promise { + const input$: operations.DeleteLinkRequest = { + linkId: linkId, + }; + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input$, + (value$) => operations.DeleteLinkRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const pathParams$ = { + linkId: enc$.encodeSimple("linkId", payload$.linkId, { + explode: false, + charEncoding: "percent", + }), + }; + const path$ = this.templateURLComponent("/links/{linkId}")(pathParams$); + + const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "deleteLink", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return operations.DeleteLinkResponseBody$.inboundSchema.parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Bulk create links + * + * @remarks + * Bulk create up to 100 links for the authenticated workspace. + */ + async createMany( + input: Array | undefined, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Content-Type", "application/json"); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => z.array(operations.RequestBody$.outboundSchema).optional().parse(value$), + "Input validation failed" + ); + const body$ = + payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true }); + + const path$ = this.templateURLComponent("/links/bulk")(); + + const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "bulkCreateLinks", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z.array(components.LinkSchema$.inboundSchema).parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } +} diff --git a/src/sdk/metatags.ts b/src/sdk/metatags.ts new file mode 100644 index 0000000..ec31533 --- /dev/null +++ b/src/sdk/metatags.ts @@ -0,0 +1,115 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import * as schemas$ from "../lib/schemas"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; + +export class Metatags extends ClientSDK { + private readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + let hooks: SDKHooks; + if ( + typeof opt === "object" && + opt != null && + "hooks" in opt && + opt.hooks instanceof SDKHooks + ) { + hooks = opt.hooks; + } else { + hooks = new SDKHooks(); + } + + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + hooks, + }); + + this.options$ = { ...options, hooks }; + void this.options$; + } + + /** + * Retrieve the metatags for a URL + * + * @remarks + * Retrieve the metatags for a URL + */ + async get( + input: operations.GetMetatagsRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetMetatagsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/metatags")(); + + const query$ = [ + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getMetatags", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { context, errorCodes: ["4XX", "5XX"] }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return operations.GetMetatagsResponseBody$.inboundSchema.parse(val$); + }, + "Response validation failed" + ); + return result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } +} diff --git a/src/sdk/qrcodes.ts b/src/sdk/qrcodes.ts new file mode 100644 index 0000000..5e8cb67 --- /dev/null +++ b/src/sdk/qrcodes.ts @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import * as schemas$ from "../lib/schemas"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; +import * as z from "zod"; + +export enum GetAcceptEnum { + applicationJson = "application/json", + imagePng = "image/png", +} + +export class QRCodes extends ClientSDK { + private readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + let hooks: SDKHooks; + if ( + typeof opt === "object" && + opt != null && + "hooks" in opt && + opt.hooks instanceof SDKHooks + ) { + hooks = opt.hooks; + } else { + hooks = new SDKHooks(); + } + + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + hooks, + }); + + this.options$ = { ...options, hooks }; + void this.options$; + } + + /** + * Retrieve a QR code + * + * @remarks + * Retrieve a QR code for a link. + */ + async get( + input: operations.GetQRCodeRequest, + options?: RequestOptions & { acceptHeaderOverride?: GetAcceptEnum } + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + + const accept = options?.acceptHeaderOverride || "application/json;q=1, image/png;q=0"; + headers$.set("Accept", accept); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetQRCodeRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/qr")(); + + const query$ = [ + enc$.encodeForm("bgColor", payload$.bgColor, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("fgColor", payload$.fgColor, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("includeMargin", payload$.includeMargin, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("level", payload$.level, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("size", payload$.size, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getQRCode", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "image/png")) { + const responseBody = await response.text(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z.string().parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts new file mode 100644 index 0000000..39635f2 --- /dev/null +++ b/src/sdk/sdk.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks"; +import { SDKOptions, serverURLFromOptions } from "../lib/config"; +import { HTTPClient } from "../lib/http"; +import { ClientSDK } from "../lib/sdks"; +import { Analytics } from "./analytics"; +import { Links } from "./links"; +import { Metatags } from "./metatags"; +import { QRCodes } from "./qrcodes"; +import { Tags } from "./tags"; +import { Workspaces } from "./workspaces"; + +export class Dub extends ClientSDK { + private readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + let hooks: SDKHooks; + if ( + typeof opt === "object" && + opt != null && + "hooks" in opt && + opt.hooks instanceof SDKHooks + ) { + hooks = opt.hooks; + } else { + hooks = new SDKHooks(); + } + + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + hooks, + }); + + this.options$ = { ...options, hooks }; + void this.options$; + } + + private _links?: Links; + get links() { + return (this._links ??= new Links(this.options$)); + } + + private _qrCodes?: QRCodes; + get qrCodes() { + return (this._qrCodes ??= new QRCodes(this.options$)); + } + + private _analytics?: Analytics; + get analytics() { + return (this._analytics ??= new Analytics(this.options$)); + } + + private _workspaces?: Workspaces; + get workspaces() { + return (this._workspaces ??= new Workspaces(this.options$)); + } + + private _tags?: Tags; + get tags() { + return (this._tags ??= new Tags(this.options$)); + } + + private _metatags?: Metatags; + get metatags() { + return (this._metatags ??= new Metatags(this.options$)); + } +} diff --git a/src/sdk/tags.ts b/src/sdk/tags.ts new file mode 100644 index 0000000..a19769e --- /dev/null +++ b/src/sdk/tags.ts @@ -0,0 +1,478 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import * as schemas$ from "../lib/schemas"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as components from "../models/components"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; +import * as z from "zod"; + +export class Tags extends ClientSDK { + private readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + let hooks: SDKHooks; + if ( + typeof opt === "object" && + opt != null && + "hooks" in opt && + opt.hooks instanceof SDKHooks + ) { + hooks = opt.hooks; + } else { + hooks = new SDKHooks(); + } + + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + hooks, + }); + + this.options$ = { ...options, hooks }; + void this.options$; + } + + /** + * Retrieve a list of tags + * + * @remarks + * Retrieve a list of tags for the authenticated workspace. + */ + async list( + _input: operations.GetTagsRequest, + options?: RequestOptions + ): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/tags")(); + + const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getTags", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z.array(components.TagSchema$.inboundSchema).parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Create a new tag + * + * @remarks + * Create a new tag for the authenticated workspace. + */ + async create( + input: operations.CreateTagRequestBody | undefined, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Content-Type", "application/json"); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.CreateTagRequestBody$.outboundSchema.optional().parse(value$), + "Input validation failed" + ); + const body$ = + payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true }); + + const path$ = this.templateURLComponent("/tags")(); + + const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("workspaceId", this.options$.workspaceId, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "createTag", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 201, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return components.TagSchema$.inboundSchema.parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } +} diff --git a/src/sdk/workspaces.ts b/src/sdk/workspaces.ts new file mode 100644 index 0000000..ad6a7ee --- /dev/null +++ b/src/sdk/workspaces.ts @@ -0,0 +1,670 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import * as enc$ from "../lib/encodings"; +import { HTTPClient } from "../lib/http"; +import * as schemas$ from "../lib/schemas"; +import { ClientSDK, RequestOptions } from "../lib/sdks"; +import * as components from "../models/components"; +import * as errors from "../models/errors"; +import * as operations from "../models/operations"; +import * as z from "zod"; + +export class Workspaces extends ClientSDK { + private readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + let hooks: SDKHooks; + if ( + typeof opt === "object" && + opt != null && + "hooks" in opt && + opt.hooks instanceof SDKHooks + ) { + hooks = opt.hooks; + } else { + hooks = new SDKHooks(); + } + + super({ + client: options.httpClient || new HTTPClient(), + baseURL: serverURLFromOptions(options), + hooks, + }); + + this.options$ = { ...options, hooks }; + void this.options$; + } + + /** + * Retrieve a list of workspaces + * + * @remarks + * Retrieve a list of workspaces for the authenticated user. + */ + async list(options?: RequestOptions): Promise> { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const path$ = this.templateURLComponent("/workspaces")(); + + const query$ = ""; + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getWorkspaces", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return z.array(components.WorkspaceSchema$.inboundSchema).parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Create a workspace + * + * @remarks + * Create a new workspace for the authenticated user. + */ + async create( + input: operations.CreateWorkspaceRequestBody | undefined, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Content-Type", "application/json"); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => + operations.CreateWorkspaceRequestBody$.outboundSchema.optional().parse(value$), + "Input validation failed" + ); + const body$ = + payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true }); + + const path$ = this.templateURLComponent("/workspaces")(); + + const query$ = ""; + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "createWorkspace", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return components.WorkspaceSchema$.inboundSchema.parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } + + /** + * Retrieve a workspace + * + * @remarks + * Retrieve a workspace for the authenticated user. + */ + async get( + input: operations.GetWorkspaceRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.GetWorkspaceRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const pathParams$ = { + idOrSlug: enc$.encodeSimple("idOrSlug", payload$.idOrSlug, { + explode: false, + charEncoding: "percent", + }), + }; + const path$ = this.templateURLComponent("/workspaces/{idOrSlug}")(pathParams$); + + const query$ = ""; + + let security$; + if (typeof this.options$.token === "function") { + security$ = { token: await this.options$.token() }; + } else if (this.options$.token) { + security$ = { token: this.options$.token }; + } else { + security$ = {}; + } + const context = { + operationID: "getWorkspace", + oAuth2Scopes: [], + securitySource: this.options$.token, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "410", + "422", + "429", + "4XX", + "500", + "5XX", + ], + }; + const request = this.createRequest$( + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + HttpMeta: { + Response: response, + Request: request, + }, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return components.WorkspaceSchema$.inboundSchema.parse(val$); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, 400, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.BadRequest$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 401, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Unauthorized$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 403, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Forbidden$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 404, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.NotFound$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 409, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.Conflict$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 410, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InviteExpired$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 422, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.UnprocessableEntity$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 429, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.RateLimitExceeded$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else if (this.matchResponse(response, 500, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.InternalServerError$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError("Unexpected API response", response, responseBody); + } + } +} diff --git a/src/types/blobs.ts b/src/types/blobs.ts new file mode 100644 index 0000000..2c21e41 --- /dev/null +++ b/src/types/blobs.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export const blobLikeSchema = z.custom(isBlobLike, { + message: "expected a Blob, File or Blob-like object", + fatal: true, +}); + +export function isBlobLike(val: unknown): val is Blob { + if (val instanceof Blob) { + return true; + } + + if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) { + return false; + } + + const name = val[Symbol.toStringTag]; + if (typeof name !== "string") { + return false; + } + if (name !== "Blob" && name !== "File") { + return false; + } + + return "stream" in val && typeof val.stream === "function"; +} diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..3937ae7 --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,8 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export { RFCDate } from "./rfcdate"; +export { blobLikeSchema, isBlobLike } from "./blobs"; +export type { Paginator, PageIterator } from "./operations"; +export { createPageIterator } from "./operations"; diff --git a/src/types/operations.ts b/src/types/operations.ts new file mode 100644 index 0000000..8e38c2f --- /dev/null +++ b/src/types/operations.ts @@ -0,0 +1,25 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +export type Paginator = () => Promise> | null; + +export type PageIterator = Result & { + next: Paginator; + [Symbol.asyncIterator]: () => AsyncIterableIterator; +}; + +export function createPageIterator( + page: Result & { next: Paginator }, +) { + return { + [Symbol.asyncIterator]: async function* paginator() { + yield page; + + let p: typeof page | null = page; + for (p = await p.next(); p != null; p = await p.next()) { + yield p; + } + }, + }; +} diff --git a/src/types/rfcdate.ts b/src/types/rfcdate.ts new file mode 100644 index 0000000..c37d292 --- /dev/null +++ b/src/types/rfcdate.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +const dateRE = /^\d{4}-\d{2}-\d{2}$/; + +export class RFCDate { + private serialized: string; + + /** + * Creates a new RFCDate instance using today's date. + */ + static today() { + return new RFCDate(new Date()); + } + + /** + * Creates a new RFCDate instance using the provided input. + * If a string is used then in must be in the format YYYY-MM-DD. + * + * @param date A Date object or a date string in YYYY-MM-DD format + * @example + * new RFCDate("2022-01-01") + * @example + * new RFCDate(new Date()) + */ + constructor(date: Date | string) { + if (typeof date === "string" && !dateRE.test(date)) { + throw new RangeError( + "RFCDate: date strings must be in the format YYYY-MM-DD: " + date, + ); + } + + const value = new Date(date); + if (isNaN(+value)) { + throw new RangeError("RFCDate: invalid date provided: " + date); + } + + this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length); + if (!dateRE.test(this.serialized)) { + throw new TypeError( + `RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`, + ); + } + } + + toJSON(): string { + return this.toString(); + } + + toString(): string { + return this.serialized; + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..7a86d2d --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,40 @@ +{ + "compilerOptions": { + "incremental": true, + "tsBuildInfoFile": ".tsbuildinfo", + "target": "ES2018", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + + "module": "Node16", + "moduleResolution": "Node16", + + "allowJs": true, + + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": ".", + + + // https://github.com/tsconfig/bases/blob/a1bf7c0fa2e094b068ca3e1448ca2ece4157977e/bases/strictest.json + "strict": true, + "allowUnusedLabels": false, + "allowUnreachableCode": false, + "exactOptionalPropertyTypes": true, + "useUnknownInCatchVariables": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noPropertyAccessFromIndexSignature": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "isolatedModules": true, + "checkJs": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["src"], + "exclude": ["node_modules"] +}