UNPKG

attio-js

Version:

Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.

1,316 lines 104 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; export const NotFoundType = { InvalidRequestError: "invalid_request_error", }; export const NotFoundCode = { NotFound: "not_found", }; /** * Not Found */ export class GetV2ObjectsObjectNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2ObjectsObjectNotFoundError"; } } export const ConflictType = { InvalidRequestError: "invalid_request_error", }; export const ConflictCode = { SlugConflict: "slug_conflict", }; /** * Conflict */ export class PostV2ObjectsSlugConflictError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2ObjectsSlugConflictError"; } } /** * Conflict */ export class PatchV2ObjectsObjectSlugConflictError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PatchV2ObjectsObjectSlugConflictError"; } } export const BadRequestType = { InvalidRequestError: "invalid_request_error", }; export const CodeValidationType = { ValidationType: "validation_type", }; /** * Bad Request */ export class PatchV2ObjectsObjectValidationTypeError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PatchV2ObjectsObjectValidationTypeError"; } } /** * Conflict */ export class PostV2TargetIdentifierAttributesSlugConflictError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2TargetIdentifierAttributesSlugConflictError"; } } /** * Not Found */ export class PostV2TargetIdentifierAttributesNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2TargetIdentifierAttributesNotFoundError"; } } /** * Bad Request */ export class PostV2TargetIdentifierAttributesValidationTypeError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2TargetIdentifierAttributesValidationTypeError"; } } /** * Not Found */ export class GetV2TargetIdentifierAttributesAttributeNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2TargetIdentifierAttributesAttributeNotFoundError"; } } export const PatchV2TargetIdentifierAttributesAttributeCode = { SystemEditUnauthorized: "system_edit_unauthorized", }; /** * Bad Request */ export class SystemEditUnauthorizedError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "SystemEditUnauthorizedError"; } } /** * Conflict */ export class PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError"; } } /** * Bad Request */ export class PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError"; } } export const BadRequestCode = { ValueNotFound: "value_not_found", MissingValue: "missing_value", }; /** * Bad Request */ export class PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError"; } } /** * Conflict */ export class PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError"; } } /** * Bad Request */ export class PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError"; } } /** * Bad Request */ export class PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError"; } } /** * Not Found */ export class PostV2ObjectsObjectRecordsQueryNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2ObjectsObjectRecordsQueryNotFoundError"; } } export const PostV2ObjectsObjectRecordsQueryCode = { FilterError: "filter_error", }; /** * Bad Request */ export class FilterError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "FilterError"; } } /** * Bad Request */ export class PostV2ObjectsObjectRecordsInvalidRequestError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2ObjectsObjectRecordsInvalidRequestError"; } } /** * Bad Request */ export class PutV2ObjectsObjectRecordsInvalidRequestError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PutV2ObjectsObjectRecordsInvalidRequestError"; } } /** * Not Found */ export class GetV2ObjectsObjectRecordsRecordIdInvalidRequestError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2ObjectsObjectRecordsRecordIdInvalidRequestError"; } } export const CodeMissingValue = { MissingValue: "missing_value", }; /** * Bad Request */ export class MissingValueError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "MissingValueError"; } } /** * Bad Request */ export class GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError"; } } /** * Not Found */ export class PostV2ListsNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2ListsNotFoundError"; } } export const PostV2ListsType = { AuthError: "auth_error", }; export const PostV2ListsCode = { BillingError: "billing_error", }; /** * Forbidden */ export class BillingError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "BillingError"; } } /** * Bad Request */ export class PostV2ListsInvalidRequestError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2ListsInvalidRequestError"; } } /** * Not Found */ export class GetV2ListsListNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2ListsListNotFoundError"; } } /** * Not Found */ export class PostV2ListsListEntriesNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2ListsListEntriesNotFoundError"; } } /** * Bad Request */ export class PostV2ListsListEntriesInvalidRequestError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2ListsListEntriesInvalidRequestError"; } } /** * Not Found */ export class PutV2ListsListEntriesNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PutV2ListsListEntriesNotFoundError"; } } export const PutV2ListsListEntriesCode = { MultipleMatchResults: "multiple_match_results", }; /** * Bad Request */ export class MultipleMatchResultsError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "MultipleMatchResultsError"; } } export const CodeImmutableValue = { ImmutableValue: "immutable_value", }; /** * Bad Request */ export class ImmutableValueError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "ImmutableValueError"; } } /** * Not Found */ export class GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError"; } } /** * Not Found */ export class GetV2NotesNoteIdNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2NotesNoteIdNotFoundError"; } } /** * Bad Request */ export class PostV2TasksValidationTypeError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2TasksValidationTypeError"; } } /** * Not Found */ export class GetV2TasksTaskIdNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2TasksTaskIdNotFoundError"; } } /** * Not Found */ export class PatchV2TasksTaskIdNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PatchV2TasksTaskIdNotFoundError"; } } /** * Not Found */ export class GetV2ThreadsThreadIdNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2ThreadsThreadIdNotFoundError"; } } /** * Bad Request */ export class PostV2CommentsInvalidRequestError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2CommentsInvalidRequestError"; } } /** * Not Found */ export class GetV2CommentsCommentIdNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2CommentsCommentIdNotFoundError"; } } /** * Not Found */ export class DeleteV2CommentsCommentIdNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "DeleteV2CommentsCommentIdNotFoundError"; } } /** * Bad Request */ export class PostV2WebhooksValidationTypeError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "PostV2WebhooksValidationTypeError"; } } /** * Not Found */ export class GetV2WebhooksWebhookIdNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "GetV2WebhooksWebhookIdNotFoundError"; } } /** * Not Found */ export class DeleteV2WebhooksWebhookIdNotFoundError extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.statusCode = err.statusCode; this.type = err.type; this.code = err.code; this.name = "DeleteV2WebhooksWebhookIdNotFoundError"; } } /** @internal */ export const NotFoundType$inboundSchema = z.nativeEnum(NotFoundType); /** @internal */ export const NotFoundType$outboundSchema = NotFoundType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var NotFoundType$; (function (NotFoundType$) { /** @deprecated use `NotFoundType$inboundSchema` instead. */ NotFoundType$.inboundSchema = NotFoundType$inboundSchema; /** @deprecated use `NotFoundType$outboundSchema` instead. */ NotFoundType$.outboundSchema = NotFoundType$outboundSchema; })(NotFoundType$ || (NotFoundType$ = {})); /** @internal */ export const NotFoundCode$inboundSchema = z.nativeEnum(NotFoundCode); /** @internal */ export const NotFoundCode$outboundSchema = NotFoundCode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var NotFoundCode$; (function (NotFoundCode$) { /** @deprecated use `NotFoundCode$inboundSchema` instead. */ NotFoundCode$.inboundSchema = NotFoundCode$inboundSchema; /** @deprecated use `NotFoundCode$outboundSchema` instead. */ NotFoundCode$.outboundSchema = NotFoundCode$outboundSchema; })(NotFoundCode$ || (NotFoundCode$ = {})); /** @internal */ export const GetV2ObjectsObjectNotFoundError$inboundSchema = z.object({ status_code: z.number(), type: NotFoundType$inboundSchema, code: NotFoundCode$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new GetV2ObjectsObjectNotFoundError(remapped); }); /** @internal */ export const GetV2ObjectsObjectNotFoundError$outboundSchema = z.instanceof(GetV2ObjectsObjectNotFoundError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: NotFoundType$outboundSchema, code: NotFoundCode$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var GetV2ObjectsObjectNotFoundError$; (function (GetV2ObjectsObjectNotFoundError$) { /** @deprecated use `GetV2ObjectsObjectNotFoundError$inboundSchema` instead. */ GetV2ObjectsObjectNotFoundError$.inboundSchema = GetV2ObjectsObjectNotFoundError$inboundSchema; /** @deprecated use `GetV2ObjectsObjectNotFoundError$outboundSchema` instead. */ GetV2ObjectsObjectNotFoundError$.outboundSchema = GetV2ObjectsObjectNotFoundError$outboundSchema; })(GetV2ObjectsObjectNotFoundError$ || (GetV2ObjectsObjectNotFoundError$ = {})); /** @internal */ export const ConflictType$inboundSchema = z.nativeEnum(ConflictType); /** @internal */ export const ConflictType$outboundSchema = ConflictType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var ConflictType$; (function (ConflictType$) { /** @deprecated use `ConflictType$inboundSchema` instead. */ ConflictType$.inboundSchema = ConflictType$inboundSchema; /** @deprecated use `ConflictType$outboundSchema` instead. */ ConflictType$.outboundSchema = ConflictType$outboundSchema; })(ConflictType$ || (ConflictType$ = {})); /** @internal */ export const ConflictCode$inboundSchema = z.nativeEnum(ConflictCode); /** @internal */ export const ConflictCode$outboundSchema = ConflictCode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var ConflictCode$; (function (ConflictCode$) { /** @deprecated use `ConflictCode$inboundSchema` instead. */ ConflictCode$.inboundSchema = ConflictCode$inboundSchema; /** @deprecated use `ConflictCode$outboundSchema` instead. */ ConflictCode$.outboundSchema = ConflictCode$outboundSchema; })(ConflictCode$ || (ConflictCode$ = {})); /** @internal */ export const PostV2ObjectsSlugConflictError$inboundSchema = z.object({ status_code: z.number(), type: ConflictType$inboundSchema, code: ConflictCode$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new PostV2ObjectsSlugConflictError(remapped); }); /** @internal */ export const PostV2ObjectsSlugConflictError$outboundSchema = z.instanceof(PostV2ObjectsSlugConflictError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: ConflictType$outboundSchema, code: ConflictCode$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2ObjectsSlugConflictError$; (function (PostV2ObjectsSlugConflictError$) { /** @deprecated use `PostV2ObjectsSlugConflictError$inboundSchema` instead. */ PostV2ObjectsSlugConflictError$.inboundSchema = PostV2ObjectsSlugConflictError$inboundSchema; /** @deprecated use `PostV2ObjectsSlugConflictError$outboundSchema` instead. */ PostV2ObjectsSlugConflictError$.outboundSchema = PostV2ObjectsSlugConflictError$outboundSchema; })(PostV2ObjectsSlugConflictError$ || (PostV2ObjectsSlugConflictError$ = {})); /** @internal */ export const PatchV2ObjectsObjectSlugConflictError$inboundSchema = z.object({ status_code: z.number(), type: ConflictType$inboundSchema, code: ConflictCode$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new PatchV2ObjectsObjectSlugConflictError(remapped); }); /** @internal */ export const PatchV2ObjectsObjectSlugConflictError$outboundSchema = z.instanceof(PatchV2ObjectsObjectSlugConflictError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: ConflictType$outboundSchema, code: ConflictCode$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PatchV2ObjectsObjectSlugConflictError$; (function (PatchV2ObjectsObjectSlugConflictError$) { /** @deprecated use `PatchV2ObjectsObjectSlugConflictError$inboundSchema` instead. */ PatchV2ObjectsObjectSlugConflictError$.inboundSchema = PatchV2ObjectsObjectSlugConflictError$inboundSchema; /** @deprecated use `PatchV2ObjectsObjectSlugConflictError$outboundSchema` instead. */ PatchV2ObjectsObjectSlugConflictError$.outboundSchema = PatchV2ObjectsObjectSlugConflictError$outboundSchema; })(PatchV2ObjectsObjectSlugConflictError$ || (PatchV2ObjectsObjectSlugConflictError$ = {})); /** @internal */ export const BadRequestType$inboundSchema = z.nativeEnum(BadRequestType); /** @internal */ export const BadRequestType$outboundSchema = BadRequestType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var BadRequestType$; (function (BadRequestType$) { /** @deprecated use `BadRequestType$inboundSchema` instead. */ BadRequestType$.inboundSchema = BadRequestType$inboundSchema; /** @deprecated use `BadRequestType$outboundSchema` instead. */ BadRequestType$.outboundSchema = BadRequestType$outboundSchema; })(BadRequestType$ || (BadRequestType$ = {})); /** @internal */ export const CodeValidationType$inboundSchema = z.nativeEnum(CodeValidationType); /** @internal */ export const CodeValidationType$outboundSchema = CodeValidationType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var CodeValidationType$; (function (CodeValidationType$) { /** @deprecated use `CodeValidationType$inboundSchema` instead. */ CodeValidationType$.inboundSchema = CodeValidationType$inboundSchema; /** @deprecated use `CodeValidationType$outboundSchema` instead. */ CodeValidationType$.outboundSchema = CodeValidationType$outboundSchema; })(CodeValidationType$ || (CodeValidationType$ = {})); /** @internal */ export const PatchV2ObjectsObjectValidationTypeError$inboundSchema = z.object({ status_code: z.number(), type: BadRequestType$inboundSchema, code: CodeValidationType$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new PatchV2ObjectsObjectValidationTypeError(remapped); }); /** @internal */ export const PatchV2ObjectsObjectValidationTypeError$outboundSchema = z.instanceof(PatchV2ObjectsObjectValidationTypeError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: BadRequestType$outboundSchema, code: CodeValidationType$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PatchV2ObjectsObjectValidationTypeError$; (function (PatchV2ObjectsObjectValidationTypeError$) { /** @deprecated use `PatchV2ObjectsObjectValidationTypeError$inboundSchema` instead. */ PatchV2ObjectsObjectValidationTypeError$.inboundSchema = PatchV2ObjectsObjectValidationTypeError$inboundSchema; /** @deprecated use `PatchV2ObjectsObjectValidationTypeError$outboundSchema` instead. */ PatchV2ObjectsObjectValidationTypeError$.outboundSchema = PatchV2ObjectsObjectValidationTypeError$outboundSchema; })(PatchV2ObjectsObjectValidationTypeError$ || (PatchV2ObjectsObjectValidationTypeError$ = {})); /** @internal */ export const PostV2TargetIdentifierAttributesSlugConflictError$inboundSchema = z.object({ status_code: z.number(), type: ConflictType$inboundSchema, code: ConflictCode$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new PostV2TargetIdentifierAttributesSlugConflictError(remapped); }); /** @internal */ export const PostV2TargetIdentifierAttributesSlugConflictError$outboundSchema = z.instanceof(PostV2TargetIdentifierAttributesSlugConflictError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: ConflictType$outboundSchema, code: ConflictCode$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TargetIdentifierAttributesSlugConflictError$; (function (PostV2TargetIdentifierAttributesSlugConflictError$) { /** @deprecated use `PostV2TargetIdentifierAttributesSlugConflictError$inboundSchema` instead. */ PostV2TargetIdentifierAttributesSlugConflictError$.inboundSchema = PostV2TargetIdentifierAttributesSlugConflictError$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesSlugConflictError$outboundSchema` instead. */ PostV2TargetIdentifierAttributesSlugConflictError$.outboundSchema = PostV2TargetIdentifierAttributesSlugConflictError$outboundSchema; })(PostV2TargetIdentifierAttributesSlugConflictError$ || (PostV2TargetIdentifierAttributesSlugConflictError$ = {})); /** @internal */ export const PostV2TargetIdentifierAttributesNotFoundError$inboundSchema = z.object({ status_code: z.number(), type: NotFoundType$inboundSchema, code: NotFoundCode$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new PostV2TargetIdentifierAttributesNotFoundError(remapped); }); /** @internal */ export const PostV2TargetIdentifierAttributesNotFoundError$outboundSchema = z.instanceof(PostV2TargetIdentifierAttributesNotFoundError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: NotFoundType$outboundSchema, code: NotFoundCode$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TargetIdentifierAttributesNotFoundError$; (function (PostV2TargetIdentifierAttributesNotFoundError$) { /** @deprecated use `PostV2TargetIdentifierAttributesNotFoundError$inboundSchema` instead. */ PostV2TargetIdentifierAttributesNotFoundError$.inboundSchema = PostV2TargetIdentifierAttributesNotFoundError$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesNotFoundError$outboundSchema` instead. */ PostV2TargetIdentifierAttributesNotFoundError$.outboundSchema = PostV2TargetIdentifierAttributesNotFoundError$outboundSchema; })(PostV2TargetIdentifierAttributesNotFoundError$ || (PostV2TargetIdentifierAttributesNotFoundError$ = {})); /** @internal */ export const PostV2TargetIdentifierAttributesValidationTypeError$inboundSchema = z.object({ status_code: z.number(), type: BadRequestType$inboundSchema, code: CodeValidationType$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new PostV2TargetIdentifierAttributesValidationTypeError(remapped); }); /** @internal */ export const PostV2TargetIdentifierAttributesValidationTypeError$outboundSchema = z.instanceof(PostV2TargetIdentifierAttributesValidationTypeError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: BadRequestType$outboundSchema, code: CodeValidationType$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TargetIdentifierAttributesValidationTypeError$; (function (PostV2TargetIdentifierAttributesValidationTypeError$) { /** @deprecated use `PostV2TargetIdentifierAttributesValidationTypeError$inboundSchema` instead. */ PostV2TargetIdentifierAttributesValidationTypeError$.inboundSchema = PostV2TargetIdentifierAttributesValidationTypeError$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesValidationTypeError$outboundSchema` instead. */ PostV2TargetIdentifierAttributesValidationTypeError$.outboundSchema = PostV2TargetIdentifierAttributesValidationTypeError$outboundSchema; })(PostV2TargetIdentifierAttributesValidationTypeError$ || (PostV2TargetIdentifierAttributesValidationTypeError$ = {})); /** @internal */ export const GetV2TargetIdentifierAttributesAttributeNotFoundError$inboundSchema = z.object({ status_code: z.number(), type: NotFoundType$inboundSchema, code: NotFoundCode$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new GetV2TargetIdentifierAttributesAttributeNotFoundError(remapped); }); /** @internal */ export const GetV2TargetIdentifierAttributesAttributeNotFoundError$outboundSchema = z.instanceof(GetV2TargetIdentifierAttributesAttributeNotFoundError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: NotFoundType$outboundSchema, code: NotFoundCode$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var GetV2TargetIdentifierAttributesAttributeNotFoundError$; (function (GetV2TargetIdentifierAttributesAttributeNotFoundError$) { /** @deprecated use `GetV2TargetIdentifierAttributesAttributeNotFoundError$inboundSchema` instead. */ GetV2TargetIdentifierAttributesAttributeNotFoundError$.inboundSchema = GetV2TargetIdentifierAttributesAttributeNotFoundError$inboundSchema; /** @deprecated use `GetV2TargetIdentifierAttributesAttributeNotFoundError$outboundSchema` instead. */ GetV2TargetIdentifierAttributesAttributeNotFoundError$.outboundSchema = GetV2TargetIdentifierAttributesAttributeNotFoundError$outboundSchema; })(GetV2TargetIdentifierAttributesAttributeNotFoundError$ || (GetV2TargetIdentifierAttributesAttributeNotFoundError$ = {})); /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeCode$inboundSchema = z .nativeEnum(PatchV2TargetIdentifierAttributesAttributeCode); /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeCode$outboundSchema = PatchV2TargetIdentifierAttributesAttributeCode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PatchV2TargetIdentifierAttributesAttributeCode$; (function (PatchV2TargetIdentifierAttributesAttributeCode$) { /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeCode$inboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeCode$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeCode$inboundSchema; /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeCode$outboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeCode$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeCode$outboundSchema; })(PatchV2TargetIdentifierAttributesAttributeCode$ || (PatchV2TargetIdentifierAttributesAttributeCode$ = {})); /** @internal */ export const SystemEditUnauthorizedError$inboundSchema = z.object({ status_code: z.number(), type: BadRequestType$inboundSchema, code: PatchV2TargetIdentifierAttributesAttributeCode$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new SystemEditUnauthorizedError(remapped); }); /** @internal */ export const SystemEditUnauthorizedError$outboundSchema = z.instanceof(SystemEditUnauthorizedError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: BadRequestType$outboundSchema, code: PatchV2TargetIdentifierAttributesAttributeCode$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var SystemEditUnauthorizedError$; (function (SystemEditUnauthorizedError$) { /** @deprecated use `SystemEditUnauthorizedError$inboundSchema` instead. */ SystemEditUnauthorizedError$.inboundSchema = SystemEditUnauthorizedError$inboundSchema; /** @deprecated use `SystemEditUnauthorizedError$outboundSchema` instead. */ SystemEditUnauthorizedError$.outboundSchema = SystemEditUnauthorizedError$outboundSchema; })(SystemEditUnauthorizedError$ || (SystemEditUnauthorizedError$ = {})); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$inboundSchema = z.object({ status_code: z.number(), type: ConflictType$inboundSchema, code: ConflictCode$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError(remapped); }); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$outboundSchema = z.instanceof(PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: ConflictType$outboundSchema, code: ConflictCode$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$; (function (PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$) { /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$inboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$.inboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$outboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$.outboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$outboundSchema; })(PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$ || (PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$ = {})); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$inboundSchema = z.object({ status_code: z.number(), type: BadRequestType$inboundSchema, code: CodeValidationType$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError(remapped); }); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$outboundSchema = z.instanceof(PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: BadRequestType$outboundSchema, code: CodeValidationType$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$; (function (PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$) { /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$inboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$.inboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$outboundSchema` instead. */ PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$.outboundSchema = PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$outboundSchema; })(PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$ || (PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$ = {})); /** @internal */ export const BadRequestCode$inboundSchema = z.nativeEnum(BadRequestCode); /** @internal */ export const BadRequestCode$outboundSchema = BadRequestCode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var BadRequestCode$; (function (BadRequestCode$) { /** @deprecated use `BadRequestCode$inboundSchema` instead. */ BadRequestCode$.inboundSchema = BadRequestCode$inboundSchema; /** @deprecated use `BadRequestCode$outboundSchema` instead. */ BadRequestCode$.outboundSchema = BadRequestCode$outboundSchema; })(BadRequestCode$ || (BadRequestCode$ = {})); /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$inboundSchema = z.object({ status_code: z.number(), type: BadRequestType$inboundSchema, code: BadRequestCode$inboundSchema, message: z.string(), }) .transform((v) => { const remapped = remap$(v, { "status_code": "statusCode", }); return new PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError(remapped); }); /** @internal */ export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$outboundSchema = z.instanceof(PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError) .transform(v => v.data$) .pipe(z.object({ statusCode: z.number(), type: BadRequestType$outboundSchema, code: BadRequestCode$outboundSchema, message: z.string(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$; (function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$) { /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$inboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$.inboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$inboundSchema; /** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$outboundSchema` instead. */ PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$.outboundSchema = PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$outboundSchema; })(PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$ || (PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$ = {})); /** @internal */ export const PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError$inboundSchema = z.object({ status_code: z.number(), type: ConflictType$inboundSchema, code: ConflictCode$inboundSchema, message: z.string(), }) .transform((v) =>