ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.299.4 (#117)

Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
This commit is contained in:
github-actions[bot]
2024-05-31 21:10:00 +05:30
committed by GitHub
parent 4aa978d729
commit fba9639cb1
16 changed files with 530 additions and 337 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0 lockVersion: 2.0.0
id: f28179cc-ef59-426d-9e85-60cec22fc642 id: f28179cc-ef59-426d-9e85-60cec22fc642
management: management:
docChecksum: 58f984453d09b11200ae524bf6ab56d2 docChecksum: 51863c384b062f0d4c1dd02e14254615
docVersion: 0.0.1 docVersion: 0.0.1
speakeasyVersion: 1.299.1 speakeasyVersion: 1.299.4
generationVersion: 2.338.5 generationVersion: 2.338.7
releaseVersion: 0.29.12 releaseVersion: 0.29.13
configChecksum: a22618851e75846b6e022571d2dfa96c configChecksum: f29df458bc70edf5911d8ec36c741de5
repoURL: https://github.com/dubinc/dub-node.git repoURL: https://github.com/dubinc/dub-node.git
installationURL: https://github.com/dubinc/dub-node installationURL: https://github.com/dubinc/dub-node
published: true published: true
@@ -279,11 +279,14 @@ generatedFiles:
- docs/models/operations/transferdomainglobals.md - docs/models/operations/transferdomainglobals.md
- docs/models/operations/transferdomainrequestbody.md - docs/models/operations/transferdomainrequestbody.md
- docs/models/operations/transferdomainrequest.md - docs/models/operations/transferdomainrequest.md
- docs/models/operations/trackleadglobals.md
- docs/models/operations/trackleadrequestbody.md - docs/models/operations/trackleadrequestbody.md
- docs/models/operations/trackleadresponsebody.md - docs/models/operations/trackleadresponsebody.md
- docs/models/operations/tracksaleglobals.md
- docs/models/operations/paymentprocessor.md - docs/models/operations/paymentprocessor.md
- docs/models/operations/tracksalerequestbody.md - docs/models/operations/tracksalerequestbody.md
- docs/models/operations/tracksaleresponsebody.md - docs/models/operations/tracksaleresponsebody.md
- docs/models/operations/trackcustomerglobals.md
- docs/models/operations/trackcustomerrequestbody.md - docs/models/operations/trackcustomerrequestbody.md
- docs/models/operations/trackcustomerresponsebody.md - docs/models/operations/trackcustomerresponsebody.md
- docs/models/operations/getmetatagsrequest.md - docs/models/operations/getmetatagsrequest.md

View File

@@ -12,7 +12,7 @@ generation:
auth: auth:
oAuth2ClientCredentialsEnabled: false oAuth2ClientCredentialsEnabled: false
typescript: typescript:
version: 0.29.12 version: 0.29.13
additionalDependencies: additionalDependencies:
dependencies: {} dependencies: {}
devDependencies: devDependencies:

View File

@@ -1,9 +1,9 @@
speakeasyVersion: 1.299.1 speakeasyVersion: 1.299.4
sources: sources:
my-first-source: my-first-source:
sourceNamespace: my-first-source sourceNamespace: my-first-source
sourceRevisionDigest: sha256:094ba510458650e8b32d7a4a655e53e4c7b531c25b6e070882ee5b187504ac42 sourceRevisionDigest: sha256:bb4192687fd363eff689a81497aa7519f010f8f3def49cabb20ce1a8bce61fa2
sourceBlobDigest: sha256:11824f29a9b18d3141c8f88c15769c49f56b187d8844549d8f6070550a0d2c76 sourceBlobDigest: sha256:e9c849908d21e7d4406be80d292b20a9c0af00a329a6543539e566d41b7cbedf
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:094ba510458650e8b32d7a4a655e53e4c7b531c25b6e070882ee5b187504ac42 sourceRevisionDigest: sha256:bb4192687fd363eff689a81497aa7519f010f8f3def49cabb20ce1a8bce61fa2
sourceBlobDigest: sha256:11824f29a9b18d3141c8f88c15769c49f56b187d8844549d8f6070550a0d2c76 sourceBlobDigest: sha256:e9c849908d21e7d4406be80d292b20a9c0af00a329a6543539e566d41b7cbedf
outLocation: /github/workspace/repo outLocation: /github/workspace/repo
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0

View File

@@ -386,4 +386,14 @@ Based on:
### Generated ### Generated
- [typescript v0.29.12] . - [typescript v0.29.12] .
### Releases ### 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 - .

View File

@@ -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"]["get"] - target: $["paths"]["/links/count"]["get"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "getWorkspaces" "label": "getLinksCount"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -17,18 +17,18 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.workspaces.list(); const result = await dub.links.count({});
// Handle the result // Handle the result
console.log(result) console.log(result)
} }
run(); run();
- target: $["paths"]["/domains/{slug}"]["delete"] - target: $["paths"]["/links/{linkId}"]["delete"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "deleteDomain" "label": "deleteLink"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -38,18 +38,18 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.domains.delete("acme.com"); const result = await dub.links.delete("<value>");
// Handle the result // Handle the result
console.log(result) console.log(result)
} }
run(); run();
- target: $["paths"]["/links"]["get"] - target: $["paths"]["/links/bulk"]["post"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "getLinks" "label": "bulkCreateLinks"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -59,7 +59,78 @@ actions:
}); });
async function run() { 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 // Handle the result
console.log(result) console.log(result)
@@ -88,6 +159,160 @@ 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",
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(); run();
- target: $["paths"]["/links/{linkId}"]["patch"] - target: $["paths"]["/links/{linkId}"]["patch"]
update: update:
@@ -112,11 +337,11 @@ actions:
} }
run(); run();
- target: $["paths"]["/analytics"]["get"] - target: $["paths"]["/tags"]["post"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "retrieveAnalytics" "label": "createTag"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -126,7 +351,74 @@ actions:
}); });
async function run() { 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 // Handle the result
console.log(result) console.log(result)
@@ -180,11 +472,11 @@ actions:
} }
run(); run();
- target: $["paths"]["/domains"]["get"] - target: $["paths"]["/domains"]["post"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "listDomains" "label": "addDomain"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -194,92 +486,8 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.domains.list({}); const result = await dub.domains.add({
slug: "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"]["/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>",
}); });
// Handle the result // Handle the result
@@ -287,11 +495,11 @@ actions:
} }
run(); run();
- target: $["paths"]["/metatags"]["get"] - target: $["paths"]["/domains/{slug}"]["delete"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "getMetatags" "label": "deleteDomain"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -301,32 +509,7 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.metatags.get({ const result = await dub.domains.delete("acme.com");
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>",
});
// Handle the result // Handle the result
console.log(result) console.log(result)
@@ -358,11 +541,11 @@ actions:
} }
run(); run();
- target: $["paths"]["/domains"]["post"] - target: $["paths"]["/metatags"]["get"]
update: update:
"x-codeSamples": "x-codeSamples":
- "lang": "typescript" - "lang": "typescript"
"label": "addDomain" "label": "getMetatags"
"source": |- "source": |-
import { Dub } from "dub"; import { Dub } from "dub";
@@ -372,191 +555,8 @@ actions:
}); });
async function run() { async function run() {
const result = await dub.domains.add({ const result = await dub.metatags.get({
slug: "acme.com", url: "https://dub.co",
});
// 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",
}); });
// Handle the result // Handle the result

