mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-09 20:47:47 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.193.0
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import { SDKHooks } from "../hooks";
|
||||
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
|
||||
import * as enc$ from "../lib/encodings";
|
||||
import { HTTPClient } from "../lib/http";
|
||||
@@ -11,17 +12,32 @@ import * as operations from "../models/operations";
|
||||
import { z } from "zod";
|
||||
|
||||
export class Log extends ClientSDK {
|
||||
private readonly options$: SDKOptions;
|
||||
private readonly options$: SDKOptions & { hooks?: SDKHooks };
|
||||
|
||||
constructor(options: SDKOptions = {}) {
|
||||
const opt = options as unknown;
|
||||
let hooks: SDKHooks;
|
||||
if (
|
||||
typeof opt === "object" &&
|
||||
opt != null &&
|
||||
"hooks" in opt &&
|
||||
opt.hooks instanceof SDKHooks
|
||||
) {
|
||||
hooks = opt.hooks;
|
||||
} else {
|
||||
hooks = new SDKHooks();
|
||||
}
|
||||
|
||||
super({
|
||||
client: options.httpClient || new HTTPClient(),
|
||||
baseURL: serverURLFromOptions(options),
|
||||
hooks,
|
||||
});
|
||||
|
||||
this.options$ = options;
|
||||
this.options$ = { ...options, hooks };
|
||||
void this.options$;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logging a single line message.
|
||||
*
|
||||
@@ -70,8 +86,11 @@ export class Log extends ClientSDK {
|
||||
}
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const response = await this.fetch$(
|
||||
const context = { operationID: "logLine" };
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = await this.createRequest$(
|
||||
{
|
||||
context,
|
||||
security: securitySettings$,
|
||||
method: "GET",
|
||||
path: path$,
|
||||
@@ -82,6 +101,8 @@ export class Log extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
@@ -146,6 +167,8 @@ export class Log extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/log")();
|
||||
|
||||
const query$ = "";
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.accessToken === "function") {
|
||||
security$ = { accessToken: await this.options$.accessToken() };
|
||||
@@ -156,17 +179,23 @@ export class Log extends ClientSDK {
|
||||
}
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const response = await this.fetch$(
|
||||
const context = { operationID: "logMultiLine" };
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = await this.createRequest$(
|
||||
{
|
||||
context,
|
||||
security: securitySettings$,
|
||||
method: "POST",
|
||||
path: path$,
|
||||
headers: headers$,
|
||||
query: query$,
|
||||
body: body$,
|
||||
},
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
@@ -204,6 +233,8 @@ export class Log extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/log/networked")();
|
||||
|
||||
const query$ = "";
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.accessToken === "function") {
|
||||
security$ = { accessToken: await this.options$.accessToken() };
|
||||
@@ -214,11 +245,22 @@ export class Log extends ClientSDK {
|
||||
}
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const response = await this.fetch$(
|
||||
{ security: securitySettings$, method: "GET", path: path$, headers: headers$ },
|
||||
const context = { operationID: "enablePaperTrail" };
|
||||
const doOptions = { context, errorCodes: ["400", "401", "403", "4XX", "5XX"] };
|
||||
const request = await this.createRequest$(
|
||||
{
|
||||
context,
|
||||
security: securitySettings$,
|
||||
method: "GET",
|
||||
path: path$,
|
||||
headers: headers$,
|
||||
query: query$,
|
||||
},
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
|
||||
Reference in New Issue
Block a user