/* * 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 PutFoldersIdInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PutFoldersIdInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutFoldersIdInternalServerErrorData; constructor( err: PutFoldersIdInternalServerErrorData, 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 = "PutFoldersIdInternalServerError"; } } /** * Resource not found */ export type PutFoldersIdNotFoundErrorData = { error?: string | undefined; }; /** * Resource not found */ export class PutFoldersIdNotFoundError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutFoldersIdNotFoundErrorData; constructor( err: PutFoldersIdNotFoundErrorData, 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 = "PutFoldersIdNotFoundError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type PutFoldersIdForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class PutFoldersIdForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutFoldersIdForbiddenErrorData; constructor( err: PutFoldersIdForbiddenErrorData, 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 = "PutFoldersIdForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PutFoldersIdUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PutFoldersIdUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutFoldersIdUnauthorizedErrorData; constructor( err: PutFoldersIdUnauthorizedErrorData, 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 = "PutFoldersIdUnauthorizedError"; } } /** @internal */ export const PutFoldersIdInternalServerError$inboundSchema: z.ZodType< PutFoldersIdInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutFoldersIdInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutFoldersIdNotFoundError$inboundSchema: z.ZodType< PutFoldersIdNotFoundError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutFoldersIdNotFoundError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutFoldersIdForbiddenError$inboundSchema: z.ZodType< PutFoldersIdForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutFoldersIdForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutFoldersIdUnauthorizedError$inboundSchema: z.ZodType< PutFoldersIdUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutFoldersIdUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });