From d678cd3421da7b0522072c2d05a92f81c42aaa47 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 17:22:38 +0530 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.310.0 (#128) Co-authored-by: speakeasybot --- .eslintrc.js => .eslintrc.cjs | 0 .speakeasy/gen.lock | 20 +- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 10 +- README.md | 29 +- RELEASES.md | 12 +- USAGE.md | 2 - codeSamples.yaml | 611 +++++++++--------- .../operations/bulkcreatelinksglobals.md | 2 +- .../operations/bulkcreatelinkstagids.md | 15 + .../operations/bulkcreatelinkstagnames.md | 15 + ...omainglobals.md => createdomainglobals.md} | 4 +- ...uestbody.md => createdomainrequestbody.md} | 2 +- docs/models/operations/createlinkglobals.md | 2 +- docs/models/operations/createtagglobals.md | 2 +- docs/models/operations/deletedomainglobals.md | 2 +- docs/models/operations/deletelinkglobals.md | 2 +- docs/models/operations/getlinkinfoglobals.md | 2 +- .../models/operations/getlinkscountglobals.md | 2 +- .../getlinkscountqueryparamtagids.md | 15 + .../getlinkscountqueryparamtagnames.md | 15 + docs/models/operations/getlinksglobals.md | 2 +- docs/models/operations/gettagsglobals.md | 2 +- docs/models/operations/groupby.md | 15 + docs/models/operations/listdomainsglobals.md | 2 +- docs/models/operations/queryparamtagids.md | 15 + docs/models/operations/queryparamtagnames.md | 15 + .../operations/retrieveanalyticsglobals.md | 2 +- .../retrieveanalyticsresponsebody.md | 183 ++++++ .../operations/setprimarydomainglobals.md | 2 +- docs/models/operations/tagids.md | 15 + docs/models/operations/tagnames.md | 15 + .../models/operations/trackcustomerglobals.md | 2 +- docs/models/operations/trackleadglobals.md | 2 +- docs/models/operations/tracksaleglobals.md | 2 +- .../operations/transferdomainglobals.md | 2 +- docs/models/operations/updatedomainglobals.md | 2 +- docs/models/operations/updatelinkglobals.md | 2 +- docs/models/operations/updatelinktagids.md | 15 + docs/models/operations/updatelinktagnames.md | 15 + docs/models/operations/upsertlinkglobals.md | 2 +- docs/models/operations/upsertlinktagids.md | 15 + docs/models/operations/upsertlinktagnames.md | 15 + docs/sdks/analytics/README.md | 1 - docs/sdks/domains/README.md | 16 +- docs/sdks/links/README.md | 8 - docs/sdks/metatags/README.md | 1 - docs/sdks/qrcodes/README.md | 1 - docs/sdks/tags/README.md | 2 - docs/sdks/track/README.md | 3 - docs/sdks/workspaces/README.md | 3 - jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/hooks/hooks.ts | 6 +- src/hooks/index.ts | 4 +- src/hooks/types.ts | 2 +- src/lib/config.ts | 14 +- src/lib/encodings.ts | 4 +- src/lib/http.ts | 14 +- src/lib/schemas.ts | 2 +- src/lib/sdks.ts | 13 +- src/lib/security.ts | 2 +- src/models/components/clickscities.ts | 7 +- src/models/components/clickscountries.ts | 6 +- src/models/components/countrycode.ts | 6 +- src/models/components/domainschema.ts | 6 +- src/models/components/index.ts | 74 +-- src/models/components/leadscities.ts | 7 +- src/models/components/leadscountries.ts | 7 +- src/models/components/linkgeotargeting.ts | 2 +- src/models/components/linkschema.ts | 4 +- src/models/components/salescities.ts | 7 +- src/models/components/salescountries.ts | 7 +- src/models/components/tagschema.ts | 6 +- src/models/components/workspaceschema.ts | 10 +- src/models/errors/badrequest.ts | 8 +- src/models/errors/conflict.ts | 8 +- src/models/errors/forbidden.ts | 8 +- src/models/errors/index.ts | 22 +- src/models/errors/internalservererror.ts | 9 +- src/models/errors/inviteexpired.ts | 9 +- src/models/errors/notfound.ts | 8 +- src/models/errors/ratelimitexceeded.ts | 9 +- src/models/errors/unauthorized.ts | 9 +- src/models/errors/unprocessableentity.ts | 9 +- src/models/operations/bulkcreatelinks.ts | 10 +- .../{adddomain.ts => createdomain.ts} | 52 +- src/models/operations/createlink.ts | 10 +- src/models/operations/createtag.ts | 14 +- src/models/operations/deletedomain.ts | 8 +- src/models/operations/deletelink.ts | 8 +- src/models/operations/getlinkinfo.ts | 8 +- src/models/operations/getlinks.ts | 14 +- src/models/operations/getlinkscount.ts | 18 +- src/models/operations/getqrcode.ts | 6 +- src/models/operations/gettags.ts | 8 +- src/models/operations/index.ts | 48 +- src/models/operations/listdomains.ts | 8 +- src/models/operations/retrieveanalytics.ts | 25 +- src/models/operations/setprimarydomain.ts | 8 +- src/models/operations/trackcustomer.ts | 8 +- src/models/operations/tracklead.ts | 8 +- src/models/operations/tracksale.ts | 15 +- src/models/operations/transferdomain.ts | 10 +- src/models/operations/updatedomain.ts | 17 +- src/models/operations/updatelink.ts | 12 +- src/models/operations/upsertlink.ts | 10 +- src/sdk/analytics.ts | 16 +- src/sdk/domains.ts | 30 +- src/sdk/index.ts | 2 +- src/sdk/links.ts | 18 +- src/sdk/metatags.ts | 14 +- src/sdk/qrcodes.ts | 16 +- src/sdk/sdk.ts | 24 +- src/sdk/tags.ts | 21 +- src/sdk/track.ts | 19 +- src/sdk/workspaces.ts | 18 +- src/types/index.ts | 12 +- 119 files changed, 1169 insertions(+), 807 deletions(-) rename .eslintrc.js => .eslintrc.cjs (100%) rename docs/models/operations/{adddomainglobals.md => createdomainglobals.md} (92%) rename docs/models/operations/{adddomainrequestbody.md => createdomainrequestbody.md} (99%) rename src/models/operations/{adddomain.ts => createdomain.ts} (66%) diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 100% rename from .eslintrc.js rename to .eslintrc.cjs diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 6af8020..5d62c87 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: ba3e83845a082a6c2321d0eeaaf9c23c + docChecksum: 4e9799bd93fdf4959c9efd6004900847 docVersion: 0.0.1 - speakeasyVersion: 1.308.1 - generationVersion: 2.342.6 - releaseVersion: 0.29.19 - configChecksum: 16dcbf7b27038e97d6737d5eb5d0d00f + speakeasyVersion: 1.310.0 + generationVersion: 2.347.4 + releaseVersion: 0.30.0 + configChecksum: 3a10eead6c2e202b51efca6e91e3a3c5 repoURL: https://github.com/dubinc/dub-node.git installationURL: https://github.com/dubinc/dub-node published: true @@ -14,7 +14,7 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.5 - core: 3.9.14 + core: 3.10.0 deprecations: 2.81.1 examples: 2.81.4 flattening: 2.81.1 @@ -39,7 +39,7 @@ generatedFiles: - src/sdk/track.ts - src/sdk/metatags.ts - src/sdk/sdk.ts - - .eslintrc.js + - .eslintrc.cjs - .npmignore - RUNTIMES.md - jsr.json @@ -125,7 +125,7 @@ generatedFiles: - src/models/operations/gettags.ts - src/models/operations/createtag.ts - src/models/operations/listdomains.ts - - src/models/operations/adddomain.ts + - src/models/operations/createdomain.ts - src/models/operations/deletedomain.ts - src/models/operations/updatedomain.ts - src/models/operations/setprimarydomain.ts @@ -265,9 +265,9 @@ generatedFiles: - docs/models/operations/createtagrequestbody.md - docs/models/operations/listdomainsglobals.md - docs/models/operations/listdomainsrequest.md - - docs/models/operations/adddomainglobals.md + - docs/models/operations/createdomainglobals.md - docs/models/operations/type.md - - docs/models/operations/adddomainrequestbody.md + - docs/models/operations/createdomainrequestbody.md - docs/models/operations/deletedomainglobals.md - docs/models/operations/deletedomainrequest.md - docs/models/operations/deletedomainresponsebody.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index fe521af..c4131a4 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.29.19 + version: 0.30.0 additionalDependencies: dependencies: {} devDependencies: @@ -39,3 +39,4 @@ typescript: packageName: dub responseFormat: flat templateVersion: v2 + useIndexModules: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index f936665..9fc994f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.308.1 +speakeasyVersion: 1.310.0 sources: my-first-source: sourceNamespace: my-first-source - sourceRevisionDigest: sha256:9a700e801c2472d685c26ad0596334e1fdf7630c097d072aa8794e7087e6e2bb - sourceBlobDigest: sha256:3146fa3c80ad954fbc1a1ea231099ecc5126b8f14693850e8c2d10183642574e + sourceRevisionDigest: sha256:d8364283c60870cb9f54133d096e7823722e4160e52eeb3db8cc2f7d90d96e65 + sourceBlobDigest: sha256:52de37a2a76e00df27b42df8fdfa2db162c0932baec6a3eeb8659f4306f5f9b5 tags: - latest - main @@ -11,8 +11,8 @@ targets: my-first-target: source: my-first-source sourceNamespace: my-first-source - sourceRevisionDigest: sha256:9a700e801c2472d685c26ad0596334e1fdf7630c097d072aa8794e7087e6e2bb - sourceBlobDigest: sha256:3146fa3c80ad954fbc1a1ea231099ecc5126b8f14693850e8c2d10183642574e + sourceRevisionDigest: sha256:d8364283c60870cb9f54133d096e7823722e4160e52eeb3db8cc2f7d90d96e65 + sourceBlobDigest: sha256:52de37a2a76e00df27b42df8fdfa2db162c0932baec6a3eeb8659f4306f5f9b5 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index 90b10d8..89fa397 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,25 @@ Learn more about the Dub.co TypeScript SDK in the [official documentation](https npm add dub ``` +### PNPM + +```bash +pnpm add dub +``` + +### Bun + +```bash +bun add dub +``` + ### Yarn ```bash -yarn add dub +yarn add dub zod + +# Note that Yarn does not install peer dependencies automatically. You will need +# to install zod as shown above. ``` @@ -43,7 +58,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -66,7 +80,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -119,7 +132,7 @@ run(); ### [domains](docs/sdks/domains/README.md) * [list](docs/sdks/domains/README.md#list) - Retrieve a list of domains -* [add](docs/sdks/domains/README.md#add) - Add a domain +* [create](docs/sdks/domains/README.md#create) - Create a domain * [delete](docs/sdks/domains/README.md#delete) - Delete a domain * [update](docs/sdks/domains/README.md#update) - Update a domain * [setPrimary](docs/sdks/domains/README.md#setprimary) - Set a domain as primary @@ -159,11 +172,10 @@ Validation errors can also occur when either method arguments or data returned f ```typescript import { Dub } from "dub"; -import * as errors from "dub/models/errors"; +import { SDKValidationError } from "dub/models/errors"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -172,7 +184,7 @@ async function run() { result = await dub.links.list({}); } catch (err) { switch (true) { - case err instanceof errors.SDKValidationError: { + case err instanceof SDKValidationError: { // Validation errors can be pretty-printed console.error(err.pretty()); // Raw value may also be inspected @@ -247,7 +259,6 @@ import { Dub } from "dub"; const dub = new Dub({ serverIdx: 0, token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -272,7 +283,6 @@ import { Dub } from "dub"; const dub = new Dub({ serverURL: "https://api.dub.co", token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -353,7 +363,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { diff --git a/RELEASES.md b/RELEASES.md index 7f809d0..f7761ae 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -456,4 +456,14 @@ Based on: ### Generated - [typescript v0.29.19] . ### Releases -- [NPM v0.29.19] https://www.npmjs.com/package/dub/v/0.29.19 - . \ No newline at end of file +- [NPM v0.29.19] https://www.npmjs.com/package/dub/v/0.29.19 - . + +## 2024-06-20 01:17:19 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.310.0 (2.347.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.30.0] . +### Releases +- [NPM v0.30.0] https://www.npmjs.com/package/dub/v/0.30.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 3af1805..9465b01 100644 --- a/USAGE.md +++ b/USAGE.md @@ -4,7 +4,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -25,7 +24,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { diff --git a/codeSamples.yaml b/codeSamples.yaml index 4d1568f..33a3baf 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,6 +3,50 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: + - target: $["paths"]["/links"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "createLink" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.links.create({ + url: "https://google/com", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/links/upsert"]["put"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "upsertLink" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.links.upsert({ + url: "https://google/com", + }); + + // Handle the result + console.log(result) + } + + run(); - target: $["paths"]["/links"]["get"] update: "x-codeSamples": @@ -13,7 +57,6 @@ actions: const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -34,7 +77,6 @@ actions: const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -44,206 +86,6 @@ actions: console.log(result) } - run(); - - target: $["paths"]["/tags"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTags" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.tags.list({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/tags"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "createTag" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.tags.create({ - tag: "", - }); - - // 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/upsert"]["put"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "upsertLink" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.links.upsert({ - url: "https://google/com", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/qr"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getQRCode" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.qrCodes.get({ - url: "https://brief-micronutrient.org", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/workspaces"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getWorkspaces" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.workspaces.list(); - - // 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"]["/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/{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"]["/workspaces"]["post"] update: @@ -255,7 +97,6 @@ actions: const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -269,67 +110,40 @@ actions: } run(); - - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] + - target: $["paths"]["/tags"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getWorkspace" + "label": "getTags" "source": |- import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { - const result = await dub.workspaces.get({ - idOrSlug: "", - }); + const result = await dub.tags.list({}); // Handle the result console.log(result) } run(); - - target: $["paths"]["/domains/{slug}"]["delete"] + - target: $["paths"]["/domains/{slug}"]["patch"] update: "x-codeSamples": - "lang": "typescript" - "label": "deleteDomain" + "label": "updateDomain" "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}/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: "", - }); + const result = await dub.domains.update("acme.com", {}); // Handle the result console.log(result) @@ -346,7 +160,6 @@ actions: const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -358,77 +171,6 @@ actions: console.log(result) } - run(); - - target: $["paths"]["/metatags"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getMetatags" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.metatags.get({ - url: "https://dub.co", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/track/lead"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "trackLead" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.track.lead({ - clickId: "", - eventName: "Sign up", - customerId: "", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/links"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "createLink" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.links.create({ - url: "https://google/com", - }); - - // Handle the result - console.log(result) - } - run(); - target: $["paths"]["/links/count"]["get"] update: @@ -440,7 +182,6 @@ actions: const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -461,7 +202,6 @@ actions: const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -471,6 +211,137 @@ actions: 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", + }); + + async function run() { + const result = await dub.links.delete(""); + + // 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", + }); + + async function run() { + const result = await dub.workspaces.get({ + idOrSlug: "", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/domains"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "createDomain" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.domains.create({ + slug: "acme.com", + }); + + // 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", + }); + + async function run() { + const result = await dub.domains.delete("acme.com"); + + // 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", + }); + + async function run() { + const result = await dub.domains.transfer("acme.com", { + newWorkspaceId: "", + }); + + // 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", + }); + + 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/{linkId}"]["patch"] update: @@ -482,7 +353,6 @@ actions: const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -505,7 +375,6 @@ actions: const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -519,6 +388,112 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/workspaces"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getWorkspaces" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.workspaces.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", + }); + + async function run() { + const result = await dub.domains.setPrimary("acme.com"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/metatags"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getMetatags" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.metatags.get({ + url: "https://dub.co", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/qr"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getQRCode" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.qrCodes.get({ + url: "https://brief-micronutrient.org", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/tags"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "createTag" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.tags.create({ + tag: "", + }); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/domains"]["get"] update: @@ -530,7 +505,6 @@ actions: const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -541,22 +515,23 @@ actions: } run(); - - target: $["paths"]["/domains"]["post"] + - target: $["paths"]["/track/lead"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "addDomain" + "label": "trackLead" "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", + const result = await dub.track.lead({ + clickId: "", + eventName: "Sign up", + customerId: "", }); // Handle the result diff --git a/docs/models/operations/bulkcreatelinksglobals.md b/docs/models/operations/bulkcreatelinksglobals.md index a541dd3..a7366cc 100644 --- a/docs/models/operations/bulkcreatelinksglobals.md +++ b/docs/models/operations/bulkcreatelinksglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/bulkcreatelinkstagids.md b/docs/models/operations/bulkcreatelinkstagids.md index 4a27290..b1dd728 100644 --- a/docs/models/operations/bulkcreatelinkstagids.md +++ b/docs/models/operations/bulkcreatelinkstagids.md @@ -2,3 +2,18 @@ The unique IDs of the tags assigned to the short link. + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/bulkcreatelinkstagnames.md b/docs/models/operations/bulkcreatelinkstagnames.md index 7fb0f68..4a52c65 100644 --- a/docs/models/operations/bulkcreatelinkstagnames.md +++ b/docs/models/operations/bulkcreatelinkstagnames.md @@ -2,3 +2,18 @@ The unique name of the tags assigned to the short link (case insensitive). + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/adddomainglobals.md b/docs/models/operations/createdomainglobals.md similarity index 92% rename from docs/models/operations/adddomainglobals.md rename to docs/models/operations/createdomainglobals.md index 1b4d310..fad2c77 100644 --- a/docs/models/operations/adddomainglobals.md +++ b/docs/models/operations/createdomainglobals.md @@ -1,9 +1,9 @@ -# AddDomainGlobals +# CreateDomainGlobals ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/adddomainrequestbody.md b/docs/models/operations/createdomainrequestbody.md similarity index 99% rename from docs/models/operations/adddomainrequestbody.md rename to docs/models/operations/createdomainrequestbody.md index 9c36ab5..06ce78c 100644 --- a/docs/models/operations/adddomainrequestbody.md +++ b/docs/models/operations/createdomainrequestbody.md @@ -1,4 +1,4 @@ -# AddDomainRequestBody +# CreateDomainRequestBody ## Fields diff --git a/docs/models/operations/createlinkglobals.md b/docs/models/operations/createlinkglobals.md index 8dabe0d..8f5996e 100644 --- a/docs/models/operations/createlinkglobals.md +++ b/docs/models/operations/createlinkglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/createtagglobals.md b/docs/models/operations/createtagglobals.md index 5c7c456..43fbbc9 100644 --- a/docs/models/operations/createtagglobals.md +++ b/docs/models/operations/createtagglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/deletedomainglobals.md b/docs/models/operations/deletedomainglobals.md index b04b0d3..8c0f909 100644 --- a/docs/models/operations/deletedomainglobals.md +++ b/docs/models/operations/deletedomainglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/deletelinkglobals.md b/docs/models/operations/deletelinkglobals.md index 8cff781..957dc59 100644 --- a/docs/models/operations/deletelinkglobals.md +++ b/docs/models/operations/deletelinkglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/getlinkinfoglobals.md b/docs/models/operations/getlinkinfoglobals.md index 40572b3..02a34ba 100644 --- a/docs/models/operations/getlinkinfoglobals.md +++ b/docs/models/operations/getlinkinfoglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/getlinkscountglobals.md b/docs/models/operations/getlinkscountglobals.md index 2c3f546..6e185df 100644 --- a/docs/models/operations/getlinkscountglobals.md +++ b/docs/models/operations/getlinkscountglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/getlinkscountqueryparamtagids.md b/docs/models/operations/getlinkscountqueryparamtagids.md index 7e70208..3cfe100 100644 --- a/docs/models/operations/getlinkscountqueryparamtagids.md +++ b/docs/models/operations/getlinkscountqueryparamtagids.md @@ -2,3 +2,18 @@ The tag IDs to filter the links by. + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/getlinkscountqueryparamtagnames.md b/docs/models/operations/getlinkscountqueryparamtagnames.md index 7ebc443..fef0a33 100644 --- a/docs/models/operations/getlinkscountqueryparamtagnames.md +++ b/docs/models/operations/getlinkscountqueryparamtagnames.md @@ -2,3 +2,18 @@ The unique name of the tags assigned to the short link (case insensitive). + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/getlinksglobals.md b/docs/models/operations/getlinksglobals.md index 9f8b78f..be445d9 100644 --- a/docs/models/operations/getlinksglobals.md +++ b/docs/models/operations/getlinksglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/gettagsglobals.md b/docs/models/operations/gettagsglobals.md index 80c5174..db7b7e3 100644 --- a/docs/models/operations/gettagsglobals.md +++ b/docs/models/operations/gettagsglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/groupby.md b/docs/models/operations/groupby.md index 57f29de..d4bb7ce 100644 --- a/docs/models/operations/groupby.md +++ b/docs/models/operations/groupby.md @@ -2,3 +2,18 @@ The field to group the links by. + +## Supported Types + +### `operations.One` + +```typescript +const value: operations.One = /* values here */ +``` + +### `operations.Two` + +```typescript +const value: operations.Two = /* values here */ +``` + diff --git a/docs/models/operations/listdomainsglobals.md b/docs/models/operations/listdomainsglobals.md index 2590c66..12db282 100644 --- a/docs/models/operations/listdomainsglobals.md +++ b/docs/models/operations/listdomainsglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/queryparamtagids.md b/docs/models/operations/queryparamtagids.md index dcb80e1..6a972a5 100644 --- a/docs/models/operations/queryparamtagids.md +++ b/docs/models/operations/queryparamtagids.md @@ -2,3 +2,18 @@ The tag IDs to filter the links by. + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/queryparamtagnames.md b/docs/models/operations/queryparamtagnames.md index 24cdd84..9033729 100644 --- a/docs/models/operations/queryparamtagnames.md +++ b/docs/models/operations/queryparamtagnames.md @@ -2,3 +2,18 @@ The unique name of the tags assigned to the short link (case insensitive). + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/retrieveanalyticsglobals.md b/docs/models/operations/retrieveanalyticsglobals.md index b2f2399..e0fcebd 100644 --- a/docs/models/operations/retrieveanalyticsglobals.md +++ b/docs/models/operations/retrieveanalyticsglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/retrieveanalyticsresponsebody.md b/docs/models/operations/retrieveanalyticsresponsebody.md index 6bfb0e4..bd6a803 100644 --- a/docs/models/operations/retrieveanalyticsresponsebody.md +++ b/docs/models/operations/retrieveanalyticsresponsebody.md @@ -2,3 +2,186 @@ Analytics data + +## Supported Types + +### `components.ClicksCount` + +```typescript +const value: components.ClicksCount = /* values here */ +``` + +### `components.ClicksTimeseries[]` + +```typescript +const value: components.ClicksTimeseries[] = /* values here */ +``` + +### `components.ClicksCountries[]` + +```typescript +const value: components.ClicksCountries[] = /* values here */ +``` + +### `components.ClicksCities[]` + +```typescript +const value: components.ClicksCities[] = /* values here */ +``` + +### `components.ClicksDevices[]` + +```typescript +const value: components.ClicksDevices[] = /* values here */ +``` + +### `components.ClicksBrowsers[]` + +```typescript +const value: components.ClicksBrowsers[] = /* values here */ +``` + +### `components.ClicksOS[]` + +```typescript +const value: components.ClicksOS[] = /* values here */ +``` + +### `components.ClicksReferers[]` + +```typescript +const value: components.ClicksReferers[] = /* values here */ +``` + +### `components.ClicksTopLinks[]` + +```typescript +const value: components.ClicksTopLinks[] = /* values here */ +``` + +### `components.ClicksTopUrls[]` + +```typescript +const value: components.ClicksTopUrls[] = /* values here */ +``` + +### `components.LeadsCount` + +```typescript +const value: components.LeadsCount = /* values here */ +``` + +### `components.LeadsTimeseries[]` + +```typescript +const value: components.LeadsTimeseries[] = /* values here */ +``` + +### `components.LeadsCountries[]` + +```typescript +const value: components.LeadsCountries[] = /* values here */ +``` + +### `components.LeadsCities[]` + +```typescript +const value: components.LeadsCities[] = /* values here */ +``` + +### `components.LeadsDevices[]` + +```typescript +const value: components.LeadsDevices[] = /* values here */ +``` + +### `components.LeadsBrowsers[]` + +```typescript +const value: components.LeadsBrowsers[] = /* values here */ +``` + +### `components.LeadsOS[]` + +```typescript +const value: components.LeadsOS[] = /* values here */ +``` + +### `components.LeadsReferers[]` + +```typescript +const value: components.LeadsReferers[] = /* values here */ +``` + +### `components.LeadsTopLinks[]` + +```typescript +const value: components.LeadsTopLinks[] = /* values here */ +``` + +### `components.LeadsTopUrls[]` + +```typescript +const value: components.LeadsTopUrls[] = /* values here */ +``` + +### `components.SalesCount` + +```typescript +const value: components.SalesCount = /* values here */ +``` + +### `components.SalesTimeseries[]` + +```typescript +const value: components.SalesTimeseries[] = /* values here */ +``` + +### `components.SalesCountries[]` + +```typescript +const value: components.SalesCountries[] = /* values here */ +``` + +### `components.SalesCities[]` + +```typescript +const value: components.SalesCities[] = /* values here */ +``` + +### `components.SalesDevices[]` + +```typescript +const value: components.SalesDevices[] = /* values here */ +``` + +### `components.SalesBrowsers[]` + +```typescript +const value: components.SalesBrowsers[] = /* values here */ +``` + +### `components.SalesOS[]` + +```typescript +const value: components.SalesOS[] = /* values here */ +``` + +### `components.SalesReferers[]` + +```typescript +const value: components.SalesReferers[] = /* values here */ +``` + +### `components.SalesTopLinks[]` + +```typescript +const value: components.SalesTopLinks[] = /* values here */ +``` + +### `components.SalesTopUrls[]` + +```typescript +const value: components.SalesTopUrls[] = /* values here */ +``` + diff --git a/docs/models/operations/setprimarydomainglobals.md b/docs/models/operations/setprimarydomainglobals.md index ce86e63..ea45f49 100644 --- a/docs/models/operations/setprimarydomainglobals.md +++ b/docs/models/operations/setprimarydomainglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/tagids.md b/docs/models/operations/tagids.md index 8dca755..67a1730 100644 --- a/docs/models/operations/tagids.md +++ b/docs/models/operations/tagids.md @@ -2,3 +2,18 @@ The unique IDs of the tags assigned to the short link. + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/tagnames.md b/docs/models/operations/tagnames.md index 78ea6be..dd9bb8a 100644 --- a/docs/models/operations/tagnames.md +++ b/docs/models/operations/tagnames.md @@ -2,3 +2,18 @@ The unique name of the tags assigned to the short link (case insensitive). + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/trackcustomerglobals.md b/docs/models/operations/trackcustomerglobals.md index 753e332..21aaa7f 100644 --- a/docs/models/operations/trackcustomerglobals.md +++ b/docs/models/operations/trackcustomerglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/trackleadglobals.md b/docs/models/operations/trackleadglobals.md index 99dd170..08f878d 100644 --- a/docs/models/operations/trackleadglobals.md +++ b/docs/models/operations/trackleadglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/tracksaleglobals.md b/docs/models/operations/tracksaleglobals.md index c3cc2f1..e84db70 100644 --- a/docs/models/operations/tracksaleglobals.md +++ b/docs/models/operations/tracksaleglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/transferdomainglobals.md b/docs/models/operations/transferdomainglobals.md index 38e0416..26e3582 100644 --- a/docs/models/operations/transferdomainglobals.md +++ b/docs/models/operations/transferdomainglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/updatedomainglobals.md b/docs/models/operations/updatedomainglobals.md index 7debeb8..b8b82f2 100644 --- a/docs/models/operations/updatedomainglobals.md +++ b/docs/models/operations/updatedomainglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/updatelinkglobals.md b/docs/models/operations/updatelinkglobals.md index 5a96eb3..85345e1 100644 --- a/docs/models/operations/updatelinkglobals.md +++ b/docs/models/operations/updatelinkglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/updatelinktagids.md b/docs/models/operations/updatelinktagids.md index e678b70..334bafd 100644 --- a/docs/models/operations/updatelinktagids.md +++ b/docs/models/operations/updatelinktagids.md @@ -2,3 +2,18 @@ The unique IDs of the tags assigned to the short link. + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/updatelinktagnames.md b/docs/models/operations/updatelinktagnames.md index 23fc701..306b618 100644 --- a/docs/models/operations/updatelinktagnames.md +++ b/docs/models/operations/updatelinktagnames.md @@ -2,3 +2,18 @@ The unique name of the tags assigned to the short link (case insensitive). + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/upsertlinkglobals.md b/docs/models/operations/upsertlinkglobals.md index 6065126..0059768 100644 --- a/docs/models/operations/upsertlinkglobals.md +++ b/docs/models/operations/upsertlinkglobals.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `workspaceId` | *string* | :heavy_check_mark: | N/A | +| `workspaceId` | *string* | :heavy_minus_sign: | 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/upsertlinktagids.md b/docs/models/operations/upsertlinktagids.md index 3516e4c..dd71d5b 100644 --- a/docs/models/operations/upsertlinktagids.md +++ b/docs/models/operations/upsertlinktagids.md @@ -2,3 +2,18 @@ The unique IDs of the tags assigned to the short link. + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/models/operations/upsertlinktagnames.md b/docs/models/operations/upsertlinktagnames.md index aa7e638..02edce5 100644 --- a/docs/models/operations/upsertlinktagnames.md +++ b/docs/models/operations/upsertlinktagnames.md @@ -2,3 +2,18 @@ The unique name of the tags assigned to the short link (case insensitive). + +## Supported Types + +### `string` + +```typescript +const value: string = /* values here */ +``` + +### `string[]` + +```typescript +const value: string[] = /* values here */ +``` + diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index 446d18a..5d7271b 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -16,7 +16,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md index b7c00e3..68ee1c9 100644 --- a/docs/sdks/domains/README.md +++ b/docs/sdks/domains/README.md @@ -4,7 +4,7 @@ ### Available Operations * [list](#list) - Retrieve a list of domains -* [add](#add) - Add a domain +* [create](#create) - Create a domain * [delete](#delete) - Delete a domain * [update](#update) - Update a domain * [setPrimary](#setprimary) - Set a domain as primary @@ -21,7 +21,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -61,9 +60,9 @@ run(); | errors.InternalServerError | 500 | application/json | | errors.SDKError | 4xx-5xx | */* | -## add +## create -Add a domain to the authenticated workspace. +Create a domain for the authenticated workspace. ### Example Usage @@ -72,11 +71,10 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { - const result = await dub.domains.add({ + const result = await dub.domains.create({ slug: "acme.com", }); @@ -91,7 +89,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.AddDomainRequestBody](../../models/operations/adddomainrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateDomainRequestBody](../../models/operations/createdomainrequestbody.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. | @@ -125,7 +123,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -176,7 +173,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -228,7 +224,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -279,7 +274,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md index 1b31370..ef5ebd7 100644 --- a/docs/sdks/links/README.md +++ b/docs/sdks/links/README.md @@ -23,7 +23,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -74,7 +73,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -127,7 +125,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -178,7 +175,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -229,7 +225,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -280,7 +275,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -334,7 +328,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -389,7 +382,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { diff --git a/docs/sdks/metatags/README.md b/docs/sdks/metatags/README.md index c6dc592..6cbd45a 100644 --- a/docs/sdks/metatags/README.md +++ b/docs/sdks/metatags/README.md @@ -16,7 +16,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { diff --git a/docs/sdks/qrcodes/README.md b/docs/sdks/qrcodes/README.md index bc7f8da..b40c230 100644 --- a/docs/sdks/qrcodes/README.md +++ b/docs/sdks/qrcodes/README.md @@ -16,7 +16,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { diff --git a/docs/sdks/tags/README.md b/docs/sdks/tags/README.md index b44482c..bbdf672 100644 --- a/docs/sdks/tags/README.md +++ b/docs/sdks/tags/README.md @@ -17,7 +17,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -68,7 +67,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { diff --git a/docs/sdks/track/README.md b/docs/sdks/track/README.md index 1148434..b60b521 100644 --- a/docs/sdks/track/README.md +++ b/docs/sdks/track/README.md @@ -18,7 +18,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -74,7 +73,6 @@ import { PaymentProcessor } from "dub/models/operations"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -129,7 +127,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index c71a637..e5f3e51 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -18,7 +18,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -68,7 +67,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { @@ -122,7 +120,6 @@ import { Dub } from "dub"; const dub = new Dub({ token: "DUB_API_KEY", - workspaceId: "", }); async function run() { diff --git a/jsr.json b/jsr.json index af9ddbf..8349491 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "dub", - "version": "0.29.19", + "version": "0.30.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index bc55afa..3891060 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dub", - "version": "0.29.19", + "version": "0.30.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dub", - "version": "0.29.19", + "version": "0.30.0", "devDependencies": { "@types/jsonpath": "^0.2.4", "@types/node": "^20.12.7", diff --git a/package.json b/package.json index b72c7bf..ffa8223 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dub", - "version": "0.29.19", + "version": "0.30.0", "author": "Dub", "main": "./index.js", "sideEffects": false, diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts index 8a3db0d..6a1e31e 100644 --- a/src/hooks/hooks.ts +++ b/src/hooks/hooks.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { RequestInput } from "../lib/http"; +import { RequestInput } from "../lib/http.js"; import { AfterErrorContext, AfterErrorHook, @@ -15,9 +15,9 @@ import { Hooks, SDKInitHook, SDKInitOptions, -} from "./types"; +} from "./types.js"; -import { initHooks } from "./registration"; +import { initHooks } from "./registration.js"; export class SDKHooks implements Hooks { sdkInitHooks: SDKInitHook[] = []; diff --git a/src/hooks/index.ts b/src/hooks/index.ts index 3df0393..d5fdd74 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -2,5 +2,5 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -export * from "./types"; -export * from "./hooks"; +export * from "./types.js"; +export * from "./hooks.js"; diff --git a/src/hooks/types.ts b/src/hooks/types.ts index a5b367a..dd23b02 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { HTTPClient, RequestInput } from "../lib/http"; +import { HTTPClient, RequestInput } from "../lib/http.js"; export type HookContext = { operationID: string; diff --git a/src/lib/config.ts b/src/lib/config.ts index 1ec5eb1..ba8279c 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -2,9 +2,9 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { HTTPClient } from "./http"; -import { RetryConfig } from "./retries"; -import { Params, pathToFunc } from "./url"; +import { HTTPClient } from "./http.js"; +import { RetryConfig } from "./retries.js"; +import { Params, pathToFunc } from "./url.js"; /** * Contains the list of servers available to the SDK @@ -22,7 +22,7 @@ export type SDKOptions = { /** * Allows setting the workspaceId parameter for all supported operations */ - workspaceId?: string; + workspaceId?: string | undefined; /** * Allows setting the projectSlug parameter for all supported operations @@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.1", - sdkVersion: "0.29.19", - genVersion: "2.342.6", - userAgent: "speakeasy-sdk/typescript 0.29.19 2.342.6 0.0.1 dub", + sdkVersion: "0.30.0", + genVersion: "2.347.4", + userAgent: "speakeasy-sdk/typescript 0.30.0 2.347.4 0.0.1 dub", } as const; diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index c28d894..49f536b 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { bytesToBase64 } from "./base64"; -import { isPlainObject } from "./is-plain-object"; +import { bytesToBase64 } from "./base64.js"; +import { isPlainObject } from "./is-plain-object.js"; export class EncodingError extends Error { constructor(message: string) { diff --git a/src/lib/http.ts b/src/lib/http.ts index f28175d..7c5107a 100644 --- a/src/lib/http.ts +++ b/src/lib/http.ts @@ -3,9 +3,9 @@ */ import { never as znever } from "zod"; -import { parse } from "./schemas"; -import { isPlainObject } from "./is-plain-object"; -import * as errors from "../models/errors"; +import { parse } from "./schemas.js"; +import { isPlainObject } from "./is-plain-object.js"; +import { SDKError } from "../models/errors/sdkerror.js"; export type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise; @@ -406,7 +406,7 @@ export class ResponseMatcher { } if (pred == null) { const responseBody = await response.text(); - throw new errors.SDKError( + throw new SDKError( "Unexpected API response status or content-type", response, responseBody @@ -446,11 +446,7 @@ export class ResponseMatcher { const resultKey = pred.key || options?.resultKey; let data: unknown; if (pred.fail) { - throw new errors.SDKError( - "API error occurred", - response, - typeof raw === "string" ? raw : "" - ); + throw new SDKError("API error occurred", response, typeof raw === "string" ? raw : ""); } else if (pred.err) { data = { ...options?.extraFields, diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index 3e8270b..94b0535 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -3,7 +3,7 @@ */ import { output, ZodEffects, ZodError, ZodObject, ZodRawShape, ZodTypeAny } from "zod"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; /** * Utility function that executes some code which may throw a ZodError. It diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 9ec697e..b6f45cf 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -2,12 +2,13 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ResponseMatcher, HTTPClient, matchStatusCode } from "./http"; -import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security"; -import { pathToFunc } from "./url"; -import { encodeForm } from "./encodings"; -import { stringToBase64 } from "./base64"; -import { SDKHooks, HookContext } from "../hooks"; +import { ResponseMatcher, HTTPClient, matchStatusCode } from "./http.js"; +import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security.js"; +import { pathToFunc } from "./url.js"; +import { encodeForm } from "./encodings.js"; +import { stringToBase64 } from "./base64.js"; +import { SDKHooks } from "../hooks/hooks.js"; +import { HookContext } from "../hooks/types.js"; export type RequestOptions = { fetchOptions?: Omit; diff --git a/src/lib/security.ts b/src/lib/security.ts index c63efac..b2f6665 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import * as components from "../models/components"; +import * as components from "../models/components/index.js"; export enum SecurityErrorCode { Incomplete = "incomplete", diff --git a/src/models/components/clickscities.ts b/src/models/components/clickscities.ts index c33a6fb..622d5c8 100644 --- a/src/models/components/clickscities.ts +++ b/src/models/components/clickscities.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -282,8 +282,9 @@ export type ClicksCities = { /** @internal */ export namespace ClicksCitiesCountry$ { - export const inboundSchema = z.nativeEnum(ClicksCitiesCountry); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(ClicksCitiesCountry); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/components/clickscountries.ts b/src/models/components/clickscountries.ts index 45ae9fc..1b758ff 100644 --- a/src/models/components/clickscountries.ts +++ b/src/models/components/clickscountries.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -278,8 +278,8 @@ export type ClicksCountries = { /** @internal */ export namespace Country$ { - export const inboundSchema = z.nativeEnum(Country); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Country); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/components/countrycode.ts b/src/models/components/countrycode.ts index 940efcc..9e1bc88 100644 --- a/src/models/components/countrycode.ts +++ b/src/models/components/countrycode.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -267,6 +267,6 @@ export type CountryCode = ClosedEnum; /** @internal */ export namespace CountryCode$ { - export const inboundSchema = z.nativeEnum(CountryCode); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(CountryCode); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } diff --git a/src/models/components/domainschema.ts b/src/models/components/domainschema.ts index dac15f4..081c436 100644 --- a/src/models/components/domainschema.ts +++ b/src/models/components/domainschema.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -66,8 +66,8 @@ export type DomainSchema = { /** @internal */ export namespace Type$ { - export const inboundSchema = z.nativeEnum(Type); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Type); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 60f95bf..02a7f39 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -2,40 +2,40 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -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"; +export * from "./clicksbrowsers.js"; +export * from "./clickscities.js"; +export * from "./clickscount.js"; +export * from "./clickscountries.js"; +export * from "./clicksdevices.js"; +export * from "./clicksos.js"; +export * from "./clicksreferers.js"; +export * from "./clickstimeseries.js"; +export * from "./clickstoplinks.js"; +export * from "./clickstopurls.js"; +export * from "./countrycode.js"; +export * from "./domainschema.js"; +export * from "./leadsbrowsers.js"; +export * from "./leadscities.js"; +export * from "./leadscount.js"; +export * from "./leadscountries.js"; +export * from "./leadsdevices.js"; +export * from "./leadsos.js"; +export * from "./leadsreferers.js"; +export * from "./leadstimeseries.js"; +export * from "./leadstoplinks.js"; +export * from "./leadstopurls.js"; +export * from "./linkgeotargeting.js"; +export * from "./linkschema.js"; +export * from "./salesbrowsers.js"; +export * from "./salescities.js"; +export * from "./salescount.js"; +export * from "./salescountries.js"; +export * from "./salesdevices.js"; +export * from "./salesos.js"; +export * from "./salesreferers.js"; +export * from "./salestimeseries.js"; +export * from "./salestoplinks.js"; +export * from "./salestopurls.js"; +export * from "./security.js"; +export * from "./tagschema.js"; +export * from "./workspaceschema.js"; diff --git a/src/models/components/leadscities.ts b/src/models/components/leadscities.ts index 1cd6945..53c69b8 100644 --- a/src/models/components/leadscities.ts +++ b/src/models/components/leadscities.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -282,8 +282,9 @@ export type LeadsCities = { /** @internal */ export namespace LeadsCitiesCountry$ { - export const inboundSchema = z.nativeEnum(LeadsCitiesCountry); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(LeadsCitiesCountry); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/components/leadscountries.ts b/src/models/components/leadscountries.ts index afd353c..f6471ef 100644 --- a/src/models/components/leadscountries.ts +++ b/src/models/components/leadscountries.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -278,8 +278,9 @@ export type LeadsCountries = { /** @internal */ export namespace LeadsCountriesCountry$ { - export const inboundSchema = z.nativeEnum(LeadsCountriesCountry); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(LeadsCountriesCountry); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/components/linkgeotargeting.ts b/src/models/components/linkgeotargeting.ts index 514fe2f..d6b99c7 100644 --- a/src/models/components/linkgeotargeting.ts +++ b/src/models/components/linkgeotargeting.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; +import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; /** diff --git a/src/models/components/linkschema.ts b/src/models/components/linkschema.ts index fb61277..8421726 100644 --- a/src/models/components/linkschema.ts +++ b/src/models/components/linkschema.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { TagSchema, TagSchema$ } from "./tagschema"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { TagSchema, TagSchema$ } from "./tagschema.js"; import * as z from "zod"; /** diff --git a/src/models/components/salescities.ts b/src/models/components/salescities.ts index bcaaee7..3263e0a 100644 --- a/src/models/components/salescities.ts +++ b/src/models/components/salescities.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -286,8 +286,9 @@ export type SalesCities = { /** @internal */ export namespace SalesCitiesCountry$ { - export const inboundSchema = z.nativeEnum(SalesCitiesCountry); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(SalesCitiesCountry); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/components/salescountries.ts b/src/models/components/salescountries.ts index 70af47c..967d2f9 100644 --- a/src/models/components/salescountries.ts +++ b/src/models/components/salescountries.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -282,8 +282,9 @@ export type SalesCountries = { /** @internal */ export namespace SalesCountriesCountry$ { - export const inboundSchema = z.nativeEnum(SalesCountriesCountry); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(SalesCountriesCountry); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/components/tagschema.ts b/src/models/components/tagschema.ts index 886be9e..7cdf14d 100644 --- a/src/models/components/tagschema.ts +++ b/src/models/components/tagschema.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -39,8 +39,8 @@ export type TagSchema = { /** @internal */ export namespace Color$ { - export const inboundSchema = z.nativeEnum(Color); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Color); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/components/workspaceschema.ts b/src/models/components/workspaceschema.ts index c62713d..9553049 100644 --- a/src/models/components/workspaceschema.ts +++ b/src/models/components/workspaceschema.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -137,14 +137,14 @@ export type WorkspaceSchema = { /** @internal */ export namespace Plan$ { - export const inboundSchema = z.nativeEnum(Plan); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Plan); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ export namespace Role$ { - export const inboundSchema = z.nativeEnum(Role); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Role); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/errors/badrequest.ts b/src/models/errors/badrequest.ts index f431cf4..200f995 100644 --- a/src/models/errors/badrequest.ts +++ b/src/models/errors/badrequest.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { ClosedEnum } from "../../types"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -65,8 +65,8 @@ export class BadRequest extends Error { /** @internal */ export namespace Code$ { - export const inboundSchema = z.nativeEnum(Code); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Code); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/errors/conflict.ts b/src/models/errors/conflict.ts index 2a0fd89..5c8dd3a 100644 --- a/src/models/errors/conflict.ts +++ b/src/models/errors/conflict.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { ClosedEnum } from "../../types"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -65,8 +65,8 @@ export class Conflict extends Error { /** @internal */ export namespace ConflictCode$ { - export const inboundSchema = z.nativeEnum(ConflictCode); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(ConflictCode); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/errors/forbidden.ts b/src/models/errors/forbidden.ts index 9ad2285..79eff76 100644 --- a/src/models/errors/forbidden.ts +++ b/src/models/errors/forbidden.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { ClosedEnum } from "../../types"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -65,8 +65,8 @@ export class Forbidden extends Error { /** @internal */ export namespace ForbiddenCode$ { - export const inboundSchema = z.nativeEnum(ForbiddenCode); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(ForbiddenCode); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index 6e1e52b..42d3d30 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -2,14 +2,14 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -export * from "./badrequest"; -export * from "./conflict"; -export * from "./forbidden"; -export * from "./internalservererror"; -export * from "./inviteexpired"; -export * from "./notfound"; -export * from "./ratelimitexceeded"; -export * from "./sdkerror"; -export * from "./sdkvalidationerror"; -export * from "./unauthorized"; -export * from "./unprocessableentity"; +export * from "./badrequest.js"; +export * from "./conflict.js"; +export * from "./forbidden.js"; +export * from "./internalservererror.js"; +export * from "./inviteexpired.js"; +export * from "./notfound.js"; +export * from "./ratelimitexceeded.js"; +export * from "./sdkerror.js"; +export * from "./sdkvalidationerror.js"; +export * from "./unauthorized.js"; +export * from "./unprocessableentity.js"; diff --git a/src/models/errors/internalservererror.ts b/src/models/errors/internalservererror.ts index 43a85cd..08f4fe8 100644 --- a/src/models/errors/internalservererror.ts +++ b/src/models/errors/internalservererror.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { ClosedEnum } from "../../types"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -65,8 +65,9 @@ export class InternalServerError extends Error { /** @internal */ export namespace InternalServerErrorCode$ { - export const inboundSchema = z.nativeEnum(InternalServerErrorCode); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(InternalServerErrorCode); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/errors/inviteexpired.ts b/src/models/errors/inviteexpired.ts index cf11256..220d8ab 100644 --- a/src/models/errors/inviteexpired.ts +++ b/src/models/errors/inviteexpired.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { ClosedEnum } from "../../types"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -65,8 +65,9 @@ export class InviteExpired extends Error { /** @internal */ export namespace InviteExpiredCode$ { - export const inboundSchema = z.nativeEnum(InviteExpiredCode); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(InviteExpiredCode); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/errors/notfound.ts b/src/models/errors/notfound.ts index 3a71d9c..aac4609 100644 --- a/src/models/errors/notfound.ts +++ b/src/models/errors/notfound.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { ClosedEnum } from "../../types"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -65,8 +65,8 @@ export class NotFound extends Error { /** @internal */ export namespace NotFoundCode$ { - export const inboundSchema = z.nativeEnum(NotFoundCode); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(NotFoundCode); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/errors/ratelimitexceeded.ts b/src/models/errors/ratelimitexceeded.ts index 7c272ac..c3c20d5 100644 --- a/src/models/errors/ratelimitexceeded.ts +++ b/src/models/errors/ratelimitexceeded.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { ClosedEnum } from "../../types"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -65,8 +65,9 @@ export class RateLimitExceeded extends Error { /** @internal */ export namespace RateLimitExceededCode$ { - export const inboundSchema = z.nativeEnum(RateLimitExceededCode); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(RateLimitExceededCode); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/errors/unauthorized.ts b/src/models/errors/unauthorized.ts index bececbe..f549af4 100644 --- a/src/models/errors/unauthorized.ts +++ b/src/models/errors/unauthorized.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { ClosedEnum } from "../../types"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -65,8 +65,9 @@ export class Unauthorized extends Error { /** @internal */ export namespace UnauthorizedCode$ { - export const inboundSchema = z.nativeEnum(UnauthorizedCode); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(UnauthorizedCode); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/errors/unprocessableentity.ts b/src/models/errors/unprocessableentity.ts index 842d30a..11bec50 100644 --- a/src/models/errors/unprocessableentity.ts +++ b/src/models/errors/unprocessableentity.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { ClosedEnum } from "../../types"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -65,8 +65,9 @@ export class UnprocessableEntity extends Error { /** @internal */ export namespace UnprocessableEntityCode$ { - export const inboundSchema = z.nativeEnum(UnprocessableEntityCode); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(UnprocessableEntityCode); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/operations/bulkcreatelinks.ts b/src/models/operations/bulkcreatelinks.ts index d53bdba..31a9834 100644 --- a/src/models/operations/bulkcreatelinks.ts +++ b/src/models/operations/bulkcreatelinks.ts @@ -2,11 +2,11 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import * as components from "../components"; +import * as components from "../components/index.js"; import * as z from "zod"; export type BulkCreateLinksGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -124,19 +124,19 @@ export type RequestBody = { export namespace BulkCreateLinksGlobals$ { export const inboundSchema: z.ZodType = z.object( { - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), } ); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/adddomain.ts b/src/models/operations/createdomain.ts similarity index 66% rename from src/models/operations/adddomain.ts rename to src/models/operations/createdomain.ts index 7c0ad3e..b7e8643 100644 --- a/src/models/operations/adddomain.ts +++ b/src/models/operations/createdomain.ts @@ -2,11 +2,11 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; -export type AddDomainGlobals = { - workspaceId: string; +export type CreateDomainGlobals = { + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -25,7 +25,7 @@ export const Type = { */ export type Type = ClosedEnum; -export type AddDomainRequestBody = { +export type CreateDomainRequestBody = { /** * Name of the domain. */ @@ -57,40 +57,41 @@ export type AddDomainRequestBody = { }; /** @internal */ -export namespace AddDomainGlobals$ { - export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), +export namespace CreateDomainGlobals$ { + export const inboundSchema: z.ZodType = z.object({ + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; - export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + export const outboundSchema: z.ZodType = z.object({ + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } /** @internal */ export namespace Type$ { - export const inboundSchema = z.nativeEnum(Type); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Type); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ -export namespace AddDomainRequestBody$ { - export const inboundSchema: z.ZodType = z.object({ - slug: z.string(), - type: Type$.inboundSchema.default("redirect"), - target: z.nullable(z.string()).optional(), - expiredUrl: z.nullable(z.string()).optional(), - archived: z.boolean().default(false), - noindex: z.boolean().optional(), - placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")), - }); +export namespace CreateDomainRequestBody$ { + export const inboundSchema: z.ZodType = + z.object({ + slug: z.string(), + type: Type$.inboundSchema.default("redirect"), + target: z.nullable(z.string()).optional(), + expiredUrl: z.nullable(z.string()).optional(), + archived: z.boolean().default(false), + noindex: z.boolean().optional(), + placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")), + }); export type Outbound = { slug: string; @@ -102,8 +103,8 @@ export namespace AddDomainRequestBody$ { placeholder: string | null; }; - export const outboundSchema: z.ZodType = z.object( - { + export const outboundSchema: z.ZodType = + z.object({ slug: z.string(), type: Type$.outboundSchema.default("redirect"), target: z.nullable(z.string()).optional(), @@ -111,6 +112,5 @@ export namespace AddDomainRequestBody$ { archived: z.boolean().default(false), noindex: z.boolean().optional(), placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")), - } - ); + }); } diff --git a/src/models/operations/createlink.ts b/src/models/operations/createlink.ts index 03a329a..8b5b2d8 100644 --- a/src/models/operations/createlink.ts +++ b/src/models/operations/createlink.ts @@ -2,11 +2,11 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import * as components from "../components"; +import * as components from "../components/index.js"; import * as z from "zod"; export type CreateLinkGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -123,17 +123,17 @@ export type CreateLinkRequestBody = { /** @internal */ export namespace CreateLinkGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/createtag.ts b/src/models/operations/createtag.ts index 3f27836..8a90b44 100644 --- a/src/models/operations/createtag.ts +++ b/src/models/operations/createtag.ts @@ -2,11 +2,11 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type CreateTagGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -44,25 +44,25 @@ export type CreateTagRequestBody = { /** @internal */ export namespace CreateTagGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } /** @internal */ export namespace Color$ { - export const inboundSchema = z.nativeEnum(Color); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Color); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/operations/deletedomain.ts b/src/models/operations/deletedomain.ts index 703f1e9..ea02bd2 100644 --- a/src/models/operations/deletedomain.ts +++ b/src/models/operations/deletedomain.ts @@ -5,7 +5,7 @@ import * as z from "zod"; export type DeleteDomainGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -32,17 +32,17 @@ export type DeleteDomainResponseBody = { /** @internal */ export namespace DeleteDomainGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/deletelink.ts b/src/models/operations/deletelink.ts index 040677c..6a6d037 100644 --- a/src/models/operations/deletelink.ts +++ b/src/models/operations/deletelink.ts @@ -5,7 +5,7 @@ import * as z from "zod"; export type DeleteLinkGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -32,17 +32,17 @@ export type DeleteLinkResponseBody = { /** @internal */ export namespace DeleteLinkGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/getlinkinfo.ts b/src/models/operations/getlinkinfo.ts index 502c8ca..b45a865 100644 --- a/src/models/operations/getlinkinfo.ts +++ b/src/models/operations/getlinkinfo.ts @@ -5,7 +5,7 @@ import * as z from "zod"; export type GetLinkInfoGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -31,17 +31,17 @@ export type GetLinkInfoRequest = { /** @internal */ export namespace GetLinkInfoGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/getlinks.ts b/src/models/operations/getlinks.ts index d987329..1b7ce52 100644 --- a/src/models/operations/getlinks.ts +++ b/src/models/operations/getlinks.ts @@ -2,11 +2,11 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type GetLinksGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -82,17 +82,17 @@ export type GetLinksRequest = { /** @internal */ export namespace GetLinksGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } @@ -127,8 +127,8 @@ export namespace QueryParamTagNames$ { /** @internal */ export namespace Sort$ { - export const inboundSchema = z.nativeEnum(Sort); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Sort); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/operations/getlinkscount.ts b/src/models/operations/getlinkscount.ts index 4b32722..3856891 100644 --- a/src/models/operations/getlinkscount.ts +++ b/src/models/operations/getlinkscount.ts @@ -2,11 +2,11 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type GetLinksCountGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -80,18 +80,18 @@ export type GetLinksCountRequest = { /** @internal */ export namespace GetLinksCountGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object( { - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), } ); @@ -122,14 +122,14 @@ export namespace GetLinksCountQueryParamTagNames$ { /** @internal */ export namespace Two$ { - export const inboundSchema = z.nativeEnum(Two); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Two); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ export namespace One$ { - export const inboundSchema = z.nativeEnum(One); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(One); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/operations/getqrcode.ts b/src/models/operations/getqrcode.ts index 004073c..305a3df 100644 --- a/src/models/operations/getqrcode.ts +++ b/src/models/operations/getqrcode.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** @@ -48,8 +48,8 @@ export type GetQRCodeRequest = { /** @internal */ export namespace Level$ { - export const inboundSchema = z.nativeEnum(Level); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Level); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/operations/gettags.ts b/src/models/operations/gettags.ts index dee87a6..2a9fc35 100644 --- a/src/models/operations/gettags.ts +++ b/src/models/operations/gettags.ts @@ -5,7 +5,7 @@ import * as z from "zod"; export type GetTagsGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -17,17 +17,17 @@ export type GetTagsRequest = {}; /** @internal */ export namespace GetTagsGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 036305e..4aecc94 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -2,27 +2,27 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -export * from "./adddomain"; -export * from "./bulkcreatelinks"; -export * from "./createlink"; -export * from "./createtag"; -export * from "./createworkspace"; -export * from "./deletedomain"; -export * from "./deletelink"; -export * from "./getlinkinfo"; -export * from "./getlinks"; -export * from "./getlinkscount"; -export * from "./getmetatags"; -export * from "./getqrcode"; -export * from "./gettags"; -export * from "./getworkspace"; -export * from "./listdomains"; -export * from "./retrieveanalytics"; -export * from "./setprimarydomain"; -export * from "./trackcustomer"; -export * from "./tracklead"; -export * from "./tracksale"; -export * from "./transferdomain"; -export * from "./updatedomain"; -export * from "./updatelink"; -export * from "./upsertlink"; +export * from "./bulkcreatelinks.js"; +export * from "./createdomain.js"; +export * from "./createlink.js"; +export * from "./createtag.js"; +export * from "./createworkspace.js"; +export * from "./deletedomain.js"; +export * from "./deletelink.js"; +export * from "./getlinkinfo.js"; +export * from "./getlinks.js"; +export * from "./getlinkscount.js"; +export * from "./getmetatags.js"; +export * from "./getqrcode.js"; +export * from "./gettags.js"; +export * from "./getworkspace.js"; +export * from "./listdomains.js"; +export * from "./retrieveanalytics.js"; +export * from "./setprimarydomain.js"; +export * from "./trackcustomer.js"; +export * from "./tracklead.js"; +export * from "./tracksale.js"; +export * from "./transferdomain.js"; +export * from "./updatedomain.js"; +export * from "./updatelink.js"; +export * from "./upsertlink.js"; diff --git a/src/models/operations/listdomains.ts b/src/models/operations/listdomains.ts index d4bc8cd..a3f03d6 100644 --- a/src/models/operations/listdomains.ts +++ b/src/models/operations/listdomains.ts @@ -5,7 +5,7 @@ import * as z from "zod"; export type ListDomainsGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -17,17 +17,17 @@ export type ListDomainsRequest = {}; /** @internal */ export namespace ListDomainsGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/retrieveanalytics.ts b/src/models/operations/retrieveanalytics.ts index 22be4b8..1f90162 100644 --- a/src/models/operations/retrieveanalytics.ts +++ b/src/models/operations/retrieveanalytics.ts @@ -2,12 +2,12 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; -import * as components from "../components"; +import { ClosedEnum } from "../../types/enums.js"; +import * as components from "../components/index.js"; import * as z from "zod"; export type RetrieveAnalyticsGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -189,38 +189,39 @@ export type RetrieveAnalyticsResponseBody = export namespace RetrieveAnalyticsGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } /** @internal */ export namespace Event$ { - export const inboundSchema = z.nativeEnum(Event); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Event); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ export namespace QueryParamGroupBy$ { - export const inboundSchema = z.nativeEnum(QueryParamGroupBy); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(QueryParamGroupBy); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ export namespace Interval$ { - export const inboundSchema = z.nativeEnum(Interval); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Interval); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/operations/setprimarydomain.ts b/src/models/operations/setprimarydomain.ts index 283896a..c376908 100644 --- a/src/models/operations/setprimarydomain.ts +++ b/src/models/operations/setprimarydomain.ts @@ -5,7 +5,7 @@ import * as z from "zod"; export type SetPrimaryDomainGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -23,18 +23,18 @@ export type SetPrimaryDomainRequest = { export namespace SetPrimaryDomainGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/trackcustomer.ts b/src/models/operations/trackcustomer.ts index 83539f8..aa13432 100644 --- a/src/models/operations/trackcustomer.ts +++ b/src/models/operations/trackcustomer.ts @@ -5,7 +5,7 @@ import * as z from "zod"; export type TrackCustomerGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -44,18 +44,18 @@ export type TrackCustomerResponseBody = { /** @internal */ export namespace TrackCustomerGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object( { - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), } ); diff --git a/src/models/operations/tracklead.ts b/src/models/operations/tracklead.ts index e338517..ed4bab6 100644 --- a/src/models/operations/tracklead.ts +++ b/src/models/operations/tracklead.ts @@ -5,7 +5,7 @@ import * as z from "zod"; export type TrackLeadGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -59,17 +59,17 @@ export type TrackLeadResponseBody = { /** @internal */ export namespace TrackLeadGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/tracksale.ts b/src/models/operations/tracksale.ts index f705d32..7f64553 100644 --- a/src/models/operations/tracksale.ts +++ b/src/models/operations/tracksale.ts @@ -2,11 +2,11 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type TrackSaleGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -73,25 +73,26 @@ export type TrackSaleResponseBody = { /** @internal */ export namespace TrackSaleGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } /** @internal */ export namespace PaymentProcessor$ { - export const inboundSchema = z.nativeEnum(PaymentProcessor); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(PaymentProcessor); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/operations/transferdomain.ts b/src/models/operations/transferdomain.ts index e5b315b..394fb03 100644 --- a/src/models/operations/transferdomain.ts +++ b/src/models/operations/transferdomain.ts @@ -2,11 +2,11 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; +import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; export type TransferDomainGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -31,18 +31,18 @@ export type TransferDomainRequest = { /** @internal */ export namespace TransferDomainGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/updatedomain.ts b/src/models/operations/updatedomain.ts index de96bc6..73235d5 100644 --- a/src/models/operations/updatedomain.ts +++ b/src/models/operations/updatedomain.ts @@ -2,12 +2,12 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import { ClosedEnum } from "../../types"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type UpdateDomainGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -68,25 +68,26 @@ export type UpdateDomainRequest = { /** @internal */ export namespace UpdateDomainGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } /** @internal */ export namespace UpdateDomainType$ { - export const inboundSchema = z.nativeEnum(UpdateDomainType); - export const outboundSchema = inboundSchema; + export const inboundSchema: z.ZodNativeEnum = + z.nativeEnum(UpdateDomainType); + export const outboundSchema: z.ZodNativeEnum = inboundSchema; } /** @internal */ diff --git a/src/models/operations/updatelink.ts b/src/models/operations/updatelink.ts index 071e7fa..83540aa 100644 --- a/src/models/operations/updatelink.ts +++ b/src/models/operations/updatelink.ts @@ -2,12 +2,12 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives"; -import * as components from "../components"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as components from "../components/index.js"; import * as z from "zod"; export type UpdateLinkGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -132,17 +132,17 @@ export type UpdateLinkRequest = { /** @internal */ export namespace UpdateLinkGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/models/operations/upsertlink.ts b/src/models/operations/upsertlink.ts index 23f03ce..9dbdde2 100644 --- a/src/models/operations/upsertlink.ts +++ b/src/models/operations/upsertlink.ts @@ -2,11 +2,11 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import * as components from "../components"; +import * as components from "../components/index.js"; import * as z from "zod"; export type UpsertLinkGlobals = { - workspaceId: string; + workspaceId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -123,17 +123,17 @@ export type UpsertLinkRequestBody = { /** @internal */ export namespace UpsertLinkGlobals$ { export const inboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); export type Outbound = { - workspaceId: string; + workspaceId?: string | undefined; projectSlug?: string | undefined; }; export const outboundSchema: z.ZodType = z.object({ - workspaceId: z.string(), + workspaceId: z.string().optional(), projectSlug: z.string().optional(), }); } diff --git a/src/sdk/analytics.ts b/src/sdk/analytics.ts index d6f50ee..720d391 100644 --- a/src/sdk/analytics.ts +++ b/src/sdk/analytics.ts @@ -2,14 +2,14 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { SDKHooks } from "../hooks"; -import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings"; -import { HTTPClient } from "../lib/http"; -import * as schemas$ from "../lib/schemas"; -import { ClientSDK, RequestOptions } from "../lib/sdks"; -import * as errors from "../models/errors"; -import * as operations from "../models/operations"; +import { SDKHooks } from "../hooks/hooks.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config.js"; +import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; +import { HTTPClient } from "../lib/http.js"; +import * as schemas$ from "../lib/schemas.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as errors from "../models/errors/index.js"; +import * as operations from "../models/operations/index.js"; export class Analytics extends ClientSDK { private readonly options$: SDKOptions & { hooks?: SDKHooks }; diff --git a/src/sdk/domains.ts b/src/sdk/domains.ts index bd20b22..0005b8f 100644 --- a/src/sdk/domains.ts +++ b/src/sdk/domains.ts @@ -2,19 +2,19 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { SDKHooks } from "../hooks"; -import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import { SDKHooks } from "../hooks/hooks.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config.js"; import { encodeFormQuery as encodeFormQuery$, encodeJSON as encodeJSON$, encodeSimple as encodeSimple$, -} 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"; +} from "../lib/encodings.js"; +import { HTTPClient } from "../lib/http.js"; +import * as schemas$ from "../lib/schemas.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as errors from "../models/errors/index.js"; +import * as operations from "../models/operations/index.js"; import * as z from "zod"; export class Domains extends ClientSDK { @@ -134,13 +134,13 @@ export class Domains extends ClientSDK { } /** - * Add a domain + * Create a domain * * @remarks - * Add a domain to the authenticated workspace. + * Create a domain for the authenticated workspace. */ - async add( - request?: operations.AddDomainRequestBody | undefined, + async create( + request?: operations.CreateDomainRequestBody | undefined, options?: RequestOptions ): Promise { const input$ = request; @@ -151,7 +151,7 @@ export class Domains extends ClientSDK { const payload$ = schemas$.parse( input$, - (value$) => operations.AddDomainRequestBody$.outboundSchema.optional().parse(value$), + (value$) => operations.CreateDomainRequestBody$.outboundSchema.optional().parse(value$), "Input validation failed" ); const body$ = @@ -173,7 +173,7 @@ export class Domains extends ClientSDK { security$ = {}; } const context = { - operationID: "addDomain", + operationID: "createDomain", oAuth2Scopes: [], securitySource: this.options$.token, }; diff --git a/src/sdk/index.ts b/src/sdk/index.ts index 3130314..34a84fc 100644 --- a/src/sdk/index.ts +++ b/src/sdk/index.ts @@ -2,4 +2,4 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -export * from "./sdk"; +export * from "./sdk.js"; diff --git a/src/sdk/links.ts b/src/sdk/links.ts index 9706a29..8abff46 100644 --- a/src/sdk/links.ts +++ b/src/sdk/links.ts @@ -2,19 +2,19 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { SDKHooks } from "../hooks"; -import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; +import { SDKHooks } from "../hooks/hooks.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config.js"; import { encodeFormQuery as encodeFormQuery$, encodeJSON as encodeJSON$, encodeSimple as encodeSimple$, -} 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"; +} from "../lib/encodings.js"; +import { HTTPClient } from "../lib/http.js"; +import * as schemas$ from "../lib/schemas.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as errors from "../models/errors/index.js"; +import * as operations from "../models/operations/index.js"; import * as z from "zod"; export class Links extends ClientSDK { diff --git a/src/sdk/metatags.ts b/src/sdk/metatags.ts index 8a2c720..d749326 100644 --- a/src/sdk/metatags.ts +++ b/src/sdk/metatags.ts @@ -2,13 +2,13 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { SDKHooks } from "../hooks"; -import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings"; -import { HTTPClient } from "../lib/http"; -import * as schemas$ from "../lib/schemas"; -import { ClientSDK, RequestOptions } from "../lib/sdks"; -import * as operations from "../models/operations"; +import { SDKHooks } from "../hooks/hooks.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config.js"; +import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; +import { HTTPClient } from "../lib/http.js"; +import * as schemas$ from "../lib/schemas.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; export class Metatags extends ClientSDK { private readonly options$: SDKOptions & { hooks?: SDKHooks }; diff --git a/src/sdk/qrcodes.ts b/src/sdk/qrcodes.ts index e5e1c08..f353b87 100644 --- a/src/sdk/qrcodes.ts +++ b/src/sdk/qrcodes.ts @@ -2,14 +2,14 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { SDKHooks } from "../hooks"; -import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings"; -import { HTTPClient } from "../lib/http"; -import * as schemas$ from "../lib/schemas"; -import { ClientSDK, RequestOptions } from "../lib/sdks"; -import * as errors from "../models/errors"; -import * as operations from "../models/operations"; +import { SDKHooks } from "../hooks/hooks.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config.js"; +import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; +import { HTTPClient } from "../lib/http.js"; +import * as schemas$ from "../lib/schemas.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as errors from "../models/errors/index.js"; +import * as operations from "../models/operations/index.js"; import * as z from "zod"; export class QRCodes extends ClientSDK { diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 60785d4..4e663c3 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -2,18 +2,18 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { SDKHooks } from "../hooks"; -import { SDKOptions, serverURLFromOptions } from "../lib/config"; -import { HTTPClient } from "../lib/http"; -import { ClientSDK } from "../lib/sdks"; -import { Analytics } from "./analytics"; -import { Domains } from "./domains"; -import { Links } from "./links"; -import { Metatags } from "./metatags"; -import { QRCodes } from "./qrcodes"; -import { Tags } from "./tags"; -import { Track } from "./track"; -import { Workspaces } from "./workspaces"; +import { SDKHooks } from "../hooks/hooks.js"; +import { SDKOptions, serverURLFromOptions } from "../lib/config.js"; +import { HTTPClient } from "../lib/http.js"; +import { ClientSDK } from "../lib/sdks.js"; +import { Analytics } from "./analytics.js"; +import { Domains } from "./domains.js"; +import { Links } from "./links.js"; +import { Metatags } from "./metatags.js"; +import { QRCodes } from "./qrcodes.js"; +import { Tags } from "./tags.js"; +import { Track } from "./track.js"; +import { Workspaces } from "./workspaces.js"; export class Dub extends ClientSDK { private readonly options$: SDKOptions & { hooks?: SDKHooks }; diff --git a/src/sdk/tags.ts b/src/sdk/tags.ts index ae07ba7..80fdcc6 100644 --- a/src/sdk/tags.ts +++ b/src/sdk/tags.ts @@ -2,15 +2,18 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { SDKHooks } from "../hooks"; -import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; -import { encodeFormQuery as encodeFormQuery$, encodeJSON as encodeJSON$ } 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 { SDKHooks } from "../hooks/hooks.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, +} from "../lib/encodings.js"; +import { HTTPClient } from "../lib/http.js"; +import * as schemas$ from "../lib/schemas.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as errors from "../models/errors/index.js"; +import * as operations from "../models/operations/index.js"; import * as z from "zod"; export class Tags extends ClientSDK { diff --git a/src/sdk/track.ts b/src/sdk/track.ts index cb47571..d25212d 100644 --- a/src/sdk/track.ts +++ b/src/sdk/track.ts @@ -2,14 +2,17 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { SDKHooks } from "../hooks"; -import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; -import { encodeFormQuery as encodeFormQuery$, encodeJSON as encodeJSON$ } from "../lib/encodings"; -import { HTTPClient } from "../lib/http"; -import * as schemas$ from "../lib/schemas"; -import { ClientSDK, RequestOptions } from "../lib/sdks"; -import * as errors from "../models/errors"; -import * as operations from "../models/operations"; +import { SDKHooks } from "../hooks/hooks.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, +} from "../lib/encodings.js"; +import { HTTPClient } from "../lib/http.js"; +import * as schemas$ from "../lib/schemas.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as errors from "../models/errors/index.js"; +import * as operations from "../models/operations/index.js"; export class Track extends ClientSDK { private readonly options$: SDKOptions & { hooks?: SDKHooks }; diff --git a/src/sdk/workspaces.ts b/src/sdk/workspaces.ts index 6b912af..cfcd577 100644 --- a/src/sdk/workspaces.ts +++ b/src/sdk/workspaces.ts @@ -2,15 +2,15 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { SDKHooks } from "../hooks"; -import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } 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 { SDKHooks } from "../hooks/hooks.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config.js"; +import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { HTTPClient } from "../lib/http.js"; +import * as schemas$ from "../lib/schemas.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as errors from "../models/errors/index.js"; +import * as operations from "../models/operations/index.js"; import * as z from "zod"; export class Workspaces extends ClientSDK { diff --git a/src/types/index.ts b/src/types/index.ts index 42fcfd2..374373e 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -2,9 +2,9 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -export { RFCDate } from "./rfcdate"; -export { blobLikeSchema, isBlobLike } from "./blobs"; -export type { Paginator, PageIterator } from "./operations"; -export { createPageIterator } from "./operations"; -export { catchUnrecognizedEnum } from "./enums"; -export type { OpenEnum, ClosedEnum, Unrecognized } from "./enums"; +export { RFCDate } from "./rfcdate.js"; +export { blobLikeSchema, isBlobLike } from "./blobs.js"; +export type { Paginator, PageIterator } from "./operations.js"; +export { createPageIterator } from "./operations.js"; +export { catchUnrecognizedEnum } from "./enums.js"; +export type { OpenEnum, ClosedEnum, Unrecognized } from "./enums.js";