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.299.4 (#117)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
This commit is contained in:
committed by
GitHub
parent
4aa978d729
commit
fba9639cb1
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: f28179cc-ef59-426d-9e85-60cec22fc642
|
||||
management:
|
||||
docChecksum: 58f984453d09b11200ae524bf6ab56d2
|
||||
docChecksum: 51863c384b062f0d4c1dd02e14254615
|
||||
docVersion: 0.0.1
|
||||
speakeasyVersion: 1.299.1
|
||||
generationVersion: 2.338.5
|
||||
releaseVersion: 0.29.12
|
||||
configChecksum: a22618851e75846b6e022571d2dfa96c
|
||||
speakeasyVersion: 1.299.4
|
||||
generationVersion: 2.338.7
|
||||
releaseVersion: 0.29.13
|
||||
configChecksum: f29df458bc70edf5911d8ec36c741de5
|
||||
repoURL: https://github.com/dubinc/dub-node.git
|
||||
installationURL: https://github.com/dubinc/dub-node
|
||||
published: true
|
||||
@@ -279,11 +279,14 @@ generatedFiles:
|
||||
- docs/models/operations/transferdomainglobals.md
|
||||
- docs/models/operations/transferdomainrequestbody.md
|
||||
- docs/models/operations/transferdomainrequest.md
|
||||
- docs/models/operations/trackleadglobals.md
|
||||
- docs/models/operations/trackleadrequestbody.md
|
||||
- docs/models/operations/trackleadresponsebody.md
|
||||
- docs/models/operations/tracksaleglobals.md
|
||||
- docs/models/operations/paymentprocessor.md
|
||||
- docs/models/operations/tracksalerequestbody.md
|
||||
- docs/models/operations/tracksaleresponsebody.md
|
||||
- docs/models/operations/trackcustomerglobals.md
|
||||
- docs/models/operations/trackcustomerrequestbody.md
|
||||
- docs/models/operations/trackcustomerresponsebody.md
|
||||
- docs/models/operations/getmetatagsrequest.md
|
||||
|
||||
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
typescript:
|
||||
version: 0.29.12
|
||||
version: 0.29.13
|
||||
additionalDependencies:
|
||||
dependencies: {}
|
||||
devDependencies:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
speakeasyVersion: 1.299.1
|
||||
speakeasyVersion: 1.299.4
|
||||
sources:
|
||||
my-first-source:
|
||||
sourceNamespace: my-first-source
|
||||
sourceRevisionDigest: sha256:094ba510458650e8b32d7a4a655e53e4c7b531c25b6e070882ee5b187504ac42
|
||||
sourceBlobDigest: sha256:11824f29a9b18d3141c8f88c15769c49f56b187d8844549d8f6070550a0d2c76
|
||||
sourceRevisionDigest: sha256:bb4192687fd363eff689a81497aa7519f010f8f3def49cabb20ce1a8bce61fa2
|
||||
sourceBlobDigest: sha256:e9c849908d21e7d4406be80d292b20a9c0af00a329a6543539e566d41b7cbedf
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
@@ -11,8 +11,8 @@ targets:
|
||||
my-first-target:
|
||||
source: my-first-source
|
||||
sourceNamespace: my-first-source
|
||||
sourceRevisionDigest: sha256:094ba510458650e8b32d7a4a655e53e4c7b531c25b6e070882ee5b187504ac42
|
||||
sourceBlobDigest: sha256:11824f29a9b18d3141c8f88c15769c49f56b187d8844549d8f6070550a0d2c76
|
||||
sourceRevisionDigest: sha256:bb4192687fd363eff689a81497aa7519f010f8f3def49cabb20ce1a8bce61fa2
|
||||
sourceBlobDigest: sha256:e9c849908d21e7d4406be80d292b20a9c0af00a329a6543539e566d41b7cbedf
|
||||
outLocation: /github/workspace/repo
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
|
||||
12
RELEASES.md
12
RELEASES.md
@@ -386,4 +386,14 @@ Based on:
|
||||
### Generated
|
||||
- [typescript v0.29.12] .
|
||||
### Releases
|
||||
- [NPM v0.29.12] https://www.npmjs.com/package/dub/v/0.29.12 - .
|
||||
- [NPM v0.29.12] https://www.npmjs.com/package/dub/v/0.29.12 - .
|
||||
|
||||
## 2024-05-31 15:32:42
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.29.13] .
|
||||
### Releases
|
||||
- [NPM v0.29.13] https://www.npmjs.com/package/dub/v/0.29.13 - .
|
||||
630
codeSamples.yaml
630
codeSamples.yaml
@@ -3,11 +3,11 @@ info:
|
||||
title: CodeSamples overlay for typescript target
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $["paths"]["/workspaces"]["get"]
|
||||
- target: $["paths"]["/links/count"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getWorkspaces"
|
||||
"label": "getLinksCount"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -17,18 +17,18 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.workspaces.list();
|
||||
const result = await dub.links.count({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains/{slug}"]["delete"]
|
||||
- target: $["paths"]["/links/{linkId}"]["delete"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "deleteDomain"
|
||||
"label": "deleteLink"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -38,18 +38,18 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.delete("acme.com");
|
||||
const result = await dub.links.delete("<value>");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links"]["get"]
|
||||
- target: $["paths"]["/links/bulk"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getLinks"
|
||||
"label": "bulkCreateLinks"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -59,7 +59,78 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.list({});
|
||||
const result = await dub.links.createMany([
|
||||
{
|
||||
url: "https://google/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";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.setPrimary("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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.track.customer({
|
||||
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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.upsert({
|
||||
url: "https://google/com",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -88,6 +159,160 @@ 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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.tags.list({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains/{slug}"]["patch"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "updateDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.update("acme.com", {});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/track/sale"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "trackSale"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
import { PaymentProcessor } from "dub/models/operations";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.track.sale({
|
||||
customerId: "<value>",
|
||||
amount: 996500,
|
||||
paymentProcessor: PaymentProcessor.Shopify,
|
||||
});
|
||||
|
||||
// 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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.create({
|
||||
url: "https://google/com",
|
||||
});
|
||||
|
||||
// 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.links.get({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links/{linkId}"]["patch"]
|
||||
update:
|
||||
@@ -112,11 +337,11 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics"]["get"]
|
||||
- target: $["paths"]["/tags"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "retrieveAnalytics"
|
||||
"label": "createTag"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -126,7 +351,74 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.analytics.retrieve({});
|
||||
const result = await dub.tags.create({
|
||||
tag: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
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.domains.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";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.transfer("acme.com", {
|
||||
newWorkspaceId: "<value>",
|
||||
});
|
||||
|
||||
// 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.links.list({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -180,11 +472,11 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains"]["get"]
|
||||
- target: $["paths"]["/domains"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "listDomains"
|
||||
"label": "addDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -194,92 +486,8 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.list({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains/{slug}"]["patch"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "updateDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.update("acme.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.links.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";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.delete("<value>");
|
||||
|
||||
// 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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.track.customer({
|
||||
customerId: "<value>",
|
||||
const result = await dub.domains.add({
|
||||
slug: "acme.com",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
@@ -287,11 +495,11 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/metatags"]["get"]
|
||||
- target: $["paths"]["/domains/{slug}"]["delete"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getMetatags"
|
||||
"label": "deleteDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -301,32 +509,7 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.metatags.get({
|
||||
url: "https://dub.co",
|
||||
});
|
||||
|
||||
// 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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.transfer("acme.com", {
|
||||
newWorkspaceId: "<value>",
|
||||
});
|
||||
const result = await dub.domains.delete("acme.com");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -358,11 +541,11 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains"]["post"]
|
||||
- target: $["paths"]["/metatags"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "addDomain"
|
||||
"label": "getMetatags"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -372,191 +555,8 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.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";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.setPrimary("acme.com");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/track/sale"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "trackSale"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
import { PaymentProcessor } from "dub/models/operations";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.track.sale({
|
||||
customerId: "<value>",
|
||||
amount: 996500,
|
||||
paymentProcessor: PaymentProcessor.Shopify,
|
||||
});
|
||||
|
||||
// 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.links.get({});
|
||||
|
||||
// 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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.createMany([
|
||||
{
|
||||
url: "https://google/com",
|
||||
},
|
||||
]);
|
||||
|
||||
// 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.tags.list({});
|
||||
|
||||
// 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.tags.create({
|
||||
tag: "<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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.create({
|
||||
url: "https://google/com",
|
||||
});
|
||||
|
||||
// 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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.upsert({
|
||||
url: "https://google/com",
|
||||
const result = await dub.metatags.get({
|
||||
url: "https://dub.co",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
|
||||
9
docs/models/operations/trackcustomerglobals.md
Normal file
9
docs/models/operations/trackcustomerglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# TrackCustomerGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/trackleadglobals.md
Normal file
9
docs/models/operations/trackleadglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# TrackLeadGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
9
docs/models/operations/tracksaleglobals.md
Normal file
9
docs/models/operations/tracksaleglobals.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# TrackSaleGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `workspaceId` | *string* | :heavy_check_mark: | N/A |
|
||||
| ~~`projectSlug`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
|
||||
2
jsr.json
2
jsr.json
@@ -2,7 +2,7 @@
|
||||
|
||||
{
|
||||
"name": "dub",
|
||||
"version": "0.29.12",
|
||||
"version": "0.29.13",
|
||||
"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.29.12",
|
||||
"version": "0.29.13",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "dub",
|
||||
"version": "0.29.12",
|
||||
"version": "0.29.13",
|
||||
"devDependencies": {
|
||||
"@types/jsonpath": "^0.2.4",
|
||||
"@types/node": "^20.12.7",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dub",
|
||||
"version": "0.29.12",
|
||||
"version": "0.29.13",
|
||||
"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.29.12",
|
||||
genVersion: "2.338.5",
|
||||
userAgent: "speakeasy-sdk/typescript 0.29.12 2.338.5 0.0.1 dub",
|
||||
sdkVersion: "0.29.13",
|
||||
genVersion: "2.338.7",
|
||||
userAgent: "speakeasy-sdk/typescript 0.29.13 2.338.7 0.0.1 dub",
|
||||
} as const;
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
|
||||
import * as z from "zod";
|
||||
|
||||
export type TrackCustomerGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export type TrackCustomerRequestBody = {
|
||||
/**
|
||||
* This is the unique identifier for the customer in the client's app. This is used to track the customer's journey.
|
||||
@@ -33,6 +41,38 @@ export type TrackCustomerResponseBody = {
|
||||
customerAvatar: string | null;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace TrackCustomerGlobals$ {
|
||||
export const inboundSchema: z.ZodType<TrackCustomerGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackCustomerGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace TrackCustomerRequestBody$ {
|
||||
export const inboundSchema: z.ZodType<TrackCustomerRequestBody, z.ZodTypeDef, unknown> = z
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
|
||||
import * as z from "zod";
|
||||
|
||||
export type TrackLeadGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export type TrackLeadRequestBody = {
|
||||
/**
|
||||
* The ID of the click in th Dub. You can read this value from `dclid` cookie.
|
||||
@@ -48,6 +56,38 @@ export type TrackLeadResponseBody = {
|
||||
metadata?: { [k: string]: any } | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace TrackLeadGlobals$ {
|
||||
export const inboundSchema: z.ZodType<TrackLeadGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackLeadGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace TrackLeadRequestBody$ {
|
||||
export const inboundSchema: z.ZodType<TrackLeadRequestBody, z.ZodTypeDef, unknown> = z
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
import { ClosedEnum } from "../../types";
|
||||
import * as z from "zod";
|
||||
|
||||
export type TrackSaleGlobals = {
|
||||
workspaceId: string;
|
||||
/**
|
||||
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
||||
*/
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The payment processor via which the sale was made.
|
||||
*/
|
||||
@@ -57,6 +65,38 @@ export type TrackSaleResponseBody = {
|
||||
metadata: { [k: string]: any } | null;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export namespace TrackSaleGlobals$ {
|
||||
export const inboundSchema: z.ZodType<TrackSaleGlobals, z.ZodTypeDef, unknown> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
|
||||
export type Outbound = {
|
||||
workspaceId: string;
|
||||
projectSlug?: string | undefined;
|
||||
};
|
||||
|
||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackSaleGlobals> = z
|
||||
.object({
|
||||
workspaceId: z.string(),
|
||||
projectSlug: z.string().optional(),
|
||||
})
|
||||
.transform((v) => {
|
||||
return {
|
||||
workspaceId: v.workspaceId,
|
||||
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export namespace PaymentProcessor$ {
|
||||
export const inboundSchema = z.nativeEnum(PaymentProcessor);
|
||||
|
||||
@@ -64,7 +64,18 @@ export class Track extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/track/lead")();
|
||||
|
||||
const query$ = "";
|
||||
const query$ = [
|
||||
enc$.encodeForm("projectSlug", this.options$.projectSlug, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("&");
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -159,7 +170,18 @@ export class Track extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/track/sale")();
|
||||
|
||||
const query$ = "";
|
||||
const query$ = [
|
||||
enc$.encodeForm("projectSlug", this.options$.projectSlug, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("&");
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -255,7 +277,18 @@ export class Track extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/track/customer")();
|
||||
|
||||
const query$ = "";
|
||||
const query$ = [
|
||||
enc$.encodeForm("projectSlug", this.options$.projectSlug, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("&");
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
|
||||
Reference in New Issue
Block a user