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.276.0 (#93)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
This commit is contained in:
committed by
GitHub
parent
4b252a0ec4
commit
8c928872a9
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: f28179cc-ef59-426d-9e85-60cec22fc642
|
||||
management:
|
||||
docChecksum: 301ac8b067918fa1a62bb9be99b93094
|
||||
docChecksum: 0008b3cde645369b98ab1f75381bb11a
|
||||
docVersion: 0.0.1
|
||||
speakeasyVersion: 1.274.1
|
||||
speakeasyVersion: 1.276.0
|
||||
generationVersion: 2.314.0
|
||||
releaseVersion: 0.25.1
|
||||
configChecksum: 08f0714c4fc55e95edc8c654394f5bcf
|
||||
releaseVersion: 0.25.2
|
||||
configChecksum: a717018481b6fdc4d6146485565263e5
|
||||
repoURL: https://github.com/dubinc/dub-node.git
|
||||
installationURL: https://github.com/dubinc/dub-node
|
||||
published: true
|
||||
|
||||
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
typescript:
|
||||
version: 0.25.1
|
||||
version: 0.25.2
|
||||
additionalDependencies:
|
||||
dependencies: {}
|
||||
devDependencies:
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
speakeasyVersion: 1.274.1
|
||||
speakeasyVersion: 1.276.0
|
||||
sources:
|
||||
my-first-source:
|
||||
sourceNamespace: my-first-source
|
||||
sourceRevisionDigest: sha256:1ec04d64ce9d8669e3f76257126409fab6bad34096dbed532525fcb1222437ce
|
||||
sourceBlobDigest: sha256:62b12b0629e54b9f7ce3fa321d248a2fd18a778bd3e223dc6603583aa66922f4
|
||||
sourceRevisionDigest: sha256:365db128287dc83d36c7a0e2ce43b6abfe2e5108053a272988c8240fcafce541
|
||||
sourceBlobDigest: sha256:3b411021fd54342776cd1a1f631e53f2f51e7b299ba8ced635a3bdedaf86f225
|
||||
tags:
|
||||
- latest
|
||||
targets:
|
||||
my-first-target:
|
||||
source: my-first-source
|
||||
sourceNamespace: my-first-source
|
||||
sourceRevisionDigest: sha256:1ec04d64ce9d8669e3f76257126409fab6bad34096dbed532525fcb1222437ce
|
||||
sourceBlobDigest: sha256:62b12b0629e54b9f7ce3fa321d248a2fd18a778bd3e223dc6603583aa66922f4
|
||||
sourceRevisionDigest: sha256:365db128287dc83d36c7a0e2ce43b6abfe2e5108053a272988c8240fcafce541
|
||||
sourceBlobDigest: sha256:3b411021fd54342776cd1a1f631e53f2f51e7b299ba8ced635a3bdedaf86f225
|
||||
outLocation: /github/workspace/repo
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
@@ -20,6 +20,8 @@ workflow:
|
||||
my-first-source:
|
||||
inputs:
|
||||
- location: https://api.dub.co
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/dub/dub/my-first-source
|
||||
targets:
|
||||
my-first-target:
|
||||
target: typescript
|
||||
|
||||
@@ -4,12 +4,14 @@ sources:
|
||||
my-first-source:
|
||||
inputs:
|
||||
- location: https://api.dub.co
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/dub/dub/my-first-source
|
||||
targets:
|
||||
my-first-target:
|
||||
target: typescript
|
||||
source: my-first-source
|
||||
codeSamples:
|
||||
output: codeSamples.yaml
|
||||
publish:
|
||||
npm:
|
||||
token: $npm_token
|
||||
codeSamples:
|
||||
output: codeSamples.yaml
|
||||
|
||||
12
RELEASES.md
12
RELEASES.md
@@ -196,4 +196,14 @@ Based on:
|
||||
### Generated
|
||||
- [typescript v0.25.1] .
|
||||
### Releases
|
||||
- [NPM v0.25.1] https://www.npmjs.com/package/dub/v/0.25.1 - .
|
||||
- [NPM v0.25.1] https://www.npmjs.com/package/dub/v/0.25.1 - .
|
||||
|
||||
## 2024-04-29 01:14:06
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.276.0 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.25.2] .
|
||||
### Releases
|
||||
- [NPM v0.25.2] https://www.npmjs.com/package/dub/v/0.25.2 - .
|
||||
710
codeSamples.yaml
710
codeSamples.yaml
@@ -3,11 +3,11 @@ info:
|
||||
title: CodeSamples overlay for typescript target
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $["paths"]["/analytics/os"]["get"]
|
||||
- target: $["paths"]["/analytics/clicks"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getOSAnalytics"
|
||||
"label": "getClicksAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -17,18 +17,18 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.os({});
|
||||
const result = await dub.clicks({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/tags"]["post"]
|
||||
- target: $["paths"]["/analytics/city"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "createTag"
|
||||
"label": "getCityAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -38,20 +38,18 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.create({
|
||||
tag: "<value>",
|
||||
});
|
||||
const result = await dub.cities({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links"]["post"]
|
||||
- target: $["paths"]["/analytics/browser"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "createLink"
|
||||
"label": "getBrowserAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -61,36 +59,7 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.create({
|
||||
url: "https://google/com",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links/{linkId}"]["put"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "editLink"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const linkId = \"<value>\";\n const requestBody = {\n url: \"https://google/com\",\n };\n \n const result = await dub.update(linkId, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/tags"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getTags"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.list({});
|
||||
const result = await dub.browsers({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -118,23 +87,17 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains/{slug}"]["delete"]
|
||||
- target: $["paths"]["/links/{linkId}"]["put"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "deleteDomain"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n \n const result = await dub.delete(slug);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/links/{linkId}"]["delete"]
|
||||
"label": "editLink"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const linkId = \"<value>\";\n const requestBody = {\n url: \"https://google/com\",\n };\n \n const result = await dub.update(linkId, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/domains"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "deleteLink"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const linkId = \"<value>\";\n \n const result = await dub.delete(linkId);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/qr"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getQRCode"
|
||||
"label": "listDomains"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -144,18 +107,18 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.get({});
|
||||
const result = await dub.list({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics/clicks"]["get"]
|
||||
- target: $["paths"]["/analytics/timeseries"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getClicksAnalytics"
|
||||
"label": "getTimeseriesAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -165,7 +128,30 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.clicks({});
|
||||
const result = await dub.timeseries({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "addDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.add({
|
||||
slug: "acme.com",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -196,166 +182,6 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/workspaces"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getWorkspaces"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.list();
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/workspaces/{idOrSlug}"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getWorkspace"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.get({
|
||||
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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.create({
|
||||
name: "<value>",
|
||||
slug: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/metatags"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getMetatags"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.get({
|
||||
url: "https://dub.co",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links/count"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getLinksCount"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.count({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics/browser"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getBrowserAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.browsers({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics/top_links"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getTopLinks"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.topLinks({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains/{slug}"]["patch"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "editDomain"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n const requestBody = {};\n \n const result = await dub.update(slug, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/links/bulk"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
@@ -380,146 +206,6 @@ actions:
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "listDomains"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.list({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "addDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.add({
|
||||
slug: "acme.com",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains/{slug}/primary"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "setPrimaryDomain"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n \n const result = await dub.setPrimary(slug);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/domains/{slug}/transfer"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "transferDomain"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n const requestBody = {\n newWorkspaceId: \"<value>\",\n };\n \n const result = await dub.transfer(slug, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/links"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getLinks"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.list({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics/city"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getCityAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.cities({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics/referer"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getRefererAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.referers({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics/timeseries"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getTimeseriesAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.timeseries({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics/country"]["get"]
|
||||
update:
|
||||
@@ -563,3 +249,317 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/workspaces/{idOrSlug}"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getWorkspace"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.get({
|
||||
idOrSlug: "<value>",
|
||||
});
|
||||
|
||||
// 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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.list({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getLinks"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.list({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/workspaces"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getWorkspaces"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.list();
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains/{slug}"]["delete"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "deleteDomain"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n \n const result = await dub.delete(slug);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/domains/{slug}/primary"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "setPrimaryDomain"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n \n const result = await dub.setPrimary(slug);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/metatags"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getMetatags"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.get({
|
||||
url: "https://dub.co",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains/{slug}"]["patch"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "editDomain"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n const requestBody = {};\n \n const result = await dub.update(slug, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/links"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "createLink"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.create({
|
||||
url: "https://google/com",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links/count"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getLinksCount"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.count({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links/{linkId}"]["delete"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "deleteLink"
|
||||
"source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const linkId = \"<value>\";\n \n const result = await dub.delete(linkId);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
- target: $["paths"]["/qr"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getQRCode"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.get({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics/referer"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getRefererAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.referers({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics/top_links"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getTopLinks"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.topLinks({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/tags"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "createTag"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.create({
|
||||
tag: "<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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.create({
|
||||
name: "<value>",
|
||||
slug: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics/os"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getOSAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.os({});
|
||||
|
||||
// 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\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"<value>\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n const requestBody = {\n newWorkspaceId: \"<value>\",\n };\n \n const result = await dub.transfer(slug, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
||||
| `id` | *string* | :heavy_check_mark: | The unique identifier of the domain. | |
|
||||
| `slug` | *string* | :heavy_check_mark: | The domain name. | acme.com |
|
||||
| `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. | |
|
||||
|
||||
2
jsr.json
2
jsr.json
@@ -2,7 +2,7 @@
|
||||
|
||||
{
|
||||
"name": "dub",
|
||||
"version": "0.25.1",
|
||||
"version": "0.25.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.25.1",
|
||||
"version": "0.25.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "dub",
|
||||
"version": "0.25.1",
|
||||
"version": "0.25.2",
|
||||
"devDependencies": {
|
||||
"@types/jsonpath": "^0.2.4",
|
||||
"@types/node": "^20.12.7",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dub",
|
||||
"version": "0.25.1",
|
||||
"version": "0.25.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.25.1",
|
||||
sdkVersion: "0.25.2",
|
||||
genVersion: "2.314.0",
|
||||
userAgent: "speakeasy-sdk/typescript 0.25.1 2.314.0 0.0.1 dub",
|
||||
userAgent: "speakeasy-sdk/typescript 0.25.2 2.314.0 0.0.1 dub",
|
||||
} as const;
|
||||
|
||||
@@ -17,6 +17,10 @@ export const Type = {
|
||||
export type Type = (typeof Type)[keyof typeof Type];
|
||||
|
||||
export type DomainSchema = {
|
||||
/**
|
||||
* The unique identifier of the domain.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The domain name.
|
||||
*/
|
||||
@@ -61,6 +65,7 @@ export const Type$: z.ZodNativeEnum<typeof Type> = z.nativeEnum(Type);
|
||||
/** @internal */
|
||||
export namespace DomainSchema$ {
|
||||
export type Inbound = {
|
||||
id: string;
|
||||
slug: string;
|
||||
verified?: boolean | undefined;
|
||||
primary?: boolean | undefined;
|
||||
@@ -74,6 +79,7 @@ export namespace DomainSchema$ {
|
||||
|
||||
export const inboundSchema: z.ZodType<DomainSchema, z.ZodTypeDef, Inbound> = z
|
||||
.object({
|
||||
id: z.string(),
|
||||
slug: z.string(),
|
||||
verified: z.boolean().default(false),
|
||||
primary: z.boolean().default(false),
|
||||
@@ -86,6 +92,7 @@ export namespace DomainSchema$ {
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
id: v.id,
|
||||
slug: v.slug,
|
||||
verified: v.verified,
|
||||
primary: v.primary,
|
||||
@@ -99,6 +106,7 @@ export namespace DomainSchema$ {
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
id: string;
|
||||
slug: string;
|
||||
verified: boolean;
|
||||
primary: boolean;
|
||||
@@ -112,6 +120,7 @@ export namespace DomainSchema$ {
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DomainSchema> = z
|
||||
.object({
|
||||
id: z.string(),
|
||||
slug: z.string(),
|
||||
verified: z.boolean().default(false),
|
||||
primary: z.boolean().default(false),
|
||||
@@ -124,6 +133,7 @@ export namespace DomainSchema$ {
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
id: v.id,
|
||||
slug: v.slug,
|
||||
verified: v.verified,
|
||||
primary: v.primary,
|
||||
|
||||
Reference in New Issue
Block a user