From 9bd96c83d3415df3cf1acc977c6e5804d678b346 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 16:36:27 +0530 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.295.2 (#111) Co-authored-by: speakeasybot --- .speakeasy/workflow.lock | 10 +- RELEASES.md | 10 + codeSamples.yaml | 938 +++++++++++++++++++-------------------- 3 files changed, 484 insertions(+), 474 deletions(-) diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index aaff050..fd8f53b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.295.1 +speakeasyVersion: 1.295.2 sources: my-first-source: sourceNamespace: my-first-source - sourceRevisionDigest: sha256:fbe8d2192ee0b7d442465a2d1a264828b3313d7d1102542c7b23e8c9a0efbd99 - sourceBlobDigest: sha256:558b0b47fb3271ba27cf7602071f28473b8a42ca78e5f663f09fd3bd4a426e3e + sourceRevisionDigest: sha256:80803948ef66ecf6e1a45773c2a8cdf85eb4f06c483b8f3a52c658c9fb410c90 + sourceBlobDigest: sha256:f6c3c2652fab580c2760f48c3a4ee434f56eae3e7e4e0ac2b2b909dec4bc12d6 tags: - latest - main @@ -11,8 +11,8 @@ targets: my-first-target: source: my-first-source sourceNamespace: my-first-source - sourceRevisionDigest: sha256:fbe8d2192ee0b7d442465a2d1a264828b3313d7d1102542c7b23e8c9a0efbd99 - sourceBlobDigest: sha256:558b0b47fb3271ba27cf7602071f28473b8a42ca78e5f663f09fd3bd4a426e3e + sourceRevisionDigest: sha256:80803948ef66ecf6e1a45773c2a8cdf85eb4f06c483b8f3a52c658c9fb410c90 + sourceBlobDigest: sha256:f6c3c2652fab580c2760f48c3a4ee434f56eae3e7e4e0ac2b2b909dec4bc12d6 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index 35b649a..5fa74fb 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -326,4 +326,14 @@ Based on: ### Generated - [typescript v0.29.7] . ### Releases +- [NPM v0.29.7] https://www.npmjs.com/package/dub/v/0.29.7 - . + +## 2024-05-24 01:15:57 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.295.2 (2.335.5) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.29.7] . +### Releases - [NPM v0.29.7] https://www.npmjs.com/package/dub/v/0.29.7 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index fff7376..3c1fe34 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,71 +3,6 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - 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"]["/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/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}"]["delete"] update: "x-codeSamples": @@ -89,11 +24,11 @@ actions: } run(); - - target: $["paths"]["/links/{linkId}"]["patch"] + - target: $["paths"]["/analytics/clicks/devices"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "updateLink" + "label": "getDevicesByClicks" "source": |- import { Dub } from "dub"; @@ -103,20 +38,18 @@ actions: }); async function run() { - const result = await dub.links.update("", { - url: "https://google/com", - }); + const result = await dub.analytics.clicks.devices({}); // Handle the result console.log(result) } run(); - - target: $["paths"]["/analytics/browser"]["get"] + - target: $["paths"]["/workspaces"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getBrowsersByClicksDeprecated" + "label": "getWorkspaces" "source": |- import { Dub } from "dub"; @@ -126,49 +59,7 @@ actions: }); async function run() { - const result = await dub.analytics.browser({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/timeseries"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTimeseriesByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.timeseries({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains/{slug}"]["delete"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "deleteDomain" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.domains.delete("acme.com"); + const result = await dub.workspaces.list(); // Handle the result console.log(result) @@ -198,11 +89,11 @@ actions: } run(); - - target: $["paths"]["/links/bulk"]["post"] + - target: $["paths"]["/links/{linkId}"]["patch"] update: "x-codeSamples": - "lang": "typescript" - "label": "bulkCreateLinks" + "label": "updateLink" "source": |- import { Dub } from "dub"; @@ -212,32 +103,9 @@ actions: }); async function run() { - const result = await dub.links.createMany([ - { - url: "https://google/com", - }, - ]); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/timeseries"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTimeseriesByClicksDeprecated" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.timeseries({}); + const result = await dub.links.update("", { + url: "https://google/com", + }); // Handle the result console.log(result) @@ -285,6 +153,50 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/analytics/clicks/cities"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getCitiesByClicks" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.analytics.clicks.cities({}); + + // 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/clicks/browsers"]["get"] update: @@ -306,6 +218,71 @@ actions: 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"]["/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"]["/analytics/timeseries"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getTimeseriesByClicksDeprecated" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.analytics.timeseries({}); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/analytics/top_urls"]["get"] update: @@ -328,11 +305,11 @@ actions: } run(); - - target: $["paths"]["/domains"]["get"] + - target: $["paths"]["/analytics/clicks"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "listDomains" + "label": "getClicksCountDeprecated" "source": |- import { Dub } from "dub"; @@ -342,7 +319,52 @@ actions: }); async function run() { - const result = await dub.domains.list({}); + const result = await dub.analytics.clicks.getClicksCountDeprecated({}); + + // 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(); + - 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) @@ -398,11 +420,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"; @@ -412,7 +434,7 @@ actions: }); async function run() { - const result = await dub.links.get({}); + const result = await dub.links.count({}); // Handle the result console.log(result) @@ -439,134 +461,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", - workspaceId: "", - }); - - async function run() { - const result = await dub.metatags.get({ - url: "https://dub.co", - }); - - // 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"]["/analytics/country"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getCountriesByClicksDeprecated" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.country({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/os"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getOSByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.os({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/referers"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getReferersByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.referers({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getClicksCountDeprecated" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.getClicksCountDeprecated({}); - - // Handle the result - console.log(result) - } - run(); - target: $["paths"]["/tags"]["get"] update: @@ -588,155 +482,6 @@ 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", - workspaceId: "", - }); - - async function run() { - const result = await dub.domains.setPrimary("acme.com"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/city"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getCitiesByClicksDeprecated" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.city({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/countries"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getCountriesByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.countries({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/top_links"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTopLinksByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.topLinks({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/clicks/top_urls"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTopURLsByClicks" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.analytics.clicks.topUrls({}); - - // 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"]["/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/lead"]["post"] update: @@ -763,11 +508,11 @@ actions: } run(); - - target: $["paths"]["/qr"]["get"] + - target: $["paths"]["/metatags"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getQRCode" + "label": "getMetatags" "source": |- import { Dub } from "dub"; @@ -777,8 +522,8 @@ actions: }); async function run() { - const result = await dub.qrCodes.get({ - url: "https://brief-micronutrient.org", + const result = await dub.metatags.get({ + url: "https://dub.co", }); // Handle the result @@ -786,11 +531,11 @@ actions: } run(); - - target: $["paths"]["/analytics/clicks/cities"]["get"] + - target: $["paths"]["/analytics/city"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getCitiesByClicks" + "label": "getCitiesByClicksDeprecated" "source": |- import { Dub } from "dub"; @@ -800,18 +545,18 @@ actions: }); async function run() { - const result = await dub.analytics.clicks.cities({}); + const result = await dub.analytics.city({}); // Handle the result console.log(result) } run(); - - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] + - target: $["paths"]["/analytics/clicks/referers"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getWorkspace" + "label": "getReferersByClicks" "source": |- import { Dub } from "dub"; @@ -821,20 +566,18 @@ actions: }); async function run() { - const result = await dub.workspaces.get({ - idOrSlug: "", - }); + const result = await dub.analytics.clicks.referers({}); // Handle the result console.log(result) } run(); - - target: $["paths"]["/tags"]["post"] + - target: $["paths"]["/domains/{slug}"]["delete"] update: "x-codeSamples": - "lang": "typescript" - "label": "createTag" + "label": "deleteDomain" "source": |- import { Dub } from "dub"; @@ -844,9 +587,7 @@ actions: }); async function run() { - const result = await dub.tags.create({ - tag: "", - }); + const result = await dub.domains.delete("acme.com"); // Handle the result console.log(result) @@ -875,6 +616,96 @@ 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"]["/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"]["/analytics/country"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getCountriesByClicksDeprecated" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.analytics.country({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/analytics/browser"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getBrowsersByClicksDeprecated" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.analytics.browser({}); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/analytics/referer"]["get"] update: @@ -918,11 +749,11 @@ actions: } run(); - - target: $["paths"]["/analytics/clicks/devices"]["get"] + - target: $["paths"]["/tags"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "getDevicesByClicks" + "label": "createTag" "source": |- import { Dub } from "dub"; @@ -932,34 +763,203 @@ actions: }); async function run() { - const result = await dub.analytics.clicks.devices({}); - - // 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: "", + 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({}); + + // 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"]["/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"]["/analytics/clicks/timeseries"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getTimeseriesByClicks" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.analytics.clicks.timeseries({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/analytics/clicks/countries"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getCountriesByClicks" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.analytics.clicks.countries({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/analytics/clicks/os"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getOSByClicks" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.analytics.clicks.os({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/analytics/clicks/top_links"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getTopLinksByClicks" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.analytics.clicks.topLinks({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/analytics/clicks/top_urls"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getTopURLsByClicks" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.analytics.clicks.topUrls({}); + + // Handle the result + console.log(result) + } + run();