View 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. |

View 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. |

View 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. |

View File

@@ -2,7 +2,7 @@
{ {
"name": "dub", "name": "dub",
"version": "0.29.12", "version": "0.29.13",
"exports": { "exports": {
".": "./src/index.ts", ".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts", "./models/errors": "./src/models/errors/index.ts",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "dub", "name": "dub",
"version": "0.29.12", "version": "0.29.13",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "dub", "name": "dub",
"version": "0.29.12", "version": "0.29.13",
"devDependencies": { "devDependencies": {
"@types/jsonpath": "^0.2.4", "@types/jsonpath": "^0.2.4",
"@types/node": "^20.12.7", "@types/node": "^20.12.7",

View File

@@ -1,6 +1,6 @@
{ {
"name": "dub", "name": "dub",
"version": "0.29.12", "version": "0.29.13",
"author": "Dub", "author": "Dub",
"main": "./index.js", "main": "./index.js",
"sideEffects": false, "sideEffects": false,

View File

@@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = { export const SDK_METADATA = {
language: "typescript", language: "typescript",
openapiDocVersion: "0.0.1", openapiDocVersion: "0.0.1",
sdkVersion: "0.29.12", sdkVersion: "0.29.13",
genVersion: "2.338.5", genVersion: "2.338.7",
userAgent: "speakeasy-sdk/typescript 0.29.12 2.338.5 0.0.1 dub", userAgent: "speakeasy-sdk/typescript 0.29.13 2.338.7 0.0.1 dub",
} as const; } as const;

View File

@@ -4,6 +4,14 @@
import * as z from "zod"; 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 = { 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. * 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; 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 */ /** @internal */
export namespace TrackCustomerRequestBody$ { export namespace TrackCustomerRequestBody$ {
export const inboundSchema: z.ZodType<TrackCustomerRequestBody, z.ZodTypeDef, unknown> = z export const inboundSchema: z.ZodType<TrackCustomerRequestBody, z.ZodTypeDef, unknown> = z

View File

@@ -4,6 +4,14 @@
import * as z from "zod"; 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 = { export type TrackLeadRequestBody = {
/** /**
* The ID of the click in th Dub. You can read this value from `dclid` cookie. * 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; 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 */ /** @internal */
export namespace TrackLeadRequestBody$ { export namespace TrackLeadRequestBody$ {
export const inboundSchema: z.ZodType<TrackLeadRequestBody, z.ZodTypeDef, unknown> = z export const inboundSchema: z.ZodType<TrackLeadRequestBody, z.ZodTypeDef, unknown> = z

View File

@@ -5,6 +5,14 @@
import { ClosedEnum } from "../../types"; import { ClosedEnum } from "../../types";
import * as z from "zod"; 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. * The payment processor via which the sale was made.
*/ */
@@ -57,6 +65,38 @@ export type TrackSaleResponseBody = {
metadata: { [k: string]: any } | null; 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 */ /** @internal */
export namespace PaymentProcessor$ { export namespace PaymentProcessor$ {
export const inboundSchema = z.nativeEnum(PaymentProcessor); export const inboundSchema = z.nativeEnum(PaymentProcessor);

View File

@@ -64,7 +64,18 @@ export class Track extends ClientSDK {
const path$ = this.templateURLComponent("/track/lead")(); 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$; let security$;
if (typeof this.options$.token === "function") { if (typeof this.options$.token === "function") {
@@ -159,7 +170,18 @@ export class Track extends ClientSDK {
const path$ = this.templateURLComponent("/track/sale")(); 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$; let security$;
if (typeof this.options$.token === "function") { if (typeof this.options$.token === "function") {
@@ -255,7 +277,18 @@ export class Track extends ClientSDK {
const path$ = this.templateURLComponent("/track/customer")(); 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$; let security$;
if (typeof this.options$.token === "function") { if (typeof this.options$.token === "function") {