ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.227.0

This commit is contained in:
speakeasybot
2024-03-27 00:27:27 +00:00
parent 6c314bea48
commit dbe2e37bba
7 changed files with 44 additions and 22 deletions

View File

@@ -3,10 +3,10 @@ id: 16f22cbf-f23f-4419-8924-3a4b06381947
management: management:
docChecksum: e34dac84738ebf2d447ea2b9055a6eeb docChecksum: e34dac84738ebf2d447ea2b9055a6eeb
docVersion: 0.0.3 docVersion: 0.0.3
speakeasyVersion: 1.213.0 speakeasyVersion: 1.227.0
generationVersion: 2.283.1 generationVersion: 2.291.0
releaseVersion: 0.10.4 releaseVersion: 0.11.0
configChecksum: 79121d7caddd1a69343bca5df91689af configChecksum: 8ed91aa4573f3ab00f3d32ae29436c8f
repoURL: https://github.com/LukeHagar/plexjs.git repoURL: https://github.com/LukeHagar/plexjs.git
repoSubDirectory: . repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexjs installationURL: https://github.com/LukeHagar/plexjs
@@ -14,7 +14,7 @@ management:
features: features:
typescript: typescript:
constsAndDefaults: 0.1.5 constsAndDefaults: 0.1.5
core: 3.6.3 core: 3.7.0
flattening: 2.81.1 flattening: 2.81.1
globalSecurity: 2.82.8 globalSecurity: 2.82.8
globalServerURLs: 2.82.4 globalServerURLs: 2.82.4

View File

@@ -269,3 +269,13 @@ Based on:
- [typescript v0.10.4] . - [typescript v0.10.4] .
### Releases ### Releases
- [NPM v0.10.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.10.4 - . - [NPM v0.10.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.10.4 - .
## 2024-03-27 00:25:29
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.227.0 (2.291.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.11.0] .
### Releases
- [NPM v0.11.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.11.0 - .

View File

@@ -12,7 +12,7 @@ generation:
auth: auth:
oAuth2ClientCredentialsEnabled: false oAuth2ClientCredentialsEnabled: false
typescript: typescript:
version: 0.10.4 version: 0.11.0
additionalDependencies: additionalDependencies:
dependencies: {} dependencies: {}
devDependencies: {} devDependencies: {}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@lukehagar/plexjs", "name": "@lukehagar/plexjs",
"version": "0.10.4", "version": "0.11.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lukehagar/plexjs", "name": "@lukehagar/plexjs",
"version": "0.10.4", "version": "0.11.0",
"devDependencies": { "devDependencies": {
"@types/jsonpath": "^0.2.4", "@types/jsonpath": "^0.2.4",
"@typescript-eslint/eslint-plugin": "^6.13.2", "@typescript-eslint/eslint-plugin": "^6.13.2",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@lukehagar/plexjs", "name": "@lukehagar/plexjs",
"version": "0.10.4", "version": "0.11.0",
"author": "LukeHagar", "author": "LukeHagar",
"main": "./index.js", "main": "./index.js",
"sideEffects": false, "sideEffects": false,

View File

@@ -82,7 +82,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = Object.freeze({ export const SDK_METADATA = Object.freeze({
language: "typescript", language: "typescript",
openapiDocVersion: "0.0.3", openapiDocVersion: "0.0.3",
sdkVersion: "0.10.4", sdkVersion: "0.11.0",
genVersion: "2.283.1", genVersion: "2.291.0",
userAgent: "speakeasy-sdk/typescript 0.10.4 2.283.1 0.0.3 @lukehagar/plexjs", userAgent: "speakeasy-sdk/typescript 0.11.0 2.291.0 0.0.3 @lukehagar/plexjs",
}); });

View File

@@ -7,15 +7,17 @@ export type Fetcher = (
init?: RequestInit, init?: RequestInit,
) => Promise<Response>; ) => Promise<Response>;
type Awaitable<T> = T | Promise<T>;
const DEFAULT_FETCHER: Fetcher = (input, init) => fetch(input, init); const DEFAULT_FETCHER: Fetcher = (input, init) => fetch(input, init);
export interface HTTPClientOptions { export interface HTTPClientOptions {
fetcher?: Fetcher; fetcher?: Fetcher;
} }
type BeforeRequestHook = (req: Request) => Request | void; type BeforeRequestHook = (req: Request) => Awaitable<Request | void>;
type RequestErrorHook = (err: unknown, req: Request) => void; type RequestErrorHook = (err: unknown, req: Request) => Awaitable<void>;
type ResponseHook = (res: Response, req: Request) => void; type ResponseHook = (res: Response, req: Request) => Awaitable<void>;
export class HTTPClient { export class HTTPClient {
private fetcher: Fetcher; private fetcher: Fetcher;
@@ -28,17 +30,27 @@ export class HTTPClient {
} }
async request(request: Request): Promise<Response> { async request(request: Request): Promise<Response> {
const req = this.requestHooks.reduce((currentReq, fn) => { let req = request;
const nextRequest = fn(currentReq); for (const hook of this.requestHooks) {
return nextRequest || currentReq; const nextRequest = await hook(req);
}, request); if (nextRequest) {
req = nextRequest;
}
}
try { try {
const res = await this.fetcher(req); const res = await this.fetcher(req);
this.responseHooks.forEach((fn) => fn(res, req));
for (const hook of this.responseHooks) {
await hook(res, req);
}
return res; return res;
} catch (err) { } catch (err) {
this.requestErrorHooks.forEach((fn) => fn(err, req)); for (const hook of this.requestErrorHooks) {
await hook(err, req);
}
throw err; throw err;
} }
} }