diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8a0c2b9..a522b4a 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: f28179cc-ef59-426d-9e85-60cec22fc642 management: - docChecksum: c82cc79ffda0379ff35a3ee5f8667c0d + docChecksum: 6f3206753e886703c723485794073b77 docVersion: 0.0.1 - speakeasyVersion: 1.296.1 + speakeasyVersion: 1.297.0 generationVersion: 2.338.1 - releaseVersion: 0.29.9 - configChecksum: 1b24c67caa5adefda06b3a743d0bca5f + releaseVersion: 0.29.10 + configChecksum: 70681a5b78b1bf018371485189a5d1f1 repoURL: https://github.com/dubinc/dub-node.git installationURL: https://github.com/dubinc/dub-node published: true @@ -32,7 +32,6 @@ features: generatedFiles: - src/sdk/links.ts - src/sdk/qrcodes.ts - - src/sdk/clicks.ts - src/sdk/analytics.ts - src/sdk/workspaces.ts - src/sdk/tags.ts @@ -67,9 +66,37 @@ generatedFiles: - src/models/components/linkschema.ts - src/models/components/tagschema.ts - src/models/components/linkgeotargeting.ts + - src/models/components/clickscount.ts + - src/models/components/clickstimeseries.ts + - src/models/components/clickscountries.ts + - src/models/components/clickscities.ts + - src/models/components/clicksdevices.ts + - src/models/components/clicksbrowsers.ts + - src/models/components/clicksos.ts + - src/models/components/clicksreferers.ts + - src/models/components/clickstoplinks.ts + - src/models/components/clickstopurls.ts + - src/models/components/leadscount.ts + - src/models/components/leadstimeseries.ts + - src/models/components/leadscountries.ts + - src/models/components/leadscities.ts + - src/models/components/leadsdevices.ts + - src/models/components/leadsbrowsers.ts + - src/models/components/leadsos.ts + - src/models/components/leadsreferers.ts + - src/models/components/leadstoplinks.ts + - src/models/components/leadstopurls.ts + - src/models/components/salescount.ts + - src/models/components/salestimeseries.ts + - src/models/components/salescountries.ts + - src/models/components/salescities.ts + - src/models/components/salesdevices.ts + - src/models/components/salesbrowsers.ts + - src/models/components/salesos.ts + - src/models/components/salesreferers.ts + - src/models/components/salestoplinks.ts + - src/models/components/salestopurls.ts - src/models/components/countrycode.ts - - src/models/components/clicksbycountry.ts - - src/models/components/clicksbycities.ts - src/models/components/workspaceschema.ts - src/models/components/domainschema.ts - src/models/components/security.ts @@ -91,26 +118,7 @@ generatedFiles: - src/models/operations/bulkcreatelinks.ts - src/models/operations/upsertlink.ts - src/models/operations/getqrcode.ts - - src/models/operations/gettimeseriesbyclicksdeprecated.ts - - src/models/operations/getcountriesbyclicksdeprecated.ts - - src/models/operations/getcitiesbyclicksdeprecated.ts - - src/models/operations/getdevicesbyclicksdeprecated.ts - - src/models/operations/getbrowsersbyclicksdeprecated.ts - - src/models/operations/getosbyclicksdeprecated.ts - - src/models/operations/getreferersbyclicksdeprecated.ts - - src/models/operations/gettoplinksbyclicksdeprecated.ts - - src/models/operations/gettopurlsbyclicksdeprecated.ts - - src/models/operations/getclickscount.ts - - src/models/operations/gettimeseriesbyclicks.ts - - src/models/operations/getcountriesbyclicks.ts - - src/models/operations/getcitiesbyclicks.ts - - src/models/operations/getdevicesbyclicks.ts - - src/models/operations/getbrowsersbyclicks.ts - - src/models/operations/getosbyclicks.ts - - src/models/operations/getreferersbyclicks.ts - - src/models/operations/gettoplinksbyclicks.ts - - src/models/operations/gettopurlsbyclicks.ts - - src/models/operations/getclickscountdeprecated.ts + - src/models/operations/retrieveanalytics.ts - src/models/operations/createworkspace.ts - src/models/operations/getworkspace.ts - src/models/operations/gettags.ts @@ -133,11 +141,43 @@ generatedFiles: - docs/models/components/color.md - docs/models/components/tagschema.md - docs/models/components/linkgeotargeting.md - - docs/models/components/countrycode.md + - docs/models/components/clickscount.md + - docs/models/components/clickstimeseries.md - docs/models/components/country.md - - docs/models/components/clicksbycountry.md - - docs/models/components/clicksbycitiescountry.md - - docs/models/components/clicksbycities.md + - docs/models/components/clickscountries.md + - docs/models/components/clickscitiescountry.md + - docs/models/components/clickscities.md + - docs/models/components/clicksdevices.md + - docs/models/components/clicksbrowsers.md + - docs/models/components/clicksos.md + - docs/models/components/clicksreferers.md + - docs/models/components/clickstoplinks.md + - docs/models/components/clickstopurls.md + - docs/models/components/leadscount.md + - docs/models/components/leadstimeseries.md + - docs/models/components/leadscountriescountry.md + - docs/models/components/leadscountries.md + - docs/models/components/leadscitiescountry.md + - docs/models/components/leadscities.md + - docs/models/components/leadsdevices.md + - docs/models/components/leadsbrowsers.md + - docs/models/components/leadsos.md + - docs/models/components/leadsreferers.md + - docs/models/components/leadstoplinks.md + - docs/models/components/leadstopurls.md + - docs/models/components/salescount.md + - docs/models/components/salestimeseries.md + - docs/models/components/salescountriescountry.md + - docs/models/components/salescountries.md + - docs/models/components/salescitiescountry.md + - docs/models/components/salescities.md + - docs/models/components/salesdevices.md + - docs/models/components/salesbrowsers.md + - docs/models/components/salesos.md + - docs/models/components/salesreferers.md + - docs/models/components/salestoplinks.md + - docs/models/components/salestopurls.md + - docs/models/components/countrycode.md - docs/models/components/plan.md - docs/models/components/role.md - docs/models/components/users.md @@ -209,80 +249,12 @@ generatedFiles: - docs/models/operations/upsertlinkrequestbody.md - docs/models/operations/level.md - docs/models/operations/getqrcoderequest.md - - docs/models/operations/gettimeseriesbyclicksdeprecatedglobals.md - - docs/models/operations/gettimeseriesbyclicksdeprecatedqueryparaminterval.md - - docs/models/operations/gettimeseriesbyclicksdeprecatedrequest.md - - docs/models/operations/gettimeseriesbyclicksdeprecatedresponsebody.md - - docs/models/operations/getcountriesbyclicksdeprecatedglobals.md - - docs/models/operations/getcountriesbyclicksdeprecatedqueryparaminterval.md - - docs/models/operations/getcountriesbyclicksdeprecatedrequest.md - - docs/models/operations/getcitiesbyclicksdeprecatedglobals.md - - docs/models/operations/getcitiesbyclicksdeprecatedqueryparaminterval.md - - docs/models/operations/getcitiesbyclicksdeprecatedrequest.md - - docs/models/operations/getdevicesbyclicksdeprecatedglobals.md - - docs/models/operations/getdevicesbyclicksdeprecatedqueryparaminterval.md - - docs/models/operations/getdevicesbyclicksdeprecatedrequest.md - - docs/models/operations/getdevicesbyclicksdeprecatedresponsebody.md - - docs/models/operations/getbrowsersbyclicksdeprecatedglobals.md - - docs/models/operations/getbrowsersbyclicksdeprecatedqueryparaminterval.md - - docs/models/operations/getbrowsersbyclicksdeprecatedrequest.md - - docs/models/operations/getbrowsersbyclicksdeprecatedresponsebody.md - - docs/models/operations/getosbyclicksdeprecatedglobals.md - - docs/models/operations/getosbyclicksdeprecatedqueryparaminterval.md - - docs/models/operations/getosbyclicksdeprecatedrequest.md - - docs/models/operations/getosbyclicksdeprecatedresponsebody.md - - docs/models/operations/getreferersbyclicksdeprecatedglobals.md - - docs/models/operations/getreferersbyclicksdeprecatedqueryparaminterval.md - - docs/models/operations/getreferersbyclicksdeprecatedrequest.md - - docs/models/operations/getreferersbyclicksdeprecatedresponsebody.md - - docs/models/operations/gettoplinksbyclicksdeprecatedglobals.md - - docs/models/operations/gettoplinksbyclicksdeprecatedqueryparaminterval.md - - docs/models/operations/gettoplinksbyclicksdeprecatedrequest.md - - docs/models/operations/gettoplinksbyclicksdeprecatedresponsebody.md - - docs/models/operations/gettopurlsbyclicksdeprecatedglobals.md - - docs/models/operations/gettopurlsbyclicksdeprecatedqueryparaminterval.md - - docs/models/operations/gettopurlsbyclicksdeprecatedrequest.md - - docs/models/operations/gettopurlsbyclicksdeprecatedresponsebody.md - - docs/models/operations/getclickscountglobals.md + - docs/models/operations/retrieveanalyticsglobals.md + - docs/models/operations/event.md + - docs/models/operations/queryparamgroupby.md - docs/models/operations/interval.md - - docs/models/operations/getclickscountrequest.md - - docs/models/operations/gettimeseriesbyclicksglobals.md - - docs/models/operations/queryparaminterval.md - - docs/models/operations/gettimeseriesbyclicksrequest.md - - docs/models/operations/responsebody.md - - docs/models/operations/getcountriesbyclicksglobals.md - - docs/models/operations/getcountriesbyclicksqueryparaminterval.md - - docs/models/operations/getcountriesbyclicksrequest.md - - docs/models/operations/getcitiesbyclicksglobals.md - - docs/models/operations/getcitiesbyclicksqueryparaminterval.md - - docs/models/operations/getcitiesbyclicksrequest.md - - docs/models/operations/getdevicesbyclicksglobals.md - - docs/models/operations/getdevicesbyclicksqueryparaminterval.md - - docs/models/operations/getdevicesbyclicksrequest.md - - docs/models/operations/getdevicesbyclicksresponsebody.md - - docs/models/operations/getbrowsersbyclicksglobals.md - - docs/models/operations/getbrowsersbyclicksqueryparaminterval.md - - docs/models/operations/getbrowsersbyclicksrequest.md - - docs/models/operations/getbrowsersbyclicksresponsebody.md - - docs/models/operations/getosbyclicksglobals.md - - docs/models/operations/getosbyclicksqueryparaminterval.md - - docs/models/operations/getosbyclicksrequest.md - - docs/models/operations/getosbyclicksresponsebody.md - - docs/models/operations/getreferersbyclicksglobals.md - - docs/models/operations/getreferersbyclicksqueryparaminterval.md - - docs/models/operations/getreferersbyclicksrequest.md - - docs/models/operations/getreferersbyclicksresponsebody.md - - docs/models/operations/gettoplinksbyclicksglobals.md - - docs/models/operations/gettoplinksbyclicksqueryparaminterval.md - - docs/models/operations/gettoplinksbyclicksrequest.md - - docs/models/operations/gettoplinksbyclicksresponsebody.md - - docs/models/operations/gettopurlsbyclicksglobals.md - - docs/models/operations/gettopurlsbyclicksqueryparaminterval.md - - docs/models/operations/gettopurlsbyclicksrequest.md - - docs/models/operations/gettopurlsbyclicksresponsebody.md - - docs/models/operations/getclickscountdeprecatedglobals.md - - docs/models/operations/getclickscountdeprecatedqueryparaminterval.md - - docs/models/operations/getclickscountdeprecatedrequest.md + - docs/models/operations/retrieveanalyticsrequest.md + - docs/models/operations/retrieveanalyticsresponsebody.md - docs/models/operations/createworkspacerequestbody.md - docs/models/operations/getworkspacerequest.md - docs/models/operations/gettagsglobals.md @@ -320,7 +292,6 @@ generatedFiles: - docs/sdks/links/README.md - docs/sdks/qrcodes/README.md - docs/sdks/analytics/README.md - - docs/sdks/clicks/README.md - docs/sdks/workspaces/README.md - docs/sdks/tags/README.md - docs/sdks/domains/README.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 5707ce7..d3c95bd 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.29.9 + version: 0.29.10 additionalDependencies: dependencies: {} devDependencies: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 2fc26bf..18c2c12 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.296.1 +speakeasyVersion: 1.297.0 sources: my-first-source: sourceNamespace: my-first-source - sourceRevisionDigest: sha256:0b285257c73443e338c219ce3a200d02ee30f8ac169aefeea1454a91ba338a43 - sourceBlobDigest: sha256:ac82ee79a3edd0ead797b2910ce6da07a17b216767cf70eb8db01d8936d545d3 + sourceRevisionDigest: sha256:6147693469ccc7ec8e6d64adeef85e435280d3c9dcff8e048755d979df72afca + sourceBlobDigest: sha256:f7684488e2e9c9dfaa6b9844f66627f1ad6f42807cedbc35f51e63a917d7e20c tags: - latest - main @@ -11,8 +11,8 @@ targets: my-first-target: source: my-first-source sourceNamespace: my-first-source - sourceRevisionDigest: sha256:0b285257c73443e338c219ce3a200d02ee30f8ac169aefeea1454a91ba338a43 - sourceBlobDigest: sha256:ac82ee79a3edd0ead797b2910ce6da07a17b216767cf70eb8db01d8936d545d3 + sourceRevisionDigest: sha256:6147693469ccc7ec8e6d64adeef85e435280d3c9dcff8e048755d979df72afca + sourceBlobDigest: sha256:f7684488e2e9c9dfaa6b9844f66627f1ad6f42807cedbc35f51e63a917d7e20c outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index 8a6fae7..90b10d8 100644 --- a/README.md +++ b/README.md @@ -103,29 +103,7 @@ run(); ### [analytics](docs/sdks/analytics/README.md) -* [~~timeseries~~](docs/sdks/analytics/README.md#timeseries) - Retrieve timeseries click analytics :warning: **Deprecated** Use `timeseries` instead. -* [~~country~~](docs/sdks/analytics/README.md#country) - Retrieve top countries by clicks :warning: **Deprecated** Use `countries` instead. -* [~~city~~](docs/sdks/analytics/README.md#city) - Retrieve top cities by clicks :warning: **Deprecated** Use `cities` instead. -* [~~device~~](docs/sdks/analytics/README.md#device) - Retrieve top devices by clicks :warning: **Deprecated** Use `devices` instead. -* [~~browser~~](docs/sdks/analytics/README.md#browser) - Retrieve top browsers by clicks :warning: **Deprecated** Use `browsers` instead. -* [~~os~~](docs/sdks/analytics/README.md#os) - Retrieve top OS by clicks :warning: **Deprecated** Use `os` instead. -* [~~referer~~](docs/sdks/analytics/README.md#referer) - Retrieve top referers by clicks :warning: **Deprecated** Use `referers` instead. -* [~~topLinks~~](docs/sdks/analytics/README.md#toplinks) - Retrieve top links by clicks :warning: **Deprecated** Use `topLinks` instead. -* [~~topUrls~~](docs/sdks/analytics/README.md#topurls) - Retrieve top URLs by clicks :warning: **Deprecated** Use `topUrls` instead. - -### [analytics.clicks](docs/sdks/clicks/README.md) - -* [count](docs/sdks/clicks/README.md#count) - Retrieve the total clicks count -* [timeseries](docs/sdks/clicks/README.md#timeseries) - Retrieve timeseries click analytics -* [countries](docs/sdks/clicks/README.md#countries) - Retrieve top countries by clicks -* [cities](docs/sdks/clicks/README.md#cities) - Retrieve top cities by clicks -* [devices](docs/sdks/clicks/README.md#devices) - Retrieve top devices by clicks -* [browsers](docs/sdks/clicks/README.md#browsers) - Retrieve top browsers by clicks -* [os](docs/sdks/clicks/README.md#os) - Retrieve top OS by clicks -* [referers](docs/sdks/clicks/README.md#referers) - Retrieve top referers by clicks -* [topLinks](docs/sdks/clicks/README.md#toplinks) - Retrieve top links by clicks -* [topUrls](docs/sdks/clicks/README.md#topurls) - Retrieve top URLs by clicks -* [~~getClicksCountDeprecated~~](docs/sdks/clicks/README.md#getclickscountdeprecated) - Retrieve the total clicks count :warning: **Deprecated** Use `count` instead. +* [retrieve](docs/sdks/analytics/README.md#retrieve) - Retrieve analytics for a link, a domain, or the authenticated workspace. ### [workspaces](docs/sdks/workspaces/README.md) diff --git a/RELEASES.md b/RELEASES.md index 170afff..5bcfcec 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -356,4 +356,14 @@ Based on: ### Generated - [typescript v0.29.9] . ### Releases -- [NPM v0.29.9] https://www.npmjs.com/package/dub/v/0.29.9 - . \ No newline at end of file +- [NPM v0.29.9] https://www.npmjs.com/package/dub/v/0.29.9 - . + +## 2024-05-29 17:07:26 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.297.0 (2.338.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.29.10] . +### Releases +- [NPM v0.29.10] https://www.npmjs.com/package/dub/v/0.29.10 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 4423102..778d5d3 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,11 +3,11 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - target: $["paths"]["/analytics/device"]["get"] + - target: $["paths"]["/links/{linkId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" - "label": "getDevicesByClicksDeprecated" + "label": "deleteLink" "source": |- import { Dub } from "dub"; @@ -17,96 +17,7 @@ actions: }); async function run() { - const result = await dub.analytics.device({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/count"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getClicksCount" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.count({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/countries"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getCountriesByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.countries({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/workspaces"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "createWorkspace" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.workspaces.create({ - name: "", - slug: "", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/track/customer"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "trackCustomer" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.track.customer({ - customerId: "", - }); + const result = await dub.links.delete(""); // Handle the result console.log(result) @@ -136,11 +47,11 @@ actions: } run(); - - target: $["paths"]["/analytics/country"]["get"] + - target: $["paths"]["/analytics"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getCountriesByClicksDeprecated" + "label": "retrieveAnalytics" "source": |- import { Dub } from "dub"; @@ -150,28 +61,7 @@ actions: }); async function run() { - const result = await dub.analytics.country({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/devices"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getDevicesByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.devices({}); + const result = await dub.analytics.retrieve({}); // Handle the result console.log(result) @@ -199,11 +89,11 @@ actions: } run(); - - target: $["paths"]["/tags"]["post"] + - target: $["paths"]["/domains/{slug}"]["patch"] update: "x-codeSamples": - "lang": "typescript" - "label": "createTag" + "label": "updateDomain" "source": |- import { Dub } from "dub"; @@ -213,35 +103,7 @@ actions: }); async function run() { - const result = await dub.tags.create({ - tag: "", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/track/sale"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "trackSale" - "source": |- - import { Dub } from "dub"; - import { PaymentProcessor } from "dub/models/operations"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.track.sale({ - customerId: "", - amount: 996500, - paymentProcessor: PaymentProcessor.Shopify, - }); + const result = await dub.domains.update("acme.com", {}); // Handle the result console.log(result) @@ -270,111 +132,6 @@ actions: console.log(result) } - run(); - - target: $["paths"]["/links"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getLinks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.links.list({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/timeseries"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTimeseriesByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.timeseries({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/top_urls"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTopURLsByClicksDeprecated" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.topUrls({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/city"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getCitiesByClicksDeprecated" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.city({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/os"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getOSByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.os({}); - - // Handle the result - console.log(result) - } - run(); - target: $["paths"]["/workspaces"]["get"] update: @@ -396,6 +153,53 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/domains/{slug}"]["delete"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "deleteDomain" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.domains.delete("acme.com"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/track/sale"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "trackSale" + "source": |- + import { Dub } from "dub"; + import { PaymentProcessor } from "dub/models/operations"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.track.sale({ + customerId: "", + amount: 996500, + paymentProcessor: PaymentProcessor.Shopify, + }); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/links"]["post"] update: @@ -441,11 +245,11 @@ actions: } run(); - - target: $["paths"]["/analytics/browser"]["get"] + - target: $["paths"]["/workspaces"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "getBrowsersByClicksDeprecated" + "label": "createWorkspace" "source": |- import { Dub } from "dub"; @@ -455,18 +259,21 @@ actions: }); async function run() { - const result = await dub.analytics.browser({}); + const result = await dub.workspaces.create({ + name: "", + slug: "", + }); // Handle the result console.log(result) } run(); - - target: $["paths"]["/analytics/referer"]["get"] + - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getReferersByClicksDeprecated" + "label": "getWorkspace" "source": |- import { Dub } from "dub"; @@ -476,18 +283,20 @@ actions: }); async function run() { - const result = await dub.analytics.referer({}); + const result = await dub.workspaces.get({ + idOrSlug: "", + }); // Handle the result console.log(result) } run(); - - target: $["paths"]["/analytics/clicks/browsers"]["get"] + - target: $["paths"]["/tags"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "getBrowsersByClicks" + "label": "createTag" "source": |- import { Dub } from "dub"; @@ -497,18 +306,20 @@ actions: }); async function run() { - const result = await dub.analytics.clicks.browsers({}); + const result = await dub.tags.create({ + tag: "", + }); // Handle the result console.log(result) } run(); - - target: $["paths"]["/domains"]["post"] + - target: $["paths"]["/domains/{slug}/primary"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "addDomain" + "label": "setPrimaryDomain" "source": |- import { Dub } from "dub"; @@ -518,8 +329,52 @@ actions: }); async function run() { - const result = await dub.domains.add({ - slug: "acme.com", + const result = await dub.domains.setPrimary("acme.com"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/track/customer"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "trackCustomer" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.track.customer({ + customerId: "", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/domains/{slug}/transfer"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "transferDomain" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.domains.transfer("acme.com", { + newWorkspaceId: "", }); // Handle the result @@ -549,6 +404,48 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/links"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getLinks" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.links.list({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/links/info"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getLinkInfo" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.links.get({}); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/links/{linkId}"]["patch"] update: @@ -572,6 +469,75 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/links/bulk"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "bulkCreateLinks" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.links.createMany([ + { + url: "https://google/com", + }, + ]); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/domains"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "listDomains" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.domains.list({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/domains"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "addDomain" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.domains.add({ + slug: "acme.com", + }); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/track/lead"]["post"] update: @@ -597,369 +563,4 @@ actions: console.log(result) } - run(); - - target: $["paths"]["/analytics/timeseries"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTimeseriesByClicksDeprecated" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.timeseries({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/top_links"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTopLinksByClicksDeprecated" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.topLinks({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/referers"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getReferersByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.referers({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getWorkspace" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.workspaces.get({ - idOrSlug: "", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains/{slug}"]["delete"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "deleteDomain" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.domains.delete("acme.com"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains/{slug}"]["patch"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "updateDomain" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.domains.update("acme.com", {}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/os"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getOSByClicksDeprecated" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.os({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/cities"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getCitiesByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.cities({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/links/bulk"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "bulkCreateLinks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.links.createMany([ - { - url: "https://google/com", - }, - ]); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/top_links"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTopLinksByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.topLinks({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/top_urls"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTopURLsByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.topUrls({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getClicksCountDeprecated" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.getClicksCountDeprecated({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "listDomains" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.domains.list({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains/{slug}/primary"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "setPrimaryDomain" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.domains.setPrimary("acme.com"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/links/info"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getLinkInfo" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.links.get({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/links/{linkId}"]["delete"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "deleteLink" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.links.delete(""); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains/{slug}/transfer"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "transferDomain" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.domains.transfer("acme.com", { - newWorkspaceId: "", - }); - - // Handle the result - console.log(result) - } - run(); diff --git a/docs/models/operations/getbrowsersbyclicksresponsebody.md b/docs/models/components/clicksbrowsers.md similarity index 95% rename from docs/models/operations/getbrowsersbyclicksresponsebody.md rename to docs/models/components/clicksbrowsers.md index a85fde2..3881851 100644 --- a/docs/models/operations/getbrowsersbyclicksresponsebody.md +++ b/docs/models/components/clicksbrowsers.md @@ -1,4 +1,4 @@ -# GetBrowsersByClicksResponseBody +# ClicksBrowsers ## Fields diff --git a/docs/models/components/clickscities.md b/docs/models/components/clickscities.md new file mode 100644 index 0000000..6b5372e --- /dev/null +++ b/docs/models/components/clickscities.md @@ -0,0 +1,10 @@ +# ClicksCities + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `city` | *string* | :heavy_check_mark: | The name of the city | +| `country` | [components.ClicksCitiesCountry](../../models/components/clickscitiescountry.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/components/clicksbycitiescountry.md b/docs/models/components/clickscitiescountry.md similarity index 99% rename from docs/models/components/clicksbycitiescountry.md rename to docs/models/components/clickscitiescountry.md index 196910b..75d95ce 100644 --- a/docs/models/components/clicksbycitiescountry.md +++ b/docs/models/components/clickscitiescountry.md @@ -1,4 +1,4 @@ -# ClicksByCitiesCountry +# ClicksCitiesCountry The 2-letter country code of the city: https://d.to/geo diff --git a/docs/models/components/clickscount.md b/docs/models/components/clickscount.md new file mode 100644 index 0000000..f9bbffd --- /dev/null +++ b/docs/models/components/clickscount.md @@ -0,0 +1,8 @@ +# ClicksCount + + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `clicks` | *number* | :heavy_check_mark: | The total number of clicks | \ No newline at end of file diff --git a/docs/models/components/clicksbycountry.md b/docs/models/components/clickscountries.md similarity index 98% rename from docs/models/components/clicksbycountry.md rename to docs/models/components/clickscountries.md index b4205d4..1bc0990 100644 --- a/docs/models/components/clicksbycountry.md +++ b/docs/models/components/clickscountries.md @@ -1,4 +1,4 @@ -# ClicksByCountry +# ClicksCountries ## Fields diff --git a/docs/models/operations/getdevicesbyclicksresponsebody.md b/docs/models/components/clicksdevices.md similarity index 95% rename from docs/models/operations/getdevicesbyclicksresponsebody.md rename to docs/models/components/clicksdevices.md index 9eece9a..453b472 100644 --- a/docs/models/operations/getdevicesbyclicksresponsebody.md +++ b/docs/models/components/clicksdevices.md @@ -1,4 +1,4 @@ -# GetDevicesByClicksResponseBody +# ClicksDevices ## Fields diff --git a/docs/models/operations/getosbyclicksresponsebody.md b/docs/models/components/clicksos.md similarity index 95% rename from docs/models/operations/getosbyclicksresponsebody.md rename to docs/models/components/clicksos.md index 8bd485d..f8f3fc1 100644 --- a/docs/models/operations/getosbyclicksresponsebody.md +++ b/docs/models/components/clicksos.md @@ -1,4 +1,4 @@ -# GetOSByClicksResponseBody +# ClicksOS ## Fields diff --git a/docs/models/operations/getreferersbyclicksresponsebody.md b/docs/models/components/clicksreferers.md similarity index 96% rename from docs/models/operations/getreferersbyclicksresponsebody.md rename to docs/models/components/clicksreferers.md index 2062878..4821e7c 100644 --- a/docs/models/operations/getreferersbyclicksresponsebody.md +++ b/docs/models/components/clicksreferers.md @@ -1,4 +1,4 @@ -# GetReferersByClicksResponseBody +# ClicksReferers ## Fields diff --git a/docs/models/operations/responsebody.md b/docs/models/components/clickstimeseries.md similarity index 97% rename from docs/models/operations/responsebody.md rename to docs/models/components/clickstimeseries.md index af29a48..d370c73 100644 --- a/docs/models/operations/responsebody.md +++ b/docs/models/components/clickstimeseries.md @@ -1,4 +1,4 @@ -# ResponseBody +# ClicksTimeseries ## Fields diff --git a/docs/models/components/clickstoplinks.md b/docs/models/components/clickstoplinks.md new file mode 100644 index 0000000..05de59e --- /dev/null +++ b/docs/models/components/clickstoplinks.md @@ -0,0 +1,15 @@ +# ClicksTopLinks + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ~~`link`~~ | *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 short link | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link | +| `domain` | *string* | :heavy_check_mark: | The domain of the short link | +| `key` | *string* | :heavy_check_mark: | The key of the short link | +| `shortLink` | *string* | :heavy_check_mark: | The short link URL | +| `url` | *string* | :heavy_check_mark: | The destination URL of the short link | +| `createdAt` | *string* | :heavy_check_mark: | The creation timestamp 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/gettopurlsbyclicksresponsebody.md b/docs/models/components/clickstopurls.md similarity index 94% rename from docs/models/operations/gettopurlsbyclicksresponsebody.md rename to docs/models/components/clickstopurls.md index 2e35dac..fcb8f7e 100644 --- a/docs/models/operations/gettopurlsbyclicksresponsebody.md +++ b/docs/models/components/clickstopurls.md @@ -1,4 +1,4 @@ -# GetTopURLsByClicksResponseBody +# ClicksTopUrls ## Fields diff --git a/docs/models/operations/getdevicesbyclicksdeprecatedresponsebody.md b/docs/models/components/leadsbrowsers.md similarity index 66% rename from docs/models/operations/getdevicesbyclicksdeprecatedresponsebody.md rename to docs/models/components/leadsbrowsers.md index 6783537..915c3e0 100644 --- a/docs/models/operations/getdevicesbyclicksdeprecatedresponsebody.md +++ b/docs/models/components/leadsbrowsers.md @@ -1,9 +1,9 @@ -# GetDevicesByClicksDeprecatedResponseBody +# LeadsBrowsers ## 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 +| `browser` | *string* | :heavy_check_mark: | The name of the browser | +| `leads` | *number* | :heavy_check_mark: | The number of leads from this browser | \ No newline at end of file diff --git a/docs/models/components/leadscities.md b/docs/models/components/leadscities.md new file mode 100644 index 0000000..cf785cc --- /dev/null +++ b/docs/models/components/leadscities.md @@ -0,0 +1,10 @@ +# LeadsCities + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `city` | *string* | :heavy_check_mark: | The name of the city | +| `country` | [components.LeadsCitiesCountry](../../models/components/leadscitiescountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | +| `leads` | *number* | :heavy_check_mark: | The number of leads from this city | \ No newline at end of file diff --git a/docs/models/components/leadscitiescountry.md b/docs/models/components/leadscitiescountry.md new file mode 100644 index 0000000..84af83c --- /dev/null +++ b/docs/models/components/leadscitiescountry.md @@ -0,0 +1,259 @@ +# LeadsCitiesCountry + +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/components/leadscount.md b/docs/models/components/leadscount.md new file mode 100644 index 0000000..d0ced8f --- /dev/null +++ b/docs/models/components/leadscount.md @@ -0,0 +1,8 @@ +# LeadsCount + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `leads` | *number* | :heavy_check_mark: | The total number of leads | \ No newline at end of file diff --git a/docs/models/components/leadscountries.md b/docs/models/components/leadscountries.md new file mode 100644 index 0000000..1d6efd9 --- /dev/null +++ b/docs/models/components/leadscountries.md @@ -0,0 +1,9 @@ +# LeadsCountries + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `country` | [components.LeadsCountriesCountry](../../models/components/leadscountriescountry.md) | :heavy_check_mark: | The 2-letter country code: https://d.to/geo | +| `leads` | *number* | :heavy_check_mark: | The number of leads from this country | \ No newline at end of file diff --git a/docs/models/components/leadscountriescountry.md b/docs/models/components/leadscountriescountry.md new file mode 100644 index 0000000..9e89e0d --- /dev/null +++ b/docs/models/components/leadscountriescountry.md @@ -0,0 +1,259 @@ +# LeadsCountriesCountry + +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/components/leadsdevices.md b/docs/models/components/leadsdevices.md new file mode 100644 index 0000000..2be7704 --- /dev/null +++ b/docs/models/components/leadsdevices.md @@ -0,0 +1,9 @@ +# LeadsDevices + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `device` | *string* | :heavy_check_mark: | The name of the device | +| `leads` | *number* | :heavy_check_mark: | The number of leads from this device | \ No newline at end of file diff --git a/docs/models/components/leadsos.md b/docs/models/components/leadsos.md new file mode 100644 index 0000000..b1ec602 --- /dev/null +++ b/docs/models/components/leadsos.md @@ -0,0 +1,9 @@ +# LeadsOS + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `os` | *string* | :heavy_check_mark: | The name of the OS | +| `leads` | *number* | :heavy_check_mark: | The number of leads from this OS | \ No newline at end of file diff --git a/docs/models/operations/getreferersbyclicksdeprecatedresponsebody.md b/docs/models/components/leadsreferers.md similarity index 84% rename from docs/models/operations/getreferersbyclicksdeprecatedresponsebody.md rename to docs/models/components/leadsreferers.md index 9a51421..0acd8c5 100644 --- a/docs/models/operations/getreferersbyclicksdeprecatedresponsebody.md +++ b/docs/models/components/leadsreferers.md @@ -1,4 +1,4 @@ -# GetReferersByClicksDeprecatedResponseBody +# LeadsReferers ## Fields @@ -6,4 +6,4 @@ | 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 +| `leads` | *number* | :heavy_check_mark: | The number of leads from this referer | \ No newline at end of file diff --git a/docs/models/operations/gettimeseriesbyclicksdeprecatedresponsebody.md b/docs/models/components/leadstimeseries.md similarity index 79% rename from docs/models/operations/gettimeseriesbyclicksdeprecatedresponsebody.md rename to docs/models/components/leadstimeseries.md index ea6a544..a814445 100644 --- a/docs/models/operations/gettimeseriesbyclicksdeprecatedresponsebody.md +++ b/docs/models/components/leadstimeseries.md @@ -1,4 +1,4 @@ -# GetTimeseriesByClicksDeprecatedResponseBody +# LeadsTimeseries ## Fields @@ -6,4 +6,4 @@ | 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 +| `leads` | *number* | :heavy_check_mark: | The number of leads in the interval | \ No newline at end of file diff --git a/docs/models/components/leadstoplinks.md b/docs/models/components/leadstoplinks.md new file mode 100644 index 0000000..b7f51b6 --- /dev/null +++ b/docs/models/components/leadstoplinks.md @@ -0,0 +1,15 @@ +# LeadsTopLinks + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ~~`link`~~ | *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 short link | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link | +| `domain` | *string* | :heavy_check_mark: | The domain of the short link | +| `key` | *string* | :heavy_check_mark: | The key of the short link | +| `shortLink` | *string* | :heavy_check_mark: | The short link URL | +| `url` | *string* | :heavy_check_mark: | The destination URL of the short link | +| `createdAt` | *string* | :heavy_check_mark: | The creation timestamp of the short link | +| `leads` | *number* | :heavy_check_mark: | The number of leads from this link | \ No newline at end of file diff --git a/docs/models/components/leadstopurls.md b/docs/models/components/leadstopurls.md new file mode 100644 index 0000000..45f8996 --- /dev/null +++ b/docs/models/components/leadstopurls.md @@ -0,0 +1,9 @@ +# LeadsTopUrls + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `url` | *string* | :heavy_check_mark: | The destination URL | +| `leads` | *number* | :heavy_check_mark: | The number of leads from this URL | \ No newline at end of file diff --git a/docs/models/components/salesbrowsers.md b/docs/models/components/salesbrowsers.md new file mode 100644 index 0000000..bc2c4a4 --- /dev/null +++ b/docs/models/components/salesbrowsers.md @@ -0,0 +1,10 @@ +# SalesBrowsers + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `browser` | *string* | :heavy_check_mark: | The name of the browser | +| `sales` | *number* | :heavy_check_mark: | The number of sales from this browser | +| `amount` | *number* | :heavy_check_mark: | The total amount of sales from this browser | \ No newline at end of file diff --git a/docs/models/components/salescities.md b/docs/models/components/salescities.md new file mode 100644 index 0000000..2d8e0a5 --- /dev/null +++ b/docs/models/components/salescities.md @@ -0,0 +1,11 @@ +# SalesCities + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `city` | *string* | :heavy_check_mark: | The name of the city | +| `country` | [components.SalesCitiesCountry](../../models/components/salescitiescountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | +| `sales` | *number* | :heavy_check_mark: | The number of sales from this city | +| `amount` | *number* | :heavy_check_mark: | The total amount of sales from this city | \ No newline at end of file diff --git a/docs/models/components/salescitiescountry.md b/docs/models/components/salescitiescountry.md new file mode 100644 index 0000000..ba8a4fe --- /dev/null +++ b/docs/models/components/salescitiescountry.md @@ -0,0 +1,259 @@ +# SalesCitiesCountry + +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/components/salescount.md b/docs/models/components/salescount.md new file mode 100644 index 0000000..f597424 --- /dev/null +++ b/docs/models/components/salescount.md @@ -0,0 +1,9 @@ +# SalesCount + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `sales` | *number* | :heavy_check_mark: | The total number of sales | +| `amount` | *number* | :heavy_check_mark: | The total amount of sales | \ No newline at end of file diff --git a/docs/models/components/clicksbycities.md b/docs/models/components/salescountries.md similarity index 70% rename from docs/models/components/clicksbycities.md rename to docs/models/components/salescountries.md index 4d07306..fc91316 100644 --- a/docs/models/components/clicksbycities.md +++ b/docs/models/components/salescountries.md @@ -1,10 +1,10 @@ -# ClicksByCities +# SalesCountries ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `city` | *string* | :heavy_check_mark: | The name of the city | -| `country` | [components.ClicksByCitiesCountry](../../models/components/clicksbycitiescountry.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 +| `country` | [components.SalesCountriesCountry](../../models/components/salescountriescountry.md) | :heavy_check_mark: | The 2-letter country code: https://d.to/geo | +| `sales` | *number* | :heavy_check_mark: | The number of sales from this country | +| `amount` | *number* | :heavy_check_mark: | The total amount of sales from this country | \ No newline at end of file diff --git a/docs/models/components/salescountriescountry.md b/docs/models/components/salescountriescountry.md new file mode 100644 index 0000000..11c9b7f --- /dev/null +++ b/docs/models/components/salescountriescountry.md @@ -0,0 +1,259 @@ +# SalesCountriesCountry + +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/components/salesdevices.md b/docs/models/components/salesdevices.md new file mode 100644 index 0000000..d132fcb --- /dev/null +++ b/docs/models/components/salesdevices.md @@ -0,0 +1,10 @@ +# SalesDevices + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `device` | *string* | :heavy_check_mark: | The name of the device | +| `sales` | *number* | :heavy_check_mark: | The number of sales from this device | +| `amount` | *number* | :heavy_check_mark: | The total amount of sales from this device | \ No newline at end of file diff --git a/docs/models/operations/getbrowsersbyclicksdeprecatedresponsebody.md b/docs/models/components/salesos.md similarity index 55% rename from docs/models/operations/getbrowsersbyclicksdeprecatedresponsebody.md rename to docs/models/components/salesos.md index 40033d9..97016ff 100644 --- a/docs/models/operations/getbrowsersbyclicksdeprecatedresponsebody.md +++ b/docs/models/components/salesos.md @@ -1,9 +1,10 @@ -# GetBrowsersByClicksDeprecatedResponseBody +# SalesOS ## 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 +| `os` | *string* | :heavy_check_mark: | The name of the OS | +| `sales` | *number* | :heavy_check_mark: | The number of sales from this OS | +| `amount` | *number* | :heavy_check_mark: | The total amount of sales from this OS | \ No newline at end of file diff --git a/docs/models/components/salesreferers.md b/docs/models/components/salesreferers.md new file mode 100644 index 0000000..bd24b0d --- /dev/null +++ b/docs/models/components/salesreferers.md @@ -0,0 +1,10 @@ +# SalesReferers + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `referer` | *string* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` | +| `sales` | *number* | :heavy_check_mark: | The number of sales from this referer | +| `amount` | *number* | :heavy_check_mark: | The total amount of sales from this referer | \ No newline at end of file diff --git a/docs/models/components/salestimeseries.md b/docs/models/components/salestimeseries.md new file mode 100644 index 0000000..de019cf --- /dev/null +++ b/docs/models/components/salestimeseries.md @@ -0,0 +1,10 @@ +# SalesTimeseries + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `start` | *string* | :heavy_check_mark: | The starting timestamp of the interval | +| `sales` | *number* | :heavy_check_mark: | The number of sales in the interval | +| `amount` | *number* | :heavy_check_mark: | The total amount of sales in the interval | \ No newline at end of file diff --git a/docs/models/components/salestoplinks.md b/docs/models/components/salestoplinks.md new file mode 100644 index 0000000..7ed41fa --- /dev/null +++ b/docs/models/components/salestoplinks.md @@ -0,0 +1,16 @@ +# SalesTopLinks + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ~~`link`~~ | *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 short link | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link | +| `domain` | *string* | :heavy_check_mark: | The domain of the short link | +| `key` | *string* | :heavy_check_mark: | The key of the short link | +| `shortLink` | *string* | :heavy_check_mark: | The short link URL | +| `url` | *string* | :heavy_check_mark: | The destination URL of the short link | +| `createdAt` | *string* | :heavy_check_mark: | The creation timestamp of the short link | +| `sales` | *number* | :heavy_check_mark: | The number of sales from this link | +| `amount` | *number* | :heavy_check_mark: | The total amount of sales from this link | \ No newline at end of file diff --git a/docs/models/components/salestopurls.md b/docs/models/components/salestopurls.md new file mode 100644 index 0000000..c253e2b --- /dev/null +++ b/docs/models/components/salestopurls.md @@ -0,0 +1,10 @@ +# SalesTopUrls + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `url` | *string* | :heavy_check_mark: | The destination URL | +| `sales` | *number* | :heavy_check_mark: | The number of sales from this URL | +| `amount` | *number* | :heavy_check_mark: | The total amount of sales from this URL | \ No newline at end of file diff --git a/docs/models/operations/event.md b/docs/models/operations/event.md new file mode 100644 index 0000000..57dd269 --- /dev/null +++ b/docs/models/operations/event.md @@ -0,0 +1,13 @@ +# Event + +The type of event to retrieve analytics for. Defaults to 'clicks'. + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Clicks` | clicks | +| `Leads` | leads | +| `Sales` | sales | +| `Composite` | composite | \ No newline at end of file diff --git a/docs/models/operations/getbrowsersbyclicksdeprecatedglobals.md b/docs/models/operations/getbrowsersbyclicksdeprecatedglobals.md deleted file mode 100644 index df73643..0000000 --- a/docs/models/operations/getbrowsersbyclicksdeprecatedglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetBrowsersByClicksDeprecatedGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getbrowsersbyclicksdeprecatedqueryparaminterval.md b/docs/models/operations/getbrowsersbyclicksdeprecatedqueryparaminterval.md deleted file mode 100644 index 2f0eadd..0000000 --- a/docs/models/operations/getbrowsersbyclicksdeprecatedqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetBrowsersByClicksDeprecatedQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getbrowsersbyclicksdeprecatedrequest.md b/docs/models/operations/getbrowsersbyclicksdeprecatedrequest.md deleted file mode 100644 index 5671fcc..0000000 --- a/docs/models/operations/getbrowsersbyclicksdeprecatedrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetBrowsersByClicksDeprecatedRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetBrowsersByClicksDeprecatedQueryParamInterval](../../models/operations/getbrowsersbyclicksdeprecatedqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getbrowsersbyclicksglobals.md b/docs/models/operations/getbrowsersbyclicksglobals.md deleted file mode 100644 index 88db8ed..0000000 --- a/docs/models/operations/getbrowsersbyclicksglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetBrowsersByClicksGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getbrowsersbyclicksqueryparaminterval.md b/docs/models/operations/getbrowsersbyclicksqueryparaminterval.md deleted file mode 100644 index a72707a..0000000 --- a/docs/models/operations/getbrowsersbyclicksqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetBrowsersByClicksQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getbrowsersbyclicksrequest.md b/docs/models/operations/getbrowsersbyclicksrequest.md deleted file mode 100644 index d1c03d4..0000000 --- a/docs/models/operations/getbrowsersbyclicksrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetBrowsersByClicksRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetBrowsersByClicksQueryParamInterval](../../models/operations/getbrowsersbyclicksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getcitiesbyclicksdeprecatedglobals.md b/docs/models/operations/getcitiesbyclicksdeprecatedglobals.md deleted file mode 100644 index aa0605f..0000000 --- a/docs/models/operations/getcitiesbyclicksdeprecatedglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetCitiesByClicksDeprecatedGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getcitiesbyclicksdeprecatedqueryparaminterval.md b/docs/models/operations/getcitiesbyclicksdeprecatedqueryparaminterval.md deleted file mode 100644 index 53be6b1..0000000 --- a/docs/models/operations/getcitiesbyclicksdeprecatedqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetCitiesByClicksDeprecatedQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getcitiesbyclicksdeprecatedrequest.md b/docs/models/operations/getcitiesbyclicksdeprecatedrequest.md deleted file mode 100644 index 9d5c924..0000000 --- a/docs/models/operations/getcitiesbyclicksdeprecatedrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetCitiesByClicksDeprecatedRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetCitiesByClicksDeprecatedQueryParamInterval](../../models/operations/getcitiesbyclicksdeprecatedqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getcitiesbyclicksqueryparaminterval.md b/docs/models/operations/getcitiesbyclicksqueryparaminterval.md deleted file mode 100644 index 86b6e98..0000000 --- a/docs/models/operations/getcitiesbyclicksqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetCitiesByClicksQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getcitiesbyclicksrequest.md b/docs/models/operations/getcitiesbyclicksrequest.md deleted file mode 100644 index 7a51be5..0000000 --- a/docs/models/operations/getcitiesbyclicksrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetCitiesByClicksRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetCitiesByClicksQueryParamInterval](../../models/operations/getcitiesbyclicksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getclickscountdeprecatedglobals.md b/docs/models/operations/getclickscountdeprecatedglobals.md deleted file mode 100644 index 54eeff5..0000000 --- a/docs/models/operations/getclickscountdeprecatedglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetClicksCountDeprecatedGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getclickscountdeprecatedqueryparaminterval.md b/docs/models/operations/getclickscountdeprecatedqueryparaminterval.md deleted file mode 100644 index 17d9c63..0000000 --- a/docs/models/operations/getclickscountdeprecatedqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetClicksCountDeprecatedQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getclickscountdeprecatedrequest.md b/docs/models/operations/getclickscountdeprecatedrequest.md deleted file mode 100644 index ef9b425..0000000 --- a/docs/models/operations/getclickscountdeprecatedrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetClicksCountDeprecatedRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetClicksCountDeprecatedQueryParamInterval](../../models/operations/getclickscountdeprecatedqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getclickscountglobals.md b/docs/models/operations/getclickscountglobals.md deleted file mode 100644 index dbcd648..0000000 --- a/docs/models/operations/getclickscountglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetClicksCountGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getcountriesbyclicksdeprecatedglobals.md b/docs/models/operations/getcountriesbyclicksdeprecatedglobals.md deleted file mode 100644 index fd703c6..0000000 --- a/docs/models/operations/getcountriesbyclicksdeprecatedglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetCountriesByClicksDeprecatedGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getcountriesbyclicksdeprecatedqueryparaminterval.md b/docs/models/operations/getcountriesbyclicksdeprecatedqueryparaminterval.md deleted file mode 100644 index 2a1a4e5..0000000 --- a/docs/models/operations/getcountriesbyclicksdeprecatedqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetCountriesByClicksDeprecatedQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getcountriesbyclicksdeprecatedrequest.md b/docs/models/operations/getcountriesbyclicksdeprecatedrequest.md deleted file mode 100644 index a1aec13..0000000 --- a/docs/models/operations/getcountriesbyclicksdeprecatedrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetCountriesByClicksDeprecatedRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetCountriesByClicksDeprecatedQueryParamInterval](../../models/operations/getcountriesbyclicksdeprecatedqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getcountriesbyclicksglobals.md b/docs/models/operations/getcountriesbyclicksglobals.md deleted file mode 100644 index 50861de..0000000 --- a/docs/models/operations/getcountriesbyclicksglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetCountriesByClicksGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getcountriesbyclicksqueryparaminterval.md b/docs/models/operations/getcountriesbyclicksqueryparaminterval.md deleted file mode 100644 index 3ee7eaf..0000000 --- a/docs/models/operations/getcountriesbyclicksqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetCountriesByClicksQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getcountriesbyclicksrequest.md b/docs/models/operations/getcountriesbyclicksrequest.md deleted file mode 100644 index 14b8bd9..0000000 --- a/docs/models/operations/getcountriesbyclicksrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetCountriesByClicksRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetCountriesByClicksQueryParamInterval](../../models/operations/getcountriesbyclicksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getdevicesbyclicksdeprecatedglobals.md b/docs/models/operations/getdevicesbyclicksdeprecatedglobals.md deleted file mode 100644 index 9ae9684..0000000 --- a/docs/models/operations/getdevicesbyclicksdeprecatedglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetDevicesByClicksDeprecatedGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getdevicesbyclicksdeprecatedqueryparaminterval.md b/docs/models/operations/getdevicesbyclicksdeprecatedqueryparaminterval.md deleted file mode 100644 index e6df0fa..0000000 --- a/docs/models/operations/getdevicesbyclicksdeprecatedqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetDevicesByClicksDeprecatedQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getdevicesbyclicksdeprecatedrequest.md b/docs/models/operations/getdevicesbyclicksdeprecatedrequest.md deleted file mode 100644 index ba81b51..0000000 --- a/docs/models/operations/getdevicesbyclicksdeprecatedrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetDevicesByClicksDeprecatedRequest - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetDevicesByClicksDeprecatedQueryParamInterval](../../models/operations/getdevicesbyclicksdeprecatedqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getdevicesbyclicksglobals.md b/docs/models/operations/getdevicesbyclicksglobals.md deleted file mode 100644 index 8258a6d..0000000 --- a/docs/models/operations/getdevicesbyclicksglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetDevicesByClicksGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getdevicesbyclicksqueryparaminterval.md b/docs/models/operations/getdevicesbyclicksqueryparaminterval.md deleted file mode 100644 index fa9546f..0000000 --- a/docs/models/operations/getdevicesbyclicksqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetDevicesByClicksQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getdevicesbyclicksrequest.md b/docs/models/operations/getdevicesbyclicksrequest.md deleted file mode 100644 index 6635502..0000000 --- a/docs/models/operations/getdevicesbyclicksrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetDevicesByClicksRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetDevicesByClicksQueryParamInterval](../../models/operations/getdevicesbyclicksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getosbyclicksdeprecatedglobals.md b/docs/models/operations/getosbyclicksdeprecatedglobals.md deleted file mode 100644 index cf88d05..0000000 --- a/docs/models/operations/getosbyclicksdeprecatedglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetOSByClicksDeprecatedGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getosbyclicksdeprecatedqueryparaminterval.md b/docs/models/operations/getosbyclicksdeprecatedqueryparaminterval.md deleted file mode 100644 index 989748a..0000000 --- a/docs/models/operations/getosbyclicksdeprecatedqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetOSByClicksDeprecatedQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getosbyclicksdeprecatedrequest.md b/docs/models/operations/getosbyclicksdeprecatedrequest.md deleted file mode 100644 index 1f20299..0000000 --- a/docs/models/operations/getosbyclicksdeprecatedrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetOSByClicksDeprecatedRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetOSByClicksDeprecatedQueryParamInterval](../../models/operations/getosbyclicksdeprecatedqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getosbyclicksdeprecatedresponsebody.md b/docs/models/operations/getosbyclicksdeprecatedresponsebody.md deleted file mode 100644 index d7bf993..0000000 --- a/docs/models/operations/getosbyclicksdeprecatedresponsebody.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetOSByClicksDeprecatedResponseBody - - -## 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/getosbyclicksglobals.md b/docs/models/operations/getosbyclicksglobals.md deleted file mode 100644 index 0f65879..0000000 --- a/docs/models/operations/getosbyclicksglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetOSByClicksGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getosbyclicksqueryparaminterval.md b/docs/models/operations/getosbyclicksqueryparaminterval.md deleted file mode 100644 index abbeac4..0000000 --- a/docs/models/operations/getosbyclicksqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetOSByClicksQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getosbyclicksrequest.md b/docs/models/operations/getosbyclicksrequest.md deleted file mode 100644 index 8531e13..0000000 --- a/docs/models/operations/getosbyclicksrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetOSByClicksRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetOSByClicksQueryParamInterval](../../models/operations/getosbyclicksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getreferersbyclicksdeprecatedglobals.md b/docs/models/operations/getreferersbyclicksdeprecatedglobals.md deleted file mode 100644 index b89c4da..0000000 --- a/docs/models/operations/getreferersbyclicksdeprecatedglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetReferersByClicksDeprecatedGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getreferersbyclicksdeprecatedqueryparaminterval.md b/docs/models/operations/getreferersbyclicksdeprecatedqueryparaminterval.md deleted file mode 100644 index 3b8b676..0000000 --- a/docs/models/operations/getreferersbyclicksdeprecatedqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetReferersByClicksDeprecatedQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getreferersbyclicksdeprecatedrequest.md b/docs/models/operations/getreferersbyclicksdeprecatedrequest.md deleted file mode 100644 index e08c570..0000000 --- a/docs/models/operations/getreferersbyclicksdeprecatedrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetReferersByClicksDeprecatedRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetReferersByClicksDeprecatedQueryParamInterval](../../models/operations/getreferersbyclicksdeprecatedqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/getreferersbyclicksglobals.md b/docs/models/operations/getreferersbyclicksglobals.md deleted file mode 100644 index 7c5a8a5..0000000 --- a/docs/models/operations/getreferersbyclicksglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetReferersByClicksGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/getreferersbyclicksqueryparaminterval.md b/docs/models/operations/getreferersbyclicksqueryparaminterval.md deleted file mode 100644 index d1bf9f8..0000000 --- a/docs/models/operations/getreferersbyclicksqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetReferersByClicksQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getreferersbyclicksrequest.md b/docs/models/operations/getreferersbyclicksrequest.md deleted file mode 100644 index 11490ff..0000000 --- a/docs/models/operations/getreferersbyclicksrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetReferersByClicksRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetReferersByClicksQueryParamInterval](../../models/operations/getreferersbyclicksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/gettimeseriesbyclicksdeprecatedglobals.md b/docs/models/operations/gettimeseriesbyclicksdeprecatedglobals.md deleted file mode 100644 index 3dbff01..0000000 --- a/docs/models/operations/gettimeseriesbyclicksdeprecatedglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTimeseriesByClicksDeprecatedGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/gettimeseriesbyclicksdeprecatedqueryparaminterval.md b/docs/models/operations/gettimeseriesbyclicksdeprecatedqueryparaminterval.md deleted file mode 100644 index 5a8c779..0000000 --- a/docs/models/operations/gettimeseriesbyclicksdeprecatedqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTimeseriesByClicksDeprecatedQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/gettimeseriesbyclicksdeprecatedrequest.md b/docs/models/operations/gettimeseriesbyclicksdeprecatedrequest.md deleted file mode 100644 index b6bab67..0000000 --- a/docs/models/operations/gettimeseriesbyclicksdeprecatedrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetTimeseriesByClicksDeprecatedRequest - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetTimeseriesByClicksDeprecatedQueryParamInterval](../../models/operations/gettimeseriesbyclicksdeprecatedqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/gettimeseriesbyclicksglobals.md b/docs/models/operations/gettimeseriesbyclicksglobals.md deleted file mode 100644 index bec0763..0000000 --- a/docs/models/operations/gettimeseriesbyclicksglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTimeseriesByClicksGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/gettimeseriesbyclicksrequest.md b/docs/models/operations/gettimeseriesbyclicksrequest.md deleted file mode 100644 index cb43a25..0000000 --- a/docs/models/operations/gettimeseriesbyclicksrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetTimeseriesByClicksRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.QueryParamInterval](../../models/operations/queryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksbyclicksdeprecatedglobals.md b/docs/models/operations/gettoplinksbyclicksdeprecatedglobals.md deleted file mode 100644 index 477db22..0000000 --- a/docs/models/operations/gettoplinksbyclicksdeprecatedglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTopLinksByClicksDeprecatedGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksbyclicksdeprecatedqueryparaminterval.md b/docs/models/operations/gettoplinksbyclicksdeprecatedqueryparaminterval.md deleted file mode 100644 index 3429c44..0000000 --- a/docs/models/operations/gettoplinksbyclicksdeprecatedqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTopLinksByClicksDeprecatedQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksbyclicksdeprecatedrequest.md b/docs/models/operations/gettoplinksbyclicksdeprecatedrequest.md deleted file mode 100644 index f84afc1..0000000 --- a/docs/models/operations/gettoplinksbyclicksdeprecatedrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetTopLinksByClicksDeprecatedRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetTopLinksByClicksDeprecatedQueryParamInterval](../../models/operations/gettoplinksbyclicksdeprecatedqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksbyclicksdeprecatedresponsebody.md b/docs/models/operations/gettoplinksbyclicksdeprecatedresponsebody.md deleted file mode 100644 index 65142ab..0000000 --- a/docs/models/operations/gettoplinksbyclicksdeprecatedresponsebody.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTopLinksByClicksDeprecatedResponseBody - - -## 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/gettoplinksbyclicksglobals.md b/docs/models/operations/gettoplinksbyclicksglobals.md deleted file mode 100644 index 1563585..0000000 --- a/docs/models/operations/gettoplinksbyclicksglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTopLinksByClicksGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksbyclicksqueryparaminterval.md b/docs/models/operations/gettoplinksbyclicksqueryparaminterval.md deleted file mode 100644 index 38958ee..0000000 --- a/docs/models/operations/gettoplinksbyclicksqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTopLinksByClicksQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksbyclicksrequest.md b/docs/models/operations/gettoplinksbyclicksrequest.md deleted file mode 100644 index 9821354..0000000 --- a/docs/models/operations/gettoplinksbyclicksrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetTopLinksByClicksRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetTopLinksByClicksQueryParamInterval](../../models/operations/gettoplinksbyclicksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/gettoplinksbyclicksresponsebody.md b/docs/models/operations/gettoplinksbyclicksresponsebody.md deleted file mode 100644 index 1f8aaf4..0000000 --- a/docs/models/operations/gettoplinksbyclicksresponsebody.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTopLinksByClicksResponseBody - - -## 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/gettopurlsbyclicksdeprecatedglobals.md b/docs/models/operations/gettopurlsbyclicksdeprecatedglobals.md deleted file mode 100644 index 21627d5..0000000 --- a/docs/models/operations/gettopurlsbyclicksdeprecatedglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTopURLsByClicksDeprecatedGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/gettopurlsbyclicksdeprecatedqueryparaminterval.md b/docs/models/operations/gettopurlsbyclicksdeprecatedqueryparaminterval.md deleted file mode 100644 index 9b8a78a..0000000 --- a/docs/models/operations/gettopurlsbyclicksdeprecatedqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTopURLsByClicksDeprecatedQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/gettopurlsbyclicksdeprecatedrequest.md b/docs/models/operations/gettopurlsbyclicksdeprecatedrequest.md deleted file mode 100644 index 8814980..0000000 --- a/docs/models/operations/gettopurlsbyclicksdeprecatedrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetTopURLsByClicksDeprecatedRequest - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetTopURLsByClicksDeprecatedQueryParamInterval](../../models/operations/gettopurlsbyclicksdeprecatedqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/gettopurlsbyclicksdeprecatedresponsebody.md b/docs/models/operations/gettopurlsbyclicksdeprecatedresponsebody.md deleted file mode 100644 index e04fe83..0000000 --- a/docs/models/operations/gettopurlsbyclicksdeprecatedresponsebody.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTopURLsByClicksDeprecatedResponseBody - - -## 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/gettopurlsbyclicksglobals.md b/docs/models/operations/gettopurlsbyclicksglobals.md deleted file mode 100644 index 3ef7198..0000000 --- a/docs/models/operations/gettopurlsbyclicksglobals.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTopURLsByClicksGlobals - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | -| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/operations/gettopurlsbyclicksqueryparaminterval.md b/docs/models/operations/gettopurlsbyclicksqueryparaminterval.md deleted file mode 100644 index a1db122..0000000 --- a/docs/models/operations/gettopurlsbyclicksqueryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTopURLsByClicksQueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/gettopurlsbyclicksrequest.md b/docs/models/operations/gettopurlsbyclicksrequest.md deleted file mode 100644 index 80dff72..0000000 --- a/docs/models/operations/gettopurlsbyclicksrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetTopURLsByClicksRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.GetTopURLsByClicksQueryParamInterval](../../models/operations/gettopurlsbyclicksqueryparaminterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file diff --git a/docs/models/operations/interval.md b/docs/models/operations/interval.md index 2f0149a..054028d 100644 --- a/docs/models/operations/interval.md +++ b/docs/models/operations/interval.md @@ -5,13 +5,13 @@ The interval to retrieve analytics for. Takes precedence over start and end. If ## Values -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file +| Name | Value | +| --------------- | --------------- | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `Ytd` | ytd | +| `Oney` | 1y | +| `All` | all | +| `AllUnfiltered` | all_unfiltered | \ No newline at end of file diff --git a/docs/models/operations/queryparamgroupby.md b/docs/models/operations/queryparamgroupby.md new file mode 100644 index 0000000..2cca3b8 --- /dev/null +++ b/docs/models/operations/queryparamgroupby.md @@ -0,0 +1,20 @@ +# QueryParamGroupBy + +The parameter to group the analytics data points by. Defaults to 'count' if undefined. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Count` | count | +| `Timeseries` | timeseries | +| `Countries` | countries | +| `Cities` | cities | +| `Devices` | devices | +| `Browsers` | browsers | +| `Os` | os | +| `Referers` | referers | +| `TopLinks` | top_links | +| `TopUrls` | top_urls | +| `Trigger` | trigger | \ No newline at end of file diff --git a/docs/models/operations/queryparaminterval.md b/docs/models/operations/queryparaminterval.md deleted file mode 100644 index 740ea7a..0000000 --- a/docs/models/operations/queryparaminterval.md +++ /dev/null @@ -1,17 +0,0 @@ -# QueryParamInterval - -The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `Oneh` | 1h | -| `TwentyFourh` | 24h | -| `Sevend` | 7d | -| `Thirtyd` | 30d | -| `Ninetyd` | 90d | -| `Ytd` | ytd | -| `Oney` | 1y | -| `All` | all | \ No newline at end of file diff --git a/docs/models/operations/getcitiesbyclicksglobals.md b/docs/models/operations/retrieveanalyticsglobals.md similarity index 98% rename from docs/models/operations/getcitiesbyclicksglobals.md rename to docs/models/operations/retrieveanalyticsglobals.md index 17ec3d5..b2f2399 100644 --- a/docs/models/operations/getcitiesbyclicksglobals.md +++ b/docs/models/operations/retrieveanalyticsglobals.md @@ -1,4 +1,4 @@ -# GetCitiesByClicksGlobals +# RetrieveAnalyticsGlobals ## Fields diff --git a/docs/models/operations/getclickscountrequest.md b/docs/models/operations/retrieveanalyticsrequest.md similarity index 62% rename from docs/models/operations/getclickscountrequest.md rename to docs/models/operations/retrieveanalyticsrequest.md index 7c0d673..a59e117 100644 --- a/docs/models/operations/getclickscountrequest.md +++ b/docs/models/operations/retrieveanalyticsrequest.md @@ -1,24 +1,27 @@ -# GetClicksCountRequest +# RetrieveAnalyticsRequest ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | -| `key` | *string* | :heavy_minus_sign: | The short link slug. | -| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | -| `interval` | [operations.Interval](../../models/operations/interval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | -| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | -| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | -| `country` | [components.CountryCode](../../models/components/countrycode.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. | -| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | -| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | -| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `event` | [operations.Event](../../models/operations/event.md) | :heavy_minus_sign: | The type of event to retrieve analytics for. Defaults to 'clicks'. | | +| `groupBy` | [operations.QueryParamGroupBy](../../models/operations/queryparamgroupby.md) | :heavy_minus_sign: | The parameter to group the analytics data points by. Defaults to 'count' if undefined. | | +| `domain` | *string* | :heavy_minus_sign: | The domain to filter analytics for. | | +| `key` | *string* | :heavy_minus_sign: | The short link slug. | | +| `linkId` | *string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | | +| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | | +| `interval` | [operations.Interval](../../models/operations/interval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | | +| `start` | *string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | | +| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | | +| `timezone` | *string* | :heavy_minus_sign: | The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. | America/New_York | +| `country` | [components.CountryCode](../../models/components/countrycode.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. | | +| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | | +| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | | +| `root` | *boolean* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | | \ No newline at end of file diff --git a/docs/models/operations/retrieveanalyticsresponsebody.md b/docs/models/operations/retrieveanalyticsresponsebody.md new file mode 100644 index 0000000..6bfb0e4 --- /dev/null +++ b/docs/models/operations/retrieveanalyticsresponsebody.md @@ -0,0 +1,4 @@ +# RetrieveAnalyticsResponseBody + +Analytics data + diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index 1002884..446d18a 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -3,21 +3,11 @@ ### Available Operations -* [~~timeseries~~](#timeseries) - Retrieve timeseries click analytics :warning: **Deprecated** Use `timeseries` instead. -* [~~country~~](#country) - Retrieve top countries by clicks :warning: **Deprecated** Use `countries` instead. -* [~~city~~](#city) - Retrieve top cities by clicks :warning: **Deprecated** Use `cities` instead. -* [~~device~~](#device) - Retrieve top devices by clicks :warning: **Deprecated** Use `devices` instead. -* [~~browser~~](#browser) - Retrieve top browsers by clicks :warning: **Deprecated** Use `browsers` instead. -* [~~os~~](#os) - Retrieve top OS by clicks :warning: **Deprecated** Use `os` instead. -* [~~referer~~](#referer) - Retrieve top referers by clicks :warning: **Deprecated** Use `referers` instead. -* [~~topLinks~~](#toplinks) - Retrieve top links by clicks :warning: **Deprecated** Use `topLinks` instead. -* [~~topUrls~~](#topurls) - Retrieve top URLs by clicks :warning: **Deprecated** Use `topUrls` instead. +* [retrieve](#retrieve) - Retrieve analytics for a link, a domain, or the authenticated workspace. -## ~~timeseries~~ +## retrieve -Retrieve timeseries click analytics for a link, a domain, or the authenticated workspace over a period of time. - -> :warning: **DEPRECATED**: This method is deprecated. Use dub.analytics.clicks.timeseries instead.. Use `timeseries` instead. +Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters. ### Example Usage @@ -30,7 +20,7 @@ const dub = new Dub({ }); async function run() { - const result = await dub.analytics.timeseries({}); + const result = await dub.analytics.retrieve({}); // Handle the result console.log(result) @@ -43,438 +33,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTimeseriesByClicksDeprecatedRequest](../../models/operations/gettimeseriesbyclicksdeprecatedrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.RetrieveAnalyticsRequest](../../models/operations/retrieveanalyticsrequest.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.GetTimeseriesByClicksDeprecatedResponseBody[]](../../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 | */* | - -## ~~country~~ - -Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace. - -> :warning: **DEPRECATED**: This method is deprecated. Use dub.analytics.clicks.countries instead.. Use `countries` instead. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.country({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCountriesByClicksDeprecatedRequest](../../models/operations/getcountriesbyclicksdeprecatedrequest.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.ClicksByCountry[]](../../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 | */* | - -## ~~city~~ - -Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace. - -> :warning: **DEPRECATED**: This method is deprecated. Use dub.analytics.clicks.cities instead.. Use `cities` instead. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.city({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCitiesByClicksDeprecatedRequest](../../models/operations/getcitiesbyclicksdeprecatedrequest.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.ClicksByCities[]](../../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 | */* | - -## ~~device~~ - -Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace. - -> :warning: **DEPRECATED**: This method is deprecated. Use dub.analytics.clicks.devices instead.. Use `devices` instead. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.device({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetDevicesByClicksDeprecatedRequest](../../models/operations/getdevicesbyclicksdeprecatedrequest.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.GetDevicesByClicksDeprecatedResponseBody[]](../../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 | */* | - -## ~~browser~~ - -Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace. - -> :warning: **DEPRECATED**: This method is deprecated. Use dub.analytics.clicks.browsers instead.. Use `browsers` instead. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.browser({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBrowsersByClicksDeprecatedRequest](../../models/operations/getbrowsersbyclicksdeprecatedrequest.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.GetBrowsersByClicksDeprecatedResponseBody[]](../../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. - -> :warning: **DEPRECATED**: This method is deprecated. Use dub.analytics.clicks.os instead.. Use `os` instead. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.os({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetOSByClicksDeprecatedRequest](../../models/operations/getosbyclicksdeprecatedrequest.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.GetOSByClicksDeprecatedResponseBody[]](../../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 | */* | - -## ~~referer~~ - -Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace. - -> :warning: **DEPRECATED**: This method is deprecated. Use dub.analytics.clicks.referers instead.. Use `referers` instead. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.referer({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetReferersByClicksDeprecatedRequest](../../models/operations/getreferersbyclicksdeprecatedrequest.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.GetReferersByClicksDeprecatedResponseBody[]](../../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. - -> :warning: **DEPRECATED**: This method is deprecated. Use dub.analytics.clicks.topLinks instead.. Use `topLinks` instead. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.topLinks({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTopLinksByClicksDeprecatedRequest](../../models/operations/gettoplinksbyclicksdeprecatedrequest.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.GetTopLinksByClicksDeprecatedResponseBody[]](../../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. - -> :warning: **DEPRECATED**: This method is deprecated. Use dub.analytics.clicks.topUrls instead.. Use `topUrls` instead. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.topUrls({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTopURLsByClicksDeprecatedRequest](../../models/operations/gettopurlsbyclicksdeprecatedrequest.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.GetTopURLsByClicksDeprecatedResponseBody[]](../../models/.md)\>** +**Promise\<[operations.RetrieveAnalyticsResponseBody](../../models/operations/retrieveanalyticsresponsebody.md)\>** ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/clicks/README.md b/docs/sdks/clicks/README.md deleted file mode 100644 index a69bc36..0000000 --- a/docs/sdks/clicks/README.md +++ /dev/null @@ -1,579 +0,0 @@ -# Clicks -(*analytics.clicks*) - -### Available Operations - -* [count](#count) - Retrieve the total clicks count -* [timeseries](#timeseries) - Retrieve timeseries click analytics -* [countries](#countries) - Retrieve top countries by clicks -* [cities](#cities) - Retrieve top cities by clicks -* [devices](#devices) - Retrieve top devices by clicks -* [browsers](#browsers) - Retrieve top browsers by clicks -* [os](#os) - Retrieve top OS by clicks -* [referers](#referers) - Retrieve top referers by clicks -* [topLinks](#toplinks) - Retrieve top links by clicks -* [topUrls](#topurls) - Retrieve top URLs by clicks -* [~~getClicksCountDeprecated~~](#getclickscountdeprecated) - Retrieve the total clicks count :warning: **Deprecated** Use `count` instead. - -## count - -Retrieve the total number of clicks for a link, a domain, or the authenticated workspace. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.count({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetClicksCountRequest](../../models/operations/getclickscountrequest.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 timeseries click analytics for a link, a domain, or the authenticated workspace over a period of time. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.timeseries({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTimeseriesByClicksRequest](../../models/operations/gettimeseriesbyclicksrequest.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"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.countries({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCountriesByClicksRequest](../../models/operations/getcountriesbyclicksrequest.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.ClicksByCountry[]](../../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"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.cities({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCitiesByClicksRequest](../../models/operations/getcitiesbyclicksrequest.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.ClicksByCities[]](../../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"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.devices({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetDevicesByClicksRequest](../../models/operations/getdevicesbyclicksrequest.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.GetDevicesByClicksResponseBody[]](../../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"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.browsers({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBrowsersByClicksRequest](../../models/operations/getbrowsersbyclicksrequest.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.GetBrowsersByClicksResponseBody[]](../../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"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.os({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetOSByClicksRequest](../../models/operations/getosbyclicksrequest.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.GetOSByClicksResponseBody[]](../../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"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.referers({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetReferersByClicksRequest](../../models/operations/getreferersbyclicksrequest.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.GetReferersByClicksResponseBody[]](../../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"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.topLinks({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTopLinksByClicksRequest](../../models/operations/gettoplinksbyclicksrequest.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.GetTopLinksByClicksResponseBody[]](../../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"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.topUrls({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTopURLsByClicksRequest](../../models/operations/gettopurlsbyclicksrequest.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.GetTopURLsByClicksResponseBody[]](../../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 | */* | - -## ~~getClicksCountDeprecated~~ - -Retrieve the total number of clicks for a link, a domain, or the authenticated workspace. - -> :warning: **DEPRECATED**: This method is deprecated. Use dub.analytics.clicks.count instead.. Use `count` instead. - -### Example Usage - -```typescript -import { Dub } from "dub"; - -const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", -}); - -async function run() { - const result = await dub.analytics.clicks.getClicksCountDeprecated({}); - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetClicksCountDeprecatedRequest](../../models/operations/getclickscountdeprecatedrequest.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 | */* | diff --git a/jsr.json b/jsr.json index 9fe2dd8..eddde85 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "dub", - "version": "0.29.9", + "version": "0.29.10", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 0c6b953..e658bb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dub", - "version": "0.29.9", + "version": "0.29.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dub", - "version": "0.29.9", + "version": "0.29.10", "devDependencies": { "@types/jsonpath": "^0.2.4", "@types/node": "^20.12.7", diff --git a/package.json b/package.json index f16d243..b452a76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dub", - "version": "0.29.9", + "version": "0.29.10", "author": "Dub", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 647d28a..151e40a 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.1", - sdkVersion: "0.29.9", + sdkVersion: "0.29.10", genVersion: "2.338.1", - userAgent: "speakeasy-sdk/typescript 0.29.9 2.338.1 0.0.1 dub", + userAgent: "speakeasy-sdk/typescript 0.29.10 2.338.1 0.0.1 dub", } as const; diff --git a/src/models/components/clicksbrowsers.ts b/src/models/components/clicksbrowsers.ts new file mode 100644 index 0000000..b0a010e --- /dev/null +++ b/src/models/components/clicksbrowsers.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ClicksBrowsers = { + /** + * The name of the browser + */ + browser: string; + /** + * The number of clicks from this browser + */ + clicks: number; +}; + +/** @internal */ +export namespace ClicksBrowsers$ { + 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 = z + .object({ + browser: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + browser: v.browser, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/components/clicksbycities.ts b/src/models/components/clickscities.ts similarity index 89% rename from src/models/components/clicksbycities.ts rename to src/models/components/clickscities.ts index b9d91f6..ccda4c3 100644 --- a/src/models/components/clicksbycities.ts +++ b/src/models/components/clickscities.ts @@ -8,7 +8,7 @@ import * as z from "zod"; /** * The 2-letter country code of the city: https://d.to/geo */ -export const ClicksByCitiesCountry = { +export const ClicksCitiesCountry = { Af: "AF", Al: "AL", Dz: "DZ", @@ -263,9 +263,9 @@ export const ClicksByCitiesCountry = { /** * The 2-letter country code of the city: https://d.to/geo */ -export type ClicksByCitiesCountry = ClosedEnum; +export type ClicksCitiesCountry = ClosedEnum; -export type ClicksByCities = { +export type ClicksCities = { /** * The name of the city */ @@ -273,7 +273,7 @@ export type ClicksByCities = { /** * The 2-letter country code of the city: https://d.to/geo */ - country: ClicksByCitiesCountry; + country: ClicksCitiesCountry; /** * The number of clicks from this city */ @@ -281,17 +281,17 @@ export type ClicksByCities = { }; /** @internal */ -export namespace ClicksByCitiesCountry$ { - export const inboundSchema = z.nativeEnum(ClicksByCitiesCountry); +export namespace ClicksCitiesCountry$ { + export const inboundSchema = z.nativeEnum(ClicksCitiesCountry); export const outboundSchema = inboundSchema; } /** @internal */ -export namespace ClicksByCities$ { - export const inboundSchema: z.ZodType = z +export namespace ClicksCities$ { + export const inboundSchema: z.ZodType = z .object({ city: z.string(), - country: ClicksByCitiesCountry$.inboundSchema, + country: ClicksCitiesCountry$.inboundSchema, clicks: z.number(), }) .transform((v) => { @@ -308,10 +308,10 @@ export namespace ClicksByCities$ { clicks: number; }; - export const outboundSchema: z.ZodType = z + export const outboundSchema: z.ZodType = z .object({ city: z.string(), - country: ClicksByCitiesCountry$.outboundSchema, + country: ClicksCitiesCountry$.outboundSchema, clicks: z.number(), }) .transform((v) => { diff --git a/src/models/components/clickscount.ts b/src/models/components/clickscount.ts new file mode 100644 index 0000000..8fba9f5 --- /dev/null +++ b/src/models/components/clickscount.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ClicksCount = { + /** + * The total number of clicks + */ + clicks: number; +}; + +/** @internal */ +export namespace ClicksCount$ { + export const inboundSchema: z.ZodType = z + .object({ + clicks: z.number(), + }) + .transform((v) => { + return { + clicks: v.clicks, + }; + }); + + export type Outbound = { + clicks: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + clicks: z.number(), + }) + .transform((v) => { + return { + clicks: v.clicks, + }; + }); +} diff --git a/src/models/components/clicksbycountry.ts b/src/models/components/clickscountries.ts similarity index 96% rename from src/models/components/clicksbycountry.ts rename to src/models/components/clickscountries.ts index e1b9e72..66e79a4 100644 --- a/src/models/components/clicksbycountry.ts +++ b/src/models/components/clickscountries.ts @@ -265,7 +265,7 @@ export const Country = { */ export type Country = ClosedEnum; -export type ClicksByCountry = { +export type ClicksCountries = { /** * The 2-letter country code: https://d.to/geo */ @@ -283,8 +283,8 @@ export namespace Country$ { } /** @internal */ -export namespace ClicksByCountry$ { - export const inboundSchema: z.ZodType = z +export namespace ClicksCountries$ { + export const inboundSchema: z.ZodType = z .object({ country: Country$.inboundSchema, clicks: z.number(), @@ -301,7 +301,7 @@ export namespace ClicksByCountry$ { clicks: number; }; - export const outboundSchema: z.ZodType = z + export const outboundSchema: z.ZodType = z .object({ country: Country$.outboundSchema, clicks: z.number(), diff --git a/src/models/components/clicksdevices.ts b/src/models/components/clicksdevices.ts new file mode 100644 index 0000000..ef88925 --- /dev/null +++ b/src/models/components/clicksdevices.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ClicksDevices = { + /** + * The name of the device + */ + device: string; + /** + * The number of clicks from this device + */ + clicks: number; +}; + +/** @internal */ +export namespace ClicksDevices$ { + 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/components/clicksos.ts b/src/models/components/clicksos.ts new file mode 100644 index 0000000..908d8af --- /dev/null +++ b/src/models/components/clicksos.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ClicksOS = { + /** + * The name of the OS + */ + os: string; + /** + * The number of clicks from this OS + */ + clicks: number; +}; + +/** @internal */ +export namespace ClicksOS$ { + 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/components/clicksreferers.ts b/src/models/components/clicksreferers.ts new file mode 100644 index 0000000..5724892 --- /dev/null +++ b/src/models/components/clicksreferers.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ClicksReferers = { + /** + * The name of the referer. If unknown, this will be `(direct)` + */ + referer: string; + /** + * The number of clicks from this referer + */ + clicks: number; +}; + +/** @internal */ +export namespace ClicksReferers$ { + 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 = z + .object({ + referer: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + referer: v.referer, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/components/clickstimeseries.ts b/src/models/components/clickstimeseries.ts new file mode 100644 index 0000000..7600344 --- /dev/null +++ b/src/models/components/clickstimeseries.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ClicksTimeseries = { + /** + * The starting timestamp of the interval + */ + start: string; + /** + * The number of clicks in the interval + */ + clicks: number; +}; + +/** @internal */ +export namespace ClicksTimeseries$ { + 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/components/clickstoplinks.ts b/src/models/components/clickstoplinks.ts new file mode 100644 index 0000000..a93c8f7 --- /dev/null +++ b/src/models/components/clickstoplinks.ts @@ -0,0 +1,104 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ClicksTopLinks = { + /** + * The unique ID of the short link + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + link: string; + /** + * The unique ID of the short link + */ + id: string; + /** + * The domain of the short link + */ + domain: string; + /** + * The key of the short link + */ + key: string; + /** + * The short link URL + */ + shortLink: string; + /** + * The destination URL of the short link + */ + url: string; + /** + * The creation timestamp of the short link + */ + createdAt: string; + /** + * The number of clicks from this link + */ + clicks: number; +}; + +/** @internal */ +export namespace ClicksTopLinks$ { + export const inboundSchema: z.ZodType = z + .object({ + link: z.string(), + id: z.string(), + domain: z.string(), + key: z.string(), + shortLink: z.string(), + url: z.string(), + createdAt: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + link: v.link, + id: v.id, + domain: v.domain, + key: v.key, + shortLink: v.shortLink, + url: v.url, + createdAt: v.createdAt, + clicks: v.clicks, + }; + }); + + export type Outbound = { + link: string; + id: string; + domain: string; + key: string; + shortLink: string; + url: string; + createdAt: string; + clicks: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + link: z.string(), + id: z.string(), + domain: z.string(), + key: z.string(), + shortLink: z.string(), + url: z.string(), + createdAt: z.string(), + clicks: z.number(), + }) + .transform((v) => { + return { + link: v.link, + id: v.id, + domain: v.domain, + key: v.key, + shortLink: v.shortLink, + url: v.url, + createdAt: v.createdAt, + clicks: v.clicks, + }; + }); +} diff --git a/src/models/components/clickstopurls.ts b/src/models/components/clickstopurls.ts new file mode 100644 index 0000000..aa0e0e8 --- /dev/null +++ b/src/models/components/clickstopurls.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ClicksTopUrls = { + /** + * The destination URL + */ + url: string; + /** + * The number of clicks from this URL + */ + clicks: number; +}; + +/** @internal */ +export namespace ClicksTopUrls$ { + 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/components/index.ts b/src/models/components/index.ts index bced464..60f95bf 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -2,12 +2,40 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -export * from "./clicksbycities"; -export * from "./clicksbycountry"; +export * from "./clicksbrowsers"; +export * from "./clickscities"; +export * from "./clickscount"; +export * from "./clickscountries"; +export * from "./clicksdevices"; +export * from "./clicksos"; +export * from "./clicksreferers"; +export * from "./clickstimeseries"; +export * from "./clickstoplinks"; +export * from "./clickstopurls"; export * from "./countrycode"; export * from "./domainschema"; +export * from "./leadsbrowsers"; +export * from "./leadscities"; +export * from "./leadscount"; +export * from "./leadscountries"; +export * from "./leadsdevices"; +export * from "./leadsos"; +export * from "./leadsreferers"; +export * from "./leadstimeseries"; +export * from "./leadstoplinks"; +export * from "./leadstopurls"; export * from "./linkgeotargeting"; export * from "./linkschema"; +export * from "./salesbrowsers"; +export * from "./salescities"; +export * from "./salescount"; +export * from "./salescountries"; +export * from "./salesdevices"; +export * from "./salesos"; +export * from "./salesreferers"; +export * from "./salestimeseries"; +export * from "./salestoplinks"; +export * from "./salestopurls"; export * from "./security"; export * from "./tagschema"; export * from "./workspaceschema"; diff --git a/src/models/components/leadsbrowsers.ts b/src/models/components/leadsbrowsers.ts new file mode 100644 index 0000000..010a4a7 --- /dev/null +++ b/src/models/components/leadsbrowsers.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type LeadsBrowsers = { + /** + * The name of the browser + */ + browser: string; + /** + * The number of leads from this browser + */ + leads: number; +}; + +/** @internal */ +export namespace LeadsBrowsers$ { + export const inboundSchema: z.ZodType = z + .object({ + browser: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + browser: v.browser, + leads: v.leads, + }; + }); + + export type Outbound = { + browser: string; + leads: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + browser: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + browser: v.browser, + leads: v.leads, + }; + }); +} diff --git a/src/models/components/leadscities.ts b/src/models/components/leadscities.ts new file mode 100644 index 0000000..c8b8c67 --- /dev/null +++ b/src/models/components/leadscities.ts @@ -0,0 +1,324 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { ClosedEnum } from "../../types"; +import * as z from "zod"; + +/** + * The 2-letter country code of the city: https://d.to/geo + */ +export const LeadsCitiesCountry = { + 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 LeadsCitiesCountry = ClosedEnum; + +export type LeadsCities = { + /** + * The name of the city + */ + city: string; + /** + * The 2-letter country code of the city: https://d.to/geo + */ + country: LeadsCitiesCountry; + /** + * The number of leads from this city + */ + leads: number; +}; + +/** @internal */ +export namespace LeadsCitiesCountry$ { + export const inboundSchema = z.nativeEnum(LeadsCitiesCountry); + export const outboundSchema = inboundSchema; +} + +/** @internal */ +export namespace LeadsCities$ { + export const inboundSchema: z.ZodType = z + .object({ + city: z.string(), + country: LeadsCitiesCountry$.inboundSchema, + leads: z.number(), + }) + .transform((v) => { + return { + city: v.city, + country: v.country, + leads: v.leads, + }; + }); + + export type Outbound = { + city: string; + country: string; + leads: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + city: z.string(), + country: LeadsCitiesCountry$.outboundSchema, + leads: z.number(), + }) + .transform((v) => { + return { + city: v.city, + country: v.country, + leads: v.leads, + }; + }); +} diff --git a/src/models/components/leadscount.ts b/src/models/components/leadscount.ts new file mode 100644 index 0000000..a65d7df --- /dev/null +++ b/src/models/components/leadscount.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type LeadsCount = { + /** + * The total number of leads + */ + leads: number; +}; + +/** @internal */ +export namespace LeadsCount$ { + export const inboundSchema: z.ZodType = z + .object({ + leads: z.number(), + }) + .transform((v) => { + return { + leads: v.leads, + }; + }); + + export type Outbound = { + leads: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + leads: z.number(), + }) + .transform((v) => { + return { + leads: v.leads, + }; + }); +} diff --git a/src/models/components/leadscountries.ts b/src/models/components/leadscountries.ts new file mode 100644 index 0000000..767453f --- /dev/null +++ b/src/models/components/leadscountries.ts @@ -0,0 +1,315 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { ClosedEnum } from "../../types"; +import * as z from "zod"; + +/** + * The 2-letter country code: https://d.to/geo + */ +export const LeadsCountriesCountry = { + 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 LeadsCountriesCountry = ClosedEnum; + +export type LeadsCountries = { + /** + * The 2-letter country code: https://d.to/geo + */ + country: LeadsCountriesCountry; + /** + * The number of leads from this country + */ + leads: number; +}; + +/** @internal */ +export namespace LeadsCountriesCountry$ { + export const inboundSchema = z.nativeEnum(LeadsCountriesCountry); + export const outboundSchema = inboundSchema; +} + +/** @internal */ +export namespace LeadsCountries$ { + export const inboundSchema: z.ZodType = z + .object({ + country: LeadsCountriesCountry$.inboundSchema, + leads: z.number(), + }) + .transform((v) => { + return { + country: v.country, + leads: v.leads, + }; + }); + + export type Outbound = { + country: string; + leads: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + country: LeadsCountriesCountry$.outboundSchema, + leads: z.number(), + }) + .transform((v) => { + return { + country: v.country, + leads: v.leads, + }; + }); +} diff --git a/src/models/components/leadsdevices.ts b/src/models/components/leadsdevices.ts new file mode 100644 index 0000000..82b84e6 --- /dev/null +++ b/src/models/components/leadsdevices.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type LeadsDevices = { + /** + * The name of the device + */ + device: string; + /** + * The number of leads from this device + */ + leads: number; +}; + +/** @internal */ +export namespace LeadsDevices$ { + export const inboundSchema: z.ZodType = z + .object({ + device: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + device: v.device, + leads: v.leads, + }; + }); + + export type Outbound = { + device: string; + leads: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + device: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + device: v.device, + leads: v.leads, + }; + }); +} diff --git a/src/models/components/leadsos.ts b/src/models/components/leadsos.ts new file mode 100644 index 0000000..4b25541 --- /dev/null +++ b/src/models/components/leadsos.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type LeadsOS = { + /** + * The name of the OS + */ + os: string; + /** + * The number of leads from this OS + */ + leads: number; +}; + +/** @internal */ +export namespace LeadsOS$ { + export const inboundSchema: z.ZodType = z + .object({ + os: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + os: v.os, + leads: v.leads, + }; + }); + + export type Outbound = { + os: string; + leads: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + os: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + os: v.os, + leads: v.leads, + }; + }); +} diff --git a/src/models/components/leadsreferers.ts b/src/models/components/leadsreferers.ts new file mode 100644 index 0000000..28494f9 --- /dev/null +++ b/src/models/components/leadsreferers.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type LeadsReferers = { + /** + * The name of the referer. If unknown, this will be `(direct)` + */ + referer: string; + /** + * The number of leads from this referer + */ + leads: number; +}; + +/** @internal */ +export namespace LeadsReferers$ { + export const inboundSchema: z.ZodType = z + .object({ + referer: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + referer: v.referer, + leads: v.leads, + }; + }); + + export type Outbound = { + referer: string; + leads: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + referer: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + referer: v.referer, + leads: v.leads, + }; + }); +} diff --git a/src/models/components/leadstimeseries.ts b/src/models/components/leadstimeseries.ts new file mode 100644 index 0000000..90a2f88 --- /dev/null +++ b/src/models/components/leadstimeseries.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type LeadsTimeseries = { + /** + * The starting timestamp of the interval + */ + start: string; + /** + * The number of leads in the interval + */ + leads: number; +}; + +/** @internal */ +export namespace LeadsTimeseries$ { + export const inboundSchema: z.ZodType = z + .object({ + start: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + start: v.start, + leads: v.leads, + }; + }); + + export type Outbound = { + start: string; + leads: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + start: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + start: v.start, + leads: v.leads, + }; + }); +} diff --git a/src/models/components/leadstoplinks.ts b/src/models/components/leadstoplinks.ts new file mode 100644 index 0000000..5fb95d3 --- /dev/null +++ b/src/models/components/leadstoplinks.ts @@ -0,0 +1,104 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type LeadsTopLinks = { + /** + * The unique ID of the short link + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + link: string; + /** + * The unique ID of the short link + */ + id: string; + /** + * The domain of the short link + */ + domain: string; + /** + * The key of the short link + */ + key: string; + /** + * The short link URL + */ + shortLink: string; + /** + * The destination URL of the short link + */ + url: string; + /** + * The creation timestamp of the short link + */ + createdAt: string; + /** + * The number of leads from this link + */ + leads: number; +}; + +/** @internal */ +export namespace LeadsTopLinks$ { + export const inboundSchema: z.ZodType = z + .object({ + link: z.string(), + id: z.string(), + domain: z.string(), + key: z.string(), + shortLink: z.string(), + url: z.string(), + createdAt: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + link: v.link, + id: v.id, + domain: v.domain, + key: v.key, + shortLink: v.shortLink, + url: v.url, + createdAt: v.createdAt, + leads: v.leads, + }; + }); + + export type Outbound = { + link: string; + id: string; + domain: string; + key: string; + shortLink: string; + url: string; + createdAt: string; + leads: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + link: z.string(), + id: z.string(), + domain: z.string(), + key: z.string(), + shortLink: z.string(), + url: z.string(), + createdAt: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + link: v.link, + id: v.id, + domain: v.domain, + key: v.key, + shortLink: v.shortLink, + url: v.url, + createdAt: v.createdAt, + leads: v.leads, + }; + }); +} diff --git a/src/models/components/leadstopurls.ts b/src/models/components/leadstopurls.ts new file mode 100644 index 0000000..e522be5 --- /dev/null +++ b/src/models/components/leadstopurls.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type LeadsTopUrls = { + /** + * The destination URL + */ + url: string; + /** + * The number of leads from this URL + */ + leads: number; +}; + +/** @internal */ +export namespace LeadsTopUrls$ { + export const inboundSchema: z.ZodType = z + .object({ + url: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + url: v.url, + leads: v.leads, + }; + }); + + export type Outbound = { + url: string; + leads: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + url: z.string(), + leads: z.number(), + }) + .transform((v) => { + return { + url: v.url, + leads: v.leads, + }; + }); +} diff --git a/src/models/components/salesbrowsers.ts b/src/models/components/salesbrowsers.ts new file mode 100644 index 0000000..7f53185 --- /dev/null +++ b/src/models/components/salesbrowsers.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type SalesBrowsers = { + /** + * The name of the browser + */ + browser: string; + /** + * The number of sales from this browser + */ + sales: number; + /** + * The total amount of sales from this browser + */ + amount: number; +}; + +/** @internal */ +export namespace SalesBrowsers$ { + export const inboundSchema: z.ZodType = z + .object({ + browser: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + browser: v.browser, + sales: v.sales, + amount: v.amount, + }; + }); + + export type Outbound = { + browser: string; + sales: number; + amount: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + browser: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + browser: v.browser, + sales: v.sales, + amount: v.amount, + }; + }); +} diff --git a/src/models/components/salescities.ts b/src/models/components/salescities.ts new file mode 100644 index 0000000..32d49ee --- /dev/null +++ b/src/models/components/salescities.ts @@ -0,0 +1,333 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { ClosedEnum } from "../../types"; +import * as z from "zod"; + +/** + * The 2-letter country code of the city: https://d.to/geo + */ +export const SalesCitiesCountry = { + 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 SalesCitiesCountry = ClosedEnum; + +export type SalesCities = { + /** + * The name of the city + */ + city: string; + /** + * The 2-letter country code of the city: https://d.to/geo + */ + country: SalesCitiesCountry; + /** + * The number of sales from this city + */ + sales: number; + /** + * The total amount of sales from this city + */ + amount: number; +}; + +/** @internal */ +export namespace SalesCitiesCountry$ { + export const inboundSchema = z.nativeEnum(SalesCitiesCountry); + export const outboundSchema = inboundSchema; +} + +/** @internal */ +export namespace SalesCities$ { + export const inboundSchema: z.ZodType = z + .object({ + city: z.string(), + country: SalesCitiesCountry$.inboundSchema, + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + city: v.city, + country: v.country, + sales: v.sales, + amount: v.amount, + }; + }); + + export type Outbound = { + city: string; + country: string; + sales: number; + amount: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + city: z.string(), + country: SalesCitiesCountry$.outboundSchema, + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + city: v.city, + country: v.country, + sales: v.sales, + amount: v.amount, + }; + }); +} diff --git a/src/models/components/salescount.ts b/src/models/components/salescount.ts new file mode 100644 index 0000000..f28b0fc --- /dev/null +++ b/src/models/components/salescount.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type SalesCount = { + /** + * The total number of sales + */ + sales: number; + /** + * The total amount of sales + */ + amount: number; +}; + +/** @internal */ +export namespace SalesCount$ { + export const inboundSchema: z.ZodType = z + .object({ + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + sales: v.sales, + amount: v.amount, + }; + }); + + export type Outbound = { + sales: number; + amount: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + sales: v.sales, + amount: v.amount, + }; + }); +} diff --git a/src/models/components/salescountries.ts b/src/models/components/salescountries.ts new file mode 100644 index 0000000..5741bcd --- /dev/null +++ b/src/models/components/salescountries.ts @@ -0,0 +1,324 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { ClosedEnum } from "../../types"; +import * as z from "zod"; + +/** + * The 2-letter country code: https://d.to/geo + */ +export const SalesCountriesCountry = { + 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 SalesCountriesCountry = ClosedEnum; + +export type SalesCountries = { + /** + * The 2-letter country code: https://d.to/geo + */ + country: SalesCountriesCountry; + /** + * The number of sales from this country + */ + sales: number; + /** + * The total amount of sales from this country + */ + amount: number; +}; + +/** @internal */ +export namespace SalesCountriesCountry$ { + export const inboundSchema = z.nativeEnum(SalesCountriesCountry); + export const outboundSchema = inboundSchema; +} + +/** @internal */ +export namespace SalesCountries$ { + export const inboundSchema: z.ZodType = z + .object({ + country: SalesCountriesCountry$.inboundSchema, + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + country: v.country, + sales: v.sales, + amount: v.amount, + }; + }); + + export type Outbound = { + country: string; + sales: number; + amount: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + country: SalesCountriesCountry$.outboundSchema, + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + country: v.country, + sales: v.sales, + amount: v.amount, + }; + }); +} diff --git a/src/models/components/salesdevices.ts b/src/models/components/salesdevices.ts new file mode 100644 index 0000000..647fb04 --- /dev/null +++ b/src/models/components/salesdevices.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type SalesDevices = { + /** + * The name of the device + */ + device: string; + /** + * The number of sales from this device + */ + sales: number; + /** + * The total amount of sales from this device + */ + amount: number; +}; + +/** @internal */ +export namespace SalesDevices$ { + export const inboundSchema: z.ZodType = z + .object({ + device: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + device: v.device, + sales: v.sales, + amount: v.amount, + }; + }); + + export type Outbound = { + device: string; + sales: number; + amount: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + device: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + device: v.device, + sales: v.sales, + amount: v.amount, + }; + }); +} diff --git a/src/models/components/salesos.ts b/src/models/components/salesos.ts new file mode 100644 index 0000000..30e7613 --- /dev/null +++ b/src/models/components/salesos.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type SalesOS = { + /** + * The name of the OS + */ + os: string; + /** + * The number of sales from this OS + */ + sales: number; + /** + * The total amount of sales from this OS + */ + amount: number; +}; + +/** @internal */ +export namespace SalesOS$ { + export const inboundSchema: z.ZodType = z + .object({ + os: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + os: v.os, + sales: v.sales, + amount: v.amount, + }; + }); + + export type Outbound = { + os: string; + sales: number; + amount: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + os: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + os: v.os, + sales: v.sales, + amount: v.amount, + }; + }); +} diff --git a/src/models/components/salesreferers.ts b/src/models/components/salesreferers.ts new file mode 100644 index 0000000..735a02f --- /dev/null +++ b/src/models/components/salesreferers.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type SalesReferers = { + /** + * The name of the referer. If unknown, this will be `(direct)` + */ + referer: string; + /** + * The number of sales from this referer + */ + sales: number; + /** + * The total amount of sales from this referer + */ + amount: number; +}; + +/** @internal */ +export namespace SalesReferers$ { + export const inboundSchema: z.ZodType = z + .object({ + referer: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + referer: v.referer, + sales: v.sales, + amount: v.amount, + }; + }); + + export type Outbound = { + referer: string; + sales: number; + amount: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + referer: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + referer: v.referer, + sales: v.sales, + amount: v.amount, + }; + }); +} diff --git a/src/models/components/salestimeseries.ts b/src/models/components/salestimeseries.ts new file mode 100644 index 0000000..6fc1e8f --- /dev/null +++ b/src/models/components/salestimeseries.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type SalesTimeseries = { + /** + * The starting timestamp of the interval + */ + start: string; + /** + * The number of sales in the interval + */ + sales: number; + /** + * The total amount of sales in the interval + */ + amount: number; +}; + +/** @internal */ +export namespace SalesTimeseries$ { + export const inboundSchema: z.ZodType = z + .object({ + start: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + start: v.start, + sales: v.sales, + amount: v.amount, + }; + }); + + export type Outbound = { + start: string; + sales: number; + amount: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + start: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + start: v.start, + sales: v.sales, + amount: v.amount, + }; + }); +} diff --git a/src/models/components/salestoplinks.ts b/src/models/components/salestoplinks.ts new file mode 100644 index 0000000..dea452a --- /dev/null +++ b/src/models/components/salestoplinks.ts @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type SalesTopLinks = { + /** + * The unique ID of the short link + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + link: string; + /** + * The unique ID of the short link + */ + id: string; + /** + * The domain of the short link + */ + domain: string; + /** + * The key of the short link + */ + key: string; + /** + * The short link URL + */ + shortLink: string; + /** + * The destination URL of the short link + */ + url: string; + /** + * The creation timestamp of the short link + */ + createdAt: string; + /** + * The number of sales from this link + */ + sales: number; + /** + * The total amount of sales from this link + */ + amount: number; +}; + +/** @internal */ +export namespace SalesTopLinks$ { + export const inboundSchema: z.ZodType = z + .object({ + link: z.string(), + id: z.string(), + domain: z.string(), + key: z.string(), + shortLink: z.string(), + url: z.string(), + createdAt: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + link: v.link, + id: v.id, + domain: v.domain, + key: v.key, + shortLink: v.shortLink, + url: v.url, + createdAt: v.createdAt, + sales: v.sales, + amount: v.amount, + }; + }); + + export type Outbound = { + link: string; + id: string; + domain: string; + key: string; + shortLink: string; + url: string; + createdAt: string; + sales: number; + amount: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + link: z.string(), + id: z.string(), + domain: z.string(), + key: z.string(), + shortLink: z.string(), + url: z.string(), + createdAt: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + link: v.link, + id: v.id, + domain: v.domain, + key: v.key, + shortLink: v.shortLink, + url: v.url, + createdAt: v.createdAt, + sales: v.sales, + amount: v.amount, + }; + }); +} diff --git a/src/models/components/salestopurls.ts b/src/models/components/salestopurls.ts new file mode 100644 index 0000000..7545646 --- /dev/null +++ b/src/models/components/salestopurls.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type SalesTopUrls = { + /** + * The destination URL + */ + url: string; + /** + * The number of sales from this URL + */ + sales: number; + /** + * The total amount of sales from this URL + */ + amount: number; +}; + +/** @internal */ +export namespace SalesTopUrls$ { + export const inboundSchema: z.ZodType = z + .object({ + url: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + url: v.url, + sales: v.sales, + amount: v.amount, + }; + }); + + export type Outbound = { + url: string; + sales: number; + amount: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + url: z.string(), + sales: z.number(), + amount: z.number(), + }) + .transform((v) => { + return { + url: v.url, + sales: v.sales, + amount: v.amount, + }; + }); +} diff --git a/src/models/operations/getbrowsersbyclicks.ts b/src/models/operations/getbrowsersbyclicks.ts deleted file mode 100644 index 234fa68..0000000 --- a/src/models/operations/getbrowsersbyclicks.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetBrowsersByClicksGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetBrowsersByClicksQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetBrowsersByClicksQueryParamInterval = ClosedEnum< - typeof GetBrowsersByClicksQueryParamInterval ->; - -export type GetBrowsersByClicksRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetBrowsersByClicksQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetBrowsersByClicksResponseBody = { - /** - * The name of the browser - */ - browser: string; - /** - * The number of clicks from this browser - */ - clicks: number; -}; - -/** @internal */ -export namespace GetBrowsersByClicksGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetBrowsersByClicksQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetBrowsersByClicksQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetBrowsersByClicksRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetBrowsersByClicksQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetBrowsersByClicksQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetBrowsersByClicksResponseBody$ { - 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, - GetBrowsersByClicksResponseBody - > = z - .object({ - browser: z.string(), - clicks: z.number(), - }) - .transform((v) => { - return { - browser: v.browser, - clicks: v.clicks, - }; - }); -} diff --git a/src/models/operations/getbrowsersbyclicksdeprecated.ts b/src/models/operations/getbrowsersbyclicksdeprecated.ts deleted file mode 100644 index 44a435e..0000000 --- a/src/models/operations/getbrowsersbyclicksdeprecated.ts +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetBrowsersByClicksDeprecatedGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetBrowsersByClicksDeprecatedQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetBrowsersByClicksDeprecatedQueryParamInterval = ClosedEnum< - typeof GetBrowsersByClicksDeprecatedQueryParamInterval ->; - -export type GetBrowsersByClicksDeprecatedRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetBrowsersByClicksDeprecatedQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetBrowsersByClicksDeprecatedResponseBody = { - /** - * The name of the browser - */ - browser: string; - /** - * The number of clicks from this browser - */ - clicks: number; -}; - -/** @internal */ -export namespace GetBrowsersByClicksDeprecatedGlobals$ { - export const inboundSchema: z.ZodType< - GetBrowsersByClicksDeprecatedGlobals, - z.ZodTypeDef, - unknown - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetBrowsersByClicksDeprecatedGlobals - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetBrowsersByClicksDeprecatedQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetBrowsersByClicksDeprecatedQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetBrowsersByClicksDeprecatedRequest$ { - export const inboundSchema: z.ZodType< - GetBrowsersByClicksDeprecatedRequest, - z.ZodTypeDef, - unknown - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetBrowsersByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetBrowsersByClicksDeprecatedRequest - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetBrowsersByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetBrowsersByClicksDeprecatedResponseBody$ { - export const inboundSchema: z.ZodType< - GetBrowsersByClicksDeprecatedResponseBody, - z.ZodTypeDef, - unknown - > = 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, - GetBrowsersByClicksDeprecatedResponseBody - > = z - .object({ - browser: z.string(), - clicks: z.number(), - }) - .transform((v) => { - return { - browser: v.browser, - clicks: v.clicks, - }; - }); -} diff --git a/src/models/operations/getcitiesbyclicks.ts b/src/models/operations/getcitiesbyclicks.ts deleted file mode 100644 index 26557a2..0000000 --- a/src/models/operations/getcitiesbyclicks.ts +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetCitiesByClicksGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetCitiesByClicksQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetCitiesByClicksQueryParamInterval = ClosedEnum< - typeof GetCitiesByClicksQueryParamInterval ->; - -export type GetCitiesByClicksRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetCitiesByClicksQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -/** @internal */ -export namespace GetCitiesByClicksGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetCitiesByClicksQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetCitiesByClicksQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetCitiesByClicksRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetCitiesByClicksQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetCitiesByClicksQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} diff --git a/src/models/operations/getcitiesbyclicksdeprecated.ts b/src/models/operations/getcitiesbyclicksdeprecated.ts deleted file mode 100644 index bf33bad..0000000 --- a/src/models/operations/getcitiesbyclicksdeprecated.ts +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetCitiesByClicksDeprecatedGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetCitiesByClicksDeprecatedQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetCitiesByClicksDeprecatedQueryParamInterval = ClosedEnum< - typeof GetCitiesByClicksDeprecatedQueryParamInterval ->; - -export type GetCitiesByClicksDeprecatedRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetCitiesByClicksDeprecatedQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -/** @internal */ -export namespace GetCitiesByClicksDeprecatedGlobals$ { - export const inboundSchema: z.ZodType< - GetCitiesByClicksDeprecatedGlobals, - z.ZodTypeDef, - unknown - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetCitiesByClicksDeprecatedGlobals - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetCitiesByClicksDeprecatedQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetCitiesByClicksDeprecatedQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetCitiesByClicksDeprecatedRequest$ { - export const inboundSchema: z.ZodType< - GetCitiesByClicksDeprecatedRequest, - z.ZodTypeDef, - unknown - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetCitiesByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetCitiesByClicksDeprecatedRequest - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetCitiesByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} diff --git a/src/models/operations/getclickscount.ts b/src/models/operations/getclickscount.ts deleted file mode 100644 index d8a26c9..0000000 --- a/src/models/operations/getclickscount.ts +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetClicksCountGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const Interval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type Interval = ClosedEnum; - -export type GetClicksCountRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: Interval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -/** @internal */ -export namespace GetClicksCountGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace Interval$ { - export const inboundSchema = z.nativeEnum(Interval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetClicksCountRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: Interval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: Interval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} diff --git a/src/models/operations/getclickscountdeprecated.ts b/src/models/operations/getclickscountdeprecated.ts deleted file mode 100644 index 6eae48c..0000000 --- a/src/models/operations/getclickscountdeprecated.ts +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetClicksCountDeprecatedGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetClicksCountDeprecatedQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetClicksCountDeprecatedQueryParamInterval = ClosedEnum< - typeof GetClicksCountDeprecatedQueryParamInterval ->; - -export type GetClicksCountDeprecatedRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetClicksCountDeprecatedQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -/** @internal */ -export namespace GetClicksCountDeprecatedGlobals$ { - export const inboundSchema: z.ZodType = - z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetClicksCountDeprecatedGlobals - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetClicksCountDeprecatedQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetClicksCountDeprecatedQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetClicksCountDeprecatedRequest$ { - export const inboundSchema: z.ZodType = - z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetClicksCountDeprecatedQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetClicksCountDeprecatedRequest - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetClicksCountDeprecatedQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} diff --git a/src/models/operations/getcountriesbyclicks.ts b/src/models/operations/getcountriesbyclicks.ts deleted file mode 100644 index 359ed61..0000000 --- a/src/models/operations/getcountriesbyclicks.ts +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetCountriesByClicksGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetCountriesByClicksQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetCountriesByClicksQueryParamInterval = ClosedEnum< - typeof GetCountriesByClicksQueryParamInterval ->; - -export type GetCountriesByClicksRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetCountriesByClicksQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -/** @internal */ -export namespace GetCountriesByClicksGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetCountriesByClicksQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetCountriesByClicksQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetCountriesByClicksRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetCountriesByClicksQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetCountriesByClicksQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} diff --git a/src/models/operations/getcountriesbyclicksdeprecated.ts b/src/models/operations/getcountriesbyclicksdeprecated.ts deleted file mode 100644 index 869887d..0000000 --- a/src/models/operations/getcountriesbyclicksdeprecated.ts +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetCountriesByClicksDeprecatedGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetCountriesByClicksDeprecatedQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetCountriesByClicksDeprecatedQueryParamInterval = ClosedEnum< - typeof GetCountriesByClicksDeprecatedQueryParamInterval ->; - -export type GetCountriesByClicksDeprecatedRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetCountriesByClicksDeprecatedQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -/** @internal */ -export namespace GetCountriesByClicksDeprecatedGlobals$ { - export const inboundSchema: z.ZodType< - GetCountriesByClicksDeprecatedGlobals, - z.ZodTypeDef, - unknown - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetCountriesByClicksDeprecatedGlobals - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetCountriesByClicksDeprecatedQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetCountriesByClicksDeprecatedQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetCountriesByClicksDeprecatedRequest$ { - export const inboundSchema: z.ZodType< - GetCountriesByClicksDeprecatedRequest, - z.ZodTypeDef, - unknown - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetCountriesByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetCountriesByClicksDeprecatedRequest - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetCountriesByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} diff --git a/src/models/operations/getdevicesbyclicks.ts b/src/models/operations/getdevicesbyclicks.ts deleted file mode 100644 index a55df94..0000000 --- a/src/models/operations/getdevicesbyclicks.ts +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetDevicesByClicksGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetDevicesByClicksQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetDevicesByClicksQueryParamInterval = ClosedEnum< - typeof GetDevicesByClicksQueryParamInterval ->; - -export type GetDevicesByClicksRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetDevicesByClicksQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetDevicesByClicksResponseBody = { - /** - * The name of the device - */ - device: string; - /** - * The number of clicks from this device - */ - clicks: number; -}; - -/** @internal */ -export namespace GetDevicesByClicksGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetDevicesByClicksQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetDevicesByClicksQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetDevicesByClicksRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetDevicesByClicksQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetDevicesByClicksQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetDevicesByClicksResponseBody$ { - 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/getdevicesbyclicksdeprecated.ts b/src/models/operations/getdevicesbyclicksdeprecated.ts deleted file mode 100644 index 96bb53d..0000000 --- a/src/models/operations/getdevicesbyclicksdeprecated.ts +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetDevicesByClicksDeprecatedGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetDevicesByClicksDeprecatedQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetDevicesByClicksDeprecatedQueryParamInterval = ClosedEnum< - typeof GetDevicesByClicksDeprecatedQueryParamInterval ->; - -export type GetDevicesByClicksDeprecatedRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetDevicesByClicksDeprecatedQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetDevicesByClicksDeprecatedResponseBody = { - /** - * The name of the device - */ - device: string; - /** - * The number of clicks from this device - */ - clicks: number; -}; - -/** @internal */ -export namespace GetDevicesByClicksDeprecatedGlobals$ { - export const inboundSchema: z.ZodType< - GetDevicesByClicksDeprecatedGlobals, - z.ZodTypeDef, - unknown - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetDevicesByClicksDeprecatedGlobals - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetDevicesByClicksDeprecatedQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetDevicesByClicksDeprecatedQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetDevicesByClicksDeprecatedRequest$ { - export const inboundSchema: z.ZodType< - GetDevicesByClicksDeprecatedRequest, - z.ZodTypeDef, - unknown - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetDevicesByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetDevicesByClicksDeprecatedRequest - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetDevicesByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetDevicesByClicksDeprecatedResponseBody$ { - export const inboundSchema: z.ZodType< - GetDevicesByClicksDeprecatedResponseBody, - z.ZodTypeDef, - unknown - > = 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< - Outbound, - z.ZodTypeDef, - GetDevicesByClicksDeprecatedResponseBody - > = z - .object({ - device: z.string(), - clicks: z.number(), - }) - .transform((v) => { - return { - device: v.device, - clicks: v.clicks, - }; - }); -} diff --git a/src/models/operations/getosbyclicks.ts b/src/models/operations/getosbyclicks.ts deleted file mode 100644 index a4212ec..0000000 --- a/src/models/operations/getosbyclicks.ts +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetOSByClicksGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetOSByClicksQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetOSByClicksQueryParamInterval = ClosedEnum; - -export type GetOSByClicksRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetOSByClicksQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetOSByClicksResponseBody = { - /** - * The name of the OS - */ - os: string; - /** - * The number of clicks from this OS - */ - clicks: number; -}; - -/** @internal */ -export namespace GetOSByClicksGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetOSByClicksQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetOSByClicksQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetOSByClicksRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetOSByClicksQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetOSByClicksQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetOSByClicksResponseBody$ { - 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/getosbyclicksdeprecated.ts b/src/models/operations/getosbyclicksdeprecated.ts deleted file mode 100644 index b12ea31..0000000 --- a/src/models/operations/getosbyclicksdeprecated.ts +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetOSByClicksDeprecatedGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetOSByClicksDeprecatedQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetOSByClicksDeprecatedQueryParamInterval = ClosedEnum< - typeof GetOSByClicksDeprecatedQueryParamInterval ->; - -export type GetOSByClicksDeprecatedRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetOSByClicksDeprecatedQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetOSByClicksDeprecatedResponseBody = { - /** - * The name of the OS - */ - os: string; - /** - * The number of clicks from this OS - */ - clicks: number; -}; - -/** @internal */ -export namespace GetOSByClicksDeprecatedGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = - z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetOSByClicksDeprecatedQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetOSByClicksDeprecatedQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetOSByClicksDeprecatedRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetOSByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = - z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetOSByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetOSByClicksDeprecatedResponseBody$ { - export const inboundSchema: z.ZodType< - GetOSByClicksDeprecatedResponseBody, - z.ZodTypeDef, - unknown - > = 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< - Outbound, - z.ZodTypeDef, - GetOSByClicksDeprecatedResponseBody - > = z - .object({ - os: z.string(), - clicks: z.number(), - }) - .transform((v) => { - return { - os: v.os, - clicks: v.clicks, - }; - }); -} diff --git a/src/models/operations/getreferersbyclicks.ts b/src/models/operations/getreferersbyclicks.ts deleted file mode 100644 index a1668b1..0000000 --- a/src/models/operations/getreferersbyclicks.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetReferersByClicksGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetReferersByClicksQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetReferersByClicksQueryParamInterval = ClosedEnum< - typeof GetReferersByClicksQueryParamInterval ->; - -export type GetReferersByClicksRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetReferersByClicksQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetReferersByClicksResponseBody = { - /** - * The name of the referer. If unknown, this will be `(direct)` - */ - referer: string; - /** - * The number of clicks from this referer - */ - clicks: number; -}; - -/** @internal */ -export namespace GetReferersByClicksGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetReferersByClicksQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetReferersByClicksQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetReferersByClicksRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetReferersByClicksQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetReferersByClicksQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetReferersByClicksResponseBody$ { - 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, - GetReferersByClicksResponseBody - > = z - .object({ - referer: z.string(), - clicks: z.number(), - }) - .transform((v) => { - return { - referer: v.referer, - clicks: v.clicks, - }; - }); -} diff --git a/src/models/operations/getreferersbyclicksdeprecated.ts b/src/models/operations/getreferersbyclicksdeprecated.ts deleted file mode 100644 index 0eb16fb..0000000 --- a/src/models/operations/getreferersbyclicksdeprecated.ts +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetReferersByClicksDeprecatedGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetReferersByClicksDeprecatedQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetReferersByClicksDeprecatedQueryParamInterval = ClosedEnum< - typeof GetReferersByClicksDeprecatedQueryParamInterval ->; - -export type GetReferersByClicksDeprecatedRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetReferersByClicksDeprecatedQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetReferersByClicksDeprecatedResponseBody = { - /** - * The name of the referer. If unknown, this will be `(direct)` - */ - referer: string; - /** - * The number of clicks from this referer - */ - clicks: number; -}; - -/** @internal */ -export namespace GetReferersByClicksDeprecatedGlobals$ { - export const inboundSchema: z.ZodType< - GetReferersByClicksDeprecatedGlobals, - z.ZodTypeDef, - unknown - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetReferersByClicksDeprecatedGlobals - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetReferersByClicksDeprecatedQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetReferersByClicksDeprecatedQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetReferersByClicksDeprecatedRequest$ { - export const inboundSchema: z.ZodType< - GetReferersByClicksDeprecatedRequest, - z.ZodTypeDef, - unknown - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetReferersByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetReferersByClicksDeprecatedRequest - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetReferersByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetReferersByClicksDeprecatedResponseBody$ { - export const inboundSchema: z.ZodType< - GetReferersByClicksDeprecatedResponseBody, - z.ZodTypeDef, - unknown - > = 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, - GetReferersByClicksDeprecatedResponseBody - > = z - .object({ - referer: z.string(), - clicks: z.number(), - }) - .transform((v) => { - return { - referer: v.referer, - clicks: v.clicks, - }; - }); -} diff --git a/src/models/operations/gettimeseriesbyclicks.ts b/src/models/operations/gettimeseriesbyclicks.ts deleted file mode 100644 index ec37fd3..0000000 --- a/src/models/operations/gettimeseriesbyclicks.ts +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetTimeseriesByClicksGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const QueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type QueryParamInterval = ClosedEnum; - -export type GetTimeseriesByClicksRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: QueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type ResponseBody = { - /** - * The starting timestamp of the interval - */ - start: string; - /** - * The number of clicks in the interval - */ - clicks: number; -}; - -/** @internal */ -export namespace GetTimeseriesByClicksGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace QueryParamInterval$ { - export const inboundSchema = z.nativeEnum(QueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetTimeseriesByClicksRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: QueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: QueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace ResponseBody$ { - 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/gettimeseriesbyclicksdeprecated.ts b/src/models/operations/gettimeseriesbyclicksdeprecated.ts deleted file mode 100644 index cf18ae3..0000000 --- a/src/models/operations/gettimeseriesbyclicksdeprecated.ts +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetTimeseriesByClicksDeprecatedGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetTimeseriesByClicksDeprecatedQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetTimeseriesByClicksDeprecatedQueryParamInterval = ClosedEnum< - typeof GetTimeseriesByClicksDeprecatedQueryParamInterval ->; - -export type GetTimeseriesByClicksDeprecatedRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetTimeseriesByClicksDeprecatedQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetTimeseriesByClicksDeprecatedResponseBody = { - /** - * The starting timestamp of the interval - */ - start: string; - /** - * The number of clicks in the interval - */ - clicks: number; -}; - -/** @internal */ -export namespace GetTimeseriesByClicksDeprecatedGlobals$ { - export const inboundSchema: z.ZodType< - GetTimeseriesByClicksDeprecatedGlobals, - z.ZodTypeDef, - unknown - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetTimeseriesByClicksDeprecatedGlobals - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetTimeseriesByClicksDeprecatedQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetTimeseriesByClicksDeprecatedQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetTimeseriesByClicksDeprecatedRequest$ { - export const inboundSchema: z.ZodType< - GetTimeseriesByClicksDeprecatedRequest, - z.ZodTypeDef, - unknown - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetTimeseriesByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetTimeseriesByClicksDeprecatedRequest - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetTimeseriesByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetTimeseriesByClicksDeprecatedResponseBody$ { - export const inboundSchema: z.ZodType< - GetTimeseriesByClicksDeprecatedResponseBody, - z.ZodTypeDef, - unknown - > = 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< - Outbound, - z.ZodTypeDef, - GetTimeseriesByClicksDeprecatedResponseBody - > = z - .object({ - start: z.string(), - clicks: z.number(), - }) - .transform((v) => { - return { - start: v.start, - clicks: v.clicks, - }; - }); -} diff --git a/src/models/operations/gettoplinksbyclicks.ts b/src/models/operations/gettoplinksbyclicks.ts deleted file mode 100644 index aed0877..0000000 --- a/src/models/operations/gettoplinksbyclicks.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetTopLinksByClicksGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetTopLinksByClicksQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetTopLinksByClicksQueryParamInterval = ClosedEnum< - typeof GetTopLinksByClicksQueryParamInterval ->; - -export type GetTopLinksByClicksRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetTopLinksByClicksQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetTopLinksByClicksResponseBody = { - /** - * The unique ID of the short link - */ - link: string; - /** - * The number of clicks from this link - */ - clicks: number; -}; - -/** @internal */ -export namespace GetTopLinksByClicksGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetTopLinksByClicksQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetTopLinksByClicksQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetTopLinksByClicksRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetTopLinksByClicksQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetTopLinksByClicksQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetTopLinksByClicksResponseBody$ { - 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< - Outbound, - z.ZodTypeDef, - GetTopLinksByClicksResponseBody - > = z - .object({ - link: z.string(), - clicks: z.number(), - }) - .transform((v) => { - return { - link: v.link, - clicks: v.clicks, - }; - }); -} diff --git a/src/models/operations/gettoplinksbyclicksdeprecated.ts b/src/models/operations/gettoplinksbyclicksdeprecated.ts deleted file mode 100644 index b665de0..0000000 --- a/src/models/operations/gettoplinksbyclicksdeprecated.ts +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetTopLinksByClicksDeprecatedGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetTopLinksByClicksDeprecatedQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetTopLinksByClicksDeprecatedQueryParamInterval = ClosedEnum< - typeof GetTopLinksByClicksDeprecatedQueryParamInterval ->; - -export type GetTopLinksByClicksDeprecatedRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetTopLinksByClicksDeprecatedQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetTopLinksByClicksDeprecatedResponseBody = { - /** - * The unique ID of the short link - */ - link: string; - /** - * The number of clicks from this link - */ - clicks: number; -}; - -/** @internal */ -export namespace GetTopLinksByClicksDeprecatedGlobals$ { - export const inboundSchema: z.ZodType< - GetTopLinksByClicksDeprecatedGlobals, - z.ZodTypeDef, - unknown - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetTopLinksByClicksDeprecatedGlobals - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetTopLinksByClicksDeprecatedQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetTopLinksByClicksDeprecatedQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetTopLinksByClicksDeprecatedRequest$ { - export const inboundSchema: z.ZodType< - GetTopLinksByClicksDeprecatedRequest, - z.ZodTypeDef, - unknown - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetTopLinksByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetTopLinksByClicksDeprecatedRequest - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetTopLinksByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetTopLinksByClicksDeprecatedResponseBody$ { - export const inboundSchema: z.ZodType< - GetTopLinksByClicksDeprecatedResponseBody, - z.ZodTypeDef, - unknown - > = 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< - Outbound, - z.ZodTypeDef, - GetTopLinksByClicksDeprecatedResponseBody - > = z - .object({ - link: z.string(), - clicks: z.number(), - }) - .transform((v) => { - return { - link: v.link, - clicks: v.clicks, - }; - }); -} diff --git a/src/models/operations/gettopurlsbyclicks.ts b/src/models/operations/gettopurlsbyclicks.ts deleted file mode 100644 index 3ce9f47..0000000 --- a/src/models/operations/gettopurlsbyclicks.ts +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetTopURLsByClicksGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetTopURLsByClicksQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetTopURLsByClicksQueryParamInterval = ClosedEnum< - typeof GetTopURLsByClicksQueryParamInterval ->; - -export type GetTopURLsByClicksRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetTopURLsByClicksQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetTopURLsByClicksResponseBody = { - /** - * The destination URL - */ - url: string; - /** - * The number of clicks from this URL - */ - clicks: number; -}; - -/** @internal */ -export namespace GetTopURLsByClicksGlobals$ { - export const inboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetTopURLsByClicksQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetTopURLsByClicksQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetTopURLsByClicksRequest$ { - export const inboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetTopURLsByClicksQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetTopURLsByClicksQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetTopURLsByClicksResponseBody$ { - 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/gettopurlsbyclicksdeprecated.ts b/src/models/operations/gettopurlsbyclicksdeprecated.ts deleted file mode 100644 index 728f51f..0000000 --- a/src/models/operations/gettopurlsbyclicksdeprecated.ts +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { ClosedEnum } from "../../types"; -import * as components from "../components"; -import * as z from "zod"; - -export type GetTopURLsByClicksDeprecatedGlobals = { - workspaceId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - projectSlug?: string | undefined; -}; - -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export const GetTopURLsByClicksDeprecatedQueryParamInterval = { - Oneh: "1h", - TwentyFourh: "24h", - Sevend: "7d", - Thirtyd: "30d", - Ninetyd: "90d", - Ytd: "ytd", - Oney: "1y", - All: "all", -} as const; -/** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ -export type GetTopURLsByClicksDeprecatedQueryParamInterval = ClosedEnum< - typeof GetTopURLsByClicksDeprecatedQueryParamInterval ->; - -export type GetTopURLsByClicksDeprecatedRequest = { - /** - * The domain to filter analytics for. - */ - domain?: string | undefined; - /** - * The short link slug. - */ - key?: string | undefined; - /** - * The unique ID of the short link on Dub. - */ - linkId?: string | undefined; - /** - * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. - */ - externalId?: string | undefined; - /** - * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. - */ - interval?: GetTopURLsByClicksDeprecatedQueryParamInterval | undefined; - /** - * The start date and time when to retrieve analytics from. - */ - start?: string | undefined; - /** - * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. - */ - end?: string | undefined; - /** - * The country to retrieve analytics for. - */ - country?: components.CountryCode | 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; - /** - * The tag ID to retrieve analytics for. - */ - tagId?: string | undefined; - /** - * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. - */ - qr?: boolean | undefined; - /** - * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. - */ - root?: boolean | undefined; -}; - -export type GetTopURLsByClicksDeprecatedResponseBody = { - /** - * The destination URL - */ - url: string; - /** - * The number of clicks from this URL - */ - clicks: number; -}; - -/** @internal */ -export namespace GetTopURLsByClicksDeprecatedGlobals$ { - export const inboundSchema: z.ZodType< - GetTopURLsByClicksDeprecatedGlobals, - z.ZodTypeDef, - unknown - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); - - export type Outbound = { - workspaceId: string; - projectSlug?: string | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetTopURLsByClicksDeprecatedGlobals - > = z - .object({ - workspaceId: z.string(), - projectSlug: z.string().optional(), - }) - .transform((v) => { - return { - workspaceId: v.workspaceId, - ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), - }; - }); -} - -/** @internal */ -export namespace GetTopURLsByClicksDeprecatedQueryParamInterval$ { - export const inboundSchema = z.nativeEnum(GetTopURLsByClicksDeprecatedQueryParamInterval); - export const outboundSchema = inboundSchema; -} - -/** @internal */ -export namespace GetTopURLsByClicksDeprecatedRequest$ { - export const inboundSchema: z.ZodType< - GetTopURLsByClicksDeprecatedRequest, - z.ZodTypeDef, - unknown - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetTopURLsByClicksDeprecatedQueryParamInterval$.inboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.inboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); - - export type Outbound = { - domain?: string | undefined; - key?: string | undefined; - linkId?: string | undefined; - externalId?: string | undefined; - interval?: string | undefined; - start?: string | undefined; - end?: string | undefined; - country?: string | undefined; - city?: string | undefined; - device?: string | undefined; - browser?: string | undefined; - os?: string | undefined; - referer?: string | undefined; - url?: string | undefined; - tagId?: string | undefined; - qr?: boolean | undefined; - root?: boolean | undefined; - }; - - export const outboundSchema: z.ZodType< - Outbound, - z.ZodTypeDef, - GetTopURLsByClicksDeprecatedRequest - > = z - .object({ - domain: z.string().optional(), - key: z.string().optional(), - linkId: z.string().optional(), - externalId: z.string().optional(), - interval: GetTopURLsByClicksDeprecatedQueryParamInterval$.outboundSchema.optional(), - start: z.string().optional(), - end: z.string().optional(), - country: components.CountryCode$.outboundSchema.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(), - tagId: z.string().optional(), - qr: z.boolean().optional(), - root: z.boolean().optional(), - }) - .transform((v) => { - return { - ...(v.domain === undefined ? null : { domain: v.domain }), - ...(v.key === undefined ? null : { key: v.key }), - ...(v.linkId === undefined ? null : { linkId: v.linkId }), - ...(v.externalId === undefined ? null : { externalId: v.externalId }), - ...(v.interval === undefined ? null : { interval: v.interval }), - ...(v.start === undefined ? null : { start: v.start }), - ...(v.end === undefined ? null : { end: v.end }), - ...(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.tagId === undefined ? null : { tagId: v.tagId }), - ...(v.qr === undefined ? null : { qr: v.qr }), - ...(v.root === undefined ? null : { root: v.root }), - }; - }); -} - -/** @internal */ -export namespace GetTopURLsByClicksDeprecatedResponseBody$ { - export const inboundSchema: z.ZodType< - GetTopURLsByClicksDeprecatedResponseBody, - z.ZodTypeDef, - unknown - > = 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< - Outbound, - z.ZodTypeDef, - GetTopURLsByClicksDeprecatedResponseBody - > = z - .object({ - url: z.string(), - clicks: z.number(), - }) - .transform((v) => { - return { - url: v.url, - clicks: v.clicks, - }; - }); -} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index e1b9f74..036305e 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -9,34 +9,15 @@ export * from "./createtag"; export * from "./createworkspace"; export * from "./deletedomain"; export * from "./deletelink"; -export * from "./getbrowsersbyclicks"; -export * from "./getbrowsersbyclicksdeprecated"; -export * from "./getcitiesbyclicks"; -export * from "./getcitiesbyclicksdeprecated"; -export * from "./getclickscount"; -export * from "./getclickscountdeprecated"; -export * from "./getcountriesbyclicks"; -export * from "./getcountriesbyclicksdeprecated"; -export * from "./getdevicesbyclicks"; -export * from "./getdevicesbyclicksdeprecated"; export * from "./getlinkinfo"; export * from "./getlinks"; export * from "./getlinkscount"; export * from "./getmetatags"; -export * from "./getosbyclicks"; -export * from "./getosbyclicksdeprecated"; export * from "./getqrcode"; -export * from "./getreferersbyclicks"; -export * from "./getreferersbyclicksdeprecated"; export * from "./gettags"; -export * from "./gettimeseriesbyclicks"; -export * from "./gettimeseriesbyclicksdeprecated"; -export * from "./gettoplinksbyclicks"; -export * from "./gettoplinksbyclicksdeprecated"; -export * from "./gettopurlsbyclicks"; -export * from "./gettopurlsbyclicksdeprecated"; export * from "./getworkspace"; export * from "./listdomains"; +export * from "./retrieveanalytics"; export * from "./setprimarydomain"; export * from "./trackcustomer"; export * from "./tracklead"; diff --git a/src/models/operations/retrieveanalytics.ts b/src/models/operations/retrieveanalytics.ts new file mode 100644 index 0000000..c3a3655 --- /dev/null +++ b/src/models/operations/retrieveanalytics.ts @@ -0,0 +1,460 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { ClosedEnum } from "../../types"; +import * as components from "../components"; +import * as z from "zod"; + +export type RetrieveAnalyticsGlobals = { + workspaceId: string; + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + projectSlug?: string | undefined; +}; + +/** + * The type of event to retrieve analytics for. Defaults to 'clicks'. + */ +export const Event = { + Clicks: "clicks", + Leads: "leads", + Sales: "sales", + Composite: "composite", +} as const; +/** + * The type of event to retrieve analytics for. Defaults to 'clicks'. + */ +export type Event = ClosedEnum; + +/** + * The parameter to group the analytics data points by. Defaults to 'count' if undefined. + */ +export const QueryParamGroupBy = { + Count: "count", + Timeseries: "timeseries", + Countries: "countries", + Cities: "cities", + Devices: "devices", + Browsers: "browsers", + Os: "os", + Referers: "referers", + TopLinks: "top_links", + TopUrls: "top_urls", + Trigger: "trigger", +} as const; +/** + * The parameter to group the analytics data points by. Defaults to 'count' if undefined. + */ +export type QueryParamGroupBy = ClosedEnum; + +/** + * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. + */ +export const Interval = { + TwentyFourh: "24h", + Sevend: "7d", + Thirtyd: "30d", + Ninetyd: "90d", + Ytd: "ytd", + Oney: "1y", + All: "all", + AllUnfiltered: "all_unfiltered", +} as const; +/** + * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. + */ +export type Interval = ClosedEnum; + +export type RetrieveAnalyticsRequest = { + /** + * The type of event to retrieve analytics for. Defaults to 'clicks'. + */ + event?: Event | undefined; + /** + * The parameter to group the analytics data points by. Defaults to 'count' if undefined. + */ + groupBy?: QueryParamGroupBy | undefined; + /** + * The domain to filter analytics for. + */ + domain?: string | undefined; + /** + * The short link slug. + */ + key?: string | undefined; + /** + * The unique ID of the short link on Dub. + */ + linkId?: string | undefined; + /** + * This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. + */ + externalId?: string | undefined; + /** + * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. + */ + interval?: Interval | undefined; + /** + * The start date and time when to retrieve analytics from. + */ + start?: string | undefined; + /** + * The end date and time when to retrieve analytics from. If not provided, defaults to the current date. + */ + end?: string | undefined; + /** + * The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. + */ + timezone?: string | undefined; + /** + * The country to retrieve analytics for. + */ + country?: components.CountryCode | 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; + /** + * The tag ID to retrieve analytics for. + */ + tagId?: string | undefined; + /** + * Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. + */ + qr?: boolean | undefined; + /** + * Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. + */ + root?: boolean | undefined; +}; + +/** + * Analytics data + */ +export type RetrieveAnalyticsResponseBody = + | components.ClicksCount + | components.LeadsCount + | components.SalesCount + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array; + +/** @internal */ +export namespace RetrieveAnalyticsGlobals$ { + export const inboundSchema: z.ZodType = z + .object({ + workspaceId: z.string(), + projectSlug: z.string().optional(), + }) + .transform((v) => { + return { + workspaceId: v.workspaceId, + ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), + }; + }); + + export type Outbound = { + workspaceId: string; + projectSlug?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + workspaceId: z.string(), + projectSlug: z.string().optional(), + }) + .transform((v) => { + return { + workspaceId: v.workspaceId, + ...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }), + }; + }); +} + +/** @internal */ +export namespace Event$ { + export const inboundSchema = z.nativeEnum(Event); + export const outboundSchema = inboundSchema; +} + +/** @internal */ +export namespace QueryParamGroupBy$ { + export const inboundSchema = z.nativeEnum(QueryParamGroupBy); + export const outboundSchema = inboundSchema; +} + +/** @internal */ +export namespace Interval$ { + export const inboundSchema = z.nativeEnum(Interval); + export const outboundSchema = inboundSchema; +} + +/** @internal */ +export namespace RetrieveAnalyticsRequest$ { + export const inboundSchema: z.ZodType = z + .object({ + event: Event$.inboundSchema.default("clicks"), + groupBy: QueryParamGroupBy$.inboundSchema.default("count"), + domain: z.string().optional(), + key: z.string().optional(), + linkId: z.string().optional(), + externalId: z.string().optional(), + interval: Interval$.inboundSchema.optional(), + start: z.string().optional(), + end: z.string().optional(), + timezone: z.string().default("UTC"), + country: components.CountryCode$.inboundSchema.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(), + tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), + }) + .transform((v) => { + return { + event: v.event, + groupBy: v.groupBy, + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.linkId === undefined ? null : { linkId: v.linkId }), + ...(v.externalId === undefined ? null : { externalId: v.externalId }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.start === undefined ? null : { start: v.start }), + ...(v.end === undefined ? null : { end: v.end }), + timezone: v.timezone, + ...(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.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), + }; + }); + + export type Outbound = { + event: string; + groupBy: string; + domain?: string | undefined; + key?: string | undefined; + linkId?: string | undefined; + externalId?: string | undefined; + interval?: string | undefined; + start?: string | undefined; + end?: string | undefined; + timezone: string; + country?: string | undefined; + city?: string | undefined; + device?: string | undefined; + browser?: string | undefined; + os?: string | undefined; + referer?: string | undefined; + url?: string | undefined; + tagId?: string | undefined; + qr?: boolean | undefined; + root?: boolean | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + event: Event$.outboundSchema.default("clicks"), + groupBy: QueryParamGroupBy$.outboundSchema.default("count"), + domain: z.string().optional(), + key: z.string().optional(), + linkId: z.string().optional(), + externalId: z.string().optional(), + interval: Interval$.outboundSchema.optional(), + start: z.string().optional(), + end: z.string().optional(), + timezone: z.string().default("UTC"), + country: components.CountryCode$.outboundSchema.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(), + tagId: z.string().optional(), + qr: z.boolean().optional(), + root: z.boolean().optional(), + }) + .transform((v) => { + return { + event: v.event, + groupBy: v.groupBy, + ...(v.domain === undefined ? null : { domain: v.domain }), + ...(v.key === undefined ? null : { key: v.key }), + ...(v.linkId === undefined ? null : { linkId: v.linkId }), + ...(v.externalId === undefined ? null : { externalId: v.externalId }), + ...(v.interval === undefined ? null : { interval: v.interval }), + ...(v.start === undefined ? null : { start: v.start }), + ...(v.end === undefined ? null : { end: v.end }), + timezone: v.timezone, + ...(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.tagId === undefined ? null : { tagId: v.tagId }), + ...(v.qr === undefined ? null : { qr: v.qr }), + ...(v.root === undefined ? null : { root: v.root }), + }; + }); +} + +/** @internal */ +export namespace RetrieveAnalyticsResponseBody$ { + export const inboundSchema: z.ZodType = + z.union([ + components.ClicksCount$.inboundSchema, + components.LeadsCount$.inboundSchema, + components.SalesCount$.inboundSchema, + z.array(components.ClicksTimeseries$.inboundSchema), + z.array(components.ClicksCountries$.inboundSchema), + z.array(components.ClicksCities$.inboundSchema), + z.array(components.ClicksDevices$.inboundSchema), + z.array(components.ClicksBrowsers$.inboundSchema), + z.array(components.ClicksOS$.inboundSchema), + z.array(components.ClicksReferers$.inboundSchema), + z.array(components.ClicksTopLinks$.inboundSchema), + z.array(components.ClicksTopUrls$.inboundSchema), + z.array(components.LeadsTimeseries$.inboundSchema), + z.array(components.LeadsCountries$.inboundSchema), + z.array(components.LeadsCities$.inboundSchema), + z.array(components.LeadsDevices$.inboundSchema), + z.array(components.LeadsBrowsers$.inboundSchema), + z.array(components.LeadsOS$.inboundSchema), + z.array(components.LeadsReferers$.inboundSchema), + z.array(components.LeadsTopLinks$.inboundSchema), + z.array(components.LeadsTopUrls$.inboundSchema), + z.array(components.SalesTimeseries$.inboundSchema), + z.array(components.SalesCountries$.inboundSchema), + z.array(components.SalesCities$.inboundSchema), + z.array(components.SalesDevices$.inboundSchema), + z.array(components.SalesBrowsers$.inboundSchema), + z.array(components.SalesOS$.inboundSchema), + z.array(components.SalesReferers$.inboundSchema), + z.array(components.SalesTopLinks$.inboundSchema), + z.array(components.SalesTopUrls$.inboundSchema), + ]); + + export type Outbound = + | components.ClicksCount$.Outbound + | components.LeadsCount$.Outbound + | components.SalesCount$.Outbound + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array; + export const outboundSchema: z.ZodType = + z.union([ + components.ClicksCount$.outboundSchema, + components.LeadsCount$.outboundSchema, + components.SalesCount$.outboundSchema, + z.array(components.ClicksTimeseries$.outboundSchema), + z.array(components.ClicksCountries$.outboundSchema), + z.array(components.ClicksCities$.outboundSchema), + z.array(components.ClicksDevices$.outboundSchema), + z.array(components.ClicksBrowsers$.outboundSchema), + z.array(components.ClicksOS$.outboundSchema), + z.array(components.ClicksReferers$.outboundSchema), + z.array(components.ClicksTopLinks$.outboundSchema), + z.array(components.ClicksTopUrls$.outboundSchema), + z.array(components.LeadsTimeseries$.outboundSchema), + z.array(components.LeadsCountries$.outboundSchema), + z.array(components.LeadsCities$.outboundSchema), + z.array(components.LeadsDevices$.outboundSchema), + z.array(components.LeadsBrowsers$.outboundSchema), + z.array(components.LeadsOS$.outboundSchema), + z.array(components.LeadsReferers$.outboundSchema), + z.array(components.LeadsTopLinks$.outboundSchema), + z.array(components.LeadsTopUrls$.outboundSchema), + z.array(components.SalesTimeseries$.outboundSchema), + z.array(components.SalesCountries$.outboundSchema), + z.array(components.SalesCities$.outboundSchema), + z.array(components.SalesDevices$.outboundSchema), + z.array(components.SalesBrowsers$.outboundSchema), + z.array(components.SalesOS$.outboundSchema), + z.array(components.SalesReferers$.outboundSchema), + z.array(components.SalesTopLinks$.outboundSchema), + z.array(components.SalesTopUrls$.outboundSchema), + ]); +} diff --git a/src/sdk/analytics.ts b/src/sdk/analytics.ts index f06ec18..4cba0e9 100644 --- a/src/sdk/analytics.ts +++ b/src/sdk/analytics.ts @@ -8,11 +8,8 @@ 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 { Clicks } from "./clicks"; -import * as z from "zod"; export class Analytics extends ClientSDK { private readonly options$: SDKOptions & { hooks?: SDKHooks }; @@ -41,23 +38,16 @@ export class Analytics extends ClientSDK { void this.options$; } - private _clicks?: Clicks; - get clicks(): Clicks { - return (this._clicks ??= new Clicks(this.options$)); - } - /** - * Retrieve timeseries click analytics + * Retrieve analytics for a link, a domain, or the authenticated workspace. * * @remarks - * Retrieve timeseries click analytics for a link, a domain, or the authenticated workspace over a period of time. - * - * @deprecated method: This method is deprecated. Use dub.analytics.clicks.timeseries instead.. Use timeseries instead. + * Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters. */ - async timeseries( - request?: operations.GetTimeseriesByClicksDeprecatedRequest | undefined, + async retrieve( + request?: operations.RetrieveAnalyticsRequest | undefined, options?: RequestOptions - ): Promise> { + ): Promise { const input$ = typeof request === "undefined" ? {} : request; const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); @@ -65,13 +55,12 @@ export class Analytics extends ClientSDK { const payload$ = schemas$.parse( input$, - (value$) => - operations.GetTimeseriesByClicksDeprecatedRequest$.outboundSchema.parse(value$), + (value$) => operations.RetrieveAnalyticsRequest$.outboundSchema.parse(value$), "Input validation failed" ); const body$ = null; - const path$ = this.templateURLComponent("/analytics/timeseries")(); + const path$ = this.templateURLComponent("/analytics")(); const query$ = [ enc$.encodeForm("browser", payload$.browser, { @@ -86,10 +75,15 @@ export class Analytics extends ClientSDK { enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }), enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("event", payload$.event, { explode: true, charEncoding: "percent" }), enc$.encodeForm("externalId", payload$.externalId, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("groupBy", payload$.groupBy, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("interval", payload$.interval, { explode: true, charEncoding: "percent", @@ -109,6 +103,10 @@ export class Analytics extends ClientSDK { enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }), enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("timezone", payload$.timezone, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { explode: true, @@ -127,7 +125,7 @@ export class Analytics extends ClientSDK { security$ = {}; } const context = { - operationID: "getTimeseriesByClicksDeprecated", + operationID: "retrieveAnalytics", oAuth2Scopes: [], securitySource: this.options$.token, }; @@ -168,1135 +166,8 @@ export class Analytics extends ClientSDK { HttpMeta: { Response: response, Request: request$ }, }; - const [result$] = await this.matcher< - Array - >() - .json( - 200, - z.array(operations.GetTimeseriesByClicksDeprecatedResponseBody$.inboundSchema) - ) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top countries by clicks - * - * @remarks - * Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace. - * - * @deprecated method: This method is deprecated. Use dub.analytics.clicks.countries instead.. Use countries instead. - */ - async country( - request?: operations.GetCountriesByClicksDeprecatedRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => - operations.GetCountriesByClicksDeprecatedRequest$.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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getCountriesByClicksDeprecated", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(components.ClicksByCountry$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top cities by clicks - * - * @remarks - * Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace. - * - * @deprecated method: This method is deprecated. Use dub.analytics.clicks.cities instead.. Use cities instead. - */ - async city( - request?: operations.GetCitiesByClicksDeprecatedRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetCitiesByClicksDeprecatedRequest$.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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getCitiesByClicksDeprecated", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(components.ClicksByCities$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top devices by clicks - * - * @remarks - * Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace. - * - * @deprecated method: This method is deprecated. Use dub.analytics.clicks.devices instead.. Use devices instead. - */ - async device( - request?: operations.GetDevicesByClicksDeprecatedRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => - operations.GetDevicesByClicksDeprecatedRequest$.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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getDevicesByClicksDeprecated", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher< - Array - >() - .json(200, z.array(operations.GetDevicesByClicksDeprecatedResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top browsers by clicks - * - * @remarks - * Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace. - * - * @deprecated method: This method is deprecated. Use dub.analytics.clicks.browsers instead.. Use browsers instead. - */ - async browser( - request?: operations.GetBrowsersByClicksDeprecatedRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => - operations.GetBrowsersByClicksDeprecatedRequest$.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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getBrowsersByClicksDeprecated", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher< - Array - >() - .json(200, z.array(operations.GetBrowsersByClicksDeprecatedResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top OS by clicks - * - * @remarks - * Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace. - * - * @deprecated method: This method is deprecated. Use dub.analytics.clicks.os instead.. Use os instead. - */ - async os( - request?: operations.GetOSByClicksDeprecatedRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetOSByClicksDeprecatedRequest$.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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getOSByClicksDeprecated", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher< - Array - >() - .json(200, z.array(operations.GetOSByClicksDeprecatedResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top referers by clicks - * - * @remarks - * Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace. - * - * @deprecated method: This method is deprecated. Use dub.analytics.clicks.referers instead.. Use referers instead. - */ - async referer( - request?: operations.GetReferersByClicksDeprecatedRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => - operations.GetReferersByClicksDeprecatedRequest$.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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getReferersByClicksDeprecated", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher< - Array - >() - .json(200, z.array(operations.GetReferersByClicksDeprecatedResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top links by clicks - * - * @remarks - * Retrieve the top links by number of clicks for a domain or the authenticated workspace. - * - * @deprecated method: This method is deprecated. Use dub.analytics.clicks.topLinks instead.. Use topLinks instead. - */ - async topLinks( - request?: operations.GetTopLinksByClicksDeprecatedRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => - operations.GetTopLinksByClicksDeprecatedRequest$.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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getTopLinksByClicksDeprecated", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher< - Array - >() - .json(200, z.array(operations.GetTopLinksByClicksDeprecatedResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top URLs by clicks - * - * @remarks - * Retrieve the top URLs by number of clicks for a given short link. - * - * @deprecated method: This method is deprecated. Use dub.analytics.clicks.topUrls instead.. Use topUrls instead. - */ - async topUrls( - request?: operations.GetTopURLsByClicksDeprecatedRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => - operations.GetTopURLsByClicksDeprecatedRequest$.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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getTopURLsByClicksDeprecated", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher< - Array - >() - .json(200, z.array(operations.GetTopURLsByClicksDeprecatedResponseBody$.inboundSchema)) + const [result$] = await this.matcher() + .json(200, operations.RetrieveAnalyticsResponseBody$) .json(400, errors.BadRequest$, { err: true }) .json(401, errors.Unauthorized$, { err: true }) .json(403, errors.Forbidden$, { err: true }) diff --git a/src/sdk/clicks.ts b/src/sdk/clicks.ts deleted file mode 100644 index a629b19..0000000 --- a/src/sdk/clicks.ts +++ /dev/null @@ -1,1540 +0,0 @@ -/* - * 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 Clicks 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 total clicks count - * - * @remarks - * Retrieve the total number of clicks for a link, a domain, or the authenticated workspace. - */ - async count( - request?: operations.GetClicksCountRequest | undefined, - options?: RequestOptions - ): Promise { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetClicksCountRequest$.outboundSchema.parse(value$), - "Input validation failed" - ); - const body$ = null; - - const path$ = this.templateURLComponent("/analytics/clicks/count")(); - - 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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getClicksCount", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher() - .json(200, z.number()) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve timeseries click analytics - * - * @remarks - * Retrieve timeseries click analytics for a link, a domain, or the authenticated workspace over a period of time. - */ - async timeseries( - request?: operations.GetTimeseriesByClicksRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetTimeseriesByClicksRequest$.outboundSchema.parse(value$), - "Input validation failed" - ); - const body$ = null; - - const path$ = this.templateURLComponent("/analytics/clicks/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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getTimeseriesByClicks", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(operations.ResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top countries by clicks - * - * @remarks - * Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace. - */ - async countries( - request?: operations.GetCountriesByClicksRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetCountriesByClicksRequest$.outboundSchema.parse(value$), - "Input validation failed" - ); - const body$ = null; - - const path$ = this.templateURLComponent("/analytics/clicks/countries")(); - - 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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getCountriesByClicks", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(components.ClicksByCountry$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top cities by clicks - * - * @remarks - * Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace. - */ - async cities( - request?: operations.GetCitiesByClicksRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetCitiesByClicksRequest$.outboundSchema.parse(value$), - "Input validation failed" - ); - const body$ = null; - - const path$ = this.templateURLComponent("/analytics/clicks/cities")(); - - 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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getCitiesByClicks", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(components.ClicksByCities$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top devices by clicks - * - * @remarks - * Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace. - */ - async devices( - request?: operations.GetDevicesByClicksRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetDevicesByClicksRequest$.outboundSchema.parse(value$), - "Input validation failed" - ); - const body$ = null; - - const path$ = this.templateURLComponent("/analytics/clicks/devices")(); - - 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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getDevicesByClicks", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(operations.GetDevicesByClicksResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top browsers by clicks - * - * @remarks - * Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace. - */ - async browsers( - request?: operations.GetBrowsersByClicksRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetBrowsersByClicksRequest$.outboundSchema.parse(value$), - "Input validation failed" - ); - const body$ = null; - - const path$ = this.templateURLComponent("/analytics/clicks/browsers")(); - - 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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getBrowsersByClicks", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(operations.GetBrowsersByClicksResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top OS by clicks - * - * @remarks - * Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace. - */ - async os( - request?: operations.GetOSByClicksRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetOSByClicksRequest$.outboundSchema.parse(value$), - "Input validation failed" - ); - const body$ = null; - - const path$ = this.templateURLComponent("/analytics/clicks/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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getOSByClicks", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(operations.GetOSByClicksResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top referers by clicks - * - * @remarks - * Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace. - */ - async referers( - request?: operations.GetReferersByClicksRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetReferersByClicksRequest$.outboundSchema.parse(value$), - "Input validation failed" - ); - const body$ = null; - - const path$ = this.templateURLComponent("/analytics/clicks/referers")(); - - 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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getReferersByClicks", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(operations.GetReferersByClicksResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top links by clicks - * - * @remarks - * Retrieve the top links by number of clicks for a domain or the authenticated workspace. - */ - async topLinks( - request?: operations.GetTopLinksByClicksRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetTopLinksByClicksRequest$.outboundSchema.parse(value$), - "Input validation failed" - ); - const body$ = null; - - const path$ = this.templateURLComponent("/analytics/clicks/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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getTopLinksByClicks", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(operations.GetTopLinksByClicksResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve top URLs by clicks - * - * @remarks - * Retrieve the top URLs by number of clicks for a given short link. - */ - async topUrls( - request?: operations.GetTopURLsByClicksRequest | undefined, - options?: RequestOptions - ): Promise> { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetTopURLsByClicksRequest$.outboundSchema.parse(value$), - "Input validation failed" - ); - const body$ = null; - - const path$ = this.templateURLComponent("/analytics/clicks/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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getTopURLsByClicks", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher>() - .json(200, z.array(operations.GetTopURLsByClicksResponseBody$.inboundSchema)) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } - - /** - * Retrieve the total clicks count - * - * @remarks - * Retrieve the total number of clicks for a link, a domain, or the authenticated workspace. - * - * @deprecated method: This method is deprecated. Use dub.analytics.clicks.count instead.. Use count instead. - */ - async getClicksCountDeprecated( - request?: operations.GetClicksCountDeprecatedRequest | undefined, - options?: RequestOptions - ): Promise { - const input$ = typeof request === "undefined" ? {} : request; - const headers$ = new Headers(); - headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Accept", "application/json"); - - const payload$ = schemas$.parse( - input$, - (value$) => operations.GetClicksCountDeprecatedRequest$.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("end", payload$.end, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("externalId", payload$.externalId, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("interval", payload$.interval, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("linkId", payload$.linkId, { 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("qr", payload$.qr, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("referer", payload$.referer, { - explode: true, - charEncoding: "percent", - }), - enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }), - enc$.encodeForm("start", payload$.start, { 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: "getClicksCountDeprecated", - 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$( - context, - { - 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$ }, - }; - - const [result$] = await this.matcher() - .json(200, z.number()) - .json(400, errors.BadRequest$, { err: true }) - .json(401, errors.Unauthorized$, { err: true }) - .json(403, errors.Forbidden$, { err: true }) - .json(404, errors.NotFound$, { err: true }) - .json(409, errors.Conflict$, { err: true }) - .json(410, errors.InviteExpired$, { err: true }) - .json(422, errors.UnprocessableEntity$, { err: true }) - .json(429, errors.RateLimitExceeded$, { err: true }) - .fail(["4XX", "5XX"]) - .json(500, errors.InternalServerError$, { err: true }) - .match(response, { extraFields: responseFields$ }); - - return result$; - } -}