ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.557.0

This commit is contained in:
speakeasybot
2025-06-09 00:13:46 +00:00
parent 2b38478255
commit a7ec77cd04
281 changed files with 11113 additions and 10513 deletions

View File

@@ -6,6 +6,7 @@ import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { PlexAPIError } from "./plexapierror.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type GetSessionsSessionsErrors = {
@@ -28,25 +29,22 @@ export type GetSessionsUnauthorizedData = {
/**
* Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
export class GetSessionsUnauthorized extends Error {
export class GetSessionsUnauthorized extends PlexAPIError {
errors?: Array<GetSessionsSessionsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSessionsUnauthorizedData;
constructor(err: GetSessionsUnauthorizedData) {
constructor(
err: GetSessionsUnauthorizedData,
httpMeta: { response: Response; request: Request; body: string },
) {
const message = "message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
super(message, httpMeta);
this.data$ = err;
if (err.errors != null) this.errors = err.errors;
if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSessionsUnauthorized";
}
@@ -72,25 +70,22 @@ export type GetSessionsBadRequestData = {
/**
* Bad Request - A parameter was not specified, or was specified incorrectly.
*/
export class GetSessionsBadRequest extends Error {
export class GetSessionsBadRequest extends PlexAPIError {
errors?: Array<GetSessionsErrors> | undefined;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: Response | undefined;
/** The original data that was passed to this error instance. */
data$: GetSessionsBadRequestData;
constructor(err: GetSessionsBadRequestData) {
constructor(
err: GetSessionsBadRequestData,
httpMeta: { response: Response; request: Request; body: string },
) {
const message = "message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message);
super(message, httpMeta);
this.data$ = err;
if (err.errors != null) this.errors = err.errors;
if (err.rawResponse != null) this.rawResponse = err.rawResponse;
this.name = "GetSessionsBadRequest";
}
@@ -165,13 +160,20 @@ export const GetSessionsUnauthorized$inboundSchema: z.ZodType<
errors: z.array(z.lazy(() => GetSessionsSessionsErrors$inboundSchema))
.optional(),
RawResponse: z.instanceof(Response).optional(),
request$: z.instanceof(Request),
response$: z.instanceof(Response),
body$: z.string(),
})
.transform((v) => {
const remapped = remap$(v, {
"RawResponse": "rawResponse",
});
return new GetSessionsUnauthorized(remapped);
return new GetSessionsUnauthorized(remapped, {
request: v.request$,
response: v.response$,
body: v.body$,
});
});
/** @internal */
@@ -282,13 +284,20 @@ export const GetSessionsBadRequest$inboundSchema: z.ZodType<
> = z.object({
errors: z.array(z.lazy(() => GetSessionsErrors$inboundSchema)).optional(),
RawResponse: z.instanceof(Response).optional(),
request$: z.instanceof(Request),
response$: z.instanceof(Response),
body$: z.string(),
})
.transform((v) => {
const remapped = remap$(v, {
"RawResponse": "rawResponse",
});
return new GetSessionsBadRequest(remapped);
return new GetSessionsBadRequest(remapped, {
request: v.request$,
response: v.response$,
body: v.body$,
});
});
/** @internal */