Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc v2.0.0-rc.33, Speakeasy CLI 1.306.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot authored and Shiroy committed Jun 13, 2024
1 parent 3514260 commit a0a7920
Show file tree
Hide file tree
Showing 15 changed files with 610 additions and 749 deletions.
14 changes: 7 additions & 7 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 2bb10af9-e48a-4bd7-ae46-a35fa809dc29
management:
docChecksum: 648a1c76291df8598c3b2a9ac657e10b
docVersion: v2.0.0-rc.32
speakeasyVersion: 1.300.0
generationVersion: 2.338.14
releaseVersion: 2.4.3
configChecksum: 1d25e5e5a4465726f7965fcb8876f065
docChecksum: 408cf4a96e96e76eaf0f8b23c35b2cb3
docVersion: v2.0.0-rc.33
speakeasyVersion: 1.306.0
generationVersion: 2.340.3
releaseVersion: 2.4.4
configChecksum: c010a22da550696fd9374cdeb229e252
repoURL: https://github.com/formancehq/formance-sdk-typescript.git
repoSubDirectory: .
installationURL: https://github.com/formancehq/formance-sdk-typescript
Expand All @@ -15,7 +15,7 @@ features:
typescript:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.5
core: 3.9.12
core: 3.9.13
deprecations: 2.81.1
errors: 2.81.10
globalSecurity: 2.82.9
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,14 @@ Based on:
### Generated
- [typescript v2.4.3] .
### Releases
- [NPM v2.4.3] https://www.npmjs.com/package/@formance/formance-sdk/v/2.4.3 - .
- [NPM v2.4.3] https://www.npmjs.com/package/@formance/formance-sdk/v/2.4.3 - .

## 2024-06-13 00:19:23
### Changes
Based on:
- OpenAPI Doc v2.0.0-rc.33
- Speakeasy CLI 1.306.0 (2.340.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v2.4.4] .
### Releases
- [NPM v2.4.4] https://www.npmjs.com/package/@formance/formance-sdk/v/2.4.4 - .
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
comments: {}
telemetryEnabled: false
typescript:
version: 2.4.3
version: 2.4.4
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "@formance/formance-sdk",
"version": "2.4.3",
"version": "2.4.4",
"exports": {
".": "./src/index.ts",
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formance/formance-sdk",
"version": "2.4.3",
"version": "2.4.4",
"author": "Formance",
"main": "./index.js",
"sideEffects": false,
Expand Down
8 changes: 4 additions & 4 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {

export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "v2.0.0-rc.32",
sdkVersion: "2.4.3",
genVersion: "2.338.14",
userAgent: "speakeasy-sdk/typescript 2.4.3 2.338.14 v2.0.0-rc.32 @formance/formance-sdk",
openapiDocVersion: "v2.0.0-rc.33",
sdkVersion: "2.4.4",
genVersion: "2.340.3",
userAgent: "speakeasy-sdk/typescript 2.4.4 2.340.3 v2.0.0-rc.33 @formance/formance-sdk",
} as const;
46 changes: 46 additions & 0 deletions src/lib/encodings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,49 @@ function mapDefinedEntries<K, V, R>(

return acc;
}

export function queryJoin(...args: string[]): string {
return args.filter(Boolean).join("&");
}

type QueryEncoderOptions = {
explode?: boolean;
charEncoding?: "percent" | "none";
};

type QueryEncoder = (
key: string,
value: unknown,
options?: QueryEncoderOptions,
) => string;

type BulkQueryEncoder = (
values: Record<string, unknown>,
options?: QueryEncoderOptions,
) => string;

export function queryEncoder(f: QueryEncoder): BulkQueryEncoder {
const bulkEncode = function (
values: Record<string, unknown>,
options?: QueryEncoderOptions,
): string {
const opts: QueryEncoderOptions = {
...options,
explode: options?.explode ?? true,
charEncoding: options?.charEncoding ?? "percent",
};

const encoded = Object.entries(values).map(([key, value]) => {
return f(key, value, opts);
});
return queryJoin(...encoded);
};

return bulkEncode;
}

export const encodeJSONQuery = queryEncoder(encodeJSON);
export const encodeFormQuery = queryEncoder(encodeForm);
export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited);
export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited);
export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject);
22 changes: 11 additions & 11 deletions src/sdk/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { SDKHooks } from "../hooks";
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
import * as enc$ from "../lib/encodings";
import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings";
import { HTTPClient } from "../lib/http";
import * as schemas$ from "../lib/schemas";
import { ClientSDK, RequestOptions } from "../lib/sdks";
Expand Down Expand Up @@ -57,7 +57,7 @@ export class Auth extends ClientSDK {
"Input validation failed"
);
const body$ =
payload$ === undefined ? null : enc$.encodeJSON("body", payload$, { explode: true });
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });

const path$ = this.templateURLComponent("/api/auth/clients")();

Expand Down Expand Up @@ -127,10 +127,10 @@ export class Auth extends ClientSDK {
(value$) => operations.CreateSecretRequest$.outboundSchema.parse(value$),
"Input validation failed"
);
const body$ = enc$.encodeJSON("body", payload$.CreateSecretRequest, { explode: true });
const body$ = encodeJSON$("body", payload$.CreateSecretRequest, { explode: true });

const pathParams$ = {
clientId: enc$.encodeSimple("clientId", payload$.clientId, {
clientId: encodeSimple$("clientId", payload$.clientId, {
explode: false,
charEncoding: "percent",
}),
Expand Down Expand Up @@ -207,7 +207,7 @@ export class Auth extends ClientSDK {
const body$ = null;

const pathParams$ = {
clientId: enc$.encodeSimple("clientId", payload$.clientId, {
clientId: encodeSimple$("clientId", payload$.clientId, {
explode: false,
charEncoding: "percent",
}),
Expand Down Expand Up @@ -282,11 +282,11 @@ export class Auth extends ClientSDK {
const body$ = null;

const pathParams$ = {
clientId: enc$.encodeSimple("clientId", payload$.clientId, {
clientId: encodeSimple$("clientId", payload$.clientId, {
explode: false,
charEncoding: "percent",
}),
secretId: enc$.encodeSimple("secretId", payload$.secretId, {
secretId: encodeSimple$("secretId", payload$.secretId, {
explode: false,
charEncoding: "percent",
}),
Expand Down Expand Up @@ -480,7 +480,7 @@ export class Auth extends ClientSDK {
const body$ = null;

const pathParams$ = {
clientId: enc$.encodeSimple("clientId", payload$.clientId, {
clientId: encodeSimple$("clientId", payload$.clientId, {
explode: false,
charEncoding: "percent",
}),
Expand Down Expand Up @@ -558,7 +558,7 @@ export class Auth extends ClientSDK {
const body$ = null;

const pathParams$ = {
userId: enc$.encodeSimple("userId", payload$.userId, {
userId: encodeSimple$("userId", payload$.userId, {
explode: false,
charEncoding: "percent",
}),
Expand Down Expand Up @@ -631,10 +631,10 @@ export class Auth extends ClientSDK {
(value$) => operations.UpdateClientRequest$.outboundSchema.parse(value$),
"Input validation failed"
);
const body$ = enc$.encodeJSON("body", payload$.UpdateClientRequest, { explode: true });
const body$ = encodeJSON$("body", payload$.UpdateClientRequest, { explode: true });

const pathParams$ = {
clientId: enc$.encodeSimple("clientId", payload$.clientId, {
clientId: encodeSimple$("clientId", payload$.clientId, {
explode: false,
charEncoding: "percent",
}),
Expand Down
Loading

0 comments on commit a0a7920

Please sign in to comment.