diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c5d6159..128516f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.314.2 +speakeasyVersion: 1.322.1 sources: my-first-source: sourceNamespace: my-first-source - sourceRevisionDigest: sha256:164c06ded7b4e584a7e1d46fc0f20ebcf23bdb28abb5e4e2dea52b5aa34271fd - sourceBlobDigest: sha256:a07c6f70c6d3df68db32b244fef1af447804b41f9c59fcfc1f989afcf4da1d37 + sourceRevisionDigest: sha256:0fd3f057e7c2c549b6fb39c1a4c1cd325928da96cecd40d8f55fb1c9084cdb6b + sourceBlobDigest: sha256:9ab1a283d4f9a9459031f205c0897a7e3b3ca1b216c1cc67bd4398c0015b6deb tags: - latest - main @@ -11,8 +11,8 @@ targets: my-first-target: source: my-first-source sourceNamespace: my-first-source - sourceRevisionDigest: sha256:164c06ded7b4e584a7e1d46fc0f20ebcf23bdb28abb5e4e2dea52b5aa34271fd - sourceBlobDigest: sha256:a07c6f70c6d3df68db32b244fef1af447804b41f9c59fcfc1f989afcf4da1d37 + sourceRevisionDigest: sha256:0fd3f057e7c2c549b6fb39c1a4c1cd325928da96cecd40d8f55fb1c9084cdb6b + sourceBlobDigest: sha256:9ab1a283d4f9a9459031f205c0897a7e3b3ca1b216c1cc67bd4398c0015b6deb outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index c1123bc..c178472 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -486,4 +486,14 @@ Based on: ### Generated - [typescript v0.30.2] . ### Releases +- [NPM v0.30.2] https://www.npmjs.com/package/dub/v/0.30.2 - . + +## 2024-06-28 01:19:07 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.322.1 (2.354.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.30.2] . +### Releases - [NPM v0.30.2] https://www.npmjs.com/package/dub/v/0.30.2 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 01094f7..bba12e7 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,11 +3,11 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] + - target: $["paths"]["/links"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "getWorkspace" + "label": "createLink" "source": |- import { Dub } from "dub"; @@ -16,8 +16,8 @@ actions: }); async function run() { - const result = await dub.workspaces.get({ - idOrSlug: "", + const result = await dub.links.create({ + url: "https://google/com", }); // Handle the result @@ -25,11 +25,11 @@ actions: } run(); - - target: $["paths"]["/domains"]["get"] + - target: $["paths"]["/workspaces"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "listDomains" + "label": "createWorkspace" "source": |- import { Dub } from "dub"; @@ -38,7 +38,54 @@ actions: }); async function run() { - const result = await dub.domains.list({}); + const result = await dub.workspaces.create({ + name: "", + slug: "", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/tags"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "createTag" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.tags.create({ + tag: "", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/domains"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "createDomain" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.domains.create({ + slug: "acme.com", + }); // Handle the result console.log(result) @@ -64,6 +111,28 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/domains/{slug}/transfer"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "transferDomain" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.domains.transfer("acme.com", { + newWorkspaceId: "", + }); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/track/sale"]["post"] update: @@ -88,180 +157,6 @@ actions: console.log(result) } - run(); - - target: $["paths"]["/metatags"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getMetatags" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.metatags.get({ - url: "https://dub.co", - }); - - // 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", - }); - - async function run() { - const result = await dub.links.update("", { - 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", - }); - - async function run() { - const result = await dub.analytics.retrieve({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/tags"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "createTag" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.tags.create({ - tag: "", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains/{slug}/primary"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "setPrimaryDomain" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.domains.setPrimary("acme.com"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/track/lead"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "trackLead" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.track.lead({ - clickId: "", - eventName: "Sign up", - customerId: "", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/qr"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getQRCode" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.qrCodes.get({ - url: "https://brief-micronutrient.org", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/links/upsert"]["put"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "upsertLink" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.links.upsert({ - url: "https://google/com", - }); - - // Handle the result - console.log(result) - } - run(); - target: $["paths"]["/links"]["get"] update: @@ -283,11 +178,11 @@ actions: } run(); - - target: $["paths"]["/links/info"]["get"] + - target: $["paths"]["/links/count"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getLinkInfo" + "label": "getLinksCount" "source": |- import { Dub } from "dub"; @@ -296,113 +191,7 @@ actions: }); async function run() { - const result = await dub.links.get({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/workspaces"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getWorkspaces" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.workspaces.list(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/tags"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTags" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.tags.list({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "createDomain" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.domains.create({ - slug: "acme.com", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains/{slug}/transfer"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "transferDomain" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.domains.transfer("acme.com", { - newWorkspaceId: "", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/links"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "createLink" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.links.create({ - url: "https://google/com", - }); + const result = await dub.links.count({}); // Handle the result console.log(result) @@ -452,29 +241,6 @@ actions: console.log(result) } - run(); - - target: $["paths"]["/workspaces"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "createWorkspace" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - }); - - async function run() { - const result = await dub.workspaces.create({ - name: "", - slug: "", - }); - - // Handle the result - console.log(result) - } - run(); - target: $["paths"]["/domains/{slug}"]["delete"] update: @@ -495,6 +261,136 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/domains/{slug}/primary"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "setPrimaryDomain" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.domains.setPrimary("acme.com"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/qr"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getQRCode" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.qrCodes.get({ + url: "https://brief-micronutrient.org", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/workspaces"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getWorkspaces" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.workspaces.list(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getWorkspace" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.workspaces.get({ + idOrSlug: "", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/track/lead"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "trackLead" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.track.lead({ + clickId: "", + eventName: "Sign up", + customerId: "", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/metatags"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getMetatags" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.metatags.get({ + url: "https://dub.co", + }); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/track/customer"]["post"] update: @@ -518,11 +414,11 @@ actions: } run(); - - target: $["paths"]["/links/count"]["get"] + - target: $["paths"]["/links/upsert"]["put"] update: "x-codeSamples": - "lang": "typescript" - "label": "getLinksCount" + "label": "upsertLink" "source": |- import { Dub } from "dub"; @@ -531,7 +427,111 @@ actions: }); async function run() { - const result = await dub.links.count({}); + 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", + }); + + 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", + }); + + async function run() { + const result = await dub.links.update("", { + 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", + }); + + async function run() { + const result = await dub.analytics.retrieve({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/tags"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getTags" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.tags.list({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/domains"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "listDomains" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + }); + + async function run() { + const result = await dub.domains.list({}); // Handle the result console.log(result)