/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { WistiaError } from "./wistiaerror.js"; /** * Internal server error */ export type PostFoldersIdCopyInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PostFoldersIdCopyInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostFoldersIdCopyInternalServerErrorData; constructor( err: PostFoldersIdCopyInternalServerErrorData, 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, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "PostFoldersIdCopyInternalServerError"; } } /** * Resource not found */ export type PostFoldersIdCopyNotFoundErrorData = { error?: string | undefined; }; /** * Resource not found */ export class PostFoldersIdCopyNotFoundError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostFoldersIdCopyNotFoundErrorData; constructor( err: PostFoldersIdCopyNotFoundErrorData, 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, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "PostFoldersIdCopyNotFoundError"; } } /** * Unauthorized, invalid or missing token */ export type PostFoldersIdCopyUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PostFoldersIdCopyUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostFoldersIdCopyUnauthorizedErrorData; constructor( err: PostFoldersIdCopyUnauthorizedErrorData, 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, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "PostFoldersIdCopyUnauthorizedError"; } } /** @internal */ export const PostFoldersIdCopyInternalServerError$inboundSchema: z.ZodType< PostFoldersIdCopyInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostFoldersIdCopyInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostFoldersIdCopyNotFoundError$inboundSchema: z.ZodType< PostFoldersIdCopyNotFoundError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostFoldersIdCopyNotFoundError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostFoldersIdCopyUnauthorizedError$inboundSchema: z.ZodType< PostFoldersIdCopyUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostFoldersIdCopyUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });