diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c34546b..e758b7e 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: 4e9799bd93fdf4959c9efd6004900847 + docChecksum: f8b1be2fa34844de98cc6c19757c0e81 docVersion: 0.0.1 - speakeasyVersion: 1.313.0 - generationVersion: 2.347.8 - releaseVersion: 0.30.1 - configChecksum: cac24fa351193e38d0c0de1fb515e0a1 + speakeasyVersion: 1.314.2 + generationVersion: 2.349.6 + releaseVersion: 0.30.2 + configChecksum: a5007338ee4d06f07b0ea685566f4669 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.10.1 + core: 3.10.2 deprecations: 2.81.1 examples: 2.81.4 flattening: 2.81.1 @@ -184,7 +184,6 @@ generatedFiles: - docs/models/components/users.md - docs/models/components/domains.md - docs/models/components/workspaceschema.md - - docs/models/components/type.md - docs/models/components/domainschema.md - docs/models/components/security.md - docs/models/errors/code.md @@ -266,13 +265,11 @@ generatedFiles: - docs/models/operations/listdomainsglobals.md - docs/models/operations/listdomainsrequest.md - docs/models/operations/createdomainglobals.md - - docs/models/operations/type.md - docs/models/operations/createdomainrequestbody.md - docs/models/operations/deletedomainglobals.md - docs/models/operations/deletedomainrequest.md - docs/models/operations/deletedomainresponsebody.md - docs/models/operations/updatedomainglobals.md - - docs/models/operations/updatedomaintype.md - docs/models/operations/updatedomainrequestbody.md - docs/models/operations/updatedomainrequest.md - docs/models/operations/setprimarydomainglobals.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 8bf6197..f97093a 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.30.1 + version: 0.30.2 additionalDependencies: dependencies: {} devDependencies: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 79be23e..c5d6159 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.313.0 +speakeasyVersion: 1.314.2 sources: my-first-source: sourceNamespace: my-first-source - sourceRevisionDigest: sha256:580766149ac00dbd6366ec82f1f89b0b46ec48577ee4498f289d2037489c528f - sourceBlobDigest: sha256:62970863bdbbe43757830e6930f28636b2a80cd64964af9b63c88c7c12995697 + sourceRevisionDigest: sha256:164c06ded7b4e584a7e1d46fc0f20ebcf23bdb28abb5e4e2dea52b5aa34271fd + sourceBlobDigest: sha256:a07c6f70c6d3df68db32b244fef1af447804b41f9c59fcfc1f989afcf4da1d37 tags: - latest - main @@ -11,8 +11,8 @@ targets: my-first-target: source: my-first-source sourceNamespace: my-first-source - sourceRevisionDigest: sha256:580766149ac00dbd6366ec82f1f89b0b46ec48577ee4498f289d2037489c528f - sourceBlobDigest: sha256:62970863bdbbe43757830e6930f28636b2a80cd64964af9b63c88c7c12995697 + sourceRevisionDigest: sha256:164c06ded7b4e584a7e1d46fc0f20ebcf23bdb28abb5e4e2dea52b5aa34271fd + sourceBlobDigest: sha256:a07c6f70c6d3df68db32b244fef1af447804b41f9c59fcfc1f989afcf4da1d37 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index 3489d4b..c1123bc 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -476,4 +476,14 @@ Based on: ### Generated - [typescript v0.30.1] . ### Releases -- [NPM v0.30.1] https://www.npmjs.com/package/dub/v/0.30.1 - . \ No newline at end of file +- [NPM v0.30.1] https://www.npmjs.com/package/dub/v/0.30.1 - . + +## 2024-06-24 01:19:54 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.314.2 (2.349.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.30.2] . +### Releases +- [NPM v0.30.2] https://www.npmjs.com/package/dub/v/0.30.2 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 7d4ed71..01094f7 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,11 +3,11 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - target: $["paths"]["/links/{linkId}"]["patch"] + - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "updateLink" + "label": "getWorkspace" "source": |- import { Dub } from "dub"; @@ -16,53 +16,8 @@ actions: }); async function run() { - const result = await dub.links.update("", { - url: "https://google/com", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/workspaces"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "createWorkspace" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.workspaces.create({ - name: "", - slug: "", - }); - - // 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: "", + const result = await dub.workspaces.get({ + idOrSlug: "", }); // Handle the result @@ -89,112 +44,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", - }); - - async function run() { - const result = await dub.metatags.get({ - url: "https://dub.co", - }); - - // 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/{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/{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}"]["patch"] update: @@ -215,52 +64,6 @@ actions: 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/lead"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "trackLead" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.track.lead({ - clickId: "", - eventName: "Sign up", - customerId: "", - }); - - // Handle the result - console.log(result) - } - run(); - target: $["paths"]["/track/sale"]["post"] update: @@ -286,11 +89,11 @@ actions: } run(); - - target: $["paths"]["/links/count"]["get"] + - target: $["paths"]["/metatags"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getLinksCount" + "label": "getMetatags" "source": |- import { Dub } from "dub"; @@ -299,18 +102,20 @@ actions: }); async function run() { - const result = await dub.links.count({}); + const result = await dub.metatags.get({ + url: "https://dub.co", + }); // Handle the result console.log(result) } run(); - - target: $["paths"]["/links/info"]["get"] + - target: $["paths"]["/links/{linkId}"]["patch"] update: "x-codeSamples": - "lang": "typescript" - "label": "getLinkInfo" + "label": "updateLink" "source": |- import { Dub } from "dub"; @@ -319,7 +124,9 @@ actions: }); async function run() { - const result = await dub.links.get({}); + const result = await dub.links.update("", { + url: "https://google/com", + }); // Handle the result console.log(result) @@ -346,11 +153,11 @@ actions: } run(); - - target: $["paths"]["/tags"]["get"] + - target: $["paths"]["/tags"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "getTags" + "label": "createTag" "source": |- import { Dub } from "dub"; @@ -359,7 +166,9 @@ actions: }); async function run() { - const result = await dub.tags.list({}); + const result = await dub.tags.create({ + tag: "", + }); // Handle the result console.log(result) @@ -386,11 +195,11 @@ actions: } run(); - - target: $["paths"]["/track/customer"]["post"] + - target: $["paths"]["/track/lead"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "trackCustomer" + "label": "trackLead" "source": |- import { Dub } from "dub"; @@ -399,7 +208,9 @@ actions: }); async function run() { - const result = await dub.track.customer({ + const result = await dub.track.lead({ + clickId: "", + eventName: "Sign up", customerId: "", }); @@ -407,6 +218,50 @@ actions: 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"]["/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: @@ -427,6 +282,152 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/links/info"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getLinkInfo" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.links.get({}); + + // 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", + }); + + async function run() { + const result = await dub.workspaces.list(); + + // Handle the result + 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", + }); + + async function run() { + const result = await dub.tags.list({}); + + // 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}/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"]["/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/{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"]["/links/bulk"]["post"] update: @@ -452,11 +453,11 @@ actions: } run(); - - target: $["paths"]["/workspaces"]["get"] + - target: $["paths"]["/workspaces"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "getWorkspaces" + "label": "createWorkspace" "source": |- import { Dub } from "dub"; @@ -465,28 +466,9 @@ actions: }); async function run() { - const result = await dub.workspaces.list(); - - // 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", + const result = await dub.workspaces.create({ + name: "", + slug: "", }); // Handle the result @@ -494,11 +476,11 @@ actions: } run(); - - target: $["paths"]["/links"]["post"] + - target: $["paths"]["/domains/{slug}"]["delete"] update: "x-codeSamples": - "lang": "typescript" - "label": "createLink" + "label": "deleteDomain" "source": |- import { Dub } from "dub"; @@ -507,20 +489,18 @@ actions: }); async function run() { - const result = await dub.links.create({ - url: "https://google/com", - }); + const result = await dub.domains.delete("acme.com"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/qr"]["get"] + - target: $["paths"]["/track/customer"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "getQRCode" + "label": "trackCustomer" "source": |- import { Dub } from "dub"; @@ -529,12 +509,32 @@ actions: }); async function run() { - const result = await dub.qrCodes.get({ - url: "https://brief-micronutrient.org", + const result = await dub.track.customer({ + customerId: "", }); // Handle the result console.log(result) } + run(); + - target: $["paths"]["/links/count"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getLinksCount" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.links.count({}); + + // Handle the result + console.log(result) + } + run(); diff --git a/docs/models/components/domainschema.md b/docs/models/components/domainschema.md index 9019de0..2b15b00 100644 --- a/docs/models/components/domainschema.md +++ b/docs/models/components/domainschema.md @@ -10,9 +10,7 @@ | `verified` | *boolean* | :heavy_minus_sign: | Whether the domain is verified. | | | `primary` | *boolean* | :heavy_minus_sign: | Whether the domain is the primary domain for the workspace. | | | `archived` | *boolean* | :heavy_minus_sign: | Whether the domain is archived. | | -| `noindex` | *boolean* | :heavy_minus_sign: | Prevent search engines from indexing the domain. | | | `placeholder` | *string* | :heavy_minus_sign: | Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. | https://dub.co/help/article/what-is-dub | | `expiredUrl` | *string* | :heavy_check_mark: | The URL to redirect to when a link under this domain has expired. | https://acme.com/expired | -| `target` | *string* | :heavy_check_mark: | The page your users will get redirected to when they visit your domain. | https://acme.com/landing | -| `type` | [components.Type](../../models/components/type.md) | :heavy_check_mark: | The type of redirect to use for this domain. | | -| `clicks` | *number* | :heavy_minus_sign: | The number of clicks on the domain. | | \ No newline at end of file +| `createdAt` | *string* | :heavy_check_mark: | The date the domain was created. | | +| `updatedAt` | *string* | :heavy_check_mark: | The date the domain was last updated. | | \ No newline at end of file diff --git a/docs/models/components/linkschema.md b/docs/models/components/linkschema.md index b26ec50..e4a1680 100644 --- a/docs/models/components/linkschema.md +++ b/docs/models/components/linkschema.md @@ -20,6 +20,7 @@ | `description` | *string* | :heavy_check_mark: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | | `image` | *string* | :heavy_check_mark: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | | `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | +| `doIndex` | *boolean* | :heavy_minus_sign: | Whether to allow search engines to index the short link. | | `ios` | *string* | :heavy_check_mark: | The iOS destination URL for the short link for iOS device targeting. | | `android` | *string* | :heavy_check_mark: | The Android destination URL for the short link for Android device targeting. | | `geo` | [components.Geo](../../models/components/geo.md) | :heavy_check_mark: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo | diff --git a/docs/models/components/type.md b/docs/models/components/type.md deleted file mode 100644 index becaf20..0000000 --- a/docs/models/components/type.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type - -The type of redirect to use for this domain. - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `Redirect` | redirect | -| `Rewrite` | rewrite | \ No newline at end of file diff --git a/docs/models/operations/createdomainrequestbody.md b/docs/models/operations/createdomainrequestbody.md index 06ce78c..0a834bf 100644 --- a/docs/models/operations/createdomainrequestbody.md +++ b/docs/models/operations/createdomainrequestbody.md @@ -6,9 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `slug` | *string* | :heavy_check_mark: | Name of the domain. | acme.com | -| `type` | [operations.Type](../../models/operations/type.md) | :heavy_minus_sign: | The type of redirect to use for this domain. | redirect | -| `target` | *string* | :heavy_minus_sign: | The page your users will get redirected to when they visit your domain. | https://acme.com/landing | | `expiredUrl` | *string* | :heavy_minus_sign: | Redirect users to a specific URL when any link under this domain has expired. | https://acme.com/expired | | `archived` | *boolean* | :heavy_minus_sign: | Whether to archive this domain. `false` will unarchive a previously archived domain. | false | -| `noindex` | *boolean* | :heavy_minus_sign: | Prevent search engines from indexing the domain. Defaults to `false`. | | | `placeholder` | *string* | :heavy_minus_sign: | Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. | https://dub.co/help/article/what-is-dub | \ No newline at end of file diff --git a/docs/models/operations/createlinkrequestbody.md b/docs/models/operations/createlinkrequestbody.md index 8087d61..b3acc8f 100644 --- a/docs/models/operations/createlinkrequestbody.md +++ b/docs/models/operations/createlinkrequestbody.md @@ -27,4 +27,5 @@ | `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | | | `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | | -| `geo` | [components.LinkGeoTargeting](../../models/components/linkgeotargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | \ No newline at end of file +| `geo` | [components.LinkGeoTargeting](../../models/components/linkgeotargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | +| `doIndex` | *boolean* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | \ No newline at end of file diff --git a/docs/models/operations/requestbody.md b/docs/models/operations/requestbody.md index 86f2fd1..26102bf 100644 --- a/docs/models/operations/requestbody.md +++ b/docs/models/operations/requestbody.md @@ -27,4 +27,5 @@ | `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | | | `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | | -| `geo` | [components.LinkGeoTargeting](../../models/components/linkgeotargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | \ No newline at end of file +| `geo` | [components.LinkGeoTargeting](../../models/components/linkgeotargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | +| `doIndex` | *boolean* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | \ No newline at end of file diff --git a/docs/models/operations/type.md b/docs/models/operations/type.md deleted file mode 100644 index becaf20..0000000 --- a/docs/models/operations/type.md +++ /dev/null @@ -1,11 +0,0 @@ -# Type - -The type of redirect to use for this domain. - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `Redirect` | redirect | -| `Rewrite` | rewrite | \ No newline at end of file diff --git a/docs/models/operations/updatedomainrequestbody.md b/docs/models/operations/updatedomainrequestbody.md index 86079e6..877e99f 100644 --- a/docs/models/operations/updatedomainrequestbody.md +++ b/docs/models/operations/updatedomainrequestbody.md @@ -6,9 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `slug` | *string* | :heavy_minus_sign: | Name of the domain. | acme.com | -| `type` | [operations.UpdateDomainType](../../models/operations/updatedomaintype.md) | :heavy_minus_sign: | The type of redirect to use for this domain. | redirect | -| `target` | *string* | :heavy_minus_sign: | The page your users will get redirected to when they visit your domain. | https://acme.com/landing | | `expiredUrl` | *string* | :heavy_minus_sign: | Redirect users to a specific URL when any link under this domain has expired. | https://acme.com/expired | | `archived` | *boolean* | :heavy_minus_sign: | Whether to archive this domain. `false` will unarchive a previously archived domain. | false | -| `noindex` | *boolean* | :heavy_minus_sign: | Prevent search engines from indexing the domain. Defaults to `false`. | | | `placeholder` | *string* | :heavy_minus_sign: | Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. | https://dub.co/help/article/what-is-dub | \ No newline at end of file diff --git a/docs/models/operations/updatedomaintype.md b/docs/models/operations/updatedomaintype.md deleted file mode 100644 index 6723136..0000000 --- a/docs/models/operations/updatedomaintype.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateDomainType - -The type of redirect to use for this domain. - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `Redirect` | redirect | -| `Rewrite` | rewrite | \ No newline at end of file diff --git a/docs/models/operations/updatelinkrequestbody.md b/docs/models/operations/updatelinkrequestbody.md index 5175e05..65cd2ef 100644 --- a/docs/models/operations/updatelinkrequestbody.md +++ b/docs/models/operations/updatelinkrequestbody.md @@ -27,4 +27,5 @@ | `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | | | `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | | -| `geo` | [components.LinkGeoTargeting](../../models/components/linkgeotargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | \ No newline at end of file +| `geo` | [components.LinkGeoTargeting](../../models/components/linkgeotargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | +| `doIndex` | *boolean* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | \ No newline at end of file diff --git a/docs/models/operations/upsertlinkrequestbody.md b/docs/models/operations/upsertlinkrequestbody.md index 8c1e4d4..aee1c6b 100644 --- a/docs/models/operations/upsertlinkrequestbody.md +++ b/docs/models/operations/upsertlinkrequestbody.md @@ -27,4 +27,5 @@ | `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `ios` | *string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | | | `android` | *string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | | -| `geo` | [components.LinkGeoTargeting](../../models/components/linkgeotargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | \ No newline at end of file +| `geo` | [components.LinkGeoTargeting](../../models/components/linkgeotargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | +| `doIndex` | *boolean* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | \ No newline at end of file diff --git a/jsr.json b/jsr.json index 88a2e38..ebf198f 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "dub", - "version": "0.30.1", + "version": "0.30.2", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index c33ef0b..3e29e20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dub", - "version": "0.30.1", + "version": "0.30.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dub", - "version": "0.30.1", + "version": "0.30.2", "devDependencies": { "@types/jsonpath": "^0.2.4", "@types/node": "^20.12.7", diff --git a/package.json b/package.json index 97b5aa2..0f45fa4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dub", - "version": "0.30.1", + "version": "0.30.2", "author": "Dub", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index f083078..2bc258d 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.1", - sdkVersion: "0.30.1", - genVersion: "2.347.8", - userAgent: "speakeasy-sdk/typescript 0.30.1 2.347.8 0.0.1 dub", + sdkVersion: "0.30.2", + genVersion: "2.349.6", + userAgent: "speakeasy-sdk/typescript 0.30.2 2.349.6 0.0.1 dub", } as const; diff --git a/src/models/components/domainschema.ts b/src/models/components/domainschema.ts index 081c436..0b3cadf 100644 --- a/src/models/components/domainschema.ts +++ b/src/models/components/domainschema.ts @@ -2,21 +2,8 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; -/** - * The type of redirect to use for this domain. - */ -export const Type = { - Redirect: "redirect", - Rewrite: "rewrite", -} as const; -/** - * The type of redirect to use for this domain. - */ -export type Type = ClosedEnum; - export type DomainSchema = { /** * The unique identifier of the domain. @@ -38,10 +25,6 @@ export type DomainSchema = { * Whether the domain is archived. */ archived?: boolean | undefined; - /** - * Prevent search engines from indexing the domain. - */ - noindex?: boolean | undefined; /** * Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. */ @@ -51,25 +34,15 @@ export type DomainSchema = { */ expiredUrl: string | null; /** - * The page your users will get redirected to when they visit your domain. + * The date the domain was created. */ - target: string | null; + createdAt: string; /** - * The type of redirect to use for this domain. + * The date the domain was last updated. */ - type: Type; - /** - * The number of clicks on the domain. - */ - clicks?: number | undefined; + updatedAt: string; }; -/** @internal */ -export namespace Type$ { - export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Type); - export const outboundSchema: z.ZodNativeEnum = inboundSchema; -} - /** @internal */ export namespace DomainSchema$ { export const inboundSchema: z.ZodType = z.object({ @@ -78,12 +51,10 @@ export namespace DomainSchema$ { verified: z.boolean().default(false), primary: z.boolean().default(false), archived: z.boolean().default(false), - noindex: z.boolean().default(false), placeholder: z.string().default("https://dub.co/help/article/what-is-dub"), expiredUrl: z.nullable(z.string()), - target: z.nullable(z.string()), - type: Type$.inboundSchema, - clicks: z.number().default(0), + createdAt: z.string(), + updatedAt: z.string(), }); export type Outbound = { @@ -92,12 +63,10 @@ export namespace DomainSchema$ { verified: boolean; primary: boolean; archived: boolean; - noindex: boolean; placeholder: string; expiredUrl: string | null; - target: string | null; - type: string; - clicks: number; + createdAt: string; + updatedAt: string; }; export const outboundSchema: z.ZodType = z.object({ @@ -106,11 +75,9 @@ export namespace DomainSchema$ { verified: z.boolean().default(false), primary: z.boolean().default(false), archived: z.boolean().default(false), - noindex: z.boolean().default(false), placeholder: z.string().default("https://dub.co/help/article/what-is-dub"), expiredUrl: z.nullable(z.string()), - target: z.nullable(z.string()), - type: Type$.outboundSchema, - clicks: z.number().default(0), + createdAt: z.string(), + updatedAt: z.string(), }); } diff --git a/src/models/components/linkschema.ts b/src/models/components/linkschema.ts index 8421726..8808732 100644 --- a/src/models/components/linkschema.ts +++ b/src/models/components/linkschema.ts @@ -323,6 +323,10 @@ export type LinkSchema = { * Whether the short link uses link cloaking. */ rewrite?: boolean | undefined; + /** + * Whether to allow search engines to index the short link. + */ + doIndex?: boolean | undefined; /** * The iOS destination URL for the short link for iOS device targeting. */ @@ -1712,6 +1716,7 @@ export namespace LinkSchema$ { description: z.nullable(z.string()), image: z.nullable(z.string()), rewrite: z.boolean().default(false), + doIndex: z.boolean().default(false), ios: z.nullable(z.string()), android: z.nullable(z.string()), geo: z.nullable(z.lazy(() => Geo$.inboundSchema)), @@ -1762,6 +1767,7 @@ export namespace LinkSchema$ { description: string | null; image: string | null; rewrite: boolean; + doIndex: boolean; ios: string | null; android: string | null; geo: Geo$.Outbound | null; @@ -1804,6 +1810,7 @@ export namespace LinkSchema$ { description: z.nullable(z.string()), image: z.nullable(z.string()), rewrite: z.boolean().default(false), + doIndex: z.boolean().default(false), ios: z.nullable(z.string()), android: z.nullable(z.string()), geo: z.nullable(z.lazy(() => Geo$.outboundSchema)), diff --git a/src/models/operations/bulkcreatelinks.ts b/src/models/operations/bulkcreatelinks.ts index 31a9834..0f46eb0 100644 --- a/src/models/operations/bulkcreatelinks.ts +++ b/src/models/operations/bulkcreatelinks.ts @@ -118,6 +118,10 @@ export type RequestBody = { * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. */ geo?: components.LinkGeoTargeting | null | undefined; + /** + * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex + */ + doIndex?: boolean | undefined; }; /** @internal */ @@ -191,6 +195,7 @@ export namespace RequestBody$ { ios: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(), geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(), + doIndex: z.boolean().default(false), }); export type Outbound = { @@ -217,6 +222,7 @@ export namespace RequestBody$ { ios?: string | null | undefined; android?: string | null | undefined; geo?: components.LinkGeoTargeting$.Outbound | null | undefined; + doIndex: boolean; }; export const outboundSchema: z.ZodType = z.object({ @@ -243,5 +249,6 @@ export namespace RequestBody$ { ios: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(), geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(), + doIndex: z.boolean().default(false), }); } diff --git a/src/models/operations/createdomain.ts b/src/models/operations/createdomain.ts index b7e8643..dbb4502 100644 --- a/src/models/operations/createdomain.ts +++ b/src/models/operations/createdomain.ts @@ -2,7 +2,6 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type CreateDomainGlobals = { @@ -13,31 +12,11 @@ export type CreateDomainGlobals = { projectSlug?: string | undefined; }; -/** - * The type of redirect to use for this domain. - */ -export const Type = { - Redirect: "redirect", - Rewrite: "rewrite", -} as const; -/** - * The type of redirect to use for this domain. - */ -export type Type = ClosedEnum; - export type CreateDomainRequestBody = { /** * Name of the domain. */ slug: string; - /** - * The type of redirect to use for this domain. - */ - type?: Type | undefined; - /** - * The page your users will get redirected to when they visit your domain. - */ - target?: string | null | undefined; /** * Redirect users to a specific URL when any link under this domain has expired. */ @@ -46,10 +25,6 @@ export type CreateDomainRequestBody = { * Whether to archive this domain. `false` will unarchive a previously archived domain. */ archived?: boolean | undefined; - /** - * Prevent search engines from indexing the domain. Defaults to `false`. - */ - noindex?: boolean | undefined; /** * Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. */ @@ -74,43 +49,28 @@ export namespace CreateDomainGlobals$ { }); } -/** @internal */ -export namespace Type$ { - export const inboundSchema: z.ZodNativeEnum = z.nativeEnum(Type); - export const outboundSchema: z.ZodNativeEnum = inboundSchema; -} - /** @internal */ 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; - type: string; - target?: string | null | undefined; expiredUrl?: string | null | undefined; archived: boolean; - noindex?: boolean | undefined; placeholder: string | null; }; export const outboundSchema: z.ZodType = z.object({ slug: z.string(), - type: Type$.outboundSchema.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")), }); } diff --git a/src/models/operations/createlink.ts b/src/models/operations/createlink.ts index 8b5b2d8..e603ade 100644 --- a/src/models/operations/createlink.ts +++ b/src/models/operations/createlink.ts @@ -118,6 +118,10 @@ export type CreateLinkRequestBody = { * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. */ geo?: components.LinkGeoTargeting | null | undefined; + /** + * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex + */ + doIndex?: boolean | undefined; }; /** @internal */ @@ -192,6 +196,7 @@ export namespace CreateLinkRequestBody$ { ios: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(), geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(), + doIndex: z.boolean().default(false), }); export type Outbound = { @@ -218,6 +223,7 @@ export namespace CreateLinkRequestBody$ { ios?: string | null | undefined; android?: string | null | undefined; geo?: components.LinkGeoTargeting$.Outbound | null | undefined; + doIndex: boolean; }; export const outboundSchema: z.ZodType = @@ -245,5 +251,6 @@ export namespace CreateLinkRequestBody$ { ios: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(), geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(), + doIndex: z.boolean().default(false), }); } diff --git a/src/models/operations/updatedomain.ts b/src/models/operations/updatedomain.ts index 73235d5..c166358 100644 --- a/src/models/operations/updatedomain.ts +++ b/src/models/operations/updatedomain.ts @@ -3,7 +3,6 @@ */ import { remap as remap$ } from "../../lib/primitives.js"; -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type UpdateDomainGlobals = { @@ -14,31 +13,11 @@ export type UpdateDomainGlobals = { projectSlug?: string | undefined; }; -/** - * The type of redirect to use for this domain. - */ -export const UpdateDomainType = { - Redirect: "redirect", - Rewrite: "rewrite", -} as const; -/** - * The type of redirect to use for this domain. - */ -export type UpdateDomainType = ClosedEnum; - export type UpdateDomainRequestBody = { /** * Name of the domain. */ slug?: string | undefined; - /** - * The type of redirect to use for this domain. - */ - type?: UpdateDomainType | undefined; - /** - * The page your users will get redirected to when they visit your domain. - */ - target?: string | null | undefined; /** * Redirect users to a specific URL when any link under this domain has expired. */ @@ -47,10 +26,6 @@ export type UpdateDomainRequestBody = { * Whether to archive this domain. `false` will unarchive a previously archived domain. */ archived?: boolean | undefined; - /** - * Prevent search engines from indexing the domain. Defaults to `false`. - */ - noindex?: boolean | undefined; /** * Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. */ @@ -83,44 +58,28 @@ export namespace UpdateDomainGlobals$ { }); } -/** @internal */ -export namespace UpdateDomainType$ { - export const inboundSchema: z.ZodNativeEnum = - z.nativeEnum(UpdateDomainType); - export const outboundSchema: z.ZodNativeEnum = inboundSchema; -} - /** @internal */ export namespace UpdateDomainRequestBody$ { export const inboundSchema: z.ZodType = z.object({ slug: z.string().optional(), - type: UpdateDomainType$.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 | undefined; - type: string; - target?: string | null | undefined; expiredUrl?: string | null | undefined; archived: boolean; - noindex?: boolean | undefined; placeholder: string | null; }; export const outboundSchema: z.ZodType = z.object({ slug: z.string().optional(), - type: UpdateDomainType$.outboundSchema.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")), }); } diff --git a/src/models/operations/updatelink.ts b/src/models/operations/updatelink.ts index 83540aa..f55a3ca 100644 --- a/src/models/operations/updatelink.ts +++ b/src/models/operations/updatelink.ts @@ -119,6 +119,10 @@ export type UpdateLinkRequestBody = { * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. */ geo?: components.LinkGeoTargeting | null | undefined; + /** + * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex + */ + doIndex?: boolean | undefined; }; export type UpdateLinkRequest = { @@ -201,6 +205,7 @@ export namespace UpdateLinkRequestBody$ { ios: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(), geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(), + doIndex: z.boolean().default(false), }); export type Outbound = { @@ -227,6 +232,7 @@ export namespace UpdateLinkRequestBody$ { ios?: string | null | undefined; android?: string | null | undefined; geo?: components.LinkGeoTargeting$.Outbound | null | undefined; + doIndex: boolean; }; export const outboundSchema: z.ZodType = @@ -254,6 +260,7 @@ export namespace UpdateLinkRequestBody$ { ios: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(), geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(), + doIndex: z.boolean().default(false), }); } diff --git a/src/models/operations/upsertlink.ts b/src/models/operations/upsertlink.ts index 9dbdde2..5618467 100644 --- a/src/models/operations/upsertlink.ts +++ b/src/models/operations/upsertlink.ts @@ -118,6 +118,10 @@ export type UpsertLinkRequestBody = { * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. */ geo?: components.LinkGeoTargeting | null | undefined; + /** + * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex + */ + doIndex?: boolean | undefined; }; /** @internal */ @@ -192,6 +196,7 @@ export namespace UpsertLinkRequestBody$ { ios: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(), geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(), + doIndex: z.boolean().default(false), }); export type Outbound = { @@ -218,6 +223,7 @@ export namespace UpsertLinkRequestBody$ { ios?: string | null | undefined; android?: string | null | undefined; geo?: components.LinkGeoTargeting$.Outbound | null | undefined; + doIndex: boolean; }; export const outboundSchema: z.ZodType = @@ -245,5 +251,6 @@ export namespace UpsertLinkRequestBody$ { ios: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(), geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(), + doIndex: z.boolean().default(false), }); }