ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.272.2 (#90)

Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
This commit is contained in:
github-actions[bot]
2024-04-24 21:04:51 +05:30
committed by GitHub
parent b6c0b1dcec
commit bc0ce5a04a
11 changed files with 618 additions and 38 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: f28179cc-ef59-426d-9e85-60cec22fc642
management:
docChecksum: d13f5102cda97c578071c17197996172
docChecksum: f62cc4d5545e36a4e97e221748501663
docVersion: 0.0.1
speakeasyVersion: 1.272.0
speakeasyVersion: 1.272.2
generationVersion: 2.312.1
releaseVersion: 0.24.5
configChecksum: 92157209ffa5c1159c8556491f90b1cd
releaseVersion: 0.24.6
configChecksum: 9712e5c733f4acb8472f37101f9293dc
repoURL: https://github.com/dubinc/dub-node.git
installationURL: https://github.com/dubinc/dub-node
published: true

View File

@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
typescript:
version: 0.24.5
version: 0.24.6
additionalDependencies:
dependencies: {}
devDependencies:

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.272.0
speakeasyVersion: 1.272.2
sources:
my-first-source: {}
targets:
@@ -19,3 +19,5 @@ workflow:
publish:
npm:
token: $npm_token
codeSamples:
output: codeSamples.yaml

View File

@@ -166,4 +166,14 @@ Based on:
### Generated
- [typescript v0.24.5] .
### Releases
- [NPM v0.24.5] https://www.npmjs.com/package/dub/v/0.24.5 - .
- [NPM v0.24.5] https://www.npmjs.com/package/dub/v/0.24.5 - .
## 2024-04-24 15:30:41
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.272.2 (2.312.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.24.6] .
### Releases
- [NPM v0.24.6] https://www.npmjs.com/package/dub/v/0.24.6 - .

565
codeSamples.yaml Normal file
View File

@@ -0,0 +1,565 @@
overlay: 1.0.0
info:
title: CodeSamples overlay for typescript target
version: 0.0.0
actions:
- 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: "<value>",
});
async function run() {
const result = await dub.add({
slug: "acme.com",
});
// 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: "<value>",
});
async function run() {
const result = await dub.list({});
// 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: "<value>",
});
async function run() {
const result = await dub.timeseries({});
// 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: "<value>",
});
async function run() {
const result = await dub.devices({});
// 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: "<value>",
});
async function run() {
const result = await dub.browsers({});
// 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: "<value>",
});
async function run() {
const result = await dub.topUrls({});
// 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: \"<value>\",\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"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "createLink"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.create({
url: "https://google/com",
});
// 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: \"<value>\",\n});\n\nasync function run() {\n const linkId = \"<value>\";\n \n const result = await dub.delete(linkId);\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
- 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: "<value>",
});
async function run() {
const result = await dub.referers({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/analytics/top_links"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getTopLinks"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.topLinks({});
// 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: \"<value>\",\n});\n\nasync function run() {\n const slug = \"acme.com\";\n const requestBody = {\n newWorkspaceId: \"<value>\",\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: "<value>",
});
async function run() {
const result = await dub.list({});
// 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: "<value>",
});
async function run() {
const result = await dub.create({
name: "<value>",
slug: "<value>",
});
// 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: \"<value>\",\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"]["/workspaces"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getWorkspaces"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.list();
// 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: "<value>",
});
async function run() {
const result = await dub.countries({});
// 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",
workspaceId: "<value>",
});
async function run() {
const result = await dub.create({
tag: "<value>",
});
// 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: "<value>",
});
async function run() {
const result = await dub.get({});
// 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: "<value>",
});
async function run() {
const result = await dub.get({
domain: "ringed-blow.name",
key: "<key>",
});
// Handle the result
console.log(result)
}
run();
- 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: \"<value>\",\n});\n\nasync function run() {\n const linkId = \"<value>\";\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"]["/links/bulk"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "bulkCreateLinks"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.createMany([
{
url: "https://google/com",
},
]);
// 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: "<value>",
});
async function run() {
const result = await dub.list({});
// 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: "<value>",
});
async function run() {
const result = await dub.count({});
// 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: "<value>",
});
async function run() {
const result = await dub.cities({});
// 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: "<value>",
});
async function run() {
const result = await dub.os({});
// 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: "<value>",
});
async function run() {
const result = await dub.get({
url: "https://dub.co",
});
// Handle the result
console.log(result)
}
run();
- 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: "<value>",
});
async function run() {
const result = await dub.clicks({});
// 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: \"<value>\",\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"]["/workspaces/{idOrSlug}"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getWorkspace"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.get({
idOrSlug: "<value>",
});
// Handle the result
console.log(result)
}
run();

