diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7fe48cf..6576e01 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:8e454ed1bdf2da41bb6ae8fb264a39d2b6b8ce5d27443ff3d9dec9044b93e6af - sourceBlobDigest: sha256:83bc634b83a3b88d08df813c1b14ef0f45c4c0f9bd1f3efffd9dab4d8a074770 + sourceRevisionDigest: sha256:455c060f88108776b4ab35e2b87737ad71718079881df3bb2ef1008d55a56dbb + sourceBlobDigest: sha256:b88a403d950f80c0eee438171f1b31e02d850a10072a237f1cc7dbd872c982a5 tags: - latest - main @@ -11,8 +11,8 @@ targets: my-first-target: source: my-first-source sourceNamespace: my-first-source - sourceRevisionDigest: sha256:8e454ed1bdf2da41bb6ae8fb264a39d2b6b8ce5d27443ff3d9dec9044b93e6af - sourceBlobDigest: sha256:83bc634b83a3b88d08df813c1b14ef0f45c4c0f9bd1f3efffd9dab4d8a074770 + sourceRevisionDigest: sha256:455c060f88108776b4ab35e2b87737ad71718079881df3bb2ef1008d55a56dbb + sourceBlobDigest: sha256:b88a403d950f80c0eee438171f1b31e02d850a10072a237f1cc7dbd872c982a5 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index aa07956..dae67f4 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -406,4 +406,14 @@ Based on: ### Generated - [typescript v0.29.14] . ### Releases +- [NPM v0.29.14] https://www.npmjs.com/package/dub/v/0.29.14 - . + +## 2024-06-03 01:18:17 +### 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 43aff30..fa26600 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,30 +3,6 @@ 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": @@ -51,203 +27,6 @@ actions: 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: "", - }); - - async function run() { - const result = await dub.links.count({}); - - // 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", - }); - - // 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: "", - }); - - 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", - workspaceId: "", - }); - - async function run() { - const result = await dub.workspaces.list(); - - // 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/{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: - "x-codeSamples": - - "lang": "typescript" - "label": "getTags" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - 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", - workspaceId: "", - }); - - async function run() { - 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) - } - run(); - target: $["paths"]["/track/sale"]["post"] update: @@ -275,11 +54,11 @@ actions: } run(); - - target: $["paths"]["/links"]["post"] + - target: $["paths"]["/links/{linkId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" - "label": "createLink" + "label": "deleteLink" "source": |- import { Dub } from "dub"; @@ -289,9 +68,7 @@ actions: }); async function run() { - const result = await dub.links.create({ - url: "https://google/com", - }); + const result = await dub.links.delete(""); // Handle the result console.log(result) @@ -320,27 +97,6 @@ actions: 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: "", - }); - - async function run() { - const result = await dub.domains.update("acme.com", {}); - - // Handle the result - console.log(result) - } - run(); - target: $["paths"]["/domains/{slug}/transfer"]["post"] update: @@ -365,11 +121,11 @@ actions: } run(); - - target: $["paths"]["/analytics"]["get"] + - target: $["paths"]["/workspaces"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "retrieveAnalytics" + "label": "getWorkspaces" "source": |- import { Dub } from "dub"; @@ -379,7 +135,28 @@ actions: }); async function run() { - const result = await dub.analytics.retrieve({}); + 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: "", + }); + + async function run() { + const result = await dub.tags.list({}); // Handle the result console.log(result) @@ -408,6 +185,29 @@ actions: 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) + } + run(); - target: $["paths"]["/domains/{slug}"]["delete"] update: @@ -430,11 +230,11 @@ actions: } run(); - - target: $["paths"]["/domains/{slug}/primary"]["post"] + - target: $["paths"]["/links/{linkId}"]["patch"] update: "x-codeSamples": - "lang": "typescript" - "label": "setPrimaryDomain" + "label": "updateLink" "source": |- import { Dub } from "dub"; @@ -444,7 +244,122 @@ actions: }); async function run() { - const result = await dub.domains.setPrimary("acme.com"); + const result = await dub.links.update("", { + 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: "", + }); + + async function run() { + const result = await dub.links.createMany([ + { + url: "https://google/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", + workspaceId: "", + }); + + async function run() { + const result = await dub.qrCodes.get({ + url: "https://brief-micronutrient.org", + }); + + // 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: "", + }); + + async function run() { + const result = await dub.analytics.retrieve({}); + + // 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: "", + }); + + async function run() { + const result = await dub.domains.update("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) @@ -495,11 +410,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"; @@ -509,18 +424,18 @@ actions: }); async function run() { - const result = await dub.links.get({}); + const result = await dub.links.count({}); // Handle the result console.log(result) } run(); - - target: $["paths"]["/links/bulk"]["post"] + - target: $["paths"]["/domains"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "bulkCreateLinks" + "label": "listDomains" "source": |- import { Dub } from "dub"; @@ -530,11 +445,28 @@ actions: }); async function run() { - const result = await dub.links.createMany([ - { - url: "https://google/com", - }, - ]); + const result = await dub.domains.list({}); + + // 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) @@ -563,4 +495,72 @@ actions: 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: "", + }); + + 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: "", + }); + + async function run() { + const result = await dub.links.get({}); + + // 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: "", + }); + + async function run() { + const result = await dub.workspaces.create({ + name: "", + slug: "", + }); + + // Handle the result + console.log(result) + } + run();