mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
165 lines
5.3 KiB
TypeScript
165 lines
5.3 KiB
TypeScript
/*
|
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
*/
|
|
|
|
import { remap as remap$ } from "../../lib/primitives";
|
|
import * as z from "zod";
|
|
|
|
export type MyPlex = {
|
|
authToken?: string | undefined;
|
|
username?: string | undefined;
|
|
mappingState?: string | undefined;
|
|
mappingError?: string | undefined;
|
|
signInState?: string | undefined;
|
|
publicAddress?: string | undefined;
|
|
publicPort?: number | undefined;
|
|
privateAddress?: string | undefined;
|
|
privatePort?: number | undefined;
|
|
subscriptionFeatures?: string | undefined;
|
|
subscriptionActive?: boolean | undefined;
|
|
subscriptionState?: string | undefined;
|
|
};
|
|
|
|
/**
|
|
* MyPlex Account
|
|
*/
|
|
export type GetMyPlexAccountResponseBody = {
|
|
myPlex?: MyPlex | undefined;
|
|
};
|
|
|
|
export type GetMyPlexAccountResponse = {
|
|
/**
|
|
* 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;
|
|
/**
|
|
* MyPlex Account
|
|
*/
|
|
object?: GetMyPlexAccountResponseBody | undefined;
|
|
};
|
|
|
|
/** @internal */
|
|
export namespace MyPlex$ {
|
|
export const inboundSchema: z.ZodType<MyPlex, z.ZodTypeDef, unknown> = z.object({
|
|
authToken: z.string().optional(),
|
|
username: z.string().optional(),
|
|
mappingState: z.string().optional(),
|
|
mappingError: z.string().optional(),
|
|
signInState: z.string().optional(),
|
|
publicAddress: z.string().optional(),
|
|
publicPort: z.number().optional(),
|
|
privateAddress: z.string().optional(),
|
|
privatePort: z.number().optional(),
|
|
subscriptionFeatures: z.string().optional(),
|
|
subscriptionActive: z.boolean().optional(),
|
|
subscriptionState: z.string().optional(),
|
|
});
|
|
|
|
export type Outbound = {
|
|
authToken?: string | undefined;
|
|
username?: string | undefined;
|
|
mappingState?: string | undefined;
|
|
mappingError?: string | undefined;
|
|
signInState?: string | undefined;
|
|
publicAddress?: string | undefined;
|
|
publicPort?: number | undefined;
|
|
privateAddress?: string | undefined;
|
|
privatePort?: number | undefined;
|
|
subscriptionFeatures?: string | undefined;
|
|
subscriptionActive?: boolean | undefined;
|
|
subscriptionState?: string | undefined;
|
|
};
|
|
|
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, MyPlex> = z.object({
|
|
authToken: z.string().optional(),
|
|
username: z.string().optional(),
|
|
mappingState: z.string().optional(),
|
|
mappingError: z.string().optional(),
|
|
signInState: z.string().optional(),
|
|
publicAddress: z.string().optional(),
|
|
publicPort: z.number().optional(),
|
|
privateAddress: z.string().optional(),
|
|
privatePort: z.number().optional(),
|
|
subscriptionFeatures: z.string().optional(),
|
|
subscriptionActive: z.boolean().optional(),
|
|
subscriptionState: z.string().optional(),
|
|
});
|
|
}
|
|
|
|
/** @internal */
|
|
export namespace GetMyPlexAccountResponseBody$ {
|
|
export const inboundSchema: z.ZodType<GetMyPlexAccountResponseBody, z.ZodTypeDef, unknown> = z
|
|
.object({
|
|
MyPlex: z.lazy(() => MyPlex$.inboundSchema).optional(),
|
|
})
|
|
.transform((v) => {
|
|
return remap$(v, {
|
|
MyPlex: "myPlex",
|
|
});
|
|
});
|
|
|
|
export type Outbound = {
|
|
MyPlex?: MyPlex$.Outbound | undefined;
|
|
};
|
|
|
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMyPlexAccountResponseBody> = z
|
|
.object({
|
|
myPlex: z.lazy(() => MyPlex$.outboundSchema).optional(),
|
|
})
|
|
.transform((v) => {
|
|
return remap$(v, {
|
|
myPlex: "MyPlex",
|
|
});
|
|
});
|
|
}
|
|
|
|
/** @internal */
|
|
export namespace GetMyPlexAccountResponse$ {
|
|
export const inboundSchema: z.ZodType<GetMyPlexAccountResponse, z.ZodTypeDef, unknown> = z
|
|
.object({
|
|
ContentType: z.string(),
|
|
StatusCode: z.number().int(),
|
|
RawResponse: z.instanceof(Response),
|
|
object: z.lazy(() => GetMyPlexAccountResponseBody$.inboundSchema).optional(),
|
|
})
|
|
.transform((v) => {
|
|
return remap$(v, {
|
|
ContentType: "contentType",
|
|
StatusCode: "statusCode",
|
|
RawResponse: "rawResponse",
|
|
});
|
|
});
|
|
|
|
export type Outbound = {
|
|
ContentType: string;
|
|
StatusCode: number;
|
|
RawResponse: never;
|
|
object?: GetMyPlexAccountResponseBody$.Outbound | undefined;
|
|
};
|
|
|
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMyPlexAccountResponse> = z
|
|
.object({
|
|
contentType: z.string(),
|
|
statusCode: z.number().int(),
|
|
rawResponse: z.instanceof(Response).transform(() => {
|
|
throw new Error("Response cannot be serialized");
|
|
}),
|
|
object: z.lazy(() => GetMyPlexAccountResponseBody$.outboundSchema).optional(),
|
|
})
|
|
.transform((v) => {
|
|
return remap$(v, {
|
|
contentType: "ContentType",
|
|
statusCode: "StatusCode",
|
|
rawResponse: "RawResponse",
|
|
});
|
|
});
|
|
}
|