diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index fce44e3..d599efe 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -5,8 +5,8 @@ management: docVersion: 0.0.1 speakeasyVersion: 1.299.4 generationVersion: 2.338.7 - releaseVersion: 0.29.13 - configChecksum: f29df458bc70edf5911d8ec36c741de5 + releaseVersion: 0.29.14 + configChecksum: 3f0426d7827c9ae11b36475a31d0faf9 repoURL: https://github.com/dubinc/dub-node.git installationURL: https://github.com/dubinc/dub-node published: true diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d6a75bd..bc3028f 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.29.13 + version: 0.29.14 additionalDependencies: dependencies: {} devDependencies: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 754c529..7fe48cf 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.299.4 sources: my-first-source: sourceNamespace: my-first-source - sourceRevisionDigest: sha256:bb4192687fd363eff689a81497aa7519f010f8f3def49cabb20ce1a8bce61fa2 - sourceBlobDigest: sha256:e9c849908d21e7d4406be80d292b20a9c0af00a329a6543539e566d41b7cbedf + sourceRevisionDigest: sha256:8e454ed1bdf2da41bb6ae8fb264a39d2b6b8ce5d27443ff3d9dec9044b93e6af + sourceBlobDigest: sha256:83bc634b83a3b88d08df813c1b14ef0f45c4c0f9bd1f3efffd9dab4d8a074770 tags: - latest - main @@ -11,8 +11,8 @@ targets: my-first-target: source: my-first-source sourceNamespace: my-first-source - sourceRevisionDigest: sha256:bb4192687fd363eff689a81497aa7519f010f8f3def49cabb20ce1a8bce61fa2 - sourceBlobDigest: sha256:e9c849908d21e7d4406be80d292b20a9c0af00a329a6543539e566d41b7cbedf + sourceRevisionDigest: sha256:8e454ed1bdf2da41bb6ae8fb264a39d2b6b8ce5d27443ff3d9dec9044b93e6af + sourceBlobDigest: sha256:83bc634b83a3b88d08df813c1b14ef0f45c4c0f9bd1f3efffd9dab4d8a074770 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index 861f662..aa07956 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -396,4 +396,14 @@ Based on: ### Generated - [typescript v0.29.13] . ### Releases -- [NPM v0.29.13] https://www.npmjs.com/package/dub/v/0.29.13 - . \ No newline at end of file +- [NPM v0.29.13] https://www.npmjs.com/package/dub/v/0.29.13 - . + +## 2024-05-31 18:41:44 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.29.14] . +### Releases +- [NPM v0.29.14] https://www.npmjs.com/package/dub/v/0.29.14 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 85812db..43aff30 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,6 +3,55 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: + - 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: "", + }); + + async function run() { + const result = await dub.workspaces.create({ + name: "", + slug: "", + }); + + // 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: "", + }); + + async function run() { + const result = await dub.track.lead({ + clickId: "", + eventName: "Signup", + customerId: "", + }); + + // Handle the result + console.log(result) + } + + run(); - target: $["paths"]["/links/count"]["get"] update: "x-codeSamples": @@ -24,11 +73,11 @@ actions: } run(); - - target: $["paths"]["/links/{linkId}"]["delete"] + - target: $["paths"]["/links/{linkId}"]["patch"] update: "x-codeSamples": - "lang": "typescript" - "label": "deleteLink" + "label": "updateLink" "source": |- import { Dub } from "dub"; @@ -38,97 +87,7 @@ actions: }); async function run() { - const result = await dub.links.delete(""); - - // 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: "", - }); - - async function run() { - 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: "", - }); - - 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: "", - }); - - async function run() { - const result = await dub.track.customer({ - customerId: "", - }); - - // 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: "", - }); - - async function run() { - const result = await dub.links.upsert({ + const result = await dub.links.update("", { url: "https://google/com", }); @@ -159,27 +118,6 @@ 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: "", - }); - - async function run() { - const result = await dub.analytics.retrieve({}); - - // Handle the result - console.log(result) - } - run(); - target: $["paths"]["/workspaces"]["get"] update: @@ -201,6 +139,50 @@ actions: 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: "", + }); + + async function run() { + const result = await dub.track.customer({ + customerId: "", + }); + + // 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: "", + }); + + async function run() { + const result = await dub.links.delete(""); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/tags"]["get"] update: @@ -223,11 +205,11 @@ actions: } run(); - - target: $["paths"]["/domains/{slug}"]["patch"] + - target: $["paths"]["/domains"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "updateDomain" + "label": "listDomains" "source": |- import { Dub } from "dub"; @@ -237,7 +219,30 @@ actions: }); async function run() { - const result = await dub.domains.update("acme.com", {}); + const result = await dub.domains.list({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/domains"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "addDomain" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.domains.add({ + slug: "acme.com", + }); // Handle the result console.log(result) @@ -293,11 +298,11 @@ actions: } run(); - - target: $["paths"]["/links/info"]["get"] + - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getLinkInfo" + "label": "getWorkspace" "source": |- import { Dub } from "dub"; @@ -307,29 +312,8 @@ actions: }); 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: "", - }); - - async function run() { - const result = await dub.links.update("", { - url: "https://google/com", + const result = await dub.workspaces.get({ + idOrSlug: "", }); // Handle the result @@ -337,11 +321,11 @@ actions: } run(); - - target: $["paths"]["/tags"]["post"] + - target: $["paths"]["/domains/{slug}"]["patch"] update: "x-codeSamples": - "lang": "typescript" - "label": "createTag" + "label": "updateDomain" "source": |- import { Dub } from "dub"; @@ -351,30 +335,7 @@ actions: }); async function run() { - const result = await dub.tags.create({ - tag: "", - }); - - // 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: "", - }); - - async function run() { - const result = await dub.domains.list({}); + const result = await dub.domains.update("acme.com", {}); // Handle the result console.log(result) @@ -404,11 +365,11 @@ actions: } run(); - - target: $["paths"]["/links"]["get"] + - target: $["paths"]["/analytics"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getLinks" + "label": "retrieveAnalytics" "source": |- import { Dub } from "dub"; @@ -418,18 +379,18 @@ actions: }); async function run() { - const result = await dub.links.list({}); + const result = await dub.analytics.retrieve({}); // Handle the result console.log(result) } run(); - - target: $["paths"]["/workspaces"]["post"] + - target: $["paths"]["/tags"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "createWorkspace" + "label": "createTag" "source": |- import { Dub } from "dub"; @@ -439,55 +400,8 @@ actions: }); async function run() { - const result = await dub.workspaces.create({ - name: "", - slug: "", - }); - - // 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: "", - }); - - async function run() { - const result = await dub.workspaces.get({ - idOrSlug: "", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "addDomain" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.domains.add({ - slug: "acme.com", + const result = await dub.tags.create({ + tag: "", }); // Handle the result @@ -516,11 +430,11 @@ actions: } run(); - - target: $["paths"]["/track/lead"]["post"] + - target: $["paths"]["/domains/{slug}/primary"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "trackLead" + "label": "setPrimaryDomain" "source": |- import { Dub } from "dub"; @@ -530,16 +444,102 @@ actions: }); async function run() { - const result = await dub.track.lead({ - clickId: "", - eventName: "Signup", - customerId: "", + const result = await dub.domains.setPrimary("acme.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: "", + }); + + async function run() { + const result = await dub.links.upsert({ + url: "https://google/com", }); // Handle the result console.log(result) } + run(); + - target: $["paths"]["/links"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getLinks" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.links.list({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/links/info"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getLinkInfo" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + 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: "", + }); + + async function run() { + const result = await dub.links.createMany([ + { + url: "https://google/com", + }, + ]); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/metatags"]["get"] update: diff --git a/jsr.json b/jsr.json index 0369191..a9d4311 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "dub", - "version": "0.29.13", + "version": "0.29.14", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 237b160..d965eb8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dub", - "version": "0.29.13", + "version": "0.29.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dub", - "version": "0.29.13", + "version": "0.29.14", "devDependencies": { "@types/jsonpath": "^0.2.4", "@types/node": "^20.12.7", diff --git a/package.json b/package.json index 8da945a..fb86705 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dub", - "version": "0.29.13", + "version": "0.29.14", "author": "Dub", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 0516bfc..2096360 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.1", - sdkVersion: "0.29.13", + sdkVersion: "0.29.14", genVersion: "2.338.7", - userAgent: "speakeasy-sdk/typescript 0.29.13 2.338.7 0.0.1 dub", + userAgent: "speakeasy-sdk/typescript 0.29.14 2.338.7 0.0.1 dub", } as const;