Skip to content

Commit 2b4d879

Browse files
committed
ci: regenerated with OpenAPI Doc 0.3.0, Speakeay CLI 1.52.2
1 parent 4bc61c9 commit 2b4d879

File tree

7 files changed

+39
-12
lines changed

7 files changed

+39
-12
lines changed

RELEASES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,4 +630,12 @@ Based on:
630630
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
631631
- Speakeasy CLI 1.52.0 (2.55.0) https://github.com/speakeasy-api/speakeasy
632632
### Releases
633-
- [NPM v1.39.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.39.0 - .
633+
- [NPM v1.39.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.39.0 - .
634+
635+
## 2023-07-06 00:13:33
636+
### Changes
637+
Based on:
638+
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
639+
- Speakeasy CLI 1.52.2 (2.57.2) https://github.com/speakeasy-api/speakeasy
640+
### Releases
641+
- [NPM v1.40.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.40.0 - .

gen.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ configVersion: 1.0.0
22
management:
33
docChecksum: 8c4f3932e054e1b349a9a34f12cf7e8c
44
docVersion: 0.3.0
5-
speakeasyVersion: 1.52.0
6-
generationVersion: 2.55.0
5+
speakeasyVersion: 1.52.2
6+
generationVersion: 2.57.2
77
generation:
88
sdkClassName: speakeasy
99
singleTagPerOp: false
1010
telemetryEnabled: true
1111
typescript:
12-
version: 1.39.0
12+
version: 1.40.0
1313
author: Speakeasy
1414
maxMethodParams: 0
1515
packageName: '@speakeasy-api/speakeasy-client-sdk-typescript'

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@speakeasy-api/speakeasy-client-sdk-typescript",
3-
"version": "1.39.0",
3+
"version": "1.40.0",
44
"author": "Speakeasy",
55
"scripts": {
66
"prepare": "tsc --build"

src/internal/utils/requestbody.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {isBooleanRecord, isNumberRecord, isStringRecord, SerializationMethodToCo
66

77
import FormData from "form-data";
88
import {RFCDate} from "../../sdk/types";
9+
import {classToPlain} from "class-transformer";
910

1011
export const requestMetadataKey = "request";
1112
const mpFormMetadataKey = "multipart_form";
@@ -66,6 +67,11 @@ const serializeContentType = (
6667
break;
6768

6869
case "application/json":
70+
[requestHeaders, requestBody] = [
71+
{"Content-Type": `${contentType}`},
72+
classToPlain(reqBody, {exposeUnsetFields: false}),
73+
];
74+
break;
6975
case "text/json":
7076
[requestHeaders, requestBody] = [
7177
{"Content-Type": `${contentType}`},

src/sdk/sdk.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ export class SDKConfiguration {
5555
serverDefaults: any;
5656
language = "typescript";
5757
openapiDocVersion = "0.3.0";
58-
sdkVersion = "1.39.0";
59-
genVersion = "2.55.0";
58+
sdkVersion = "1.40.0";
59+
genVersion = "2.57.2";
6060

6161
public constructor(init?: Partial<SDKConfiguration>) {
6262
Object.assign(this, init);

src/sdk/types/rfcdate.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,24 @@
55
export class RFCDate {
66
private date: Date;
77

8-
constructor(date?: Date | string) {
8+
constructor(date: Date | {date:string} | string | undefined) {
9+
if (!date) {
10+
this.date = new Date();
11+
return;
12+
}
13+
914
if (typeof date === "string") {
1015
this.date = new Date(date);
11-
} else {
12-
this.date = date ?? new Date();
16+
return;
17+
}
18+
if (date instanceof Date) {
19+
this.date = date as Date
20+
return;
21+
}
22+
23+
const anyDate = (date as any);
24+
if (date && !!anyDate.date) {
25+
this.date = new Date(anyDate.date);
1326
}
1427
}
1528

0 commit comments

Comments
 (0)