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.306.0 (#124)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
This commit is contained in:
committed by
GitHub
parent
bf02cec182
commit
370eb1a88c
@@ -3,10 +3,10 @@ id: f28179cc-ef59-426d-9e85-60cec22fc642
|
||||
management:
|
||||
docChecksum: ba3e83845a082a6c2321d0eeaaf9c23c
|
||||
docVersion: 0.0.1
|
||||
speakeasyVersion: 1.300.1
|
||||
generationVersion: 2.339.1
|
||||
releaseVersion: 0.29.17
|
||||
configChecksum: abcc577a6e8ac99c2f094f6ed12af47e
|
||||
speakeasyVersion: 1.306.0
|
||||
generationVersion: 2.340.3
|
||||
releaseVersion: 0.29.18
|
||||
configChecksum: 7b734b1bea3f5aa02fa180a183d84da8
|
||||
repoURL: https://github.com/dubinc/dub-node.git
|
||||
installationURL: https://github.com/dubinc/dub-node
|
||||
published: true
|
||||
@@ -14,7 +14,7 @@ features:
|
||||
typescript:
|
||||
additionalDependencies: 0.1.0
|
||||
constsAndDefaults: 0.1.5
|
||||
core: 3.9.12
|
||||
core: 3.9.13
|
||||
deprecations: 2.81.1
|
||||
examples: 2.81.4
|
||||
flattening: 2.81.1
|
||||
|
||||
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
typescript:
|
||||
version: 0.29.17
|
||||
version: 0.29.18
|
||||
additionalDependencies:
|
||||
dependencies: {}
|
||||
devDependencies:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
speakeasyVersion: 1.300.1
|
||||
speakeasyVersion: 1.306.0
|
||||
sources:
|
||||
my-first-source:
|
||||
sourceNamespace: my-first-source
|
||||
sourceRevisionDigest: sha256:3cfe493866b6d3030980739fbfc34e87a9eb315bc561193ed4369d875111433d
|
||||
sourceBlobDigest: sha256:e5214a62fe8f5b011d691272b615a89443f1316b7654f7edcf5595a793af0e13
|
||||
sourceRevisionDigest: sha256:8c17755b9d3c07391761c3012a50f04523eabcd578d197315dfc8e9e84747c97
|
||||
sourceBlobDigest: sha256:22ce9ef46e6c3905a84147071418d68f197fd93ff71b7c5e732eedecbec4a563
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
@@ -11,8 +11,8 @@ targets:
|
||||
my-first-target:
|
||||
source: my-first-source
|
||||
sourceNamespace: my-first-source
|
||||
sourceRevisionDigest: sha256:3cfe493866b6d3030980739fbfc34e87a9eb315bc561193ed4369d875111433d
|
||||
sourceBlobDigest: sha256:e5214a62fe8f5b011d691272b615a89443f1316b7654f7edcf5595a793af0e13
|
||||
sourceRevisionDigest: sha256:8c17755b9d3c07391761c3012a50f04523eabcd578d197315dfc8e9e84747c97
|
||||
sourceBlobDigest: sha256:22ce9ef46e6c3905a84147071418d68f197fd93ff71b7c5e732eedecbec4a563
|
||||
outLocation: /github/workspace/repo
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
|
||||
10
RELEASES.md
10
RELEASES.md
@@ -437,3 +437,13 @@ Based on:
|
||||
- [typescript v0.29.17] .
|
||||
### Releases
|
||||
- [NPM v0.29.17] https://www.npmjs.com/package/dub/v/0.29.17 - .
|
||||
|
||||
## 2024-06-13 01:18:11
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.306.0 (2.340.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.29.18] .
|
||||
### Releases
|
||||
- [NPM v0.29.18] https://www.npmjs.com/package/dub/v/0.29.18 - .
|
||||
586
codeSamples.yaml
586
codeSamples.yaml
@@ -3,29 +3,6 @@ info:
|
||||
title: CodeSamples overlay for typescript target
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- 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.qrCodes.get({
|
||||
url: "https://brief-micronutrient.org",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
@@ -47,11 +24,11 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains/{slug}/transfer"]["post"]
|
||||
- target: $["paths"]["/domains/{slug}"]["patch"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "transferDomain"
|
||||
"label": "updateDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -61,8 +38,31 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.transfer("acme.com", {
|
||||
newWorkspaceId: "<value>",
|
||||
const result = await dub.domains.update("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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.track.lead({
|
||||
clickId: "<value>",
|
||||
eventName: "Sign up",
|
||||
customerId: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
@@ -70,11 +70,11 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links/count"]["get"]
|
||||
- target: $["paths"]["/links/{linkId}"]["delete"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getLinksCount"
|
||||
"label": "deleteLink"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -84,7 +84,51 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.count({});
|
||||
const result = await dub.links.delete("<value>");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links/{linkId}"]["patch"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "updateLink"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.update("<value>", {
|
||||
url: "https://google/com",
|
||||
});
|
||||
|
||||
// Handle the 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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.analytics.retrieve({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -135,13 +179,14 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/domains"]["post"]
|
||||
- target: $["paths"]["/track/sale"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "addDomain"
|
||||
"label": "trackSale"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
import { PaymentProcessor } from "dub/models/operations";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
@@ -149,56 +194,16 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.add({
|
||||
slug: "acme.com",
|
||||
const result = await dub.track.sale({
|
||||
customerId: "<value>",
|
||||
amount: 996500,
|
||||
paymentProcessor: PaymentProcessor.Shopify,
|
||||
});
|
||||
|
||||
// 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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.delete("acme.com");
|
||||
|
||||
// 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/customer"]["post"]
|
||||
update:
|
||||
@@ -222,166 +227,6 @@ actions:
|
||||
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)
|
||||
}
|
||||
|
||||
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:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "updateLink"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.update("<value>", {
|
||||
url: "https://google/com",
|
||||
});
|
||||
|
||||
// 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"]["/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.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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.workspaces.get({
|
||||
idOrSlug: "<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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.setPrimary("acme.com");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/metatags"]["get"]
|
||||
update:
|
||||
@@ -428,6 +273,29 @@ actions:
|
||||
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)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links"]["get"]
|
||||
update:
|
||||
@@ -450,11 +318,11 @@ actions:
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/links/{linkId}"]["delete"]
|
||||
- target: $["paths"]["/links/bulk"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "deleteLink"
|
||||
"label": "bulkCreateLinks"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -464,18 +332,22 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.links.delete("<value>");
|
||||
const result = await dub.links.createMany([
|
||||
{
|
||||
url: "https://google/com",
|
||||
},
|
||||
]);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/analytics"]["get"]
|
||||
- target: $["paths"]["/domains"]["post"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "retrieveAnalytics"
|
||||
"label": "addDomain"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
@@ -485,7 +357,186 @@ actions:
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.analytics.retrieve({});
|
||||
const result = await dub.domains.add({
|
||||
slug: "acme.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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.workspaces.create({
|
||||
name: "<value>",
|
||||
slug: "<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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.transfer("acme.com", {
|
||||
newWorkspaceId: "<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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.domains.delete("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/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"]["/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.qrCodes.get({
|
||||
url: "https://brief-micronutrient.org",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/workspaces/{idOrSlug}"]["get"]
|
||||
update:
|
||||
"x-codeSamples":
|
||||
- "lang": "typescript"
|
||||
"label": "getWorkspace"
|
||||
"source": |-
|
||||
import { Dub } from "dub";
|
||||
|
||||
const dub = new Dub({
|
||||
token: "DUB_API_KEY",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await dub.workspaces.get({
|
||||
idOrSlug: "<value>",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -512,55 +563,4 @@ actions:
|
||||
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",
|
||||
workspaceId: "<value>",
|
||||
});
|
||||
|
||||
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"]["/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();
|
||||
|
||||
2
jsr.json
2
jsr.json
@@ -2,7 +2,7 @@
|
||||
|
||||
{
|
||||
"name": "dub",
|
||||
"version": "0.29.17",
|
||||
"version": "0.29.18",
|
||||
"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.17",
|
||||
"version": "0.29.18",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "dub",
|
||||
"version": "0.29.17",
|
||||
"version": "0.29.18",
|
||||
"devDependencies": {
|
||||
"@types/jsonpath": "^0.2.4",
|
||||
"@types/node": "^20.12.7",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dub",
|
||||
"version": "0.29.17",
|
||||
"version": "0.29.18",
|
||||
"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.17",
|
||||
genVersion: "2.339.1",
|
||||
userAgent: "speakeasy-sdk/typescript 0.29.17 2.339.1 0.0.1 dub",
|
||||
sdkVersion: "0.29.18",
|
||||
genVersion: "2.340.3",
|
||||
userAgent: "speakeasy-sdk/typescript 0.29.18 2.340.3 0.0.1 dub",
|
||||
} as const;
|
||||
|
||||
@@ -383,3 +383,49 @@ function mapDefinedEntries<K, V, R>(
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
export function queryJoin(...args: string[]): string {
|
||||
return args.filter(Boolean).join("&");
|
||||
}
|
||||
|
||||
type QueryEncoderOptions = {
|
||||
explode?: boolean;
|
||||
charEncoding?: "percent" | "none";
|
||||
};
|
||||
|
||||
type QueryEncoder = (
|
||||
key: string,
|
||||
value: unknown,
|
||||
options?: QueryEncoderOptions,
|
||||
) => string;
|
||||
|
||||
type BulkQueryEncoder = (
|
||||
values: Record<string, unknown>,
|
||||
options?: QueryEncoderOptions,
|
||||
) => string;
|
||||
|
||||
export function queryEncoder(f: QueryEncoder): BulkQueryEncoder {
|
||||
const bulkEncode = function (
|
||||
values: Record<string, unknown>,
|
||||
options?: QueryEncoderOptions,
|
||||
): string {
|
||||
const opts: QueryEncoderOptions = {
|
||||
...options,
|
||||
explode: options?.explode ?? true,
|
||||
charEncoding: options?.charEncoding ?? "percent",
|
||||
};
|
||||
|
||||
const encoded = Object.entries(values).map(([key, value]) => {
|
||||
return f(key, value, opts);
|
||||
});
|
||||
return queryJoin(...encoded);
|
||||
};
|
||||
|
||||
return bulkEncode;
|
||||
}
|
||||
|
||||
export const encodeJSONQuery = queryEncoder(encodeJSON);
|
||||
export const encodeFormQuery = queryEncoder(encodeForm);
|
||||
export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited);
|
||||
export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited);
|
||||
export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { SDKHooks } from "../hooks";
|
||||
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
|
||||
import * as enc$ from "../lib/encodings";
|
||||
import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings";
|
||||
import { HTTPClient } from "../lib/http";
|
||||
import * as schemas$ from "../lib/schemas";
|
||||
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
||||
@@ -62,59 +62,30 @@ export class Analytics extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/analytics")();
|
||||
|
||||
const query$ = [
|
||||
enc$.encodeForm("browser", payload$.browser, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("city", payload$.city, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("country", payload$.country, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("device", payload$.device, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("end", payload$.end, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("event", payload$.event, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("externalId", payload$.externalId, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("groupBy", payload$.groupBy, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("interval", payload$.interval, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("linkId", payload$.linkId, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("projectSlug", this.options$.projectSlug, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("qr", payload$.qr, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("referer", payload$.referer, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("root", payload$.root, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("start", payload$.start, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("timezone", payload$.timezone, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
key: payload$.key,
|
||||
linkId: payload$.linkId,
|
||||
device: payload$.device,
|
||||
browser: payload$.browser,
|
||||
tagId: payload$.tagId,
|
||||
city: payload$.city,
|
||||
url: payload$.url,
|
||||
workspaceId: this.options$.workspaceId,
|
||||
event: payload$.event,
|
||||
domain: payload$.domain,
|
||||
externalId: payload$.externalId,
|
||||
timezone: payload$.timezone,
|
||||
country: payload$.country,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
qr: payload$.qr,
|
||||
groupBy: payload$.groupBy,
|
||||
interval: payload$.interval,
|
||||
start: payload$.start,
|
||||
os: payload$.os,
|
||||
referer: payload$.referer,
|
||||
end: payload$.end,
|
||||
root: payload$.root,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
|
||||
import { SDKHooks } from "../hooks";
|
||||
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
|
||||
import * as enc$ from "../lib/encodings";
|
||||
import {
|
||||
encodeFormQuery as encodeFormQuery$,
|
||||
encodeJSON as encodeJSON$,
|
||||
encodeSimple as encodeSimple$,
|
||||
} from "../lib/encodings";
|
||||
import { HTTPClient } from "../lib/http";
|
||||
import * as schemas$ from "../lib/schemas";
|
||||
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
||||
@@ -58,18 +62,10 @@ export class Domains extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/domains")();
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -159,22 +155,14 @@ export class Domains extends ClientSDK {
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ =
|
||||
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
|
||||
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
||||
|
||||
const path$ = this.templateURLComponent("/domains")();
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -268,25 +256,14 @@ export class Domains extends ClientSDK {
|
||||
const body$ = null;
|
||||
|
||||
const pathParams$ = {
|
||||
slug: enc$.encodeSimple("slug", payload$.slug, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
slug: encodeSimple$("slug", payload$.slug, { explode: false, charEncoding: "percent" }),
|
||||
};
|
||||
const path$ = this.templateURLComponent("/domains/{slug}")(pathParams$);
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -380,28 +357,17 @@ export class Domains extends ClientSDK {
|
||||
(value$) => operations.UpdateDomainRequest$.outboundSchema.parse(value$),
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
|
||||
const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true });
|
||||
|
||||
const pathParams$ = {
|
||||
slug: enc$.encodeSimple("slug", payload$.slug, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
slug: encodeSimple$("slug", payload$.slug, { explode: false, charEncoding: "percent" }),
|
||||
};
|
||||
const path$ = this.templateURLComponent("/domains/{slug}")(pathParams$);
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -492,25 +458,14 @@ export class Domains extends ClientSDK {
|
||||
const body$ = null;
|
||||
|
||||
const pathParams$ = {
|
||||
slug: enc$.encodeSimple("slug", payload$.slug, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
slug: encodeSimple$("slug", payload$.slug, { explode: false, charEncoding: "percent" }),
|
||||
};
|
||||
const path$ = this.templateURLComponent("/domains/{slug}/primary")(pathParams$);
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -604,28 +559,17 @@ export class Domains extends ClientSDK {
|
||||
(value$) => operations.TransferDomainRequest$.outboundSchema.parse(value$),
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
|
||||
const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true });
|
||||
|
||||
const pathParams$ = {
|
||||
slug: enc$.encodeSimple("slug", payload$.slug, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
slug: encodeSimple$("slug", payload$.slug, { explode: false, charEncoding: "percent" }),
|
||||
};
|
||||
const path$ = this.templateURLComponent("/domains/{slug}/transfer")(pathParams$);
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
|
||||
216
src/sdk/links.ts
216
src/sdk/links.ts
@@ -4,7 +4,11 @@
|
||||
|
||||
import { SDKHooks } from "../hooks";
|
||||
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
|
||||
import * as enc$ from "../lib/encodings";
|
||||
import {
|
||||
encodeFormQuery as encodeFormQuery$,
|
||||
encodeJSON as encodeJSON$,
|
||||
encodeSimple as encodeSimple$,
|
||||
} from "../lib/encodings";
|
||||
import { HTTPClient } from "../lib/http";
|
||||
import * as schemas$ from "../lib/schemas";
|
||||
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
||||
@@ -64,37 +68,20 @@ export class Links extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/links")();
|
||||
|
||||
const query$ = [
|
||||
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("page", payload$.page, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("projectSlug", this.options$.projectSlug, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("search", payload$.search, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("showArchived", payload$.showArchived, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("sort", payload$.sort, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("tagIds", payload$.tagIds, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("tagNames", payload$.tagNames, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("userId", payload$.userId, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("withTags", payload$.withTags, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
tagId: payload$.tagId,
|
||||
sort: payload$.sort,
|
||||
page: payload$.page,
|
||||
workspaceId: this.options$.workspaceId,
|
||||
domain: payload$.domain,
|
||||
tagIds: payload$.tagIds,
|
||||
tagNames: payload$.tagNames,
|
||||
search: payload$.search,
|
||||
userId: payload$.userId,
|
||||
showArchived: payload$.showArchived,
|
||||
withTags: payload$.withTags,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -185,22 +172,14 @@ export class Links extends ClientSDK {
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ =
|
||||
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
|
||||
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
||||
|
||||
const path$ = this.templateURLComponent("/links")();
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -293,39 +272,19 @@ export class Links extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/links/count")();
|
||||
|
||||
const query$ = [
|
||||
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("groupBy", payload$.groupBy, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("projectSlug", this.options$.projectSlug, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("search", payload$.search, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("showArchived", payload$.showArchived, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("tagId", payload$.tagId, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("tagIds", payload$.tagIds, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("tagNames", payload$.tagNames, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("userId", payload$.userId, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("withTags", payload$.withTags, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
tagIds: payload$.tagIds,
|
||||
tagNames: payload$.tagNames,
|
||||
groupBy: payload$.groupBy,
|
||||
userId: payload$.userId,
|
||||
showArchived: payload$.showArchived,
|
||||
withTags: payload$.withTags,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
domain: payload$.domain,
|
||||
tagId: payload$.tagId,
|
||||
search: payload$.search,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -418,25 +377,14 @@ export class Links extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/links/info")();
|
||||
|
||||
const query$ = [
|
||||
enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("externalId", payload$.externalId, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("linkId", payload$.linkId, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("projectSlug", this.options$.projectSlug, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("workspaceId", this.options$.workspaceId, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
domain: payload$.domain,
|
||||
key: payload$.key,
|
||||
linkId: payload$.linkId,
|
||||
externalId: payload$.externalId,
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -530,25 +478,17 @@ export class Links extends ClientSDK {
|
||||
const body$ = null;
|
||||
|
||||
const pathParams$ = {
|
||||
linkId: enc$.encodeSimple("linkId", payload$.linkId, {
|
||||
linkId: encodeSimple$("linkId", payload$.linkId, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
};
|
||||
const path$ = this.templateURLComponent("/links/{linkId}")(pathParams$);
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -642,28 +582,20 @@ export class Links extends ClientSDK {
|
||||
(value$) => operations.UpdateLinkRequest$.outboundSchema.parse(value$),
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
|
||||
const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true });
|
||||
|
||||
const pathParams$ = {
|
||||
linkId: enc$.encodeSimple("linkId", payload$.linkId, {
|
||||
linkId: encodeSimple$("linkId", payload$.linkId, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
};
|
||||
const path$ = this.templateURLComponent("/links/{linkId}")(pathParams$);
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -754,22 +686,14 @@ export class Links extends ClientSDK {
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ =
|
||||
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
|
||||
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
||||
|
||||
const path$ = this.templateURLComponent("/links/bulk")();
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -860,22 +784,14 @@ export class Links extends ClientSDK {
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ =
|
||||
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
|
||||
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
||||
|
||||
const path$ = this.templateURLComponent("/links/upsert")();
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { SDKHooks } from "../hooks";
|
||||
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
|
||||
import * as enc$ from "../lib/encodings";
|
||||
import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings";
|
||||
import { HTTPClient } from "../lib/http";
|
||||
import * as schemas$ from "../lib/schemas";
|
||||
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
||||
@@ -61,11 +61,9 @@ export class Metatags extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/metatags")();
|
||||
|
||||
const query$ = [
|
||||
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
url: payload$.url,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { SDKHooks } from "../hooks";
|
||||
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
|
||||
import * as enc$ from "../lib/encodings";
|
||||
import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings";
|
||||
import { HTTPClient } from "../lib/http";
|
||||
import * as schemas$ from "../lib/schemas";
|
||||
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
||||
@@ -60,25 +60,14 @@ export class QRCodes extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/qr")();
|
||||
|
||||
const query$ = [
|
||||
enc$.encodeForm("bgColor", payload$.bgColor, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("fgColor", payload$.fgColor, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("includeMargin", payload$.includeMargin, {
|
||||
explode: true,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
enc$.encodeForm("level", payload$.level, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("size", payload$.size, { explode: true, charEncoding: "percent" }),
|
||||
enc$.encodeForm("url", payload$.url, { explode: true, charEncoding: "percent" }),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
includeMargin: payload$.includeMargin,
|
||||
url: payload$.url,
|
||||
size: payload$.size,
|
||||
level: payload$.level,
|
||||
fgColor: payload$.fgColor,
|
||||
bgColor: payload$.bgColor,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { SDKHooks } from "../hooks";
|
||||
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
|
||||
import * as enc$ from "../lib/encodings";
|
||||
import { encodeFormQuery as encodeFormQuery$, encodeJSON as encodeJSON$ } from "../lib/encodings";
|
||||
import { HTTPClient } from "../lib/http";
|
||||
import * as schemas$ from "../lib/schemas";
|
||||
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
||||
@@ -58,18 +58,10 @@ export class Tags extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/tags")();
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -159,22 +151,14 @@ export class Tags extends ClientSDK {
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ =
|
||||
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
|
||||
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
||||
|
||||
const path$ = this.templateURLComponent("/tags")();
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { SDKHooks } from "../hooks";
|
||||
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
|
||||
import * as enc$ from "../lib/encodings";
|
||||
import { encodeFormQuery as encodeFormQuery$, encodeJSON as encodeJSON$ } from "../lib/encodings";
|
||||
import { HTTPClient } from "../lib/http";
|
||||
import * as schemas$ from "../lib/schemas";
|
||||
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
||||
@@ -60,22 +60,14 @@ export class Track extends ClientSDK {
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ =
|
||||
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
|
||||
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
||||
|
||||
const path$ = this.templateURLComponent("/track/lead")();
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -166,22 +158,14 @@ export class Track extends ClientSDK {
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ =
|
||||
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
|
||||
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
||||
|
||||
const path$ = this.templateURLComponent("/track/sale")();
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
@@ -273,22 +257,14 @@ export class Track extends ClientSDK {
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ =
|
||||
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
|
||||
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
||||
|
||||
const path$ = this.templateURLComponent("/track/customer")();
|
||||
|
||||
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("&");
|
||||
const query$ = encodeFormQuery$({
|
||||
workspaceId: this.options$.workspaceId,
|
||||
projectSlug: this.options$.projectSlug,
|
||||
});
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.token === "function") {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { SDKHooks } from "../hooks";
|
||||
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
|
||||
import * as enc$ from "../lib/encodings";
|
||||
import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings";
|
||||
import { HTTPClient } from "../lib/http";
|
||||
import * as schemas$ from "../lib/schemas";
|
||||
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
||||
@@ -144,7 +144,7 @@ export class Workspaces extends ClientSDK {
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ =
|
||||
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
|
||||
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
||||
|
||||
const path$ = this.templateURLComponent("/workspaces")();
|
||||
|
||||
@@ -240,7 +240,7 @@ export class Workspaces extends ClientSDK {
|
||||
const body$ = null;
|
||||
|
||||
const pathParams$ = {
|
||||
idOrSlug: enc$.encodeSimple("idOrSlug", payload$.idOrSlug, {
|
||||
idOrSlug: encodeSimple$("idOrSlug", payload$.idOrSlug, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user