mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-09 20:47:47 +00:00
136 lines
3.4 KiB
TypeScript
136 lines
3.4 KiB
TypeScript
/*
|
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
*/
|
|
|
|
import * as z from "zod";
|
|
|
|
/**
|
|
* `delegation` - This is the only supported `type` parameter.
|
|
*/
|
|
export enum GetTransientTokenQueryParamType {
|
|
Delegation = "delegation",
|
|
}
|
|
|
|
/**
|
|
* `all` - This is the only supported `scope` parameter.
|
|
*/
|
|
export enum Scope {
|
|
All = "all",
|
|
}
|
|
|
|
export type GetTransientTokenRequest = {
|
|
/**
|
|
* `delegation` - This is the only supported `type` parameter.
|
|
*/
|
|
type: GetTransientTokenQueryParamType;
|
|
/**
|
|
* `all` - This is the only supported `scope` parameter.
|
|
*/
|
|
scope: Scope;
|
|
};
|
|
|
|
export type GetTransientTokenResponse = {
|
|
/**
|
|
* 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 const GetTransientTokenQueryParamType$: z.ZodNativeEnum<
|
|
typeof GetTransientTokenQueryParamType
|
|
> = z.nativeEnum(GetTransientTokenQueryParamType);
|
|
|
|
/** @internal */
|
|
export const Scope$: z.ZodNativeEnum<typeof Scope> = z.nativeEnum(Scope);
|
|
|
|
/** @internal */
|
|
export namespace GetTransientTokenRequest$ {
|
|
export type Inbound = {
|
|
type: GetTransientTokenQueryParamType;
|
|
scope: Scope;
|
|
};
|
|
|
|
export const inboundSchema: z.ZodType<GetTransientTokenRequest, z.ZodTypeDef, Inbound> = z
|
|
.object({
|
|
type: GetTransientTokenQueryParamType$,
|
|
scope: Scope$,
|
|
})
|
|
.transform((v) => {
|
|
return {
|
|
type: v.type,
|
|
scope: v.scope,
|
|
};
|
|
});
|
|
|
|
export type Outbound = {
|
|
type: GetTransientTokenQueryParamType;
|
|
scope: Scope;
|
|
};
|
|
|
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTransientTokenRequest> = z
|
|
.object({
|
|
type: GetTransientTokenQueryParamType$,
|
|
scope: Scope$,
|
|
})
|
|
.transform((v) => {
|
|
return {
|
|
type: v.type,
|
|
scope: v.scope,
|
|
};
|
|
});
|
|
}
|
|
|
|
/** @internal */
|
|
export namespace GetTransientTokenResponse$ {
|
|
export type Inbound = {
|
|
ContentType: string;
|
|
StatusCode: number;
|
|
RawResponse: Response;
|
|
};
|
|
|
|
export const inboundSchema: z.ZodType<GetTransientTokenResponse, 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, GetTransientTokenResponse> = 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,
|
|
};
|
|
});
|
|
}
|