/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; /** * Forbidden */ export type ForbiddenData = { description?: any; }; /** * Forbidden */ export class Forbidden extends Error { description?: any; /** The original data that was passed to this error instance. */ data$: ForbiddenData; constructor(err: ForbiddenData) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; if (err.description != null) this.description = err.description; this.name = "Forbidden"; } } /** @internal */ export const Forbidden$inboundSchema: z.ZodType< Forbidden, z.ZodTypeDef, unknown > = z.object({ description: z.any(), }) .transform((v) => { return new Forbidden(v); }); /** @internal */ export type Forbidden$Outbound = { description?: any; }; /** @internal */ export const Forbidden$outboundSchema: z.ZodType< Forbidden$Outbound, z.ZodTypeDef, Forbidden > = z.instanceof(Forbidden) .transform(v => v.data$) .pipe(z.object({ description: z.any(), })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Forbidden$ { /** @deprecated use `Forbidden$inboundSchema` instead. */ export const inboundSchema = Forbidden$inboundSchema; /** @deprecated use `Forbidden$outboundSchema` instead. */ export const outboundSchema = Forbidden$outboundSchema; /** @deprecated use `Forbidden$Outbound` instead. */ export type Outbound = Forbidden$Outbound; }