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:
|
sources:
|
||||||
my-first-source:
|
my-first-source:
|
||||||
sourceNamespace: my-first-source
|
sourceNamespace: my-first-source
|
||||||
sourceRevisionDigest: sha256:164c06ded7b4e584a7e1d46fc0f20ebcf23bdb28abb5e4e2dea52b5aa34271fd
|
sourceRevisionDigest: sha256:a9ac6bc5d6ce4c38a9d9547e0f4c6e9a2fca2cf4ebab3883c84037051710f100
|
||||||
sourceBlobDigest: sha256:a07c6f70c6d3df68db32b244fef1af447804b41f9c59fcfc1f989afcf4da1d37
|
sourceBlobDigest: sha256:1ff54ddea17d8f017d543e2fb965382649fc4054b40efb5284987a05fa636f6a
|
||||||
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:164c06ded7b4e584a7e1d46fc0f20ebcf23bdb28abb5e4e2dea52b5aa34271fd
|
sourceRevisionDigest: sha256:a9ac6bc5d6ce4c38a9d9547e0f4c6e9a2fca2cf4ebab3883c84037051710f100
|
||||||
sourceBlobDigest: sha256:a07c6f70c6d3df68db32b244fef1af447804b41f9c59fcfc1f989afcf4da1d37
|
sourceBlobDigest: sha256:1ff54ddea17d8f017d543e2fb965382649fc4054b40efb5284987a05fa636f6a
|
||||||
outLocation: /github/workspace/repo
|
outLocation: /github/workspace/repo
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
|
|||||||
10
RELEASES.md
10
RELEASES.md
@@ -486,4 +486,14 @@ Based on:
|
|||||||
### Generated
|
### Generated
|
||||||
- [typescript v0.30.2] .
|
- [typescript v0.30.2] .
|
||||||
### Releases
|
### 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 - .
|
- [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
|
title: CodeSamples overlay for typescript target
|
||||||
version: 0.0.0
|
version: 0.0.0
|
||||||
actions:
|
actions:
|
||||||
- target: $["paths"]["/workspaces/{idOrSlug}"]["get"]
|
- target: $["paths"]["/analytics"]["get"]
|
||||||
update:
|
update:
|
||||||
"x-codeSamples":
|
"x-codeSamples":
|
||||||
- "lang": "typescript"
|
- "lang": "typescript"
|
||||||
"label": "getWorkspace"
|
"label": "retrieveAnalytics"
|
||||||
"source": |-
|
"source": |-
|
||||||
import { Dub } from "dub";
|
import { Dub } from "dub";
|
||||||
|
|
||||||
@@ -16,8 +16,226 @@ actions:
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await dub.workspaces.get({
|
const result = await dub.analytics.retrieve({});
|
||||||
idOrSlug: "<value>",
|
|
||||||
|
// 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
|
// Handle the result
|
||||||
@@ -44,6 +262,133 @@ actions:
|
|||||||
console.log(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"]["/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();
|
run();
|
||||||
- target: $["paths"]["/domains/{slug}"]["patch"]
|
- target: $["paths"]["/domains/{slug}"]["patch"]
|
||||||
update:
|
update:
|
||||||
@@ -65,11 +410,11 @@ actions:
|
|||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
- target: $["paths"]["/track/sale"]["post"]
|
- target: $["paths"]["/domains/{slug}/primary"]["post"]
|
||||||
update:
|
update:
|
||||||
"x-codeSamples":
|
"x-codeSamples":
|
||||||
- "lang": "typescript"
|
- "lang": "typescript"
|
||||||
"label": "trackSale"
|
"label": "setPrimaryDomain"
|
||||||
"source": |-
|
"source": |-
|
||||||
import { Dub } from "dub";
|
import { Dub } from "dub";
|
||||||
|
|
||||||
@@ -78,10 +423,70 @@ actions:
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await dub.track.sale({
|
const result = await dub.domains.setPrimary("acme.com");
|
||||||
customerId: "<value>",
|
|
||||||
amount: 996500,
|
// Handle the result
|
||||||
paymentProcessor: "shopify",
|
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
|
// Handle the result
|
||||||
@@ -132,409 +537,4 @@ actions:
|
|||||||
console.log(result)
|
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();
|
run();
|
||||||
|
|||||||
Reference in New Issue
Block a user