From 0b0b14c7d62d926ad4ef5d7c9ebffebee728dd08 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 5 May 2023 00:33:12 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc 1.0, Speakeay CLI 1.29.0 --- RELEASES.md | 10 +++++++++- gen.yaml | 7 ++++--- package-lock.json | 4 ++-- package.json | 2 +- src/internal/utils/queryparams.ts | 32 ++++++++++++++++++++----------- src/sdk/sdk.ts | 4 ++-- 6 files changed, 39 insertions(+), 20 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index d7dfef2..bc6f65d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -156,4 +156,12 @@ Based on: - OpenAPI Doc 1.0 https://prod.speakeasyapi.dev/v1/apis/Structure/version/1.0.0/schema/download - Speakeasy CLI 1.27.0 (2.24.0) https://github.com/speakeasy-api/speakeasy ### Releases -- [NPM v0.8.0] https://www.npmjs.com/package/structure-ac/v/0.8.0 - . \ No newline at end of file +- [NPM v0.8.0] https://www.npmjs.com/package/structure-ac/v/0.8.0 - . + +## 2023-05-05 00:33:00 +### Changes +Based on: +- OpenAPI Doc 1.0 https://prod.speakeasyapi.dev/v1/apis/Structure/version/1.0.0/schema/download +- Speakeasy CLI 1.29.0 (2.26.0) https://github.com/speakeasy-api/speakeasy +### Releases +- [NPM v0.9.0] https://www.npmjs.com/package/structure-ac/v/0.9.0 - . \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index e076871..94e5b6a 100644 --- a/gen.yaml +++ b/gen.yaml @@ -2,13 +2,14 @@ configVersion: 1.0.0 management: docChecksum: e0bf2d205ca94a0d32bd91d6ea558d5b docVersion: "1.0" - speakeasyVersion: 1.27.0 - generationVersion: 2.24.0 + speakeasyVersion: 1.29.0 + generationVersion: 2.26.0 generation: telemetryEnabled: false sdkClassName: structure singleTagPerOp: false typescript: - version: 0.8.0 + version: 0.9.0 author: structure + maxMethodParams: 0 packageName: structure-ac diff --git a/package-lock.json b/package-lock.json index 72df367..7cbfb0a 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "structure-ac", - "version": "0.8.0", + "version": "0.9.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "structure-ac", - "version": "0.8.0", + "version": "0.9.0", "dependencies": { "axios": "^1.1.3", "class-transformer": "^0.5.1", diff --git a/package.json b/package.json index 43ed35e..b1eb9a4 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "structure-ac", - "version": "0.8.0", + "version": "0.9.0", "author": "structure", "scripts": { "prepare": "tsc --build" diff --git a/src/internal/utils/queryparams.ts b/src/internal/utils/queryparams.ts index 07014c5..2776316 100755 --- a/src/internal/utils/queryparams.ts +++ b/src/internal/utils/queryparams.ts @@ -2,10 +2,9 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import { parseParamDecorator, populateFromGlobals, valToString } from "./utils"; +import {ParamDecorator, parseParamDecorator, populateFromGlobals, valToString} from "./utils"; -import { requestMetadataKey } from "./requestbody"; -import { ParamDecorator } from "./utils"; +import {requestMetadataKey} from "./requestbody"; export const qpMetadataKey = "queryParam"; const queryStringPrefix = "?"; @@ -34,7 +33,7 @@ export function serializeQueryParams(queryParams: any, globals?: any): string { fname ); - if (!qpAnn) return { serialize: () => "" }; + if (!qpAnn) return {serialize: () => ""}; const qpDecorator: ParamDecorator = parseParamDecorator( qpAnn, @@ -49,27 +48,38 @@ export function serializeQueryParams(queryParams: any, globals?: any): string { value = populateFromGlobals(value, fname, "queryParam", globals); if (qpDecorator.Serialization === "json") - queryStringParts.push(jsonSerializer({ [qpDecorator.ParamName]: value })); + queryStringParts.push(jsonSerializer({[qpDecorator.ParamName]: value})); else { switch (qpDecorator.Style) { case "deepObject": queryStringParts.push( - deepObjectSerializer({ [qpDecorator.ParamName]: value }) + deepObjectSerializer({[qpDecorator.ParamName]: value}) ); return; case "form": if (!qpDecorator.Explode) queryStringParts.push( - formSerializer({ [qpDecorator.ParamName]: value }) + noExplodeSerializer({[qpDecorator.ParamName]: value}) ); else queryStringParts.push( - formSerializerExplode({ [qpDecorator.ParamName]: value }) + formSerializerExplode({[qpDecorator.ParamName]: value}) ); return; + case "pipeDelimited": + if (!qpDecorator.Explode) { + queryStringParts.push( + noExplodeSerializer({[qpDecorator.ParamName]: value}, "|") + ); + } else { + queryStringParts.push( + formSerializerExplode({[qpDecorator.ParamName]: value}) + ); + } + return; default: queryStringParts.push( - formSerializerExplode({ [qpDecorator.ParamName]: value }) + formSerializerExplode({[qpDecorator.ParamName]: value}) ); } } @@ -88,7 +98,7 @@ function jsonSerializer(params: Record): string { } // TODO: Add support for disabling percent encoding for reserved characters -function formSerializer(params: Record): string { +function noExplodeSerializer(params: Record, delimiter = ","): string { const query: string[] = []; Object.entries(Object.assign({}, params)).forEach(([key, value]) => { @@ -96,7 +106,7 @@ function formSerializer(params: Record): string { if (value !== Object(value)) query.push(`${key}=${encodeURIComponent(valToString(value))}`); else if (Array.isArray(value)) { - const values: string = value.map((aValue) => aValue).join(","); + const values: string = value.map((aValue) => aValue).join(delimiter); query.push(`${key}=${encodeURIComponent(values)}`); } else { diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index df8c1f4..9e60f90 100755 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -59,8 +59,8 @@ export class Structure { public _securityClient: AxiosInstance; public _serverURL: string; private _language = "typescript"; - private _sdkVersion = "0.8.0"; - private _genVersion = "2.24.0"; + private _sdkVersion = "0.9.0"; + private _genVersion = "2.26.0"; private _globals: any; constructor(props?: SDKProps) {