diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f4be6fa..34c9439 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: f28179cc-ef59-426d-9e85-60cec22fc642 management: - docChecksum: f62cc4d5545e36a4e97e221748501663 + docChecksum: 301ac8b067918fa1a62bb9be99b93094 docVersion: 0.0.1 speakeasyVersion: 1.274.1 generationVersion: 2.314.0 - releaseVersion: 0.25.0 - configChecksum: 30642fe6dce694be4bd19b050af01108 + releaseVersion: 0.25.1 + configChecksum: 08f0714c4fc55e95edc8c654394f5bcf 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 c8344a0..bf33512 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.25.0 + version: 0.25.1 additionalDependencies: dependencies: {} devDependencies: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 764d940..97aad8f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,17 @@ speakeasyVersion: 1.274.1 sources: - my-first-source: {} + my-first-source: + sourceNamespace: my-first-source + sourceRevisionDigest: sha256:1ec04d64ce9d8669e3f76257126409fab6bad34096dbed532525fcb1222437ce + sourceBlobDigest: sha256:62b12b0629e54b9f7ce3fa321d248a2fd18a778bd3e223dc6603583aa66922f4 + tags: + - latest targets: my-first-target: source: my-first-source + sourceNamespace: my-first-source + sourceRevisionDigest: sha256:1ec04d64ce9d8669e3f76257126409fab6bad34096dbed532525fcb1222437ce + sourceBlobDigest: sha256:62b12b0629e54b9f7ce3fa321d248a2fd18a778bd3e223dc6603583aa66922f4 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index 0b93b6a..cca5716 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -186,4 +186,14 @@ Based on: ### Generated - [typescript v0.25.0] . ### Releases -- [NPM v0.25.0] https://www.npmjs.com/package/dub/v/0.25.0 - . \ No newline at end of file +- [NPM v0.25.0] https://www.npmjs.com/package/dub/v/0.25.0 - . + +## 2024-04-26 01:12:55 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.274.1 (2.314.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.25.1] . +### Releases +- [NPM v0.25.1] https://www.npmjs.com/package/dub/v/0.25.1 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 8ea3f24..36371f4 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -24,11 +24,11 @@ actions: } run(); - - target: $["paths"]["/workspaces"]["post"] + - target: $["paths"]["/tags"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "createWorkspace" + "label": "createTag" "source": |- import { Dub } from "dub"; @@ -39,8 +39,7 @@ actions: async function run() { const result = await dub.create({ - name: "", - slug: "", + tag: "", }); // Handle the result @@ -48,11 +47,11 @@ actions: } run(); - - target: $["paths"]["/domains"]["post"] + - target: $["paths"]["/links"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "addDomain" + "label": "createLink" "source": |- import { Dub } from "dub"; @@ -62,8 +61,8 @@ actions: }); async function run() { - const result = await dub.add({ - slug: "acme.com", + const result = await dub.create({ + url: "https://google/com", }); // Handle the result @@ -71,11 +70,17 @@ actions: } run(); - - target: $["paths"]["/analytics/browser"]["get"] + - target: $["paths"]["/links/{linkId}"]["put"] update: "x-codeSamples": - "lang": "typescript" - "label": "getBrowserAnalytics" + "label": "editLink" + "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"]["/tags"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getTags" "source": |- import { Dub } from "dub"; @@ -85,18 +90,18 @@ actions: }); async function run() { - const result = await dub.browsers({}); + const result = await dub.list({}); // Handle the result console.log(result) } run(); - - target: $["paths"]["/analytics/country"]["get"] + - target: $["paths"]["/analytics/top_urls"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getCountryAnalytics" + "label": "getTopURLs" "source": |- import { Dub } from "dub"; @@ -106,13 +111,19 @@ actions: }); async function run() { - const result = await dub.countries({}); + const result = await dub.topUrls({}); // Handle the result console.log(result) } run(); + - target: $["paths"]["/domains/{slug}"]["delete"] + 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/{linkId}"]["delete"] update: "x-codeSamples": @@ -140,11 +151,11 @@ actions: } run(); - - target: $["paths"]["/analytics/device"]["get"] + - target: $["paths"]["/analytics/clicks"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getDeviceAnalytics" + "label": "getClicksAnalytics" "source": |- import { Dub } from "dub"; @@ -154,124 +165,7 @@ actions: }); async function run() { - const result = await dub.devices({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/referer"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getRefererAnalytics" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.referers({}); - - // 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.list({}); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/domains/{slug}"]["patch"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "editDomain" - "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/{linkId}"]["put"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "editLink" - "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/timeseries"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTimeseriesAnalytics" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.timeseries({}); - - // 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"]["/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.count({}); + const result = await dub.clicks({}); // Handle the result console.log(result) @@ -302,11 +196,11 @@ actions: } run(); - - target: $["paths"]["/links/bulk"]["post"] + - target: $["paths"]["/workspaces"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "bulkCreateLinks" + "label": "getWorkspaces" "source": |- import { Dub } from "dub"; @@ -316,32 +210,7 @@ actions: }); async function run() { - const result = await dub.createMany([ - { - url: "https://google/com", - }, - ]); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/analytics/top_urls"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "getTopURLs" - "source": |- - import { Dub } from "dub"; - - const dub = new Dub({ - token: "DUB_API_KEY", - workspaceId: "", - }); - - async function run() { - const result = await dub.topUrls({}); + const result = await dub.list(); // Handle the result console.log(result) @@ -371,17 +240,11 @@ actions: } run(); - - target: $["paths"]["/domains/{slug}"]["delete"] + - target: $["paths"]["/workspaces"]["post"] 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": "createWorkspace" "source": |- import { Dub } from "dub"; @@ -392,7 +255,8 @@ actions: async function run() { const result = await dub.create({ - url: "https://google/com", + name: "", + slug: "", }); // Handle the result @@ -400,11 +264,11 @@ actions: } run(); - - target: $["paths"]["/analytics/clicks"]["get"] + - target: $["paths"]["/metatags"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "getClicksAnalytics" + "label": "getMetatags" "source": |- import { Dub } from "dub"; @@ -414,7 +278,51 @@ actions: }); async function run() { - const result = await dub.clicks({}); + const result = await dub.get({ + url: "https://dub.co", + }); + + // 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.count({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/analytics/browser"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getBrowserAnalytics" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.browsers({}); // Handle the result console.log(result) @@ -442,11 +350,17 @@ actions: } run(); - - target: $["paths"]["/tags"]["post"] + - target: $["paths"]["/domains/{slug}"]["patch"] update: "x-codeSamples": - "lang": "typescript" - "label": "createTag" + "label": "editDomain" + "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/bulk"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "bulkCreateLinks" "source": |- import { Dub } from "dub"; @@ -456,86 +370,11 @@ actions: }); async function run() { - const result = await dub.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\";\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"]["/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"]["/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"]["/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"]["/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(); + const result = await dub.createMany([ + { + url: "https://google/com", + }, + ]); // Handle the result console.log(result) @@ -562,4 +401,165 @@ 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.add({ + slug: "acme.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\";\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"]["/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"]["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"]["/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"]["/analytics/referer"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getRefererAnalytics" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.referers({}); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/analytics/timeseries"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "getTimeseriesAnalytics" + "source": |- + import { Dub } from "dub"; + + const dub = new Dub({ + token: "DUB_API_KEY", + workspaceId: "", + }); + + async function run() { + const result = await dub.timeseries({}); + + // Handle the result + console.log(result) + } + + run(); + - 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/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/docs/models/operations/createlinkrequestbody.md b/docs/models/operations/createlinkrequestbody.md index 2857170..2fd42ff 100644 --- a/docs/models/operations/createlinkrequestbody.md +++ b/docs/models/operations/createlinkrequestbody.md @@ -8,7 +8,7 @@ | `url` | *string* | :heavy_check_mark: | The destination URL of the short link. | https://google/com | | `domain` | *string* | :heavy_minus_sign: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | | | `key` | *string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. | 123456 | +| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. | 123456 | | `prefix` | *string* | :heavy_minus_sign: | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. | | | `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. | | | `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | | diff --git a/docs/models/operations/deletelinkrequest.md b/docs/models/operations/deletelinkrequest.md index 4543f62..640ee12 100644 --- a/docs/models/operations/deletelinkrequest.md +++ b/docs/models/operations/deletelinkrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `linkId` | *string* | :heavy_check_mark: | The id of the link to delete. You can get this via the `getLinkInfo` endpoint. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `linkId` | *string* | :heavy_check_mark: | The id of the link to delete. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`. | \ No newline at end of file diff --git a/docs/models/operations/editlinkrequest.md b/docs/models/operations/editlinkrequest.md index 34b9e4f..c4d6a3f 100644 --- a/docs/models/operations/editlinkrequest.md +++ b/docs/models/operations/editlinkrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `linkId` | *string* | :heavy_check_mark: | The id of the link to edit. You can get this via the `getLinkInfo` endpoint. | -| `requestBody` | [operations.EditLinkRequestBody](../../models/operations/editlinkrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `linkId` | *string* | :heavy_check_mark: | The id of the link to edit. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`. | +| `requestBody` | [operations.EditLinkRequestBody](../../models/operations/editlinkrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/editlinkrequestbody.md b/docs/models/operations/editlinkrequestbody.md index 7a4a024..3065b5a 100644 --- a/docs/models/operations/editlinkrequestbody.md +++ b/docs/models/operations/editlinkrequestbody.md @@ -8,7 +8,7 @@ | `url` | *string* | :heavy_check_mark: | The destination URL of the short link. | https://google/com | | `domain` | *string* | :heavy_minus_sign: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | | | `key` | *string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. | 123456 | +| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. | 123456 | | `prefix` | *string* | :heavy_minus_sign: | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. | | | `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. | | | `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | | diff --git a/docs/models/operations/requestbody.md b/docs/models/operations/requestbody.md index 7f5e1e6..91af03d 100644 --- a/docs/models/operations/requestbody.md +++ b/docs/models/operations/requestbody.md @@ -8,7 +8,7 @@ | `url` | *string* | :heavy_check_mark: | The destination URL of the short link. | https://google/com | | `domain` | *string* | :heavy_minus_sign: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | | | `key` | *string* | :heavy_minus_sign: | The short link slug. If not provided, a random 7-character slug will be generated. | | -| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. | 123456 | +| `externalId` | *string* | :heavy_minus_sign: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. | 123456 | | `prefix` | *string* | :heavy_minus_sign: | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided. | | | `archived` | *boolean* | :heavy_minus_sign: | Whether the short link is archived. | | | `publicStats` | *boolean* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | | diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md index 6266c14..a015d4a 100644 --- a/docs/sdks/links/README.md +++ b/docs/sdks/links/README.md @@ -253,7 +253,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `linkId` | *string* | :heavy_check_mark: | The id of the link to edit. You can get this via the `getLinkInfo` endpoint. | +| `linkId` | *string* | :heavy_check_mark: | The id of the link to edit. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`. | | `requestBody` | [operations.EditLinkRequestBody](../../models/operations/editlinkrequestbody.md) | :heavy_minus_sign: | N/A | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | @@ -307,7 +307,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `linkId` | *string* | :heavy_check_mark: | The id of the link to delete. You can get this via the `getLinkInfo` endpoint. | +| `linkId` | *string* | :heavy_check_mark: | The id of the link to delete. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | diff --git a/jsr.json b/jsr.json index 064fb1b..ac55248 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "dub", - "version": "0.25.0", + "version": "0.25.1", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 834f4a2..1fe1bb0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dub", - "version": "0.25.0", + "version": "0.25.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dub", - "version": "0.25.0", + "version": "0.25.1", "devDependencies": { "@types/jsonpath": "^0.2.4", "@types/node": "^20.12.7", diff --git a/package.json b/package.json index afa94b7..749e3d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dub", - "version": "0.25.0", + "version": "0.25.1", "author": "Dub", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 66706ef..0849982 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.25.0", + sdkVersion: "0.25.1", genVersion: "2.314.0", - userAgent: "speakeasy-sdk/typescript 0.25.0 2.314.0 0.0.1 dub", + userAgent: "speakeasy-sdk/typescript 0.25.1 2.314.0 0.0.1 dub", } as const; diff --git a/src/models/operations/bulkcreatelinks.ts b/src/models/operations/bulkcreatelinks.ts index 75b11bf..7033c02 100644 --- a/src/models/operations/bulkcreatelinks.ts +++ b/src/models/operations/bulkcreatelinks.ts @@ -284,7 +284,7 @@ export type RequestBody = { */ key?: string | undefined; /** - * This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. + * This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. */ externalId?: string | null | undefined; /** diff --git a/src/models/operations/createlink.ts b/src/models/operations/createlink.ts index c9e14d2..70599f3 100644 --- a/src/models/operations/createlink.ts +++ b/src/models/operations/createlink.ts @@ -284,7 +284,7 @@ export type CreateLinkRequestBody = { */ key?: string | undefined; /** - * This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. + * This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. */ externalId?: string | null | undefined; /** diff --git a/src/models/operations/deletelink.ts b/src/models/operations/deletelink.ts index 2128631..0d714be 100644 --- a/src/models/operations/deletelink.ts +++ b/src/models/operations/deletelink.ts @@ -6,7 +6,7 @@ import * as z from "zod"; export type DeleteLinkRequest = { /** - * The id of the link to delete. You can get this via the `getLinkInfo` endpoint. + * The id of the link to delete. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`. */ linkId: string; }; diff --git a/src/models/operations/editlink.ts b/src/models/operations/editlink.ts index 2f7f2d9..dbae2f0 100644 --- a/src/models/operations/editlink.ts +++ b/src/models/operations/editlink.ts @@ -284,7 +284,7 @@ export type EditLinkRequestBody = { */ key?: string | undefined; /** - * This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. + * This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. */ externalId?: string | null | undefined; /** @@ -365,7 +365,7 @@ export type EditLinkRequestBody = { export type EditLinkRequest = { /** - * The id of the link to edit. You can get this via the `getLinkInfo` endpoint. + * The id of the link to edit. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`. */ linkId: string; requestBody?: EditLinkRequestBody | undefined;