diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c0c8666a..11f7862f 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: 37d7e2c33b3d71ced9283276b543de34 + docChecksum: 3ef41873dee5fcca0b0407f423aa20bf docVersion: 0.0.1 - speakeasyVersion: 1.246.0 - generationVersion: 2.302.0 - releaseVersion: 0.20.2 - configChecksum: cf1d62f46487352bf64eb9d7f549677a + speakeasyVersion: 1.246.1 + generationVersion: 2.302.1 + releaseVersion: 0.20.3 + configChecksum: d59a77a56a626d3c17af15170f4a04da 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 271d0921..25ca0bfe 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.20.2 + version: 0.20.3 additionalDependencies: dependencies: {} devDependencies: diff --git a/RELEASES.md b/RELEASES.md index 1ded62ee..865166e8 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -26,4 +26,14 @@ Based on: ### Generated - [typescript v0.20.2] . ### Releases -- [NPM v0.20.2] https://www.npmjs.com/package/dub/v/0.20.2 - . \ No newline at end of file +- [NPM v0.20.2] https://www.npmjs.com/package/dub/v/0.20.2 - . + +## 2024-04-10 16:28:04 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.246.1 (2.302.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.20.3] . +### Releases +- [NPM v0.20.3] https://www.npmjs.com/package/dub/v/0.20.3 - . \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6b7fd4bc..1b1488d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dub", - "version": "0.20.2", + "version": "0.20.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dub", - "version": "0.20.2", + "version": "0.20.3", "devDependencies": { "@types/jsonpath": "^0.2.4", "@typescript-eslint/eslint-plugin": "^6.13.2", diff --git a/package.json b/package.json index 85205e07..0af0e744 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dub", - "version": "0.20.2", + "version": "0.20.3", "author": "Dub", "main": "./index.js", "sideEffects": false, diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts index 74a677aa..c4eed9f7 100644 --- a/src/hooks/hooks.ts +++ b/src/hooks/hooks.ts @@ -14,13 +14,17 @@ import { SDKInitOptions, } from "./types"; +import { initHooks } from "./registration"; + export class SDKHooks implements Hooks { sdkInitHooks: SDKInitHook[] = []; beforeRequestHooks: BeforeRequestHook[] = []; afterSuccessHooks: AfterSuccessHook[] = []; afterErrorHooks: AfterErrorHook[] = []; - constructor() {} + constructor() { + initHooks(this); + } registerSDKInitHook(hook: SDKInitHook) { this.sdkInitHooks.push(hook); diff --git a/src/hooks/registration.ts b/src/hooks/registration.ts new file mode 100644 index 00000000..3ae1e457 --- /dev/null +++ b/src/hooks/registration.ts @@ -0,0 +1,14 @@ +import { Hooks } from "./types"; + +/* + * This file is only ever generated once on the first generation and then is free to be modified. + * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them + * in this file or in separate files in the hooks folder. + */ + +// @ts-expect-error remove this line when you add your first hook and hooks is used +export function initHooks(hooks: Hooks) { + // Add hooks by calling hooks.register{ClientInit/BeforeRequest/AfterSuccess/AfterError}Hook + // with an instance of a hook that implements that specific Hook interface + // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance +} diff --git a/src/lib/config.ts b/src/lib/config.ts index 1b275b8a..f4c04476 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 = Object.freeze({ language: "typescript", openapiDocVersion: "0.0.1", - sdkVersion: "0.20.2", - genVersion: "2.302.0", - userAgent: "speakeasy-sdk/typescript 0.20.2 2.302.0 0.0.1 dub", + sdkVersion: "0.20.3", + genVersion: "2.302.1", + userAgent: "speakeasy-sdk/typescript 0.20.3 2.302.1 0.0.1 dub", }); diff --git a/src/sdk/analytics.ts b/src/sdk/analytics.ts index 5e4de14d..46a08ee3 100644 --- a/src/sdk/analytics.ts +++ b/src/sdk/analytics.ts @@ -84,6 +84,10 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", @@ -328,6 +332,10 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", @@ -572,6 +580,10 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", @@ -818,6 +830,10 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", @@ -1064,6 +1080,10 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", @@ -1310,6 +1330,10 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", @@ -1556,6 +1580,10 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", @@ -1802,6 +1830,10 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", @@ -2048,6 +2080,10 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", @@ -2292,6 +2328,10 @@ export class Analytics extends ClientSDK { }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("referer", payload$.referer, { explode: true, charEncoding: "percent", diff --git a/src/sdk/links.ts b/src/sdk/links.ts index 13249ac2..8605c8b8 100644 --- a/src/sdk/links.ts +++ b/src/sdk/links.ts @@ -66,6 +66,10 @@ export class Links extends ClientSDK { const query$ = [ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), enc$.encodeForm("page", payload$.page, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("search", payload$.search, { explode: true, charEncoding: "percent" }), enc$.encodeForm("showArchived", payload$.showArchived, { explode: true, @@ -298,6 +302,10 @@ export class Links extends ClientSDK { const path$ = this.templateURLComponent("/links")(); const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { explode: true, charEncoding: "percent", @@ -517,6 +525,10 @@ export class Links extends ClientSDK { explode: true, charEncoding: "percent", }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("search", payload$.search, { explode: true, charEncoding: "percent" }), enc$.encodeForm("showArchived", payload$.showArchived, { explode: true, @@ -748,6 +760,10 @@ export class Links extends ClientSDK { const query$ = [ enc$.encodeForm("domain", payload$.domain, { explode: true, charEncoding: "percent" }), enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { explode: true, charEncoding: "percent", @@ -977,6 +993,10 @@ export class Links extends ClientSDK { const path$ = this.templateURLComponent("/links/{linkId}")(pathParams$); const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { explode: true, charEncoding: "percent", @@ -1203,6 +1223,10 @@ export class Links extends ClientSDK { const path$ = this.templateURLComponent("/links/{linkId}")(pathParams$); const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { explode: true, charEncoding: "percent", @@ -1422,6 +1446,10 @@ export class Links extends ClientSDK { const path$ = this.templateURLComponent("/links/bulk")(); const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { explode: true, charEncoding: "percent", diff --git a/src/sdk/tags.ts b/src/sdk/tags.ts index ae1d49f3..a19769ee 100644 --- a/src/sdk/tags.ts +++ b/src/sdk/tags.ts @@ -57,6 +57,10 @@ export class Tags extends ClientSDK { const path$ = this.templateURLComponent("/tags")(); const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { explode: true, charEncoding: "percent", @@ -275,6 +279,10 @@ export class Tags extends ClientSDK { const path$ = this.templateURLComponent("/tags")(); const query$ = [ + enc$.encodeForm("projectSlug", this.options$.projectSlug, { + explode: true, + charEncoding: "percent", + }), enc$.encodeForm("workspaceId", this.options$.workspaceId, { explode: true, charEncoding: "percent",