From 6e9199001aea5c2db5f7c2f95f2758f868a52676 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 11 Jul 2024 14:56:56 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.331.2 --- .speakeasy/workflow.lock | 11 ++++++----- platform/.speakeasy/gen.lock | 10 +++++----- platform/RELEASES.md | 10 +++++++++- platform/gen.yaml | 2 +- platform/jsr.json | 2 +- platform/package-lock.json | 11 ++--------- platform/package.json | 3 +-- platform/src/lib/config.ts | 7 ++++--- platform/src/lib/sdks.ts | 23 ++++++++++++++++++++++- platform/src/sdk/companies.ts | 5 +++++ platform/src/sdk/connectionmanagement.ts | 1 + platform/src/sdk/connections.ts | 6 ++++++ platform/src/sdk/corssettings.ts | 2 ++ platform/src/sdk/customdatatype.ts | 4 ++++ platform/src/sdk/groups.ts | 4 ++++ platform/src/sdk/integrations.ts | 3 +++ platform/src/sdk/pushdata.ts | 3 +++ platform/src/sdk/refreshdata.ts | 5 +++++ platform/src/sdk/settings.ts | 7 +++++++ platform/src/sdk/supplementaldata.ts | 2 ++ platform/src/sdk/webhooks.ts | 6 ++++++ 21 files changed, 99 insertions(+), 28 deletions(-) diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ac616d92a..6a3762872 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.330.0 +speakeasyVersion: 1.331.2 sources: platform-source: sourceNamespace: platform-source - sourceRevisionDigest: sha256:59b5bd8591d6b39332f73cd4256c7d340f5092490cf62b3276e8eb380cfa7dc7 - sourceBlobDigest: sha256:5bb804deb2a67b94d3d214b593db4ec259c9e1dd50cc424689b59847d0465fcd + sourceRevisionDigest: sha256:14df481219fad245cca40b9bc118b435d81cf76644db91eb6cd141e1ae052504 + sourceBlobDigest: sha256:5d647abdc8820166576203f4baf8ce52892bd5e7a527a4d2ddeeb588ec287226 tags: - latest - main @@ -11,8 +11,8 @@ targets: platform-library: source: platform-source sourceNamespace: platform-source - sourceRevisionDigest: sha256:59b5bd8591d6b39332f73cd4256c7d340f5092490cf62b3276e8eb380cfa7dc7 - sourceBlobDigest: sha256:5bb804deb2a67b94d3d214b593db4ec259c9e1dd50cc424689b59847d0465fcd + sourceRevisionDigest: sha256:14df481219fad245cca40b9bc118b435d81cf76644db91eb6cd141e1ae052504 + sourceBlobDigest: sha256:5d647abdc8820166576203f4baf8ce52892bd5e7a527a4d2ddeeb588ec287226 outLocation: ./platform workflow: workflowVersion: 1.0.0 @@ -105,6 +105,7 @@ workflow: target: typescript source: platform-source output: ./platform + publish: {} sync-for-commerce-library: target: typescript source: sync-for-commerce-source diff --git a/platform/.speakeasy/gen.lock b/platform/.speakeasy/gen.lock index 20382a208..6d53a9cd8 100755 --- a/platform/.speakeasy/gen.lock +++ b/platform/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 6a970e30-8d0a-42f0-a8ce-621dfe880a1d management: docChecksum: ced98ff1180e32d5026f7d960a49babc docVersion: 3.0.0 - speakeasyVersion: 1.330.0 - generationVersion: 2.361.10 - releaseVersion: 3.0.1 - configChecksum: 711ca2bc569c19eac6dff850d0442664 + speakeasyVersion: 1.331.2 + generationVersion: 2.366.1 + releaseVersion: 3.0.2 + configChecksum: b24049153b9330a7ac090f5c5932bd8b repoURL: https://github.com/codatio/client-sdk-typescript.git repoSubDirectory: platform installationURL: https://gitpkg.now.sh/codatio/client-sdk-typescript/platform @@ -15,7 +15,7 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.5 - core: 3.11.5 + core: 3.11.6 deprecations: 2.81.1 examples: 2.81.4 globalSecurity: 2.82.9 diff --git a/platform/RELEASES.md b/platform/RELEASES.md index 571a6aa54..ae24d0db0 100644 --- a/platform/RELEASES.md +++ b/platform/RELEASES.md @@ -124,4 +124,12 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.330.0 (2.361.10) https://github.com/speakeasy-api/speakeasy ### Generated -- [typescript v3.0.1] ./platform \ No newline at end of file +- [typescript v3.0.1] ./platform + +## 2024-07-11 14:55:19 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.331.2 (2.366.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v3.0.2] ./platform \ No newline at end of file diff --git a/platform/gen.yaml b/platform/gen.yaml index 4f90562c1..72e1a75d7 100644 --- a/platform/gen.yaml +++ b/platform/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 3.0.1 + version: 3.0.2 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/platform/jsr.json b/platform/jsr.json index 927dd2a6b..a57d5129c 100644 --- a/platform/jsr.json +++ b/platform/jsr.json @@ -2,7 +2,7 @@ { "name": "@codat/platform", - "version": "3.0.1", + "version": "3.0.2", "exports": { ".": "./src/index.ts", "./sdk/models/errors": "./src/sdk/models/errors/index.ts", diff --git a/platform/package-lock.json b/platform/package-lock.json index c01a3bd44..4ae4ad57b 100644 --- a/platform/package-lock.json +++ b/platform/package-lock.json @@ -1,14 +1,13 @@ { "name": "@codat/platform", - "version": "3.0.1", + "version": "3.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@codat/platform", - "version": "3.0.1", + "version": "3.0.2", "devDependencies": { - "@types/jsonpath": "^0.2.4", "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", "eslint": "^8.57.0", @@ -197,12 +196,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@types/jsonpath": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@types/jsonpath/-/jsonpath-0.2.4.tgz", - "integrity": "sha512-K3hxB8Blw0qgW6ExKgMbXQv2UPZBoE2GqLpVY+yr7nMD2Pq86lsuIzyAaiQ7eMqFL5B6di6pxSkogLJEyEHoGA==", - "dev": true - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.0.tgz", diff --git a/platform/package.json b/platform/package.json index d2aeeb6e1..31cb2af6c 100644 --- a/platform/package.json +++ b/platform/package.json @@ -1,6 +1,6 @@ { "name": "@codat/platform", - "version": "3.0.1", + "version": "3.0.2", "author": "Codat", "main": "./index.js", "sideEffects": false, @@ -18,7 +18,6 @@ "zod": ">= 3" }, "devDependencies": { - "@types/jsonpath": "^0.2.4", "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", "eslint": "^8.57.0", diff --git a/platform/src/lib/config.ts b/platform/src/lib/config.ts index c76d04ca0..f7f20d4fa 100644 --- a/platform/src/lib/config.ts +++ b/platform/src/lib/config.ts @@ -32,6 +32,7 @@ export type SDKOptions = { * Allows overriding the default retry config used by the SDK */ retryConfig?: RetryConfig; + timeoutMs?: number; }; export function serverURLFromOptions(options: SDKOptions): URL | null { @@ -54,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "3.0.0", - sdkVersion: "3.0.1", - genVersion: "2.361.10", - userAgent: "speakeasy-sdk/typescript 3.0.1 2.361.10 3.0.0 @codat/platform", + sdkVersion: "3.0.2", + genVersion: "2.366.1", + userAgent: "speakeasy-sdk/typescript 3.0.2 2.366.1 3.0.0 @codat/platform", } as const; diff --git a/platform/src/lib/sdks.ts b/platform/src/lib/sdks.ts index 740bb0699..de2948755 100644 --- a/platform/src/lib/sdks.ts +++ b/platform/src/lib/sdks.ts @@ -12,6 +12,16 @@ import { SDKHooks } from "../hooks/hooks.js"; import { HookContext } from "../hooks/types.js"; export type RequestOptions = { + /** + * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If + * `fetchOptions.signal` is set then it will take precedence over this option. + */ + timeoutMs?: number; + /** + * Sets various request options on the `fetch` call made by an SDK method. + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} + */ fetchOptions?: Omit; }; @@ -24,6 +34,7 @@ type RequestConfig = { headers?: HeadersInit; security?: SecurityState | null; uaHeader?: string; + timeoutMs?: number; }; const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; @@ -119,10 +130,20 @@ export class ClientSDK { headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); } + let fetchOptions = options?.fetchOptions; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + if (!fetchOptions) { + fetchOptions = { signal: timeoutSignal }; + } else { + fetchOptions.signal = timeoutSignal; + } + } + const input = this.hooks$.beforeCreateRequest(context, { url: reqURL, options: { - ...options?.fetchOptions, + ...fetchOptions, body: conf.body ?? null, headers, method, diff --git a/platform/src/sdk/companies.ts b/platform/src/sdk/companies.ts index 10dbb5d80..92beb693c 100644 --- a/platform/src/sdk/companies.ts +++ b/platform/src/sdk/companies.ts @@ -104,6 +104,7 @@ export class Companies extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -215,6 +216,7 @@ export class Companies extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -318,6 +320,7 @@ export class Companies extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -421,6 +424,7 @@ export class Companies extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -525,6 +529,7 @@ export class Companies extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/connectionmanagement.ts b/platform/src/sdk/connectionmanagement.ts index d26b6f1b4..8e124dee9 100644 --- a/platform/src/sdk/connectionmanagement.ts +++ b/platform/src/sdk/connectionmanagement.ts @@ -108,6 +108,7 @@ export class ConnectionManagement extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/connections.ts b/platform/src/sdk/connections.ts index 25cda039e..15cbc6d19 100644 --- a/platform/src/sdk/connections.ts +++ b/platform/src/sdk/connections.ts @@ -107,6 +107,7 @@ export class Connections extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -220,6 +221,7 @@ export class Connections extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -325,6 +327,7 @@ export class Connections extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -431,6 +434,7 @@ export class Connections extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -537,6 +541,7 @@ export class Connections extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -644,6 +649,7 @@ export class Connections extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/corssettings.ts b/platform/src/sdk/corssettings.ts index 750e2c41a..43e8496f1 100644 --- a/platform/src/sdk/corssettings.ts +++ b/platform/src/sdk/corssettings.ts @@ -83,6 +83,7 @@ export class CorsSettings extends ClientSDK { path: path$, headers: headers$, query: query$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -183,6 +184,7 @@ export class CorsSettings extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/customdatatype.ts b/platform/src/sdk/customdatatype.ts index 9afbbf207..c5df830dc 100644 --- a/platform/src/sdk/customdatatype.ts +++ b/platform/src/sdk/customdatatype.ts @@ -119,6 +119,7 @@ export class CustomDataType extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -228,6 +229,7 @@ export class CustomDataType extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -338,6 +340,7 @@ export class CustomDataType extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -464,6 +467,7 @@ export class CustomDataType extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/groups.ts b/platform/src/sdk/groups.ts index 4d26d3b97..8d1a292e9 100644 --- a/platform/src/sdk/groups.ts +++ b/platform/src/sdk/groups.ts @@ -101,6 +101,7 @@ export class Groups extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -208,6 +209,7 @@ export class Groups extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -292,6 +294,7 @@ export class Groups extends ClientSDK { path: path$, headers: headers$, query: query$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -392,6 +395,7 @@ export class Groups extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/integrations.ts b/platform/src/sdk/integrations.ts index b4f2587ae..04134a708 100644 --- a/platform/src/sdk/integrations.ts +++ b/platform/src/sdk/integrations.ts @@ -99,6 +99,7 @@ export class Integrations extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -198,6 +199,7 @@ export class Integrations extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -299,6 +301,7 @@ export class Integrations extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/pushdata.ts b/platform/src/sdk/pushdata.ts index 5ce4148af..7f1f3e16f 100644 --- a/platform/src/sdk/pushdata.ts +++ b/platform/src/sdk/pushdata.ts @@ -122,6 +122,7 @@ export class PushData extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -226,6 +227,7 @@ export class PushData extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -342,6 +344,7 @@ export class PushData extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/refreshdata.ts b/platform/src/sdk/refreshdata.ts index 7d1431610..e53c1d75a 100644 --- a/platform/src/sdk/refreshdata.ts +++ b/platform/src/sdk/refreshdata.ts @@ -105,6 +105,7 @@ export class RefreshData extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -214,6 +215,7 @@ export class RefreshData extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -313,6 +315,7 @@ export class RefreshData extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -417,6 +420,7 @@ export class RefreshData extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -533,6 +537,7 @@ export class RefreshData extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/settings.ts b/platform/src/sdk/settings.ts index 9772ea65e..f9fcefab1 100644 --- a/platform/src/sdk/settings.ts +++ b/platform/src/sdk/settings.ts @@ -81,6 +81,7 @@ export class Settings extends ClientSDK { path: path$, headers: headers$, query: query$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -174,6 +175,7 @@ export class Settings extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -254,6 +256,7 @@ export class Settings extends ClientSDK { path: path$, headers: headers$, query: query$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -350,6 +353,7 @@ export class Settings extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -434,6 +438,7 @@ export class Settings extends ClientSDK { path: path$, headers: headers$, query: query$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -537,6 +542,7 @@ export class Settings extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -656,6 +662,7 @@ export class Settings extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/supplementaldata.ts b/platform/src/sdk/supplementaldata.ts index 728a6c97c..41e7bc3c2 100644 --- a/platform/src/sdk/supplementaldata.ts +++ b/platform/src/sdk/supplementaldata.ts @@ -112,6 +112,7 @@ export class SupplementalData extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -220,6 +221,7 @@ export class SupplementalData extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); diff --git a/platform/src/sdk/webhooks.ts b/platform/src/sdk/webhooks.ts index 60cb9b825..473978cc1 100644 --- a/platform/src/sdk/webhooks.ts +++ b/platform/src/sdk/webhooks.ts @@ -103,6 +103,7 @@ export class Webhooks extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -211,6 +212,7 @@ export class Webhooks extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -310,6 +312,7 @@ export class Webhooks extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -394,6 +397,7 @@ export class Webhooks extends ClientSDK { path: path$, headers: headers$, query: query$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -494,6 +498,7 @@ export class Webhooks extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); @@ -595,6 +600,7 @@ export class Webhooks extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options );