diff --git a/RELEASES.md b/RELEASES.md index 01c1badaa..1b5b41395 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -804,4 +804,12 @@ Based on: - [php v1.35.2] php-client-sdk - [python v1.36.2] python-client-sdk - [ruby v1.35.2] ruby-client-sdk -- [typescript v1.37.2] typescript-client-sdk \ No newline at end of file +- [typescript v1.37.2] typescript-client-sdk + +## 2023-10-04 14:28:03 +### Changes +Based on: +- OpenAPI Doc 0.1.0 +- Speakeasy CLI 1.93.3 (2.146.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.37.3] typescript-client-sdk \ No newline at end of file diff --git a/typescript-client-sdk/__tests__/telemetry.test.ts b/typescript-client-sdk/__tests__/telemetry.test.ts index 7aedd3b29..17b20c796 100755 --- a/typescript-client-sdk/__tests__/telemetry.test.ts +++ b/typescript-client-sdk/__tests__/telemetry.test.ts @@ -21,7 +21,7 @@ test("Test Telemetry User Agent Get", async () => { expect(res.statusCode).toBeDefined(); expect(res.statusCode).toBe(200); expect(res.res?.headers["X-Speakeasy-User-Agent"]).toBe( - "speakeasy-sdk/typescript 1.37.2 2.144.7 0.1.0 openapi" + "speakeasy-sdk/typescript 1.37.3 2.146.1 0.1.0 openapi" ); }); @@ -39,6 +39,6 @@ test("Test Telemetry Speakeasy User Agent Get", async () => { expect(res.statusCode).toBe(200); expect(res.res?.headers["User-Agent"]).toBe(userAgent); expect(res.res?.headers["X-Speakeasy-User-Agent"]).toBe( - "speakeasy-sdk/typescript 1.37.2 2.144.7 0.1.0 openapi" + "speakeasy-sdk/typescript 1.37.3 2.146.1 0.1.0 openapi" ); }); diff --git a/typescript-client-sdk/docs/models/shared/defaultsandconsts.md b/typescript-client-sdk/docs/models/shared/defaultsandconsts.md index 2acce7271..c27588ad8 100755 --- a/typescript-client-sdk/docs/models/shared/defaultsandconsts.md +++ b/typescript-client-sdk/docs/models/shared/defaultsandconsts.md @@ -3,35 +3,33 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `constBigInt` | *number* | :heavy_check_mark: | N/A | -| `constBigIntStr` | *string* | :heavy_check_mark: | N/A | -| `constBool` | *boolean* | :heavy_check_mark: | N/A | -| `constDate` | [RFCDate](../../types/rfcdate.md) | :heavy_check_mark: | N/A | -| `constDateTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | -| `constDecimal` | *number* | :heavy_check_mark: | N/A | -| `constDecimalStr` | *string* | :heavy_check_mark: | N/A | -| `constEnumInt` | [DefaultsAndConstsConstEnumInt](../../models/shared/defaultsandconstsconstenumint.md) | :heavy_check_mark: | N/A | -| `constEnumStr` | [DefaultsAndConstsConstEnumStr](../../models/shared/defaultsandconstsconstenumstr.md) | :heavy_check_mark: | N/A | -| `constInt` | *number* | :heavy_check_mark: | N/A | -| `constNum` | *number* | :heavy_check_mark: | N/A | -| `constStr` | *string* | :heavy_check_mark: | N/A | -| `constStrNull` | *string* | :heavy_check_mark: | N/A | -| `defaultBigInt` | *number* | :heavy_minus_sign: | N/A | -| `defaultBigIntStr` | *string* | :heavy_minus_sign: | N/A | -| `defaultBool` | *boolean* | :heavy_minus_sign: | N/A | -| `defaultDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | N/A | -| `defaultDateTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `defaultDecimal` | *number* | :heavy_minus_sign: | N/A | -| `defaultDecimalStr` | *string* | :heavy_minus_sign: | N/A | -| `defaultEnumInt` | [DefaultsAndConstsDefaultEnumInt](../../models/shared/defaultsandconstsdefaultenumint.md) | :heavy_minus_sign: | N/A | -| `defaultEnumStr` | [DefaultsAndConstsDefaultEnumStr](../../models/shared/defaultsandconstsdefaultenumstr.md) | :heavy_minus_sign: | N/A | -| `defaultInt` | *number* | :heavy_minus_sign: | N/A | -| `defaultNum` | *number* | :heavy_minus_sign: | N/A | -| `defaultStr` | *string* | :heavy_minus_sign: | N/A | -| `defaultStrNullable` | *string* | :heavy_minus_sign: | N/A | -| `defaultStrOptional` | *string* | :heavy_minus_sign: | N/A | -| `normalField` | *string* | :heavy_check_mark: | N/A | -| `singleEnumConstBool` | *boolean* | :heavy_check_mark: | N/A | -| `singleEnumConstStr` | [DefaultsAndConstsSingleEnumConstStr](../../models/shared/defaultsandconstssingleenumconststr.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `constBigInt` | *number* | :heavy_check_mark: | N/A | +| `constBigIntStr` | *string* | :heavy_check_mark: | N/A | +| `constBool` | *boolean* | :heavy_check_mark: | N/A | +| `constDate` | [RFCDate](../../types/rfcdate.md) | :heavy_check_mark: | N/A | +| `constDateTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | +| `constDecimal` | *number* | :heavy_check_mark: | N/A | +| `constDecimalStr` | *string* | :heavy_check_mark: | N/A | +| `constEnumInt` | [DefaultsAndConstsConstEnumInt](../../models/shared/defaultsandconstsconstenumint.md) | :heavy_check_mark: | N/A | +| `constEnumStr` | [DefaultsAndConstsConstEnumStr](../../models/shared/defaultsandconstsconstenumstr.md) | :heavy_check_mark: | N/A | +| `constInt` | *number* | :heavy_check_mark: | N/A | +| `constNum` | *number* | :heavy_check_mark: | N/A | +| `constStr` | *string* | :heavy_check_mark: | N/A | +| `constStrNull` | *string* | :heavy_check_mark: | N/A | +| `defaultBigInt` | *number* | :heavy_minus_sign: | N/A | +| `defaultBigIntStr` | *string* | :heavy_minus_sign: | N/A | +| `defaultBool` | *boolean* | :heavy_minus_sign: | N/A | +| `defaultDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | N/A | +| `defaultDateTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `defaultDecimal` | *number* | :heavy_minus_sign: | N/A | +| `defaultDecimalStr` | *string* | :heavy_minus_sign: | N/A | +| `defaultEnumInt` | [DefaultsAndConstsDefaultEnumInt](../../models/shared/defaultsandconstsdefaultenumint.md) | :heavy_minus_sign: | N/A | +| `defaultEnumStr` | [DefaultsAndConstsDefaultEnumStr](../../models/shared/defaultsandconstsdefaultenumstr.md) | :heavy_minus_sign: | N/A | +| `defaultInt` | *number* | :heavy_minus_sign: | N/A | +| `defaultNum` | *number* | :heavy_minus_sign: | N/A | +| `defaultStr` | *string* | :heavy_minus_sign: | N/A | +| `defaultStrNullable` | *string* | :heavy_minus_sign: | N/A | +| `defaultStrOptional` | *string* | :heavy_minus_sign: | N/A | +| `normalField` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/typescript-client-sdk/docs/models/shared/defaultsandconstsoutput.md b/typescript-client-sdk/docs/models/shared/defaultsandconstsoutput.md index baeab7764..4134162a9 100755 --- a/typescript-client-sdk/docs/models/shared/defaultsandconstsoutput.md +++ b/typescript-client-sdk/docs/models/shared/defaultsandconstsoutput.md @@ -32,6 +32,4 @@ | `defaultStr` | *string* | :heavy_check_mark: | N/A | | `defaultStrNullable` | *string* | :heavy_check_mark: | N/A | | `defaultStrOptional` | *string* | :heavy_minus_sign: | N/A | -| `normalField` | *string* | :heavy_check_mark: | N/A | -| `singleEnumConstBool` | *boolean* | :heavy_check_mark: | N/A | -| `singleEnumConstStr` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `normalField` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/typescript-client-sdk/docs/models/shared/defaultsandconstssingleenumconststr.md b/typescript-client-sdk/docs/models/shared/defaultsandconstssingleenumconststr.md deleted file mode 100755 index 54cf2a545..000000000 --- a/typescript-client-sdk/docs/models/shared/defaultsandconstssingleenumconststr.md +++ /dev/null @@ -1,8 +0,0 @@ -# DefaultsAndConstsSingleEnumConstStr - - -## Values - -| Name | Value | -| ----- | ----- | -| `One` | one | \ No newline at end of file diff --git a/typescript-client-sdk/docs/sdks/requestbodies/README.md b/typescript-client-sdk/docs/sdks/requestbodies/README.md index 75a1ebb0e..c73b90593 100755 --- a/typescript-client-sdk/docs/sdks/requestbodies/README.md +++ b/typescript-client-sdk/docs/sdks/requestbodies/README.md @@ -1888,7 +1888,6 @@ import { DefaultsAndConstsConstEnumStr, DefaultsAndConstsDefaultEnumInt, DefaultsAndConstsDefaultEnumStr, - DefaultsAndConstsSingleEnumConstStr, } from "openapi/dist/sdk/models/shared"; import { RFCDate } from "openapi/dist/sdk/types"; @@ -1929,8 +1928,6 @@ sdk.requestBodies.requestBodyPostDefaultsAndConsts({ defaultStrNullable: "silver Central", defaultStrOptional: "Gasoline Pines boo", normalField: "free", - singleEnumConstBool: false, - singleEnumConstStr: DefaultsAndConstsSingleEnumConstStr.One, }).then((res: RequestBodyPostDefaultsAndConstsResponse) => { if (res.statusCode == 200) { // handle response diff --git a/typescript-client-sdk/files.gen b/typescript-client-sdk/files.gen index e26f21601..eb4e31a71 100755 --- a/typescript-client-sdk/files.gen +++ b/typescript-client-sdk/files.gen @@ -812,7 +812,6 @@ docs/models/shared/defaultsandconstsconstenumint.md docs/models/shared/defaultsandconstsconstenumstr.md docs/models/shared/defaultsandconstsdefaultenumint.md docs/models/shared/defaultsandconstsdefaultenumstr.md -docs/models/shared/defaultsandconstssingleenumconststr.md docs/models/shared/defaultsandconsts.md docs/models/shared/readwriteobjectinput.md docs/models/shared/readwriteobjectoutput.md diff --git a/typescript-client-sdk/gen.yaml b/typescript-client-sdk/gen.yaml index 812e0f6a2..7908a2438 100755 --- a/typescript-client-sdk/gen.yaml +++ b/typescript-client-sdk/gen.yaml @@ -2,15 +2,15 @@ configVersion: 1.0.0 management: docChecksum: 09f66eb85627e03a8cf855efeda04a31 docVersion: 0.1.0 - speakeasyVersion: 1.93.1 - generationVersion: 2.144.7 + speakeasyVersion: 1.93.3 + generationVersion: 2.146.1 generation: sdkClassName: SDK singleTagPerOp: false features: typescript: acceptHeaders: 2.81.1 - core: 2.90.1 + core: 2.90.2 deprecations: 2.81.1 docs: 0.2.1 enums: 2.81.1 @@ -31,7 +31,7 @@ features: retries: 2.82.1 serverIDs: 2.81.1 typescript: - version: 1.37.2 + version: 1.37.3 author: Speakeasy clientServerStatusCodesAsErrors: true maxMethodParams: 5 diff --git a/typescript-client-sdk/package-lock.json b/typescript-client-sdk/package-lock.json index fc2d88de8..c55590d3d 100755 --- a/typescript-client-sdk/package-lock.json +++ b/typescript-client-sdk/package-lock.json @@ -1,12 +1,12 @@ { "name": "openapi", - "version": "1.37.2", + "version": "1.37.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "openapi", - "version": "1.37.2", + "version": "1.37.3", "dependencies": { "axios": "^1.1.3", "class-transformer": "^0.5.1", diff --git a/typescript-client-sdk/package.json b/typescript-client-sdk/package.json index 28574065b..e7dab511a 100755 --- a/typescript-client-sdk/package.json +++ b/typescript-client-sdk/package.json @@ -1,6 +1,6 @@ { "name": "openapi", - "version": "1.37.2", + "version": "1.37.3", "author": "Speakeasy", "scripts": { "prepare": "tsc --build", diff --git a/typescript-client-sdk/src/internal/utils/utils.ts b/typescript-client-sdk/src/internal/utils/utils.ts index dc6b28905..03daf8839 100755 --- a/typescript-client-sdk/src/internal/utils/utils.ts +++ b/typescript-client-sdk/src/internal/utils/utils.ts @@ -81,7 +81,7 @@ export class SpeakeasyBase { for (const prop of props) { if (payload && payload.hasOwnProperty(prop.key)) { const value = payload[prop.key]; - if (isSpeakeasyBase(prop.type)) { + if (isSpeakeasyBase(prop.type) && value != null) { (this as any)[prop.key] = new prop.type(value); } else if ( prop.type.name == "Array" && diff --git a/typescript-client-sdk/src/sdk/models/shared/defaultsandconsts.ts b/typescript-client-sdk/src/sdk/models/shared/defaultsandconsts.ts index b8cd53f71..916627b8f 100755 --- a/typescript-client-sdk/src/sdk/models/shared/defaultsandconsts.ts +++ b/typescript-client-sdk/src/sdk/models/shared/defaultsandconsts.ts @@ -30,10 +30,6 @@ export enum DefaultsAndConstsDefaultEnumStr { Three = "three", } -export enum DefaultsAndConstsSingleEnumConstStr { - One = "one", -} - export class DefaultsAndConsts extends SpeakeasyBase { @SpeakeasyMetadata() @Expose({ name: "constBigInt" }) @@ -150,12 +146,4 @@ export class DefaultsAndConsts extends SpeakeasyBase { @SpeakeasyMetadata() @Expose({ name: "normalField" }) normalField: string; - - @SpeakeasyMetadata() - @Expose({ name: "singleEnumConstBool" }) - singleEnumConstBool: boolean; - - @SpeakeasyMetadata() - @Expose({ name: "singleEnumConstStr" }) - singleEnumConstStr: DefaultsAndConstsSingleEnumConstStr; } diff --git a/typescript-client-sdk/src/sdk/models/shared/defaultsandconstsoutput.ts b/typescript-client-sdk/src/sdk/models/shared/defaultsandconstsoutput.ts index 4d32c27b6..cb5f75baf 100755 --- a/typescript-client-sdk/src/sdk/models/shared/defaultsandconstsoutput.ts +++ b/typescript-client-sdk/src/sdk/models/shared/defaultsandconstsoutput.ts @@ -146,12 +146,4 @@ export class DefaultsAndConstsOutput extends SpeakeasyBase { @SpeakeasyMetadata() @Expose({ name: "normalField" }) normalField: string; - - @SpeakeasyMetadata() - @Expose({ name: "singleEnumConstBool" }) - singleEnumConstBool: boolean; - - @SpeakeasyMetadata() - @Expose({ name: "singleEnumConstStr" }) - singleEnumConstStr: string; } diff --git a/typescript-client-sdk/src/sdk/sdk.ts b/typescript-client-sdk/src/sdk/sdk.ts index 4eb828eea..9d8204aed 100755 --- a/typescript-client-sdk/src/sdk/sdk.ts +++ b/typescript-client-sdk/src/sdk/sdk.ts @@ -130,9 +130,9 @@ export class SDKConfiguration { serverDefaults: any; language = "typescript"; openapiDocVersion = "0.1.0"; - sdkVersion = "1.37.2"; - genVersion = "2.144.7"; - userAgent = "speakeasy-sdk/typescript 1.37.2 2.144.7 0.1.0 openapi"; + sdkVersion = "1.37.3"; + genVersion = "2.146.1"; + userAgent = "speakeasy-sdk/typescript 1.37.3 2.146.1 0.1.0 openapi"; globals: any; retryConfig?: utils.RetryConfig; public constructor(init?: Partial) {