/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { SDKError } from "./sdkerror.js"; /** * Rate limited */ export type CreateScopedApiKeyAuthApiKeysResponse429ResponseBodyData = { message: string; }; /** * Rate limited */ export class CreateScopedApiKeyAuthApiKeysResponse429ResponseBody extends SDKError { /** The original data that was passed to this error instance. */ data$: CreateScopedApiKeyAuthApiKeysResponse429ResponseBodyData; constructor( err: CreateScopedApiKeyAuthApiKeysResponse429ResponseBodyData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = err.message || `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; this.name = "CreateScopedApiKeyAuthApiKeysResponse429ResponseBody"; } } /** * Conflict */ export type CreateScopedApiKeyAuthApiKeysResponse409ResponseBodyData = { message: string; }; /** * Conflict */ export class CreateScopedApiKeyAuthApiKeysResponse409ResponseBody extends SDKError { /** The original data that was passed to this error instance. */ data$: CreateScopedApiKeyAuthApiKeysResponse409ResponseBodyData; constructor( err: CreateScopedApiKeyAuthApiKeysResponse409ResponseBodyData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = err.message || `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; this.name = "CreateScopedApiKeyAuthApiKeysResponse409ResponseBody"; } } /** * Not found */ export type CreateScopedApiKeyAuthApiKeysResponse404ResponseBodyData = { message: string; }; /** * Not found */ export class CreateScopedApiKeyAuthApiKeysResponse404ResponseBody extends SDKError { /** The original data that was passed to this error instance. */ data$: CreateScopedApiKeyAuthApiKeysResponse404ResponseBodyData; constructor( err: CreateScopedApiKeyAuthApiKeysResponse404ResponseBodyData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = err.message || `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; this.name = "CreateScopedApiKeyAuthApiKeysResponse404ResponseBody"; } } /** * Forbidden */ export type CreateScopedApiKeyAuthApiKeysResponseResponseBodyData = { message: string; }; /** * Forbidden */ export class CreateScopedApiKeyAuthApiKeysResponseResponseBody extends SDKError { /** The original data that was passed to this error instance. */ data$: CreateScopedApiKeyAuthApiKeysResponseResponseBodyData; constructor( err: CreateScopedApiKeyAuthApiKeysResponseResponseBodyData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = err.message || `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; this.name = "CreateScopedApiKeyAuthApiKeysResponseResponseBody"; } } /** * Unauthorized */ export type CreateScopedApiKeyAuthApiKeysResponseBodyData = { message: string; }; /** * Unauthorized */ export class CreateScopedApiKeyAuthApiKeysResponseBody extends SDKError { /** The original data that was passed to this error instance. */ data$: CreateScopedApiKeyAuthApiKeysResponseBodyData; constructor( err: CreateScopedApiKeyAuthApiKeysResponseBodyData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = err.message || `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; this.name = "CreateScopedApiKeyAuthApiKeysResponseBody"; } } /** * Bad request */ export type CreateScopedApiKeyResponseBodyData = { message: string; }; /** * Bad request */ export class CreateScopedApiKeyResponseBody extends SDKError { /** The original data that was passed to this error instance. */ data$: CreateScopedApiKeyResponseBodyData; constructor( err: CreateScopedApiKeyResponseBodyData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = err.message || `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; this.name = "CreateScopedApiKeyResponseBody"; } } /** @internal */ export const CreateScopedApiKeyAuthApiKeysResponse429ResponseBody$inboundSchema: z.ZodType< CreateScopedApiKeyAuthApiKeysResponse429ResponseBody, z.ZodTypeDef, unknown > = z.object({ message: z.string(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new CreateScopedApiKeyAuthApiKeysResponse429ResponseBody(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export type CreateScopedApiKeyAuthApiKeysResponse429ResponseBody$Outbound = { message: string; }; /** @internal */ export const CreateScopedApiKeyAuthApiKeysResponse429ResponseBody$outboundSchema: z.ZodType< CreateScopedApiKeyAuthApiKeysResponse429ResponseBody$Outbound, z.ZodTypeDef, CreateScopedApiKeyAuthApiKeysResponse429ResponseBody > = z.instanceof(CreateScopedApiKeyAuthApiKeysResponse429ResponseBody) .transform(v => v.data$) .pipe(z.object({ message: z.string(), })); /** @internal */ export const CreateScopedApiKeyAuthApiKeysResponse409ResponseBody$inboundSchema: z.ZodType< CreateScopedApiKeyAuthApiKeysResponse409ResponseBody, z.ZodTypeDef, unknown > = z.object({ message: z.string(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new CreateScopedApiKeyAuthApiKeysResponse409ResponseBody(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export type CreateScopedApiKeyAuthApiKeysResponse409ResponseBody$Outbound = { message: string; }; /** @internal */ export const CreateScopedApiKeyAuthApiKeysResponse409ResponseBody$outboundSchema: z.ZodType< CreateScopedApiKeyAuthApiKeysResponse409ResponseBody$Outbound, z.ZodTypeDef, CreateScopedApiKeyAuthApiKeysResponse409ResponseBody > = z.instanceof(CreateScopedApiKeyAuthApiKeysResponse409ResponseBody) .transform(v => v.data$) .pipe(z.object({ message: z.string(), })); /** @internal */ export const CreateScopedApiKeyAuthApiKeysResponse404ResponseBody$inboundSchema: z.ZodType< CreateScopedApiKeyAuthApiKeysResponse404ResponseBody, z.ZodTypeDef, unknown > = z.object({ message: z.string(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new CreateScopedApiKeyAuthApiKeysResponse404ResponseBody(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export type CreateScopedApiKeyAuthApiKeysResponse404ResponseBody$Outbound = { message: string; }; /** @internal */ export const CreateScopedApiKeyAuthApiKeysResponse404ResponseBody$outboundSchema: z.ZodType< CreateScopedApiKeyAuthApiKeysResponse404ResponseBody$Outbound, z.ZodTypeDef, CreateScopedApiKeyAuthApiKeysResponse404ResponseBody > = z.instanceof(CreateScopedApiKeyAuthApiKeysResponse404ResponseBody) .transform(v => v.data$) .pipe(z.object({ message: z.string(), })); /** @internal */ export const CreateScopedApiKeyAuthApiKeysResponseResponseBody$inboundSchema: z.ZodType< CreateScopedApiKeyAuthApiKeysResponseResponseBody, z.ZodTypeDef, unknown > = z.object({ message: z.string(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new CreateScopedApiKeyAuthApiKeysResponseResponseBody(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export type CreateScopedApiKeyAuthApiKeysResponseResponseBody$Outbound = { message: string; }; /** @internal */ export const CreateScopedApiKeyAuthApiKeysResponseResponseBody$outboundSchema: z.ZodType< CreateScopedApiKeyAuthApiKeysResponseResponseBody$Outbound, z.ZodTypeDef, CreateScopedApiKeyAuthApiKeysResponseResponseBody > = z.instanceof(CreateScopedApiKeyAuthApiKeysResponseResponseBody) .transform(v => v.data$) .pipe(z.object({ message: z.string(), })); /** @internal */ export const CreateScopedApiKeyAuthApiKeysResponseBody$inboundSchema: z.ZodType< CreateScopedApiKeyAuthApiKeysResponseBody, z.ZodTypeDef, unknown > = z.object({ message: z.string(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new CreateScopedApiKeyAuthApiKeysResponseBody(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export type CreateScopedApiKeyAuthApiKeysResponseBody$Outbound = { message: string; }; /** @internal */ export const CreateScopedApiKeyAuthApiKeysResponseBody$outboundSchema: z.ZodType< CreateScopedApiKeyAuthApiKeysResponseBody$Outbound, z.ZodTypeDef, CreateScopedApiKeyAuthApiKeysResponseBody > = z.instanceof(CreateScopedApiKeyAuthApiKeysResponseBody) .transform(v => v.data$) .pipe(z.object({ message: z.string(), })); /** @internal */ export const CreateScopedApiKeyResponseBody$inboundSchema: z.ZodType< CreateScopedApiKeyResponseBody, z.ZodTypeDef, unknown > = z.object({ message: z.string(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new CreateScopedApiKeyResponseBody(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export type CreateScopedApiKeyResponseBody$Outbound = { message: string; }; /** @internal */ export const CreateScopedApiKeyResponseBody$outboundSchema: z.ZodType< CreateScopedApiKeyResponseBody$Outbound, z.ZodTypeDef, CreateScopedApiKeyResponseBody > = z.instanceof(CreateScopedApiKeyResponseBody) .transform(v => v.data$) .pipe(z.object({ message: z.string(), }));