mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-10 04:20:58 +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";
|
||||
@@ -10,17 +11,32 @@ import * as errors from "../models/errors";
|
||||
import * as operations from "../models/operations";
|
||||
|
||||
export class Activities 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$;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Server Activities
|
||||
*
|
||||
@@ -36,6 +52,8 @@ export class Activities extends ClientSDK {
|
||||
|
||||
const path$ = this.templateURLComponent("/activities")();
|
||||
|
||||
const query$ = "";
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.accessToken === "function") {
|
||||
security$ = { accessToken: await this.options$.accessToken() };
|
||||
@@ -46,11 +64,22 @@ export class Activities extends ClientSDK {
|
||||
}
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const response = await this.fetch$(
|
||||
{ security: securitySettings$, method: "GET", path: path$, headers: headers$ },
|
||||
const context = { operationID: "getServerActivities" };
|
||||
const doOptions = { context, errorCodes: ["400", "401", "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,
|
||||
@@ -103,9 +132,10 @@ export class Activities extends ClientSDK {
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
};
|
||||
|
||||
const path$ = this.templateURLComponent("/activities/{activityUUID}")(pathParams$);
|
||||
|
||||
const query$ = "";
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.accessToken === "function") {
|
||||
security$ = { accessToken: await this.options$.accessToken() };
|
||||
@@ -116,17 +146,23 @@ export class Activities extends ClientSDK {
|
||||
}
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const response = await this.fetch$(
|
||||
const context = { operationID: "cancelServerActivities" };
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = await this.createRequest$(
|
||||
{
|
||||
context,
|
||||
security: securitySettings$,
|
||||
method: "DELETE",
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user