mirror of
https://github.com/LukeHagar/dub-node.git
synced 2025-12-06 12:27:48 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.321.0
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
speakeasyVersion: 1.314.2
|
||||
speakeasyVersion: 1.321.0
|
||||
sources:
|
||||
my-first-source:
|
||||
sourceNamespace: my-first-source
|
||||
sourceRevisionDigest: sha256:164c06ded7b4e584a7e1d46fc0f20ebcf23bdb28abb5e4e2dea52b5aa34271fd
|
||||
sourceBlobDigest: sha256:a07c6f70c6d3df68db32b244fef1af447804b41f9c59fcfc1f989afcf4da1d37
|
||||
sourceRevisionDigest: sha256:a9ac6bc5d6ce4c38a9d9547e0f4c6e9a2fca2cf4ebab3883c84037051710f100
|
||||
sourceBlobDigest: sha256:1ff54ddea17d8f017d543e2fb965382649fc4054b40efb5284987a05fa636f6a
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
@@ -11,8 +11,8 @@ targets:
|
||||
my-first-target:
|
||||
source: my-first-source
|
||||
sourceNamespace: my-first-source
|
||||
sourceRevisionDigest: sha256:164c06ded7b4e584a7e1d46fc0f20ebcf23bdb28abb5e4e2dea52b5aa34271fd
|
||||
sourceBlobDigest: sha256:a07c6f70c6d3df68db32b244fef1af447804b41f9c59fcfc1f989afcf4da1d37
|
||||
sourceRevisionDigest: sha256:a9ac6bc5d6ce4c38a9d9547e0f4c6e9a2fca2cf4ebab3883c84037051710f100
|
||||
sourceBlobDigest: sha256:1ff54ddea17d8f017d543e2fb965382649fc4054b40efb5284987a05fa636f6a
|
||||
outLocation: /github/workspace/repo
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
|
||||
10
RELEASES.md
10
RELEASES.md
@@ -487,3 +487,13 @@ Based on:
|
||||
- [typescript v0.30.2] .
|
||||
### Releases
|
||||
- [NPM v0.30.2] https://www.npmjs.com/package/dub/v/0.30.2 - .
|
||||
|
||||
## 2024-06-27 01:19:01
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.321.0 (2.354.2) 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 - .
|
||||
830
codeSamples.yaml
830
codeSamples.yaml
@@ -3,11 +3,11 @@ info:
|
||||
title: CodeSamples overlay for typescript target
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $["paths"]["/workspaces/{idOrSlug}"]["get"]
|
||||
- target: $["paths"]["/analytics"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getWorkspace"
|
||||
"label": "retrieveAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -16,8 +16,226 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.workspaces.get({
|
||||
idOrSlug: "<value>",
|
||||
const result = await dub.analytics.retrieve({});
|
||||
|
||||
// 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"]["/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"]["/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:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getLinks"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.list({});
|
||||
|
||||
// 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:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "bulkCreateLinks"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.createMany([
|
||||
{
|
||||
url: "https://google/com",
|
||||
},
|
||||
]);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/qr"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getQRCode"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.qrCodes.get({
|
||||
url: "https://brief-micronutrient.org",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/track/sale"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "trackSale"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.track.sale({
|
||||
customerId: "<value>",
|
||||
amount: 996500,
|
||||
paymentProcessor: "shopify",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/track/customer"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "trackCustomer"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.track.customer({
|
||||
customerId: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/tags"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "createTag"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.tags.create({
|
||||
tag: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
@@ -44,6 +262,133 @@ actions:
|
||||
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"]["/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/count"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getLinksCount"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.count({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- 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"]["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"]["/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}"]["patch"]
|
||||
update:
|
||||
@@ -65,11 +410,11 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/track/sale"]["post"]
|
||||
- target: $["paths"]["/domains/{slug}/primary"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "trackSale"
|
||||
"label": "setPrimaryDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -78,10 +423,70 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.track.sale({
|
||||
customerId: "<value>",
|
||||
amount: 996500,
|
||||
paymentProcessor: "shopify",
|
||||
const result = await dub.domains.setPrimary("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"]["/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
|
||||
@@ -132,409 +537,4 @@ actions:
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "retrieveAnalytics"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.analytics.retrieve({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/tags"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "createTag"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.tags.create({
|
||||
tag: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains/{slug}/primary"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "setPrimaryDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.setPrimary("acme.com");
|
||||
|
||||
// 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"]["/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:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getLinks"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.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",
|
||||
});
|
||||
|
||||
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:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "bulkCreateLinks"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.createMany([
|
||||
{
|
||||
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"]["/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"]["/track/customer"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "trackCustomer"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.track.customer({
|
||||
customerId: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links/count"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getLinksCount"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.count({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
Reference in New Issue
Block a user