View File

@@ -116,7 +116,7 @@ run();
## delete
Delete a domain from a workspace.
Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
### Example Usage
@@ -129,9 +129,9 @@ const dub = new Dub({
});
async function run() {
const result = await dub.domains.delete({
slug: "acme.com",
});
const slug = "acme.com";
const result = await dub.domains.delete(slug);
// Handle the result
console.log(result)
@@ -142,11 +142,11 @@ run();
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.DeleteDomainRequest](../../models/operations/deletedomainrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `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. |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `slug` | *string* | :heavy_check_mark: | The domain name. | [object Object] |
| `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. | |
### Response
@@ -237,9 +237,9 @@ const dub = new Dub({
});
async function run() {
const result = await dub.domains.setPrimary({
slug: "acme.com",
});
const slug = "acme.com";
const result = await dub.domains.setPrimary(slug);
// Handle the result
console.log(result)
@@ -250,11 +250,11 @@ run();
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.SetPrimaryDomainRequest](../../models/operations/setprimarydomainrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `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. |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `slug` | *string* | :heavy_check_mark: | The domain name. | [object Object] |
| `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. | |
### Response

View File

@@ -2,7 +2,7 @@
{
"name": "dub",
"version": "0.24.5",
"version": "0.24.6",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "dub",
"version": "0.24.5",
"version": "0.24.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "dub",
"version": "0.24.5",
"version": "0.24.6",
"devDependencies": {
"@types/jsonpath": "^0.2.4",
"@types/node": "^20.12.7",

View File

@@ -1,6 +1,6 @@
{
"name": "dub",
"version": "0.24.5",
"version": "0.24.6",
"author": "Dub",
"main": "./index.js",
"sideEffects": false,

View File

@@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.0.1",
sdkVersion: "0.24.5",
sdkVersion: "0.24.6",
genVersion: "2.312.1",
userAgent: "speakeasy-sdk/typescript 0.24.5 2.312.1 0.0.1 dub",
userAgent: "speakeasy-sdk/typescript 0.24.6 2.312.1 0.0.1 dub",
} as const;

View File

@@ -480,18 +480,21 @@ export class Domains extends ClientSDK {
* Delete a domain
*
* @remarks
* Delete a domain from a workspace.
* Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
*/
async delete(
input: operations.DeleteDomainRequest,
slug: string,
options?: RequestOptions
): Promise<operations.DeleteDomainResponseBody> {
const input$: operations.DeleteDomainRequest = {
slug: slug,
};
const headers$ = new Headers();
headers$.set("user-agent", SDK_METADATA.userAgent);
headers$.set("Accept", "application/json");
const payload$ = schemas$.parse(
input,
input$,
(value$) => operations.DeleteDomainRequest$.outboundSchema.parse(value$),
"Input validation failed"
);
@@ -942,16 +945,16 @@ export class Domains extends ClientSDK {
* @remarks
* Set a domain as primary for the authenticated workspace.
*/
async setPrimary(
input: operations.SetPrimaryDomainRequest,
options?: RequestOptions
): Promise<components.DomainSchema> {
async setPrimary(slug: string, options?: RequestOptions): Promise<components.DomainSchema> {
const input$: operations.SetPrimaryDomainRequest = {
slug: slug,
};
const headers$ = new Headers();
headers$.set("user-agent", SDK_METADATA.userAgent);
headers$.set("Accept", "application/json");
const payload$ = schemas$.parse(
input,
input$,
(value$) => operations.SetPrimaryDomainRequest$.outboundSchema.parse(value$),
"Input validation failed"
);