/* * 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 GetFoldersFolderIdSubfoldersInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class GetFoldersFolderIdSubfoldersInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetFoldersFolderIdSubfoldersInternalServerErrorData; constructor( err: GetFoldersFolderIdSubfoldersInternalServerErrorData, 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 = "GetFoldersFolderIdSubfoldersInternalServerError"; } } /** * Folder not found */ export type GetFoldersFolderIdSubfoldersNotFoundErrorData = { error?: string | undefined; }; /** * Folder not found */ export class GetFoldersFolderIdSubfoldersNotFoundError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetFoldersFolderIdSubfoldersNotFoundErrorData; constructor( err: GetFoldersFolderIdSubfoldersNotFoundErrorData, 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 = "GetFoldersFolderIdSubfoldersNotFoundError"; } } /** * Unauthorized, invalid or missing token */ export type GetFoldersFolderIdSubfoldersUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class GetFoldersFolderIdSubfoldersUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetFoldersFolderIdSubfoldersUnauthorizedErrorData; constructor( err: GetFoldersFolderIdSubfoldersUnauthorizedErrorData, 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 = "GetFoldersFolderIdSubfoldersUnauthorizedError"; } } /** * Bad request */ export type GetFoldersFolderIdSubfoldersBadRequestErrorData = { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; }; /** * Bad request */ export class GetFoldersFolderIdSubfoldersBadRequestError extends WistiaError { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetFoldersFolderIdSubfoldersBadRequestErrorData; constructor( err: GetFoldersFolderIdSubfoldersBadRequestErrorData, 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 = "GetFoldersFolderIdSubfoldersBadRequestError"; } } /** @internal */ export const GetFoldersFolderIdSubfoldersInternalServerError$inboundSchema: z.ZodType< GetFoldersFolderIdSubfoldersInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetFoldersFolderIdSubfoldersInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetFoldersFolderIdSubfoldersNotFoundError$inboundSchema: z.ZodType< GetFoldersFolderIdSubfoldersNotFoundError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetFoldersFolderIdSubfoldersNotFoundError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetFoldersFolderIdSubfoldersUnauthorizedError$inboundSchema: z.ZodType< GetFoldersFolderIdSubfoldersUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetFoldersFolderIdSubfoldersUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetFoldersFolderIdSubfoldersBadRequestError$inboundSchema: z.ZodType< GetFoldersFolderIdSubfoldersBadRequestError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetFoldersFolderIdSubfoldersBadRequestError(v, { request: v.request$, response: v.response$, body: v.body$, }); });