/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { OutpostError } from "./outposterror.js"; /** * List Tenants feature is not available. Requires Redis with RediSearch module. */ export type NotImplementedErrorData = { error?: string | undefined; }; /** * List Tenants feature is not available. Requires Redis with RediSearch module. */ export class NotImplementedError extends OutpostError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: NotImplementedErrorData; constructor( err: NotImplementedErrorData, 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 = "NotImplementedError"; } } /** @internal */ export const NotImplementedError$inboundSchema: z.ZodType< NotImplementedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new NotImplementedError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export type NotImplementedError$Outbound = { error?: string | undefined; }; /** @internal */ export const NotImplementedError$outboundSchema: z.ZodType< NotImplementedError$Outbound, z.ZodTypeDef, NotImplementedError > = z.instanceof(NotImplementedError) .transform(v => v.data$) .pipe(z.object({ error: z.string().optional(), }));