mirror of
https://github.com/LukeHagar/dub-node.git
synced 2025-12-06 04:19:37 +00:00
Merge pull request #100 from dubinc/speakeasy-sdk-regen-1715179091
chore: 🐝 Update SDK - Generate
This commit is contained in:
@@ -5,8 +5,8 @@ management:
|
|||||||
docVersion: 0.0.1
|
docVersion: 0.0.1
|
||||||
speakeasyVersion: 1.283.1
|
speakeasyVersion: 1.283.1
|
||||||
generationVersion: 2.324.0
|
generationVersion: 2.324.0
|
||||||
releaseVersion: 0.28.0
|
releaseVersion: 0.28.1
|
||||||
configChecksum: 20cfec24e8ffc74509679a1f0942fe7e
|
configChecksum: 57519beee2ffb4eaa09c3d40cdc10712
|
||||||
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
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ generation:
|
|||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: false
|
oAuth2ClientCredentialsEnabled: false
|
||||||
typescript:
|
typescript:
|
||||||
version: 0.28.0
|
version: 0.28.1
|
||||||
additionalDependencies:
|
additionalDependencies:
|
||||||
dependencies: {}
|
dependencies: {}
|
||||||
devDependencies:
|
devDependencies:
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ speakeasyVersion: 1.283.1
|
|||||||
sources:
|
sources:
|
||||||
my-first-source:
|
my-first-source:
|
||||||
sourceNamespace: my-first-source
|
sourceNamespace: my-first-source
|
||||||
sourceRevisionDigest: sha256:b43a4dbf6e1046455dbbc1d82d42ad674fc9ac4329ad56ea56b8fa871eb663fc
|
sourceRevisionDigest: sha256:a596b0820636c1e8167c5e9e6c27c095337ac44aa16ecdfaf7c9a9cfc67fe98b
|
||||||
sourceBlobDigest: sha256:e16837f81e17ab3177f10c0449b07608dcd0cc3f17b40a9a971ecc382c36b4b2
|
sourceBlobDigest: sha256:0b14928333e7abd7cb33d986d926af8a73a608fc45fa08c53fd9ced42cd5b61f
|
||||||
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:b43a4dbf6e1046455dbbc1d82d42ad674fc9ac4329ad56ea56b8fa871eb663fc
|
sourceRevisionDigest: sha256:a596b0820636c1e8167c5e9e6c27c095337ac44aa16ecdfaf7c9a9cfc67fe98b
|
||||||
sourceBlobDigest: sha256:e16837f81e17ab3177f10c0449b07608dcd0cc3f17b40a9a971ecc382c36b4b2
|
sourceBlobDigest: sha256:0b14928333e7abd7cb33d986d926af8a73a608fc45fa08c53fd9ced42cd5b61f
|
||||||
outLocation: /github/workspace/repo
|
outLocation: /github/workspace/repo
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
|
|||||||
12
RELEASES.md
12
RELEASES.md
@@ -236,4 +236,14 @@ Based on:
|
|||||||
### Generated
|
### Generated
|
||||||
- [typescript v0.28.0] .
|
- [typescript v0.28.0] .
|
||||||
### Releases
|
### Releases
|
||||||
- [NPM v0.28.0] https://www.npmjs.com/package/dub/v/0.28.0 - .
|
- [NPM v0.28.0] https://www.npmjs.com/package/dub/v/0.28.0 - .
|
||||||
|
|
||||||
|
## 2024-05-08 14:38:08
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.283.1 (2.324.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.28.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.28.1] https://www.npmjs.com/package/dub/v/0.28.1 - .
|
||||||
538
codeSamples.yaml
538
codeSamples.yaml
@@ -3,6 +3,116 @@ 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"]["/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/info"]["get"]
|
||||||
|
update:
|
||||||
|
"x-codeSamples":
|
||||||
|
- "lang": "typescript"
|
||||||
|
"label": "getLinkInfo"
|
||||||
|
"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/device"]["get"]
|
||||||
|
update:
|
||||||
|
"x-codeSamples":
|
||||||
|
- "lang": "typescript"
|
||||||
|
"label": "getDeviceAnalytics"
|
||||||
|
"source": |-
|
||||||
|
import { Dub } from "dub";
|
||||||
|
|
||||||
|
const dub = new Dub({
|
||||||
|
token: "DUB_API_KEY",
|
||||||
|
workspaceId: "<value>",
|
||||||
|
});
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const result = await dub.devices({});
|
||||||
|
|
||||||
|
// 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"]["/analytics/top_urls"]["get"]
|
- target: $["paths"]["/analytics/top_urls"]["get"]
|
||||||
update:
|
update:
|
||||||
"x-codeSamples":
|
"x-codeSamples":
|
||||||
@@ -24,11 +134,38 @@ actions:
|
|||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
- target: $["paths"]["/tags"]["post"]
|
- target: $["paths"]["/workspaces"]["get"]
|
||||||
update:
|
update:
|
||||||
"x-codeSamples":
|
"x-codeSamples":
|
||||||
- "lang": "typescript"
|
- "lang": "typescript"
|
||||||
"label": "createTag"
|
"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}/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"]["post"]
|
||||||
|
update:
|
||||||
|
"x-codeSamples":
|
||||||
|
- "lang": "typescript"
|
||||||
|
"label": "createLink"
|
||||||
"source": |-
|
"source": |-
|
||||||
import { Dub } from "dub";
|
import { Dub } from "dub";
|
||||||
|
|
||||||
@@ -39,7 +176,7 @@ actions:
|
|||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await dub.create({
|
const result = await dub.create({
|
||||||
tag: "<value>",
|
url: "https://google/com",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle the result
|
// Handle the result
|
||||||
@@ -67,6 +204,33 @@ actions:
|
|||||||
console.log(result)
|
console.log(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
- target: $["paths"]["/links/{linkId}"]["patch"]
|
||||||
|
update:
|
||||||
|
"x-codeSamples":
|
||||||
|
- "lang": "typescript"
|
||||||
|
"label": "updateLink"
|
||||||
|
"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"]["/analytics/country"]["get"]
|
||||||
|
update:
|
||||||
|
"x-codeSamples":
|
||||||
|
- "lang": "typescript"
|
||||||
|
"label": "getCountryAnalytics"
|
||||||
|
"source": |-
|
||||||
|
import { Dub } from "dub";
|
||||||
|
|
||||||
|
const dub = new Dub({
|
||||||
|
token: "DUB_API_KEY",
|
||||||
|
workspaceId: "<value>",
|
||||||
|
});
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const result = await dub.countries({});
|
||||||
|
|
||||||
|
// Handle the result
|
||||||
|
console.log(result)
|
||||||
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
- target: $["paths"]["/analytics/timeseries"]["get"]
|
- target: $["paths"]["/analytics/timeseries"]["get"]
|
||||||
update:
|
update:
|
||||||
@@ -88,6 +252,33 @@ actions:
|
|||||||
console.log(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"]["/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();
|
run();
|
||||||
- target: $["paths"]["/analytics/browser"]["get"]
|
- target: $["paths"]["/analytics/browser"]["get"]
|
||||||
update:
|
update:
|
||||||
@@ -131,11 +322,23 @@ actions:
|
|||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
- target: $["paths"]["/metatags"]["get"]
|
- target: $["paths"]["/domains/{slug}"]["delete"]
|
||||||
update:
|
update:
|
||||||
"x-codeSamples":
|
"x-codeSamples":
|
||||||
- "lang": "typescript"
|
- "lang": "typescript"
|
||||||
"label": "getMetatags"
|
"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"]
|
||||||
|
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"]["/links/bulk"]["post"]
|
||||||
|
update:
|
||||||
|
"x-codeSamples":
|
||||||
|
- "lang": "typescript"
|
||||||
|
"label": "bulkCreateLinks"
|
||||||
"source": |-
|
"source": |-
|
||||||
import { Dub } from "dub";
|
import { Dub } from "dub";
|
||||||
|
|
||||||
@@ -145,156 +348,11 @@ actions:
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await dub.get({
|
const result = await dub.createMany([
|
||||||
url: "https://dub.co",
|
{
|
||||||
});
|
url: "https://google/com",
|
||||||
|
},
|
||||||
// Handle the result
|
]);
|
||||||
console.log(result)
|
|
||||||
}
|
|
||||||
|
|
||||||
run();
|
|
||||||
- target: $["paths"]["/links/{linkId}"]["patch"]
|
|
||||||
update:
|
|
||||||
"x-codeSamples":
|
|
||||||
- "lang": "typescript"
|
|
||||||
"label": "updateLink"
|
|
||||||
"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"]["/analytics/clicks"]["get"]
|
|
||||||
update:
|
|
||||||
"x-codeSamples":
|
|
||||||
- "lang": "typescript"
|
|
||||||
"label": "getClicksAnalytics"
|
|
||||||
"source": |-
|
|
||||||
import { Dub } from "dub";
|
|
||||||
|
|
||||||
const dub = new Dub({
|
|
||||||
token: "DUB_API_KEY",
|
|
||||||
workspaceId: "<value>",
|
|
||||||
});
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
const result = await dub.clicks({});
|
|
||||||
|
|
||||||
// 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"]["/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"]["/analytics/country"]["get"]
|
|
||||||
update:
|
|
||||||
"x-codeSamples":
|
|
||||||
- "lang": "typescript"
|
|
||||||
"label": "getCountryAnalytics"
|
|
||||||
"source": |-
|
|
||||||
import { Dub } from "dub";
|
|
||||||
|
|
||||||
const dub = new Dub({
|
|
||||||
token: "DUB_API_KEY",
|
|
||||||
workspaceId: "<value>",
|
|
||||||
});
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
const result = await dub.countries({});
|
|
||||||
|
|
||||||
// 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"]["/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}/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"]["/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
|
// Handle the result
|
||||||
console.log(result)
|
console.log(result)
|
||||||
@@ -322,17 +380,11 @@ actions:
|
|||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
- target: $["paths"]["/domains/{slug}"]["delete"]
|
- target: $["paths"]["/analytics/clicks"]["get"]
|
||||||
update:
|
update:
|
||||||
"x-codeSamples":
|
"x-codeSamples":
|
||||||
- "lang": "typescript"
|
- "lang": "typescript"
|
||||||
"label": "deleteDomain"
|
"label": "getClicksAnalytics"
|
||||||
"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"]["post"]
|
|
||||||
update:
|
|
||||||
"x-codeSamples":
|
|
||||||
- "lang": "typescript"
|
|
||||||
"label": "createLink"
|
|
||||||
"source": |-
|
"source": |-
|
||||||
import { Dub } from "dub";
|
import { Dub } from "dub";
|
||||||
|
|
||||||
@@ -342,20 +394,24 @@ actions:
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await dub.create({
|
const result = await dub.clicks({});
|
||||||
url: "https://google/com",
|
|
||||||
});
|
|
||||||
|
|
||||||
// Handle the result
|
// Handle the result
|
||||||
console.log(result)
|
console.log(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
- target: $["paths"]["/links/bulk"]["post"]
|
- target: $["paths"]["/domains/{slug}"]["patch"]
|
||||||
update:
|
update:
|
||||||
"x-codeSamples":
|
"x-codeSamples":
|
||||||
- "lang": "typescript"
|
- "lang": "typescript"
|
||||||
"label": "bulkCreateLinks"
|
"label": "updateDomain"
|
||||||
|
"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"]["get"]
|
||||||
|
update:
|
||||||
|
"x-codeSamples":
|
||||||
|
- "lang": "typescript"
|
||||||
|
"label": "getLinks"
|
||||||
"source": |-
|
"source": |-
|
||||||
import { Dub } from "dub";
|
import { Dub } from "dub";
|
||||||
|
|
||||||
@@ -365,11 +421,28 @@ actions:
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await dub.createMany([
|
const result = await dub.list({});
|
||||||
{
|
|
||||||
url: "https://google/com",
|
// 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
|
// Handle the result
|
||||||
console.log(result)
|
console.log(result)
|
||||||
@@ -417,81 +490,6 @@ actions:
|
|||||||
console.log(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"]["/links/info"]["get"]
|
|
||||||
update:
|
|
||||||
"x-codeSamples":
|
|
||||||
- "lang": "typescript"
|
|
||||||
"label": "getLinkInfo"
|
|
||||||
"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"]["/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"]["/domains/{slug}"]["patch"]
|
|
||||||
update:
|
|
||||||
"x-codeSamples":
|
|
||||||
- "lang": "typescript"
|
|
||||||
"label": "updateDomain"
|
|
||||||
"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"]["/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();
|
run();
|
||||||
- target: $["paths"]["/workspaces/{idOrSlug}"]["get"]
|
- target: $["paths"]["/workspaces/{idOrSlug}"]["get"]
|
||||||
update:
|
update:
|
||||||
@@ -515,6 +513,29 @@ actions:
|
|||||||
console.log(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();
|
run();
|
||||||
- target: $["paths"]["/domains"]["post"]
|
- target: $["paths"]["/domains"]["post"]
|
||||||
update:
|
update:
|
||||||
@@ -538,25 +559,4 @@ actions:
|
|||||||
console.log(result)
|
console.log(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
|
||||||
- target: $["paths"]["/analytics/device"]["get"]
|
|
||||||
update:
|
|
||||||
"x-codeSamples":
|
|
||||||
- "lang": "typescript"
|
|
||||||
"label": "getDeviceAnalytics"
|
|
||||||
"source": |-
|
|
||||||
import { Dub } from "dub";
|
|
||||||
|
|
||||||
const dub = new Dub({
|
|
||||||
token: "DUB_API_KEY",
|
|
||||||
workspaceId: "<value>",
|
|
||||||
});
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
const result = await dub.devices({});
|
|
||||||
|
|
||||||
// Handle the result
|
|
||||||
console.log(result)
|
|
||||||
}
|
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
2
jsr.json
2
jsr.json
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "dub",
|
"name": "dub",
|
||||||
"version": "0.28.0",
|
"version": "0.28.1",
|
||||||
"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
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "dub",
|
"name": "dub",
|
||||||
"version": "0.28.0",
|
"version": "0.28.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "dub",
|
"name": "dub",
|
||||||
"version": "0.28.0",
|
"version": "0.28.1",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jsonpath": "^0.2.4",
|
"@types/jsonpath": "^0.2.4",
|
||||||
"@types/node": "^20.12.7",
|
"@types/node": "^20.12.7",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dub",
|
"name": "dub",
|
||||||
"version": "0.28.0",
|
"version": "0.28.1",
|
||||||
"author": "Dub",
|
"author": "Dub",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
|||||||
@@ -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.28.0",
|
sdkVersion: "0.28.1",
|
||||||
genVersion: "2.324.0",
|
genVersion: "2.324.0",
|
||||||
userAgent: "speakeasy-sdk/typescript 0.28.0 2.324.0 0.0.1 dub",
|
userAgent: "speakeasy-sdk/typescript 0.28.1 2.324.0 0.0.1 dub",
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
Reference in New Issue
Block a user