mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-09 12:37:46 +00:00
106 lines
2.8 KiB
TypeScript
106 lines
2.8 KiB
TypeScript
/*
|
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
*/
|
|
|
|
import * as z from "zod";
|
|
|
|
export type CancelServerActivitiesRequest = {
|
|
/**
|
|
* The UUID of the activity to cancel.
|
|
*/
|
|
activityUUID: string;
|
|
};
|
|
|
|
export type CancelServerActivitiesResponse = {
|
|
/**
|
|
* HTTP response content type for this operation
|
|
*/
|
|
contentType: string;
|
|
/**
|
|
* HTTP response status code for this operation
|
|
*/
|
|
statusCode: number;
|
|
/**
|
|
* Raw HTTP response; suitable for custom response parsing
|
|
*/
|
|
rawResponse: Response;
|
|
};
|
|
|
|
/** @internal */
|
|
export namespace CancelServerActivitiesRequest$ {
|
|
export type Inbound = {
|
|
activityUUID: string;
|
|
};
|
|
|
|
export const inboundSchema: z.ZodType<CancelServerActivitiesRequest, z.ZodTypeDef, Inbound> = z
|
|
.object({
|
|
activityUUID: z.string(),
|
|
})
|
|
.transform((v) => {
|
|
return {
|
|
activityUUID: v.activityUUID,
|
|
};
|
|
});
|
|
|
|
export type Outbound = {
|
|
activityUUID: string;
|
|
};
|
|
|
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CancelServerActivitiesRequest> =
|
|
z
|
|
.object({
|
|
activityUUID: z.string(),
|
|
})
|
|
.transform((v) => {
|
|
return {
|
|
activityUUID: v.activityUUID,
|
|
};
|
|
});
|
|
}
|
|
|
|
/** @internal */
|
|
export namespace CancelServerActivitiesResponse$ {
|
|
export type Inbound = {
|
|
ContentType: string;
|
|
StatusCode: number;
|
|
RawResponse: Response;
|
|
};
|
|
|
|
export const inboundSchema: z.ZodType<CancelServerActivitiesResponse, z.ZodTypeDef, Inbound> = z
|
|
.object({
|
|
ContentType: z.string(),
|
|
StatusCode: z.number().int(),
|
|
RawResponse: z.instanceof(Response),
|
|
})
|
|
.transform((v) => {
|
|
return {
|
|
contentType: v.ContentType,
|
|
statusCode: v.StatusCode,
|
|
rawResponse: v.RawResponse,
|
|
};
|
|
});
|
|
|
|
export type Outbound = {
|
|
ContentType: string;
|
|
StatusCode: number;
|
|
RawResponse: never;
|
|
};
|
|
|
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CancelServerActivitiesResponse> =
|
|
z
|
|
.object({
|
|
contentType: z.string(),
|
|
statusCode: z.number().int(),
|
|
rawResponse: z.instanceof(Response).transform(() => {
|
|
throw new Error("Response cannot be serialized");
|
|
}),
|
|
})
|
|
.transform((v) => {
|
|
return {
|
|
ContentType: v.contentType,
|
|
StatusCode: v.statusCode,
|
|
RawResponse: v.rawResponse,
|
|
};
|
|
});
|
|
}
|