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