{"version":3,"sources":["../../src/contacts-v4-submit-contact-submitted-contact.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const AppendOrCreateContactRequest = z.object({\n  options: z\n    .object({\n      info: z\n        .object({\n          name: z\n            .object({\n              first: z\n                .string()\n                .describe(\"Contact's first name.\")\n                .max(1000)\n                .optional()\n                .nullable(),\n              last: z\n                .string()\n                .describe(\"Contact's last name.\")\n                .max(1000)\n                .optional()\n                .nullable(),\n            })\n            .describe(\"Contact's first and last name.\")\n            .optional(),\n          emails: z\n            .object({\n              items: z\n                .array(\n                  z.object({\n                    _id: z\n                      .string()\n                      .describe('Email ID.')\n                      .regex(\n                        /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n                        'Must be a valid GUID'\n                      )\n                      .optional()\n                      .nullable(),\n                    tag: z\n                      .enum(['UNTAGGED', 'MAIN', 'HOME', 'WORK'])\n                      .optional(),\n                    email: z\n                      .string()\n                      .describe('Email address.')\n                      .min(1)\n                      .max(320)\n                      .optional(),\n                    primary: z\n                      .boolean()\n                      .describe(\n                        \"Indicates whether this is the contact's primary email address.\\nWhen changing `primary` to `true` for an email,\\nthe contact's other emails become `false`.\\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email.\"\n                      )\n                      .optional()\n                      .nullable(),\n                  })\n                )\n                .max(50)\n                .optional(),\n            })\n            .describe(\"Contact's email addresses.\")\n            .optional(),\n          phones: z\n            .object({\n              items: z\n                .array(\n                  z.object({\n                    _id: z\n                      .string()\n                      .describe('Phone ID.')\n                      .regex(\n                        /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n                        'Must be a valid GUID'\n                      )\n                      .optional()\n                      .nullable(),\n                    tag: z\n                      .enum([\n                        'UNTAGGED',\n                        'MAIN',\n                        'HOME',\n                        'MOBILE',\n                        'WORK',\n                        'FAX',\n                      ])\n                      .optional(),\n                    countryCode: z\n                      .string()\n                      .describe(\n                        '[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.'\n                      )\n                      .optional()\n                      .nullable(),\n                    phone: z\n                      .string()\n                      .describe('Phone number.')\n                      .min(1)\n                      .max(50)\n                      .optional(),\n                    e164Phone: z\n                      .string()\n                      .describe(\n                        '[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\\nphone number.\\nAutomatically generated using `phone` and `countryCode`, pending both values are valid.'\n                      )\n                      .optional()\n                      .nullable(),\n                    primary: z\n                      .boolean()\n                      .describe(\n                        \"Indicates whether this is the contact's primary phone number.\\nWhen changing `primary` to `true` for a phone,\\nthe contact's `primary` field for other phones becomes `false`.\\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone.\"\n                      )\n                      .optional()\n                      .nullable(),\n                  })\n                )\n                .max(50)\n                .optional(),\n            })\n            .describe(\"Contact's phone numbers.\")\n            .optional(),\n          addresses: z\n            .object({\n              items: z\n                .array(\n                  z.object({\n                    _id: z\n                      .string()\n                      .describe('Street address ID.')\n                      .regex(\n                        /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n                        'Must be a valid GUID'\n                      )\n                      .optional()\n                      .nullable(),\n                    tag: z\n                      .enum(['UNTAGGED', 'HOME', 'WORK', 'BILLING', 'SHIPPING'])\n                      .optional(),\n                    address: z\n                      .object({\n                        city: z.string().optional().nullable(),\n                        subdivision: z.string().optional().nullable(),\n                        country: z.string().optional().nullable(),\n                        postalCode: z.string().optional().nullable(),\n                        addressLine1: z.string().optional().nullable(),\n                        addressLine2: z.string().optional().nullable(),\n                      })\n                      .describe('Street address.')\n                      .optional(),\n                  })\n                )\n                .max(50)\n                .optional(),\n            })\n            .describe(\"Contact's street addresses.\")\n            .optional(),\n          company: z\n            .string()\n            .describe(\"Contact's company name.\")\n            .max(1000)\n            .optional()\n            .nullable(),\n          jobTitle: z\n            .string()\n            .describe(\"Contact's job title.\")\n            .max(1000)\n            .optional()\n            .nullable(),\n          birthdate: z\n            .string()\n            .describe(\n              'Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.'\n            )\n            .optional()\n            .nullable(),\n          locale: z\n            .string()\n            .describe(\n              'Locale in\\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\\nTypically, this is a lowercase 2-letter language code,\\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German.'\n            )\n            .optional()\n            .nullable(),\n          labelKeys: z\n            .object({ items: z.array(z.string()).max(2000).optional() })\n            .describe(\n              \"List of contact's labels.\\n\\nLabels are used to organize contacts. Labels can be\\nadded and removed using Label Contact and Unlabel Contact, respectively.\\n\\nTo view or manage contact labels, use the Labels API.\"\n            )\n            .optional(),\n          extendedFields: z\n            .object({\n              items: z\n                .record(z.string(), z.any())\n                .describe(\n                  \"Contact's extended fields,\\nwhere each key is the field key,\\nand each value is the field's value for the contact.\\n\\nTo view and manage extended fields, use the Extended Fields API.\"\n                )\n                .optional(),\n            })\n            .describe(\n              'Additional custom fields.\\n\\nEmpty fields are not returned.'\n            )\n            .optional(),\n          picture: z\n            .object({\n              image: z\n                .string()\n                .describe(\n                  'Image.\\nThis can contain an image URL or a Wix Media image ID.'\n                )\n                .optional(),\n            })\n            .describe(\"Contact's profile picture.\")\n            .optional(),\n        })\n        .describe(\n          \"Contact's information.\\nTo reconcile with an existing contact,\\na phone or email must be provided,\\nor the current session identity must be attached to a contact or member.\\n\\nIf no existing contact can be found,\\na new contact is created with the specified information.\\n\\n<!--ONLY:REST-->\\nRequired if there's no contextual identity or given `contactId`.\\n<!--END:ONLY:REST-->\"\n        )\n        .optional(),\n      passThroughData: z\n        .string()\n        .describe(\n          'Pass through data, to be posted on Contact Submitted Domain Event (optional).'\n        )\n        .max(300)\n        .optional()\n        .nullable(),\n      contactId: z\n        .string()\n        .describe(\n          'Existing Contact ID (optional).\\nRequires permission `CONTACTS.SUBMIT_WITH_OVERRIDES`'\n        )\n        .regex(\n          /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n          'Must be a valid GUID'\n        )\n        .optional()\n        .nullable(),\n    })\n    .optional(),\n});\nexport const AppendOrCreateContactResponse = z.object({\n  contactId: z\n    .string()\n    .describe('ID of the contact that was found or created.')\n    .regex(\n      /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n      'Must be a valid GUID'\n    )\n    .optional(),\n  identityType: z\n    .enum(['UNKNOWN', 'CONTACT', 'MEMBER', 'NOT_AUTHENTICATED_MEMBER'])\n    .describe(\n      'Identity type of the returned contact.\\n\\n- `CONTACT`: The returned contact ID belongs to a new or existing contact.\\n- `MEMBER`: The returned contact ID belongs to the currently logged-in site member.\\n- `NOT_AUTHENTICATED_MEMBER`: The returned contact ID belongs to a site member who is not currently logged in.'\n    )\n    .optional(),\n  newContact: z\n    .boolean()\n    .describe(\n      'Indicates whether the contact was just created or already existed.\\n\\nIf the contact was just created, returns `true`.\\nIf it already existed, returns `false`.'\n    )\n    .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,+BAAiC,SAAO;AAAA,EACnD,SACG,SAAO;AAAA,IACN,MACG,SAAO;AAAA,MACN,MACG,SAAO;AAAA,QACN,OACG,SAAO,EACP,SAAS,uBAAuB,EAChC,IAAI,GAAI,EACR,SAAS,EACT,SAAS;AAAA,QACZ,MACG,SAAO,EACP,SAAS,sBAAsB,EAC/B,IAAI,GAAI,EACR,SAAS,EACT,SAAS;AAAA,MACd,CAAC,EACA,SAAS,gCAAgC,EACzC,SAAS;AAAA,MACZ,QACG,SAAO;AAAA,QACN,O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