ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2 (#130)

Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
This commit is contained in:
github-actions[bot]
2024-06-24 12:55:28 +05:30
committed by GitHub
parent 52a4272a33
commit 765e170c45
28 changed files with 332 additions and 440 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0 lockVersion: 2.0.0
id: f28179cc-ef59-426d-9e85-60cec22fc642 id: f28179cc-ef59-426d-9e85-60cec22fc642
management: management:
docChecksum: 4e9799bd93fdf4959c9efd6004900847 docChecksum: f8b1be2fa34844de98cc6c19757c0e81
docVersion: 0.0.1 docVersion: 0.0.1
speakeasyVersion: 1.313.0 speakeasyVersion: 1.314.2
generationVersion: 2.347.8 generationVersion: 2.349.6
releaseVersion: 0.30.1 releaseVersion: 0.30.2
configChecksum: cac24fa351193e38d0c0de1fb515e0a1 configChecksum: a5007338ee4d06f07b0ea685566f4669
repoURL: https://github.com/dubinc/dub-node.git repoURL: https://github.com/dubinc/dub-node.git
installationURL: https://github.com/dubinc/dub-node installationURL: https://github.com/dubinc/dub-node
published: true published: true
@@ -14,7 +14,7 @@ features:
typescript: typescript:
additionalDependencies: 0.1.0 additionalDependencies: 0.1.0
constsAndDefaults: 0.1.5 constsAndDefaults: 0.1.5
core: 3.10.1 core: 3.10.2
deprecations: 2.81.1 deprecations: 2.81.1
examples: 2.81.4 examples: 2.81.4
flattening: 2.81.1 flattening: 2.81.1
@@ -184,7 +184,6 @@ generatedFiles:
- docs/models/components/users.md - docs/models/components/users.md
- docs/models/components/domains.md - docs/models/components/domains.md
- docs/models/components/workspaceschema.md - docs/models/components/workspaceschema.md
- docs/models/components/type.md
- docs/models/components/domainschema.md - docs/models/components/domainschema.md
- docs/models/components/security.md - docs/models/components/security.md
- docs/models/errors/code.md - docs/models/errors/code.md
@@ -266,13 +265,11 @@ generatedFiles:
- docs/models/operations/listdomainsglobals.md - docs/models/operations/listdomainsglobals.md
- docs/models/operations/listdomainsrequest.md - docs/models/operations/listdomainsrequest.md
- docs/models/operations/createdomainglobals.md - docs/models/operations/createdomainglobals.md
- docs/models/operations/type.md
- docs/models/operations/createdomainrequestbody.md - docs/models/operations/createdomainrequestbody.md
- docs/models/operations/deletedomainglobals.md - docs/models/operations/deletedomainglobals.md
- docs/models/operations/deletedomainrequest.md - docs/models/operations/deletedomainrequest.md
- docs/models/operations/deletedomainresponsebody.md - docs/models/operations/deletedomainresponsebody.md
- docs/models/operations/updatedomainglobals.md - docs/models/operations/updatedomainglobals.md
- docs/models/operations/updatedomaintype.md
- docs/models/operations/updatedomainrequestbody.md - docs/models/operations/updatedomainrequestbody.md
- docs/models/operations/updatedomainrequest.md - docs/models/operations/updatedomainrequest.md
- docs/models/operations/setprimarydomainglobals.md - docs/models/operations/setprimarydomainglobals.md

View File

@@ -12,7 +12,7 @@ generation:
auth: auth:
oAuth2ClientCredentialsEnabled: false oAuth2ClientCredentialsEnabled: false
typescript: typescript:
version: 0.30.1 version: 0.30.2
additionalDependencies: additionalDependencies:
dependencies: {} dependencies: {}
devDependencies: devDependencies:

View File

@@ -1,9 +1,9 @@
speakeasyVersion: 1.313.0 speakeasyVersion: 1.314.2
sources: sources:
my-first-source: my-first-source:
sourceNamespace: my-first-source sourceNamespace: my-first-source
sourceRevisionDigest: sha256:580766149ac00dbd6366ec82f1f89b0b46ec48577ee4498f289d2037489c528f sourceRevisionDigest: sha256:164c06ded7b4e584a7e1d46fc0f20ebcf23bdb28abb5e4e2dea52b5aa34271fd
sourceBlobDigest: sha256:62970863bdbbe43757830e6930f28636b2a80cd64964af9b63c88c7c12995697 sourceBlobDigest: sha256:a07c6f70c6d3df68db32b244fef1af447804b41f9c59fcfc1f989afcf4da1d37
tags: tags:
- latest - latest
- main - main
@@ -11,8 +11,8 @@ targets:
my-first-target: my-first-target:
source: my-first-source source: my-first-source
sourceNamespace: my-first-source sourceNamespace: my-first-source
sourceRevisionDigest: sha256:580766149ac00dbd6366ec82f1f89b0b46ec48577ee4498f289d2037489c528f sourceRevisionDigest: sha256:164c06ded7b4e584a7e1d46fc0f20ebcf23bdb28abb5e4e2dea52b5aa34271fd
sourceBlobDigest: sha256:62970863bdbbe43757830e6930f28636b2a80cd64964af9b63c88c7c12995697 sourceBlobDigest: sha256:a07c6f70c6d3df68db32b244fef1af447804b41f9c59fcfc1f989afcf4da1d37
outLocation: /github/workspace/repo outLocation: /github/workspace/repo
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0

View File

@@ -476,4 +476,14 @@ Based on:
### Generated ### Generated
- [typescript v0.30.1] . - [typescript v0.30.1] .
### Releases ### Releases
- [NPM v0.30.1] https://www.npmjs.com/package/dub/v/0.30.1 - . - [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 - .

View File

@@ -3,11 +3,11 @@ info:
title: CodeSamples overlay for typescript target title: CodeSamples overlay for typescript target
version: 0.0.0 version: 0.0.0
actions: actions:
- target: $["paths"]["/links/{linkId}"]["patch"] - target: $["paths"]["/workspaces/{idOrSlug}"]["get"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "updateLink" "label": "getWorkspace"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -16,53 +16,8 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.links.update("<value>", { const result = await dub.workspaces.get({
url: "https://google/com", idOrSlug: "<value>",
});
// 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: "<value>",
slug: "<value>",
});
// 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: "<value>",
}); });
// Handle the result // Handle the result
@@ -89,112 +44,6 @@ actions:
console.log(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"]["/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("<value>");
// 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: "<value>",
});
// 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(); run();
- target: $["paths"]["/domains/{slug}"]["patch"] - target: $["paths"]["/domains/{slug}"]["patch"]
update: update:
@@ -215,52 +64,6 @@ actions:
console.log(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: "<value>",
});
// 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: "<value>",
eventName: "Sign up",
customerId: "<value>",
});
// Handle the result
console.log(result)
}
run(); run();
- target: $["paths"]["/track/sale"]["post"] - target: $["paths"]["/track/sale"]["post"]
update: update:
@@ -286,11 +89,11 @@ actions:
} }
run(); run();
- target: $["paths"]["/links/count"]["get"] - target: $["paths"]["/metatags"]["get"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "getLinksCount" "label": "getMetatags"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -299,18 +102,20 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.links.count({}); const result = await dub.metatags.get({
url: "https://dub.co",
});
// Handle the result // Handle the result
console.log(result) console.log(result)
} }
run(); run();
- target: $["paths"]["/links/info"]["get"] - target: $["paths"]["/links/{linkId}"]["patch"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "getLinkInfo" "label": "updateLink"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -319,7 +124,9 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.links.get({}); const result = await dub.links.update("<value>", {
url: "https://google/com",
});
// Handle the result // Handle the result
console.log(result) console.log(result)
@@ -346,11 +153,11 @@ actions:
} }
run(); run();
- target: $["paths"]["/tags"]["get"] - target: $["paths"]["/tags"]["post"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "getTags" "label": "createTag"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -359,7 +166,9 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.tags.list({}); const result = await dub.tags.create({
tag: "<value>",
});
// Handle the result // Handle the result
console.log(result) console.log(result)
@@ -386,11 +195,11 @@ actions:
} }
run(); run();
- target: $["paths"]["/track/customer"]["post"] - target: $["paths"]["/track/lead"]["post"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "trackCustomer" "label": "trackLead"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -399,7 +208,9 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.track.customer({ const result = await dub.track.lead({
clickId: "<value>",
eventName: "Sign up",
customerId: "<value>", customerId: "<value>",
}); });
@@ -407,6 +218,50 @@ actions:
console.log(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"]["/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(); run();
- target: $["paths"]["/links"]["get"] - target: $["paths"]["/links"]["get"]
update: update:
@@ -427,6 +282,152 @@ actions:
console.log(result) console.log(result)
} }
run();
- target: $["paths"]["/links/info"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getLinkInfo"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
});
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: "<value>",
});
// 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("<value>");
// Handle the result
console.log(result)
}
run(); run();
- target: $["paths"]["/links/bulk"]["post"] - target: $["paths"]["/links/bulk"]["post"]
update: update:
@@ -452,11 +453,11 @@ actions:
} }
run(); run();
- target: $["paths"]["/workspaces"]["get"] - target: $["paths"]["/workspaces"]["post"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "getWorkspaces" "label": "createWorkspace"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -465,28 +466,9 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.workspaces.list(); const result = await dub.workspaces.create({
name: "<value>",
// Handle the result slug: "<value>",
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 // Handle the result
@@ -494,11 +476,11 @@ actions:
} }
run(); run();
- target: $["paths"]["/links"]["post"] - target: $["paths"]["/domains/{slug}"]["delete"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "createLink" "label": "deleteDomain"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -507,20 +489,18 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.links.create({ const result = await dub.domains.delete("acme.com");
url: "https://google/com",
});
// Handle the result // Handle the result
console.log(result) console.log(result)
} }
run(); run();
- target: $["paths"]["/qr"]["get"] - target: $["paths"]["/track/customer"]["post"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "getQRCode" "label": "trackCustomer"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -529,12 +509,32 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.qrCodes.get({ const result = await dub.track.customer({
url: "https://brief-micronutrient.org", customerId: "<value>",
}); });
// Handle the result // Handle the result
console.log(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(); run();

View File

@@ -10,9 +10,7 @@
| `verified` | *boolean* | :heavy_minus_sign: | Whether the domain is verified. | | | `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. | | | `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. | | | `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 | | `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 | | `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 | | `createdAt` | *string* | :heavy_check_mark: | The date the domain was created. | |
| `type` | [components.Type](../../models/components/type.md) | :heavy_check_mark: | The type of redirect to use for this domain. | | | `updatedAt` | *string* | :heavy_check_mark: | The date the domain was last updated. | |
| `clicks` | *number* | :heavy_minus_sign: | The number of clicks on the domain. | |

View File

@@ -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. | | `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. | | `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. | | `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. | | `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. | | `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 | | `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 |

View File

@@ -1,11 +0,0 @@
# Type
The type of redirect to use for this domain.
## Values
| Name | Value |
| ---------- | ---------- |
| `Redirect` | redirect |
| `Rewrite` | rewrite |

View File

@@ -6,9 +6,6 @@
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `slug` | *string* | :heavy_check_mark: | Name of the domain. | acme.com | | `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 | | `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 | | `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 | | `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 |

View File

@@ -27,4 +27,5 @@
| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `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. | | | `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. | | | `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 }`. | | | `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 | |

View File

@@ -27,4 +27,5 @@
| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `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. | | | `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. | | | `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 }`. | | | `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 | |

View File

@@ -1,11 +0,0 @@
# Type
The type of redirect to use for this domain.
## Values
| Name | Value |
| ---------- | ---------- |
| `Redirect` | redirect |
| `Rewrite` | rewrite |

View File

@@ -6,9 +6,6 @@
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `slug` | *string* | :heavy_minus_sign: | Name of the domain. | acme.com | | `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 | | `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 | | `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 | | `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 |

View File

@@ -1,11 +0,0 @@
# UpdateDomainType
The type of redirect to use for this domain.
## Values
| Name | Value |
| ---------- | ---------- |
| `Redirect` | redirect |
| `Rewrite` | rewrite |

View File

@@ -27,4 +27,5 @@
| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `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. | | | `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. | | | `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 }`. | | | `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 | |

