Skip to content

Commit 60b7d3d

Browse files
committed
ci: regenerated with OpenAPI Doc 0.3.0, Speakeay CLI 1.20.0
1 parent 94e76c0 commit 60b7d3d

File tree

13 files changed

+168
-272
lines changed

13 files changed

+168
-272
lines changed

RELEASES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,4 +294,12 @@ Based on:
294294
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
295295
- Speakeasy CLI 1.19.7 (2.17.9) https://github.com/speakeasy-api/speakeasy
296296
### Releases
297-
- [NPM v1.15.1] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.15.1 - .
297+
- [NPM v1.15.1] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.15.1 - .
298+
299+
## 2023-04-14 00:10:26
300+
### Changes
301+
Based on:
302+
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
303+
- Speakeasy CLI 1.20.0 (2.18.0) https://github.com/speakeasy-api/speakeasy
304+
### Releases
305+
- [NPM v1.16.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.16.0 - .

files.gen

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ src/internal/utils/retries.ts
2121
src/internal/utils/security.ts
2222
src/internal/utils/utils.ts
2323
src/sdk/index.ts
24+
src/sdk/types/index.ts
25+
src/sdk/types/rfcdate.ts
2426
tsconfig.json
2527
src/sdk/models/operations/deleteapiendpoint.ts
2628
src/sdk/models/operations/findapiendpoint.ts

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: 2bba3b8f9d211b02569b3f9aff0d34b4
44
docVersion: 0.3.0
5-
speakeasyVersion: 1.19.7
6-
generationVersion: 2.17.9
5+
speakeasyVersion: 1.20.0
6+
generationVersion: 2.18.0
77
generation:
88
telemetryEnabled: true
99
sdkClassName: speakeasy
1010
sdkFlattening: false
1111
singleTagPerOp: false
1212
typescript:
13-
version: 1.15.1
13+
version: 1.16.0
1414
author: Speakeasy
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.15.1",
3+
"version": "1.16.0",
44
"author": "Speakeasy",
55
"scripts": {
66
"prepare": "tsc --build"

src/internal/utils/headers.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
import { AxiosResponseHeaders, RawAxiosResponseHeaders } from "axios";
66
import {
77
ParamDecorator,
8-
convertIfDateObjectToISOString,
98
isBooleanRecord,
109
isEmpty,
1110
isNumberRecord,
1211
isStringRecord,
1312
parseParamDecorator,
13+
valToString,
1414
} from "./utils";
1515

1616
import { requestMetadataKey } from "./requestbody";
@@ -51,8 +51,7 @@ export function getHeadersFromRequest(headerParams: any): any {
5151

5252
const value: string = serializeHeader(
5353
headerParams[fname],
54-
headerDecorator.Explode,
55-
headerDecorator.DateTimeFormat
54+
headerDecorator.Explode
5655
);
5756

5857
if (value != "") headers[headerDecorator.ParamName] = value;
@@ -89,25 +88,22 @@ export function getHeadersFromResponse(
8988
return reponseHeaders;
9089
}
9190

92-
function serializeHeader(
93-
header: any,
94-
explode: boolean,
95-
dateTimeFormat?: string
96-
): string {
91+
function serializeHeader(header: any, explode: boolean): string {
9792
const headerVals: string[] = [];
9893

9994
if (Array.isArray(header)) {
10095
header.forEach((val: any) => {
101-
headerVals.push(convertIfDateObjectToISOString(val, dateTimeFormat));
96+
headerVals.push(valToString(val));
10297
});
10398
} else if (
10499
isStringRecord(header) ||
105100
isNumberRecord(header) ||
106101
isBooleanRecord(header)
107102
) {
108103
Object.getOwnPropertyNames(header).forEach((headerKey: string) => {
109-
if (explode) headerVals.push(`${headerKey}=${header[headerKey]}`);
110-
else headerVals.push(`${headerKey},${header[headerKey]}`);
104+
if (explode)
105+
headerVals.push(`${headerKey}=${valToString(header[headerKey])}`);
106+
else headerVals.push(`${headerKey},${valToString(header[headerKey])}`);
111107
});
112108
} else if (header instanceof Object) {
113109
Object.getOwnPropertyNames(header).forEach((headerKey: string) => {
@@ -128,10 +124,7 @@ function serializeHeader(
128124

129125
if (headerDecorator == null) return;
130126

131-
const headerFieldValue = convertIfDateObjectToISOString(
132-
header[headerKey],
133-
headerDecorator.DateTimeFormat
134-
);
127+
const headerFieldValue = valToString(header[headerKey]);
135128

136129
if (isEmpty(headerFieldValue)) return;
137130
else if (explode)

src/internal/utils/pathparams.ts

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,28 @@
33
*/
44

55
import {
6-
encodeAndConvertPrimitiveVal,
76
ParamDecorator,
8-
parseParamDecorator,
9-
} from "./utils";
10-
import {
11-
isStringRecord,
12-
isNumberRecord,
137
isBooleanRecord,
148
isEmpty,
9+
isNumberRecord,
10+
isStringRecord,
11+
parseParamDecorator,
12+
valToString,
1513
} from "./utils";
1614

1715
export const ppMetadataKey = "pathParam";
1816

1917
export function getSimplePathParams(
2018
paramName: string,
2119
paramValue: any,
22-
explode: boolean,
23-
dateTimeFormat?: string
20+
explode: boolean
2421
): Map<string, string> {
2522
const pathParams: Map<string, string> = new Map<string, string>();
2623
const ppVals: string[] = [];
2724

2825
if (Array.isArray(paramValue)) {
2926
paramValue.forEach((param) => {
30-
ppVals.push(encodeAndConvertPrimitiveVal(param, dateTimeFormat));
27+
ppVals.push(encodeURIComponent(valToString(param)));
3128
});
3229
pathParams.set(paramName, ppVals.join(","));
3330
} else if (
@@ -36,9 +33,8 @@ export function getSimplePathParams(
3633
isBooleanRecord(paramValue)
3734
) {
3835
Object.getOwnPropertyNames(paramValue).forEach((paramKey: string) => {
39-
const paramFieldValue = encodeAndConvertPrimitiveVal(
40-
paramValue[paramKey],
41-
dateTimeFormat
36+
const paramFieldValue = encodeURIComponent(
37+
valToString(paramValue[paramKey])
4238
);
4339

4440
if (explode) ppVals.push(`${paramKey}=${paramFieldValue}`);
@@ -65,9 +61,8 @@ export function getSimplePathParams(
6561

6662
if (ppDecorator == null) return;
6763

68-
const paramFieldValue = encodeAndConvertPrimitiveVal(
69-
paramValue[paramKey],
70-
ppDecorator.DateTimeFormat
64+
const paramFieldValue = encodeURIComponent(
65+
valToString(paramValue[paramKey])
7166
);
7267

7368
if (isEmpty(paramFieldValue)) return;
@@ -78,10 +73,7 @@ export function getSimplePathParams(
7873

7974
pathParams.set(paramName, ppVals.join(","));
8075
} else {
81-
pathParams.set(
82-
paramName,
83-
encodeAndConvertPrimitiveVal(paramValue, dateTimeFormat)
84-
);
76+
pathParams.set(paramName, encodeURIComponent(valToString(paramValue)));
8577
}
8678
return pathParams;
8779
}

0 commit comments

Comments
 (0)