From 01eb4d52833217a0976fe33e105597502b4a1b2d Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 8 May 2024 14:40:06 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.283.1 --- .speakeasy/gen.lock | 4 +- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 8 +- RELEASES.md | 12 +- codeSamples.yaml | 538 +++++++++++++++++++-------------------- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/lib/config.ts | 4 +- 9 files changed, 293 insertions(+), 283 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 707578a..7d6bc9b 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -5,8 +5,8 @@ management: docVersion: 0.0.1 speakeasyVersion: 1.283.1 generationVersion: 2.324.0 - releaseVersion: 0.28.0 - configChecksum: 20cfec24e8ffc74509679a1f0942fe7e + releaseVersion: 0.28.1 + configChecksum: 57519beee2ffb4eaa09c3d40cdc10712 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 a0d111d..68649da 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.28.0 + version: 0.28.1 additionalDependencies: dependencies: {} devDependencies: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1a301ad..15c588f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.283.1 sources: my-first-source: sourceNamespace: my-first-source - sourceRevisionDigest: sha256:b43a4dbf6e1046455dbbc1d82d42ad674fc9ac4329ad56ea56b8fa871eb663fc - sourceBlobDigest: sha256:e16837f81e17ab3177f10c0449b07608dcd0cc3f17b40a9a971ecc382c36b4b2 + sourceRevisionDigest: sha256:a596b0820636c1e8167c5e9e6c27c095337ac44aa16ecdfaf7c9a9cfc67fe98b + sourceBlobDigest: sha256:0b14928333e7abd7cb33d986d926af8a73a608fc45fa08c53fd9ced42cd5b61f tags: - latest - main @@ -11,8 +11,8 @@ targets: my-first-target: source: my-first-source sourceNamespace: my-first-source - sourceRevisionDigest: sha256:b43a4dbf6e1046455dbbc1d82d42ad674fc9ac4329ad56ea56b8fa871eb663fc - sourceBlobDigest: sha256:e16837f81e17ab3177f10c0449b07608dcd0cc3f17b40a9a971ecc382c36b4b2 + sourceRevisionDigest: sha256:a596b0820636c1e8167c5e9e6c27c095337ac44aa16ecdfaf7c9a9cfc67fe98b + sourceBlobDigest: sha256:0b14928333e7abd7cb33d986d926af8a73a608fc45fa08c53fd9ced42cd5b61f outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index a54e4b9..22d3a46 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -236,4 +236,14 @@ Based on: ### Generated - [typescript v0.28.0] . ### Releases -- [NPM v0.28.0] https://www.npmjs.com/package/dub/v/0.28.0 - . \ No newline at end of file +- [NPM v0.28.0] https://www.npmjs.com/package/dub/v/0.28.0 - . + +## 2024-05-08 14:38:08 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.283.1 (2.324.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.28.1] . +### Releases +- [NPM v0.28.1] https://www.npmjs.com/package/dub/v/0.28.1 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 6afa2d1..9f93fb8 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,6 +3,116 @@ 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.create({ + name: "", + slug: "", + }); + + // 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", + workspaceId: "", + }); + + async function run() { + const result = await dub.get({ + url: "https://dub.co", + }); + + // 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.get({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/analytics/device"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getDeviceAnalytics" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.devices({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/analytics/os"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getOSAnalytics" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.os({}); + + // Handle the result + console.log(result) + } + + run(); - target: $["paths"]["/analytics/top_urls"]["get"] update: "x-codeSamples": @@ -24,11 +134,38 @@ actions: } run(); - - target: $["paths"]["/tags"]["post"] + - target: $["paths"]["/workspaces"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "createTag" + "label": "getWorkspaces" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.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\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n const requestBody = {\n newWorkspaceId: \"\",\n };\n \n const result = await dub.transfer(slug, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/links"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "createLink" "source": |- import { Dub } from "dub"; @@ -39,7 +176,7 @@ actions: async function run() { const result = await dub.create({ - tag: "", + url: "https://google/com", }); // Handle the result @@ -67,6 +204,33 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/links/{linkId}"]["patch"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "updateLink" + "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const linkId = \"\";\n const requestBody = {\n url: \"https://google/com\",\n };\n \n const result = await dub.update(linkId, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/analytics/country"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getCountryAnalytics" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.countries({}); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/analytics/timeseries"]["get"] update: @@ -88,6 +252,33 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/domains/{slug}/primary"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "setPrimaryDomain" + "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n \n const result = await dub.setPrimary(slug);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - 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.get({}); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/analytics/browser"]["get"] update: @@ -131,11 +322,23 @@ actions: } run(); - - target: $["paths"]["/metatags"]["get"] + - target: $["paths"]["/domains/{slug}"]["delete"] update: "x-codeSamples": - "lang": "typescript" - "label": "getMetatags" + "label": "deleteDomain" + "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n \n const result = await dub.delete(slug);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/links/{linkId}"]["delete"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "deleteLink" + "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const linkId = \"\";\n \n const result = await dub.delete(linkId);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/links/bulk"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "bulkCreateLinks" "source": |- import { Dub } from "dub"; @@ -145,156 +348,11 @@ actions: }); async function run() { - const result = await dub.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\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const linkId = \"\";\n const requestBody = {\n url: \"https://google/com\",\n };\n \n const result = await dub.update(linkId, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/analytics/clicks"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getClicksAnalytics" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.clicks({}); - - // 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.create({ - name: "", - slug: "", - }); - - // 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\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n const requestBody = {\n newWorkspaceId: \"\",\n };\n \n const result = await dub.transfer(slug, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/analytics/country"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getCountryAnalytics" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.countries({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/city"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getCityAnalytics" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.cities({}); - - // 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.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\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n \n const result = await dub.setPrimary(slug);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/analytics/os"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getOSAnalytics" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.os({}); + const result = await dub.createMany([ + { + url: "https://google/com", + }, + ]); // Handle the result console.log(result) @@ -322,17 +380,11 @@ actions: } run(); - - target: $["paths"]["/domains/{slug}"]["delete"] + - target: $["paths"]["/analytics/clicks"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "deleteDomain" - "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n \n const result = await dub.delete(slug);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/links"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "createLink" + "label": "getClicksAnalytics" "source": |- import { Dub } from "dub"; @@ -342,20 +394,24 @@ actions: }); async function run() { - const result = await dub.create({ - url: "https://google/com", - }); + const result = await dub.clicks({}); // Handle the result console.log(result) } run(); - - target: $["paths"]["/links/bulk"]["post"] + - target: $["paths"]["/domains/{slug}"]["patch"] update: "x-codeSamples": - "lang": "typescript" - "label": "bulkCreateLinks" + "label": "updateDomain" + "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n const requestBody = {};\n \n const result = await dub.update(slug, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/links"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getLinks" "source": |- import { Dub } from "dub"; @@ -365,11 +421,28 @@ actions: }); async function run() { - const result = await dub.createMany([ - { - url: "https://google/com", - }, - ]); + const result = await dub.list({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/analytics/city"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getCityAnalytics" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.cities({}); // Handle the result console.log(result) @@ -417,81 +490,6 @@ actions: 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.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.get({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/links/{linkId}"]["delete"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "deleteLink" - "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const linkId = \"\";\n \n const result = await dub.delete(linkId);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/domains/{slug}"]["patch"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "updateDomain" - "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n workspaceId: \"\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n const requestBody = {};\n \n const result = await dub.update(slug, requestBody);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - 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.get({}); - - // Handle the result - console.log(result) - } - run(); - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: @@ -515,6 +513,29 @@ actions: 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: "", + }); + + async function run() { + const result = await dub.create({ + tag: "", + }); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/domains"]["post"] update: @@ -538,25 +559,4 @@ actions: console.log(result) } - run(); - - target: $["paths"]["/analytics/device"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getDeviceAnalytics" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.devices({}); - - // Handle the result - console.log(result) - } - run(); diff --git a/jsr.json b/jsr.json index 9ef9f7c..05c1712 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "dub", - "version": "0.28.0", + "version": "0.28.1", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 156d08f..eaba5bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dub", - "version": "0.28.0", + "version": "0.28.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dub", - "version": "0.28.0", + "version": "0.28.1", "devDependencies": { "@types/jsonpath": "^0.2.4", "@types/node": "^20.12.7", diff --git a/package.json b/package.json index aa12469..d9e6cd7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dub", - "version": "0.28.0", + "version": "0.28.1", "author": "Dub", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 5d8fc23..58f787a 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.28.0", + sdkVersion: "0.28.1", genVersion: "2.324.0", - userAgent: "speakeasy-sdk/typescript 0.28.0 2.324.0 0.0.1 dub", + userAgent: "speakeasy-sdk/typescript 0.28.1 2.324.0 0.0.1 dub", } as const;