UNPKG

attio-js

Version:

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

598 lines 40 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.PostV2TargetIdentifierAttributesRequestBody$inboundSchema = exports.PostV2TargetIdentifierAttributesData$ = exports.PostV2TargetIdentifierAttributesData$outboundSchema = exports.PostV2TargetIdentifierAttributesData$inboundSchema = exports.PostV2TargetIdentifierAttributesConfig$ = exports.PostV2TargetIdentifierAttributesConfig$outboundSchema = exports.PostV2TargetIdentifierAttributesConfig$inboundSchema = exports.PostV2TargetIdentifierAttributesRecordReference$ = exports.PostV2TargetIdentifierAttributesRecordReference$outboundSchema = exports.PostV2TargetIdentifierAttributesRecordReference$inboundSchema = exports.PostV2TargetIdentifierAttributesCurrency$ = exports.PostV2TargetIdentifierAttributesCurrency$outboundSchema = exports.PostV2TargetIdentifierAttributesCurrency$inboundSchema = exports.PostV2TargetIdentifierAttributesDisplayType$ = exports.PostV2TargetIdentifierAttributesDisplayType$outboundSchema = exports.PostV2TargetIdentifierAttributesDisplayType$inboundSchema = exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$ = exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$outboundSchema = exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$inboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueUnion$ = exports.PostV2TargetIdentifierAttributesDefaultValueUnion$outboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueUnion$inboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$ = exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$outboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$inboundSchema = exports.PostV2TargetIdentifierAttributesTemplate$ = exports.PostV2TargetIdentifierAttributesTemplate$outboundSchema = exports.PostV2TargetIdentifierAttributesTemplate$inboundSchema = exports.PostV2TargetIdentifierAttributesTypeDynamic$ = exports.PostV2TargetIdentifierAttributesTypeDynamic$outboundSchema = exports.PostV2TargetIdentifierAttributesTypeDynamic$inboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueStatic$ = exports.PostV2TargetIdentifierAttributesDefaultValueStatic$outboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueStatic$inboundSchema = exports.PostV2TargetIdentifierAttributesTypeStatic$ = exports.PostV2TargetIdentifierAttributesTypeStatic$outboundSchema = exports.PostV2TargetIdentifierAttributesTypeStatic$inboundSchema = exports.PostV2TargetIdentifierAttributesType$ = exports.PostV2TargetIdentifierAttributesType$outboundSchema = exports.PostV2TargetIdentifierAttributesType$inboundSchema = exports.PostV2TargetIdentifierAttributesTarget$ = exports.PostV2TargetIdentifierAttributesTarget$outboundSchema = exports.PostV2TargetIdentifierAttributesTarget$inboundSchema = exports.PostV2TargetIdentifierAttributesDisplayType = exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode = exports.PostV2TargetIdentifierAttributesTemplate = exports.PostV2TargetIdentifierAttributesTypeDynamic = exports.PostV2TargetIdentifierAttributesTypeStatic = exports.PostV2TargetIdentifierAttributesType = exports.PostV2TargetIdentifierAttributesTarget = void 0; exports.PostV2TargetIdentifierAttributesResponse$ = exports.PostV2TargetIdentifierAttributesResponse$outboundSchema = exports.PostV2TargetIdentifierAttributesResponse$inboundSchema = exports.PostV2TargetIdentifierAttributesRequest$ = exports.PostV2TargetIdentifierAttributesRequest$outboundSchema = exports.PostV2TargetIdentifierAttributesRequest$inboundSchema = exports.PostV2TargetIdentifierAttributesRequestBody$ = exports.PostV2TargetIdentifierAttributesRequestBody$outboundSchema = void 0; exports.postV2TargetIdentifierAttributesDefaultValueStaticToJSON = postV2TargetIdentifierAttributesDefaultValueStaticToJSON; exports.postV2TargetIdentifierAttributesDefaultValueStaticFromJSON = postV2TargetIdentifierAttributesDefaultValueStaticFromJSON; exports.postV2TargetIdentifierAttributesDefaultValueDynamicToJSON = postV2TargetIdentifierAttributesDefaultValueDynamicToJSON; exports.postV2TargetIdentifierAttributesDefaultValueDynamicFromJSON = postV2TargetIdentifierAttributesDefaultValueDynamicFromJSON; exports.postV2TargetIdentifierAttributesDefaultValueUnionToJSON = postV2TargetIdentifierAttributesDefaultValueUnionToJSON; exports.postV2TargetIdentifierAttributesDefaultValueUnionFromJSON = postV2TargetIdentifierAttributesDefaultValueUnionFromJSON; exports.postV2TargetIdentifierAttributesCurrencyToJSON = postV2TargetIdentifierAttributesCurrencyToJSON; exports.postV2TargetIdentifierAttributesCurrencyFromJSON = postV2TargetIdentifierAttributesCurrencyFromJSON; exports.postV2TargetIdentifierAttributesRecordReferenceToJSON = postV2TargetIdentifierAttributesRecordReferenceToJSON; exports.postV2TargetIdentifierAttributesRecordReferenceFromJSON = postV2TargetIdentifierAttributesRecordReferenceFromJSON; exports.postV2TargetIdentifierAttributesConfigToJSON = postV2TargetIdentifierAttributesConfigToJSON; exports.postV2TargetIdentifierAttributesConfigFromJSON = postV2TargetIdentifierAttributesConfigFromJSON; exports.postV2TargetIdentifierAttributesDataToJSON = postV2TargetIdentifierAttributesDataToJSON; exports.postV2TargetIdentifierAttributesDataFromJSON = postV2TargetIdentifierAttributesDataFromJSON; exports.postV2TargetIdentifierAttributesRequestBodyToJSON = postV2TargetIdentifierAttributesRequestBodyToJSON; exports.postV2TargetIdentifierAttributesRequestBodyFromJSON = postV2TargetIdentifierAttributesRequestBodyFromJSON; exports.postV2TargetIdentifierAttributesRequestToJSON = postV2TargetIdentifierAttributesRequestToJSON; exports.postV2TargetIdentifierAttributesRequestFromJSON = postV2TargetIdentifierAttributesRequestFromJSON; exports.postV2TargetIdentifierAttributesResponseToJSON = postV2TargetIdentifierAttributesResponseToJSON; exports.postV2TargetIdentifierAttributesResponseFromJSON = postV2TargetIdentifierAttributesResponseFromJSON; const z = __importStar(require("zod")); const primitives_js_1 = require("../../lib/primitives.js"); const schemas_js_1 = require("../../lib/schemas.js"); const attribute_js_1 = require("../components/attribute.js"); const inputvalueunion_js_1 = require("../components/inputvalueunion.js"); /** * Whether the attribute is to be created on an object or a list. */ exports.PostV2TargetIdentifierAttributesTarget = { Objects: "objects", Lists: "lists", }; /** * The type of the attribute. This value affects the possible `config` values. Attributes of type "status" are not supported on objects. */ exports.PostV2TargetIdentifierAttributesType = { Text: "text", Number: "number", Checkbox: "checkbox", Currency: "currency", Date: "date", Timestamp: "timestamp", Rating: "rating", Status: "status", Select: "select", RecordReference: "record-reference", ActorReference: "actor-reference", Location: "location", Domain: "domain", EmailAddress: "email-address", PhoneNumber: "phone-number", }; exports.PostV2TargetIdentifierAttributesTypeStatic = { Static: "static", }; exports.PostV2TargetIdentifierAttributesTypeDynamic = { Dynamic: "dynamic", }; /** * For actor reference attributes, you may pass a dynamic value of `"current-user"`. When creating new records or entries, this will cause the actor reference value to be populated with either the workspace member or API token that created the record/entry. */ exports.PostV2TargetIdentifierAttributesTemplate = { CurrentUser: "current-user", }; /** * The ISO4217 code representing the currency that values for this attribute should be stored in. */ exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode = { Aud: "AUD", Brl: "BRL", Bel: "BEL", Cad: "CAD", Cny: "CNY", Cop: "COP", Czk: "CZK", Dkk: "DKK", Eur: "EUR", Hkd: "HKD", Isk: "ISK", Inr: "INR", Ils: "ILS", Jpy: "JPY", Krw: "KRW", Myr: "MYR", Mxn: "MXN", Ntd: "NTD", Nzd: "NZD", Ngn: "NGN", Nok: "NOK", Xpf: "XPF", Pen: "PEN", Php: "PHP", Pln: "PLN", Gbp: "GBP", Sar: "SAR", Sgd: "SGD", Zar: "ZAR", Sek: "SEK", Chf: "CHF", Aed: "AED", Usd: "USD", }; /** * How the currency should be displayed across the app. "code" will display the ISO currency code e.g. "USD", "name" will display the localized currency name e.g. "British pound", "narrowSymbol" will display "$1" instead of "US$1" and "symbol" will display a localized currency symbol such as "$". */ exports.PostV2TargetIdentifierAttributesDisplayType = { Code: "code", Name: "name", NarrowSymbol: "narrowSymbol", Symbol: "symbol", }; /** @internal */ exports.PostV2TargetIdentifierAttributesTarget$inboundSchema = z.nativeEnum(exports.PostV2TargetIdentifierAttributesTarget); /** @internal */ exports.PostV2TargetIdentifierAttributesTarget$outboundSchema = exports.PostV2TargetIdentifierAttributesTarget$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesTarget$; (function (PostV2TargetIdentifierAttributesTarget$) { /** @deprecated use `PostV2TargetIdentifierAttributesTarget$inboundSchema` instead. */ PostV2TargetIdentifierAttributesTarget$.inboundSchema = exports.PostV2TargetIdentifierAttributesTarget$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesTarget$outboundSchema` instead. */ PostV2TargetIdentifierAttributesTarget$.outboundSchema = exports.PostV2TargetIdentifierAttributesTarget$outboundSchema; })(PostV2TargetIdentifierAttributesTarget$ || (exports.PostV2TargetIdentifierAttributesTarget$ = PostV2TargetIdentifierAttributesTarget$ = {})); /** @internal */ exports.PostV2TargetIdentifierAttributesType$inboundSchema = z.nativeEnum(exports.PostV2TargetIdentifierAttributesType); /** @internal */ exports.PostV2TargetIdentifierAttributesType$outboundSchema = exports.PostV2TargetIdentifierAttributesType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesType$; (function (PostV2TargetIdentifierAttributesType$) { /** @deprecated use `PostV2TargetIdentifierAttributesType$inboundSchema` instead. */ PostV2TargetIdentifierAttributesType$.inboundSchema = exports.PostV2TargetIdentifierAttributesType$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesType$outboundSchema` instead. */ PostV2TargetIdentifierAttributesType$.outboundSchema = exports.PostV2TargetIdentifierAttributesType$outboundSchema; })(PostV2TargetIdentifierAttributesType$ || (exports.PostV2TargetIdentifierAttributesType$ = PostV2TargetIdentifierAttributesType$ = {})); /** @internal */ exports.PostV2TargetIdentifierAttributesTypeStatic$inboundSchema = z .nativeEnum(exports.PostV2TargetIdentifierAttributesTypeStatic); /** @internal */ exports.PostV2TargetIdentifierAttributesTypeStatic$outboundSchema = exports.PostV2TargetIdentifierAttributesTypeStatic$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesTypeStatic$; (function (PostV2TargetIdentifierAttributesTypeStatic$) { /** @deprecated use `PostV2TargetIdentifierAttributesTypeStatic$inboundSchema` instead. */ PostV2TargetIdentifierAttributesTypeStatic$.inboundSchema = exports.PostV2TargetIdentifierAttributesTypeStatic$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesTypeStatic$outboundSchema` instead. */ PostV2TargetIdentifierAttributesTypeStatic$.outboundSchema = exports.PostV2TargetIdentifierAttributesTypeStatic$outboundSchema; })(PostV2TargetIdentifierAttributesTypeStatic$ || (exports.PostV2TargetIdentifierAttributesTypeStatic$ = PostV2TargetIdentifierAttributesTypeStatic$ = {})); /** @internal */ exports.PostV2TargetIdentifierAttributesDefaultValueStatic$inboundSchema = z.object({ type: exports.PostV2TargetIdentifierAttributesTypeStatic$inboundSchema, template: z.array(inputvalueunion_js_1.InputValueUnion$inboundSchema), }); /** @internal */ exports.PostV2TargetIdentifierAttributesDefaultValueStatic$outboundSchema = z.object({ type: exports.PostV2TargetIdentifierAttributesTypeStatic$outboundSchema, template: z.array(inputvalueunion_js_1.InputValueUnion$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesDefaultValueStatic$; (function (PostV2TargetIdentifierAttributesDefaultValueStatic$) { /** @deprecated use `PostV2TargetIdentifierAttributesDefaultValueStatic$inboundSchema` instead. */ PostV2TargetIdentifierAttributesDefaultValueStatic$.inboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueStatic$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesDefaultValueStatic$outboundSchema` instead. */ PostV2TargetIdentifierAttributesDefaultValueStatic$.outboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueStatic$outboundSchema; })(PostV2TargetIdentifierAttributesDefaultValueStatic$ || (exports.PostV2TargetIdentifierAttributesDefaultValueStatic$ = PostV2TargetIdentifierAttributesDefaultValueStatic$ = {})); function postV2TargetIdentifierAttributesDefaultValueStaticToJSON(postV2TargetIdentifierAttributesDefaultValueStatic) { return JSON.stringify(exports.PostV2TargetIdentifierAttributesDefaultValueStatic$outboundSchema.parse(postV2TargetIdentifierAttributesDefaultValueStatic)); } function postV2TargetIdentifierAttributesDefaultValueStaticFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesDefaultValueStatic$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesDefaultValueStatic' from JSON`); } /** @internal */ exports.PostV2TargetIdentifierAttributesTypeDynamic$inboundSchema = z .nativeEnum(exports.PostV2TargetIdentifierAttributesTypeDynamic); /** @internal */ exports.PostV2TargetIdentifierAttributesTypeDynamic$outboundSchema = exports.PostV2TargetIdentifierAttributesTypeDynamic$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesTypeDynamic$; (function (PostV2TargetIdentifierAttributesTypeDynamic$) { /** @deprecated use `PostV2TargetIdentifierAttributesTypeDynamic$inboundSchema` instead. */ PostV2TargetIdentifierAttributesTypeDynamic$.inboundSchema = exports.PostV2TargetIdentifierAttributesTypeDynamic$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesTypeDynamic$outboundSchema` instead. */ PostV2TargetIdentifierAttributesTypeDynamic$.outboundSchema = exports.PostV2TargetIdentifierAttributesTypeDynamic$outboundSchema; })(PostV2TargetIdentifierAttributesTypeDynamic$ || (exports.PostV2TargetIdentifierAttributesTypeDynamic$ = PostV2TargetIdentifierAttributesTypeDynamic$ = {})); /** @internal */ exports.PostV2TargetIdentifierAttributesTemplate$inboundSchema = z .nativeEnum(exports.PostV2TargetIdentifierAttributesTemplate); /** @internal */ exports.PostV2TargetIdentifierAttributesTemplate$outboundSchema = exports.PostV2TargetIdentifierAttributesTemplate$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesTemplate$; (function (PostV2TargetIdentifierAttributesTemplate$) { /** @deprecated use `PostV2TargetIdentifierAttributesTemplate$inboundSchema` instead. */ PostV2TargetIdentifierAttributesTemplate$.inboundSchema = exports.PostV2TargetIdentifierAttributesTemplate$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesTemplate$outboundSchema` instead. */ PostV2TargetIdentifierAttributesTemplate$.outboundSchema = exports.PostV2TargetIdentifierAttributesTemplate$outboundSchema; })(PostV2TargetIdentifierAttributesTemplate$ || (exports.PostV2TargetIdentifierAttributesTemplate$ = PostV2TargetIdentifierAttributesTemplate$ = {})); /** @internal */ exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$inboundSchema = z.object({ type: exports.PostV2TargetIdentifierAttributesTypeDynamic$inboundSchema, template: z.any().optional(), }); /** @internal */ exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$outboundSchema = z.object({ type: exports.PostV2TargetIdentifierAttributesTypeDynamic$outboundSchema, template: z.any().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesDefaultValueDynamic$; (function (PostV2TargetIdentifierAttributesDefaultValueDynamic$) { /** @deprecated use `PostV2TargetIdentifierAttributesDefaultValueDynamic$inboundSchema` instead. */ PostV2TargetIdentifierAttributesDefaultValueDynamic$.inboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesDefaultValueDynamic$outboundSchema` instead. */ PostV2TargetIdentifierAttributesDefaultValueDynamic$.outboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$outboundSchema; })(PostV2TargetIdentifierAttributesDefaultValueDynamic$ || (exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$ = PostV2TargetIdentifierAttributesDefaultValueDynamic$ = {})); function postV2TargetIdentifierAttributesDefaultValueDynamicToJSON(postV2TargetIdentifierAttributesDefaultValueDynamic) { return JSON.stringify(exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$outboundSchema.parse(postV2TargetIdentifierAttributesDefaultValueDynamic)); } function postV2TargetIdentifierAttributesDefaultValueDynamicFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesDefaultValueDynamic' from JSON`); } /** @internal */ exports.PostV2TargetIdentifierAttributesDefaultValueUnion$inboundSchema = z.union([ z.lazy(() => exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$inboundSchema), z.lazy(() => exports.PostV2TargetIdentifierAttributesDefaultValueStatic$inboundSchema), ]); /** @internal */ exports.PostV2TargetIdentifierAttributesDefaultValueUnion$outboundSchema = z.union([ z.lazy(() => exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$outboundSchema), z.lazy(() => exports.PostV2TargetIdentifierAttributesDefaultValueStatic$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesDefaultValueUnion$; (function (PostV2TargetIdentifierAttributesDefaultValueUnion$) { /** @deprecated use `PostV2TargetIdentifierAttributesDefaultValueUnion$inboundSchema` instead. */ PostV2TargetIdentifierAttributesDefaultValueUnion$.inboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueUnion$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesDefaultValueUnion$outboundSchema` instead. */ PostV2TargetIdentifierAttributesDefaultValueUnion$.outboundSchema = exports.PostV2TargetIdentifierAttributesDefaultValueUnion$outboundSchema; })(PostV2TargetIdentifierAttributesDefaultValueUnion$ || (exports.PostV2TargetIdentifierAttributesDefaultValueUnion$ = PostV2TargetIdentifierAttributesDefaultValueUnion$ = {})); function postV2TargetIdentifierAttributesDefaultValueUnionToJSON(postV2TargetIdentifierAttributesDefaultValueUnion) { return JSON.stringify(exports.PostV2TargetIdentifierAttributesDefaultValueUnion$outboundSchema.parse(postV2TargetIdentifierAttributesDefaultValueUnion)); } function postV2TargetIdentifierAttributesDefaultValueUnionFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesDefaultValueUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesDefaultValueUnion' from JSON`); } /** @internal */ exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$inboundSchema = z.nativeEnum(exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode); /** @internal */ exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$outboundSchema = exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesDefaultCurrencyCode$; (function (PostV2TargetIdentifierAttributesDefaultCurrencyCode$) { /** @deprecated use `PostV2TargetIdentifierAttributesDefaultCurrencyCode$inboundSchema` instead. */ PostV2TargetIdentifierAttributesDefaultCurrencyCode$.inboundSchema = exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesDefaultCurrencyCode$outboundSchema` instead. */ PostV2TargetIdentifierAttributesDefaultCurrencyCode$.outboundSchema = exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$outboundSchema; })(PostV2TargetIdentifierAttributesDefaultCurrencyCode$ || (exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$ = PostV2TargetIdentifierAttributesDefaultCurrencyCode$ = {})); /** @internal */ exports.PostV2TargetIdentifierAttributesDisplayType$inboundSchema = z .nativeEnum(exports.PostV2TargetIdentifierAttributesDisplayType); /** @internal */ exports.PostV2TargetIdentifierAttributesDisplayType$outboundSchema = exports.PostV2TargetIdentifierAttributesDisplayType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesDisplayType$; (function (PostV2TargetIdentifierAttributesDisplayType$) { /** @deprecated use `PostV2TargetIdentifierAttributesDisplayType$inboundSchema` instead. */ PostV2TargetIdentifierAttributesDisplayType$.inboundSchema = exports.PostV2TargetIdentifierAttributesDisplayType$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesDisplayType$outboundSchema` instead. */ PostV2TargetIdentifierAttributesDisplayType$.outboundSchema = exports.PostV2TargetIdentifierAttributesDisplayType$outboundSchema; })(PostV2TargetIdentifierAttributesDisplayType$ || (exports.PostV2TargetIdentifierAttributesDisplayType$ = PostV2TargetIdentifierAttributesDisplayType$ = {})); /** @internal */ exports.PostV2TargetIdentifierAttributesCurrency$inboundSchema = z.object({ default_currency_code: exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$inboundSchema, display_type: exports.PostV2TargetIdentifierAttributesDisplayType$inboundSchema, }).transform((v) => { return (0, primitives_js_1.remap)(v, { "default_currency_code": "defaultCurrencyCode", "display_type": "displayType", }); }); /** @internal */ exports.PostV2TargetIdentifierAttributesCurrency$outboundSchema = z.object({ defaultCurrencyCode: exports.PostV2TargetIdentifierAttributesDefaultCurrencyCode$outboundSchema, displayType: exports.PostV2TargetIdentifierAttributesDisplayType$outboundSchema, }).transform((v) => { return (0, primitives_js_1.remap)(v, { defaultCurrencyCode: "default_currency_code", displayType: "display_type", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesCurrency$; (function (PostV2TargetIdentifierAttributesCurrency$) { /** @deprecated use `PostV2TargetIdentifierAttributesCurrency$inboundSchema` instead. */ PostV2TargetIdentifierAttributesCurrency$.inboundSchema = exports.PostV2TargetIdentifierAttributesCurrency$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesCurrency$outboundSchema` instead. */ PostV2TargetIdentifierAttributesCurrency$.outboundSchema = exports.PostV2TargetIdentifierAttributesCurrency$outboundSchema; })(PostV2TargetIdentifierAttributesCurrency$ || (exports.PostV2TargetIdentifierAttributesCurrency$ = PostV2TargetIdentifierAttributesCurrency$ = {})); function postV2TargetIdentifierAttributesCurrencyToJSON(postV2TargetIdentifierAttributesCurrency) { return JSON.stringify(exports.PostV2TargetIdentifierAttributesCurrency$outboundSchema.parse(postV2TargetIdentifierAttributesCurrency)); } function postV2TargetIdentifierAttributesCurrencyFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesCurrency$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesCurrency' from JSON`); } /** @internal */ exports.PostV2TargetIdentifierAttributesRecordReference$inboundSchema = z.object({ allowed_objects: z.array(z.string()), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "allowed_objects": "allowedObjects", }); }); /** @internal */ exports.PostV2TargetIdentifierAttributesRecordReference$outboundSchema = z.object({ allowedObjects: z.array(z.string()), }).transform((v) => { return (0, primitives_js_1.remap)(v, { allowedObjects: "allowed_objects", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesRecordReference$; (function (PostV2TargetIdentifierAttributesRecordReference$) { /** @deprecated use `PostV2TargetIdentifierAttributesRecordReference$inboundSchema` instead. */ PostV2TargetIdentifierAttributesRecordReference$.inboundSchema = exports.PostV2TargetIdentifierAttributesRecordReference$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesRecordReference$outboundSchema` instead. */ PostV2TargetIdentifierAttributesRecordReference$.outboundSchema = exports.PostV2TargetIdentifierAttributesRecordReference$outboundSchema; })(PostV2TargetIdentifierAttributesRecordReference$ || (exports.PostV2TargetIdentifierAttributesRecordReference$ = PostV2TargetIdentifierAttributesRecordReference$ = {})); function postV2TargetIdentifierAttributesRecordReferenceToJSON(postV2TargetIdentifierAttributesRecordReference) { return JSON.stringify(exports.PostV2TargetIdentifierAttributesRecordReference$outboundSchema.parse(postV2TargetIdentifierAttributesRecordReference)); } function postV2TargetIdentifierAttributesRecordReferenceFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesRecordReference$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesRecordReference' from JSON`); } /** @internal */ exports.PostV2TargetIdentifierAttributesConfig$inboundSchema = z.object({ currency: z.lazy(() => exports.PostV2TargetIdentifierAttributesCurrency$inboundSchema) .optional(), record_reference: z.lazy(() => exports.PostV2TargetIdentifierAttributesRecordReference$inboundSchema).optional(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "record_reference": "recordReference", }); }); /** @internal */ exports.PostV2TargetIdentifierAttributesConfig$outboundSchema = z.object({ currency: z.lazy(() => exports.PostV2TargetIdentifierAttributesCurrency$outboundSchema).optional(), recordReference: z.lazy(() => exports.PostV2TargetIdentifierAttributesRecordReference$outboundSchema).optional(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { recordReference: "record_reference", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesConfig$; (function (PostV2TargetIdentifierAttributesConfig$) { /** @deprecated use `PostV2TargetIdentifierAttributesConfig$inboundSchema` instead. */ PostV2TargetIdentifierAttributesConfig$.inboundSchema = exports.PostV2TargetIdentifierAttributesConfig$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesConfig$outboundSchema` instead. */ PostV2TargetIdentifierAttributesConfig$.outboundSchema = exports.PostV2TargetIdentifierAttributesConfig$outboundSchema; })(PostV2TargetIdentifierAttributesConfig$ || (exports.PostV2TargetIdentifierAttributesConfig$ = PostV2TargetIdentifierAttributesConfig$ = {})); function postV2TargetIdentifierAttributesConfigToJSON(postV2TargetIdentifierAttributesConfig) { return JSON.stringify(exports.PostV2TargetIdentifierAttributesConfig$outboundSchema.parse(postV2TargetIdentifierAttributesConfig)); } function postV2TargetIdentifierAttributesConfigFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesConfig' from JSON`); } /** @internal */ exports.PostV2TargetIdentifierAttributesData$inboundSchema = z.object({ title: z.string(), description: z.nullable(z.string()), api_slug: z.string(), type: exports.PostV2TargetIdentifierAttributesType$inboundSchema, is_required: z.boolean(), is_unique: z.boolean(), is_multiselect: z.boolean(), default_value: z.nullable(z.union([ z.lazy(() => exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$inboundSchema), z.lazy(() => exports.PostV2TargetIdentifierAttributesDefaultValueStatic$inboundSchema), ])).optional(), config: z.lazy(() => exports.PostV2TargetIdentifierAttributesConfig$inboundSchema), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "api_slug": "apiSlug", "is_required": "isRequired", "is_unique": "isUnique", "is_multiselect": "isMultiselect", "default_value": "defaultValue", }); }); /** @internal */ exports.PostV2TargetIdentifierAttributesData$outboundSchema = z.object({ title: z.string(), description: z.nullable(z.string()), apiSlug: z.string(), type: exports.PostV2TargetIdentifierAttributesType$outboundSchema, isRequired: z.boolean(), isUnique: z.boolean(), isMultiselect: z.boolean(), defaultValue: z.nullable(z.union([ z.lazy(() => exports.PostV2TargetIdentifierAttributesDefaultValueDynamic$outboundSchema), z.lazy(() => exports.PostV2TargetIdentifierAttributesDefaultValueStatic$outboundSchema), ])).optional(), config: z.lazy(() => exports.PostV2TargetIdentifierAttributesConfig$outboundSchema), }).transform((v) => { return (0, primitives_js_1.remap)(v, { apiSlug: "api_slug", isRequired: "is_required", isUnique: "is_unique", isMultiselect: "is_multiselect", defaultValue: "default_value", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesData$; (function (PostV2TargetIdentifierAttributesData$) { /** @deprecated use `PostV2TargetIdentifierAttributesData$inboundSchema` instead. */ PostV2TargetIdentifierAttributesData$.inboundSchema = exports.PostV2TargetIdentifierAttributesData$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesData$outboundSchema` instead. */ PostV2TargetIdentifierAttributesData$.outboundSchema = exports.PostV2TargetIdentifierAttributesData$outboundSchema; })(PostV2TargetIdentifierAttributesData$ || (exports.PostV2TargetIdentifierAttributesData$ = PostV2TargetIdentifierAttributesData$ = {})); function postV2TargetIdentifierAttributesDataToJSON(postV2TargetIdentifierAttributesData) { return JSON.stringify(exports.PostV2TargetIdentifierAttributesData$outboundSchema.parse(postV2TargetIdentifierAttributesData)); } function postV2TargetIdentifierAttributesDataFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesData' from JSON`); } /** @internal */ exports.PostV2TargetIdentifierAttributesRequestBody$inboundSchema = z.object({ data: z.lazy(() => exports.PostV2TargetIdentifierAttributesData$inboundSchema), }); /** @internal */ exports.PostV2TargetIdentifierAttributesRequestBody$outboundSchema = z.object({ data: z.lazy(() => exports.PostV2TargetIdentifierAttributesData$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesRequestBody$; (function (PostV2TargetIdentifierAttributesRequestBody$) { /** @deprecated use `PostV2TargetIdentifierAttributesRequestBody$inboundSchema` instead. */ PostV2TargetIdentifierAttributesRequestBody$.inboundSchema = exports.PostV2TargetIdentifierAttributesRequestBody$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesRequestBody$outboundSchema` instead. */ PostV2TargetIdentifierAttributesRequestBody$.outboundSchema = exports.PostV2TargetIdentifierAttributesRequestBody$outboundSchema; })(PostV2TargetIdentifierAttributesRequestBody$ || (exports.PostV2TargetIdentifierAttributesRequestBody$ = PostV2TargetIdentifierAttributesRequestBody$ = {})); function postV2TargetIdentifierAttributesRequestBodyToJSON(postV2TargetIdentifierAttributesRequestBody) { return JSON.stringify(exports.PostV2TargetIdentifierAttributesRequestBody$outboundSchema.parse(postV2TargetIdentifierAttributesRequestBody)); } function postV2TargetIdentifierAttributesRequestBodyFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesRequestBody' from JSON`); } /** @internal */ exports.PostV2TargetIdentifierAttributesRequest$inboundSchema = z.object({ target: exports.PostV2TargetIdentifierAttributesTarget$inboundSchema, identifier: z.string(), RequestBody: z.lazy(() => exports.PostV2TargetIdentifierAttributesRequestBody$inboundSchema), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "RequestBody": "requestBody", }); }); /** @internal */ exports.PostV2TargetIdentifierAttributesRequest$outboundSchema = z.object({ target: exports.PostV2TargetIdentifierAttributesTarget$outboundSchema, identifier: z.string(), requestBody: z.lazy(() => exports.PostV2TargetIdentifierAttributesRequestBody$outboundSchema), }).transform((v) => { return (0, primitives_js_1.remap)(v, { requestBody: "RequestBody", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesRequest$; (function (PostV2TargetIdentifierAttributesRequest$) { /** @deprecated use `PostV2TargetIdentifierAttributesRequest$inboundSchema` instead. */ PostV2TargetIdentifierAttributesRequest$.inboundSchema = exports.PostV2TargetIdentifierAttributesRequest$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesRequest$outboundSchema` instead. */ PostV2TargetIdentifierAttributesRequest$.outboundSchema = exports.PostV2TargetIdentifierAttributesRequest$outboundSchema; })(PostV2TargetIdentifierAttributesRequest$ || (exports.PostV2TargetIdentifierAttributesRequest$ = PostV2TargetIdentifierAttributesRequest$ = {})); function postV2TargetIdentifierAttributesRequestToJSON(postV2TargetIdentifierAttributesRequest) { return JSON.stringify(exports.PostV2TargetIdentifierAttributesRequest$outboundSchema.parse(postV2TargetIdentifierAttributesRequest)); } function postV2TargetIdentifierAttributesRequestFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesRequest' from JSON`); } /** @internal */ exports.PostV2TargetIdentifierAttributesResponse$inboundSchema = z.object({ data: attribute_js_1.Attribute$inboundSchema, }); /** @internal */ exports.PostV2TargetIdentifierAttributesResponse$outboundSchema = z.object({ data: attribute_js_1.Attribute$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2TargetIdentifierAttributesResponse$; (function (PostV2TargetIdentifierAttributesResponse$) { /** @deprecated use `PostV2TargetIdentifierAttributesResponse$inboundSchema` instead. */ PostV2TargetIdentifierAttributesResponse$.inboundSchema = exports.PostV2TargetIdentifierAttributesResponse$inboundSchema; /** @deprecated use `PostV2TargetIdentifierAttributesResponse$outboundSchema` instead. */ PostV2TargetIdentifierAttributesResponse$.outboundSchema = exports.PostV2TargetIdentifierAttributesResponse$outboundSchema; })(PostV2TargetIdentifierAttributesResponse$ || (exports.PostV2TargetIdentifierAttributesResponse$ = PostV2TargetIdentifierAttributesResponse$ = {})); function postV2TargetIdentifierAttributesResponseToJSON(postV2TargetIdentifierAttributesResponse) { return JSON.stringify(exports.PostV2TargetIdentifierAttributesResponse$outboundSchema.parse(postV2TargetIdentifierAttributesResponse)); } function postV2TargetIdentifierAttributesResponseFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesResponse' from JSON`); } //# sourceMappingURL=postv2targetidentifierattributes.js.map