mirror of
https://github.com/LukeHagar/dub-node.git
synced 2025-12-06 04:19:37 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2 (#130)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
This commit is contained in:
committed by
GitHub
parent
52a4272a33
commit
765e170c45
@@ -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
|
||||
|
||||
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
typescript:
|
||||
version: 0.30.1
|
||||
version: 0.30.2
|
||||
additionalDependencies:
|
||||
dependencies: {}
|
||||
devDependencies:
|
||||
|
||||
@@ -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
|
||||
|
||||
10
RELEASES.md
10
RELEASES.md
@@ -477,3 +477,13 @@ Based on:
|
||||
- [typescript v0.30.1] .
|
||||
### Releases
|
||||
- [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 - .
|
||||
460
codeSamples.yaml
460
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("<value>", {
|
||||
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: "<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>",
|
||||
const result = await dub.workspaces.get({
|
||||
idOrSlug: "<value>",
|
||||
});
|
||||
|
||||
// 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("<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();
|
||||
- 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: "<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();
|
||||
- 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("<value>", {
|
||||
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: "<value>",
|
||||
});
|
||||
|
||||
// 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: "<value>",
|
||||
eventName: "Sign up",
|
||||
customerId: "<value>",
|
||||
});
|
||||
|
||||
@@ -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: "<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();
|
||||
- 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,18 +466,21 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.workspaces.list();
|
||||
const result = await dub.workspaces.create({
|
||||
name: "<value>",
|
||||
slug: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains"]["post"]
|
||||
- target: $["paths"]["/domains/{slug}"]["delete"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "createDomain"
|
||||
"label": "deleteDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -485,20 +489,18 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.create({
|
||||
slug: "acme.com",
|
||||
});
|
||||
const result = await dub.domains.delete("acme.com");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links"]["post"]
|
||||
- target: $["paths"]["/track/customer"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "createLink"
|
||||
"label": "trackCustomer"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -507,8 +509,8 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.create({
|
||||
url: "https://google/com",
|
||||
const result = await dub.track.customer({
|
||||
customerId: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
@@ -516,11 +518,11 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/qr"]["get"]
|
||||
- target: $["paths"]["/links/count"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getQRCode"
|
||||
"label": "getLinksCount"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -529,9 +531,7 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.qrCodes.get({
|
||||
url: "https://brief-micronutrient.org",
|
||||
});
|
||||
const result = await dub.links.count({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
|
||||
@@ -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. | |
|
||||
| `createdAt` | *string* | :heavy_check_mark: | The date the domain was created. | |
|
||||
| `updatedAt` | *string* | :heavy_check_mark: | The date the domain was last updated. | |
|
||||
@@ -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 |
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Type
|
||||
|
||||
The type of redirect to use for this domain.
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------- | ---------- |
|
||||
| `Redirect` | redirect |
|
||||
| `Rewrite` | rewrite |
|
||||
@@ -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 |
|
||||
@@ -28,3 +28,4 @@
|
||||
| `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 }`. | |
|
||||
| `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 | |
|
||||
@@ -28,3 +28,4 @@
|
||||
| `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 }`. | |
|
||||
| `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 | |
|
||||
@@ -1,11 +0,0 @@
|
||||
# Type
|
||||
|
||||
The type of redirect to use for this domain.
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------- | ---------- |
|
||||
| `Redirect` | redirect |
|
||||
| `Rewrite` | rewrite |
|
||||
@@ -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 |
|
||||
@@ -1,11 +0,0 @@
|
||||
# UpdateDomainType
|
||||
|
||||
The type of redirect to use for this domain.
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------- | ---------- |
|
||||
| `Redirect` | redirect |
|
||||
| `Rewrite` | rewrite |
|
||||
@@ -28,3 +28,4 @@
|
||||
| `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 }`. | |
|
||||
| `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 | |
|
||||
@@ -28,3 +28,4 @@
|
||||
| `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 }`. | |
|
||||
| `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 | |
|
||||
2
jsr.json
2
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",
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dub",
|
||||
"version": "0.30.1",
|
||||
"version": "0.30.2",
|
||||
"author": "Dub",
|
||||
"main": "./index.js",
|
||||
"sideEffects": false,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<typeof Type>;
|
||||
|
||||
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<typeof Type> = z.nativeEnum(Type);
|
||||
export const outboundSchema: z.ZodNativeEnum<typeof Type> = inboundSchema;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace DomainSchema$ {
|
||||
export const inboundSchema: z.ZodType<DomainSchema, z.ZodTypeDef, unknown> = 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<Outbound, z.ZodTypeDef, DomainSchema> = 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(),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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)),
|
||||
|
||||
@@ -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<Outbound, z.ZodTypeDef, RequestBody> = 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),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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<typeof Type>;
|
||||
|
||||
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<typeof Type> = z.nativeEnum(Type);
|
||||
export const outboundSchema: z.ZodNativeEnum<typeof Type> = inboundSchema;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace CreateDomainRequestBody$ {
|
||||
export const inboundSchema: z.ZodType<CreateDomainRequestBody, z.ZodTypeDef, unknown> =
|
||||
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<Outbound, z.ZodTypeDef, CreateDomainRequestBody> =
|
||||
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")),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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<Outbound, z.ZodTypeDef, CreateLinkRequestBody> =
|
||||
@@ -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),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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<typeof UpdateDomainType>;
|
||||
|
||||
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<typeof UpdateDomainType> =
|
||||
z.nativeEnum(UpdateDomainType);
|
||||
export const outboundSchema: z.ZodNativeEnum<typeof UpdateDomainType> = inboundSchema;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace UpdateDomainRequestBody$ {
|
||||
export const inboundSchema: z.ZodType<UpdateDomainRequestBody, z.ZodTypeDef, unknown> =
|
||||
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<Outbound, z.ZodTypeDef, UpdateDomainRequestBody> =
|
||||
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")),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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<Outbound, z.ZodTypeDef, UpdateLinkRequestBody> =
|
||||
@@ -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),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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<Outbound, z.ZodTypeDef, UpsertLinkRequestBody> =
|
||||
@@ -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),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user