View File

@@ -27,4 +27,5 @@
| `rewrite` | *boolean* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `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. | | | `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. | | | `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 }`. | | | `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 | |

View File

@@ -2,7 +2,7 @@
{ {
"name": "dub", "name": "dub",
"version": "0.30.1", "version": "0.30.2",
"exports": { "exports": {
".": "./src/index.ts", ".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts", "./models/errors": "./src/models/errors/index.ts",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "dub", "name": "dub",
"version": "0.30.1", "version": "0.30.2",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "dub", "name": "dub",
"version": "0.30.1", "version": "0.30.2",
"devDependencies": { "devDependencies": {
"@types/jsonpath": "^0.2.4", "@types/jsonpath": "^0.2.4",
"@types/node": "^20.12.7", "@types/node": "^20.12.7",

View File

@@ -1,6 +1,6 @@
{ {
"name": "dub", "name": "dub",
"version": "0.30.1", "version": "0.30.2",
"author": "Dub", "author": "Dub",
"main": "./index.js", "main": "./index.js",
"sideEffects": false, "sideEffects": false,

View File

@@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = { export const SDK_METADATA = {
language: "typescript", language: "typescript",
openapiDocVersion: "0.0.1", openapiDocVersion: "0.0.1",
sdkVersion: "0.30.1", sdkVersion: "0.30.2",
genVersion: "2.347.8", genVersion: "2.349.6",
userAgent: "speakeasy-sdk/typescript 0.30.1 2.347.8 0.0.1 dub", userAgent: "speakeasy-sdk/typescript 0.30.2 2.349.6 0.0.1 dub",
} as const; } as const;

View File

@@ -2,21 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/ */
import { ClosedEnum } from "../../types/enums.js";
import * as z from "zod"; 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<typeof Type>;
export type DomainSchema = { export type DomainSchema = {
/** /**
* The unique identifier of the domain. * The unique identifier of the domain.
@@ -38,10 +25,6 @@ export type DomainSchema = {
* Whether the domain is archived. * Whether the domain is archived.
*/ */
archived?: boolean | undefined; 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. * 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; 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; updatedAt: string;
/**
* The number of clicks on the domain.
*/
clicks?: number | undefined;
}; };
/** @internal */
export namespace Type$ {
export const inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(Type);
export const outboundSchema: z.ZodNativeEnum<typeof Type> = inboundSchema;
}
/** @internal */ /** @internal */
export namespace DomainSchema$ { export namespace DomainSchema$ {
export const inboundSchema: z.ZodType<DomainSchema, z.ZodTypeDef, unknown> = z.object({ export const inboundSchema: z.ZodType<DomainSchema, z.ZodTypeDef, unknown> = z.object({
@@ -78,12 +51,10 @@ export namespace DomainSchema$ {
verified: z.boolean().default(false), verified: z.boolean().default(false),
primary: z.boolean().default(false), primary: z.boolean().default(false),
archived: 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"), placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
expiredUrl: z.nullable(z.string()), expiredUrl: z.nullable(z.string()),
target: z.nullable(z.string()), createdAt: z.string(),
type: Type$.inboundSchema, updatedAt: z.string(),
clicks: z.number().default(0),
}); });
export type Outbound = { export type Outbound = {
@@ -92,12 +63,10 @@ export namespace DomainSchema$ {
verified: boolean; verified: boolean;
primary: boolean; primary: boolean;
archived: boolean; archived: boolean;
noindex: boolean;
placeholder: string; placeholder: string;
expiredUrl: string | null; expiredUrl: string | null;
target: string | null; createdAt: string;
type: string; updatedAt: string;
clicks: number;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DomainSchema> = z.object({ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DomainSchema> = z.object({
@@ -106,11 +75,9 @@ export namespace DomainSchema$ {
verified: z.boolean().default(false), verified: z.boolean().default(false),
primary: z.boolean().default(false), primary: z.boolean().default(false),
archived: 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"), placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
expiredUrl: z.nullable(z.string()), expiredUrl: z.nullable(z.string()),
target: z.nullable(z.string()), createdAt: z.string(),
type: Type$.outboundSchema, updatedAt: z.string(),
clicks: z.number().default(0),
}); });
} }

View File

@@ -323,6 +323,10 @@ export type LinkSchema = {
* Whether the short link uses link cloaking. * Whether the short link uses link cloaking.
*/ */
rewrite?: boolean | undefined; 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. * The iOS destination URL for the short link for iOS device targeting.
*/ */
@@ -1712,6 +1716,7 @@ export namespace LinkSchema$ {
description: z.nullable(z.string()), description: z.nullable(z.string()),
image: z.nullable(z.string()), image: z.nullable(z.string()),
rewrite: z.boolean().default(false), rewrite: z.boolean().default(false),
doIndex: z.boolean().default(false),
ios: z.nullable(z.string()), ios: z.nullable(z.string()),
android: z.nullable(z.string()), android: z.nullable(z.string()),
geo: z.nullable(z.lazy(() => Geo$.inboundSchema)), geo: z.nullable(z.lazy(() => Geo$.inboundSchema)),
@@ -1762,6 +1767,7 @@ export namespace LinkSchema$ {
description: string | null; description: string | null;
image: string | null; image: string | null;
rewrite: boolean; rewrite: boolean;
doIndex: boolean;
ios: string | null; ios: string | null;
android: string | null; android: string | null;
geo: Geo$.Outbound | null; geo: Geo$.Outbound | null;
@@ -1804,6 +1810,7 @@ export namespace LinkSchema$ {
description: z.nullable(z.string()), description: z.nullable(z.string()),
image: z.nullable(z.string()), image: z.nullable(z.string()),
rewrite: z.boolean().default(false), rewrite: z.boolean().default(false),
doIndex: z.boolean().default(false),
ios: z.nullable(z.string()), ios: z.nullable(z.string()),
android: z.nullable(z.string()), android: z.nullable(z.string()),
geo: z.nullable(z.lazy(() => Geo$.outboundSchema)), geo: z.nullable(z.lazy(() => Geo$.outboundSchema)),

View File

@@ -118,6 +118,10 @@ export type RequestBody = {
* Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
*/ */
geo?: components.LinkGeoTargeting | null | undefined; 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 */ /** @internal */
@@ -191,6 +195,7 @@ export namespace RequestBody$ {
ios: z.nullable(z.string()).optional(), ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(), geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
doIndex: z.boolean().default(false),
}); });
export type Outbound = { export type Outbound = {
@@ -217,6 +222,7 @@ export namespace RequestBody$ {
ios?: string | null | undefined; ios?: string | null | undefined;
android?: string | null | undefined; android?: string | null | undefined;
geo?: components.LinkGeoTargeting$.Outbound | null | undefined; geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
doIndex: boolean;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RequestBody> = z.object({ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RequestBody> = z.object({
@@ -243,5 +249,6 @@ export namespace RequestBody$ {
ios: z.nullable(z.string()).optional(), ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(), geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
doIndex: z.boolean().default(false),
}); });
} }

View File

@@ -2,7 +2,6 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/ */
import { ClosedEnum } from "../../types/enums.js";
import * as z from "zod"; import * as z from "zod";
export type CreateDomainGlobals = { export type CreateDomainGlobals = {
@@ -13,31 +12,11 @@ export type CreateDomainGlobals = {
projectSlug?: string | undefined; 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<typeof Type>;
export type CreateDomainRequestBody = { export type CreateDomainRequestBody = {
/** /**
* Name of the domain. * Name of the domain.
*/ */
slug: string; 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. * 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. * Whether to archive this domain. `false` will unarchive a previously archived domain.
*/ */
archived?: boolean | undefined; 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. * 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<typeof Type> = z.nativeEnum(Type);
export const outboundSchema: z.ZodNativeEnum<typeof Type> = inboundSchema;
}
/** @internal */ /** @internal */
export namespace CreateDomainRequestBody$ { export namespace CreateDomainRequestBody$ {
export const inboundSchema: z.ZodType<CreateDomainRequestBody, z.ZodTypeDef, unknown> = export const inboundSchema: z.ZodType<CreateDomainRequestBody, z.ZodTypeDef, unknown> =
z.object({ z.object({
slug: z.string(), slug: z.string(),
type: Type$.inboundSchema.default("redirect"),
target: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(), expiredUrl: z.nullable(z.string()).optional(),
archived: z.boolean().default(false), archived: z.boolean().default(false),
noindex: z.boolean().optional(),
placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")), placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
}); });
export type Outbound = { export type Outbound = {
slug: string; slug: string;
type: string;
target?: string | null | undefined;
expiredUrl?: string | null | undefined; expiredUrl?: string | null | undefined;
archived: boolean; archived: boolean;
noindex?: boolean | undefined;
placeholder: string | null; placeholder: string | null;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateDomainRequestBody> = export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateDomainRequestBody> =
z.object({ z.object({
slug: z.string(), slug: z.string(),
type: Type$.outboundSchema.default("redirect"),
target: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(), expiredUrl: z.nullable(z.string()).optional(),
archived: z.boolean().default(false), archived: z.boolean().default(false),
noindex: z.boolean().optional(),
placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")), placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
}); });
} }

View File

@@ -118,6 +118,10 @@ export type CreateLinkRequestBody = {
* Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
*/ */
geo?: components.LinkGeoTargeting | null | undefined; 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 */ /** @internal */
@@ -192,6 +196,7 @@ export namespace CreateLinkRequestBody$ {
ios: z.nullable(z.string()).optional(), ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(), geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
doIndex: z.boolean().default(false),
}); });
export type Outbound = { export type Outbound = {
@@ -218,6 +223,7 @@ export namespace CreateLinkRequestBody$ {
ios?: string | null | undefined; ios?: string | null | undefined;
android?: string | null | undefined; android?: string | null | undefined;
geo?: components.LinkGeoTargeting$.Outbound | null | undefined; geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
doIndex: boolean;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkRequestBody> = export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkRequestBody> =
@@ -245,5 +251,6 @@ export namespace CreateLinkRequestBody$ {
ios: z.nullable(z.string()).optional(), ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(), geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
doIndex: z.boolean().default(false),
}); });
} }

View File

@@ -3,7 +3,6 @@
*/ */
import { remap as remap$ } from "../../lib/primitives.js"; import { remap as remap$ } from "../../lib/primitives.js";
import { ClosedEnum } from "../../types/enums.js";
import * as z from "zod"; import * as z from "zod";
export type UpdateDomainGlobals = { export type UpdateDomainGlobals = {
@@ -14,31 +13,11 @@ export type UpdateDomainGlobals = {
projectSlug?: string | undefined; 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<typeof UpdateDomainType>;
export type UpdateDomainRequestBody = { export type UpdateDomainRequestBody = {
/** /**
* Name of the domain. * Name of the domain.
*/ */
slug?: string | undefined; 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. * 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. * Whether to archive this domain. `false` will unarchive a previously archived domain.
*/ */
archived?: boolean | undefined; 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. * 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<typeof UpdateDomainType> =
z.nativeEnum(UpdateDomainType);
export const outboundSchema: z.ZodNativeEnum<typeof UpdateDomainType> = inboundSchema;
}
/** @internal */ /** @internal */
export namespace UpdateDomainRequestBody$ { export namespace UpdateDomainRequestBody$ {
export const inboundSchema: z.ZodType<UpdateDomainRequestBody, z.ZodTypeDef, unknown> = export const inboundSchema: z.ZodType<UpdateDomainRequestBody, z.ZodTypeDef, unknown> =
z.object({ z.object({
slug: z.string().optional(), slug: z.string().optional(),
type: UpdateDomainType$.inboundSchema.default("redirect"),
target: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(), expiredUrl: z.nullable(z.string()).optional(),
archived: z.boolean().default(false), archived: z.boolean().default(false),
noindex: z.boolean().optional(),
placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")), placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
}); });
export type Outbound = { export type Outbound = {
slug?: string | undefined; slug?: string | undefined;
type: string;
target?: string | null | undefined;
expiredUrl?: string | null | undefined; expiredUrl?: string | null | undefined;
archived: boolean; archived: boolean;
noindex?: boolean | undefined;
placeholder: string | null; placeholder: string | null;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateDomainRequestBody> = export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateDomainRequestBody> =
z.object({ z.object({
slug: z.string().optional(), slug: z.string().optional(),
type: UpdateDomainType$.outboundSchema.default("redirect"),
target: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(), expiredUrl: z.nullable(z.string()).optional(),
archived: z.boolean().default(false), archived: z.boolean().default(false),
noindex: z.boolean().optional(),
placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")), placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
}); });
} }

View File

@@ -119,6 +119,10 @@ export type UpdateLinkRequestBody = {
* Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
*/ */
geo?: components.LinkGeoTargeting | null | undefined; 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 = { export type UpdateLinkRequest = {
@@ -201,6 +205,7 @@ export namespace UpdateLinkRequestBody$ {
ios: z.nullable(z.string()).optional(), ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(), geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
doIndex: z.boolean().default(false),
}); });
export type Outbound = { export type Outbound = {
@@ -227,6 +232,7 @@ export namespace UpdateLinkRequestBody$ {
ios?: string | null | undefined; ios?: string | null | undefined;
android?: string | null | undefined; android?: string | null | undefined;
geo?: components.LinkGeoTargeting$.Outbound | null | undefined; geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
doIndex: boolean;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkRequestBody> = export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkRequestBody> =
@@ -254,6 +260,7 @@ export namespace UpdateLinkRequestBody$ {
ios: z.nullable(z.string()).optional(), ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(), geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
doIndex: z.boolean().default(false),
}); });
} }

View File

@@ -118,6 +118,10 @@ export type UpsertLinkRequestBody = {
* Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
*/ */
geo?: components.LinkGeoTargeting | null | undefined; 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 */ /** @internal */
@@ -192,6 +196,7 @@ export namespace UpsertLinkRequestBody$ {
ios: z.nullable(z.string()).optional(), ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(), geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
doIndex: z.boolean().default(false),
}); });
export type Outbound = { export type Outbound = {
@@ -218,6 +223,7 @@ export namespace UpsertLinkRequestBody$ {
ios?: string | null | undefined; ios?: string | null | undefined;
android?: string | null | undefined; android?: string | null | undefined;
geo?: components.LinkGeoTargeting$.Outbound | null | undefined; geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
doIndex: boolean;
}; };
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpsertLinkRequestBody> = export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpsertLinkRequestBody> =
@@ -245,5 +251,6 @@ export namespace UpsertLinkRequestBody$ {
ios: z.nullable(z.string()).optional(), ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(), android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(), geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
doIndex: z.boolean().default(false),
}); });
} }