@wix/auto_sdk_crm_contacts-v-5 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/contacts-v5-contact-contacts-v-5.universal.ts","../../src/contacts-v5-contact-contacts-v-5.http.ts","../../src/contacts-v5-contact-contacts-v-5.public.ts","../../src/contacts-v5-contact-contacts-v-5.context.ts"],"sourcesContent":["export * from './src/contacts-v5-contact-contacts-v-5.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n Search as SearchSdkType,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n SearchSpec,\n} from '@wix/sdk-types';\nimport * as ambassadorWixContactsV5Contact from './contacts-v5-contact-contacts-v-5.http.js';\n// @ts-ignore\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\nimport { createSearchUtils } from '@wix/sdk-runtime/search-builder-utils';\n\n/** A contact represents a person in a site's contact list. It stores profile details such as name, email addresses, phone numbers, and addresses, and can optionally be linked to a site member. */\nexport interface Contact {\n /**\n * Contact ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the Contact is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the Contact.\n *\n * Ignored when creating a Contact.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the contact was created.\n * @readonly\n * @immutable\n */\n _createdDate?: Date | null;\n /**\n * Date and time the contact was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Contact external ID. Used to identify contacts from external systems.\n * This field can only be set once and can't be updated after creation.\n * @maxLength 100\n */\n externalId?: string | null;\n /** Contact's name information including first and last name. */\n name?: ContactName;\n /**\n * The main email of the contact with subscription status and deliverability information.\n * This email is used for contact matching and deduplication logic.\n */\n email?: ContactEmail;\n /**\n * Additional emails of the contact.\n * These emails do not affect subscription status or contact matching/deduplication.\n * The main email field must be set before additional emails can be added.\n * @maxSize 10\n */\n additionalEmails?: AdditionalEmail[];\n /**\n * The main phone of the contact with subscription status and deliverability information.\n * This phone is used for contact matching and deduplication logic.\n * At least one of name, email, or phone is required for contact creation.\n */\n phone?: ContactPhone;\n /**\n * Additional phones of the contact.\n * These phones do not affect subscription status or contact matching/deduplication.\n * The main phone field must be set before additional phones can be added.\n * @maxSize 10\n */\n additionalPhones?: AdditionalPhone[];\n /**\n * Contact's physical addresses.\n * Each address can be tagged (HOME, WORK, BILLING, SHIPPING, OTHER) and one can be set as default.\n * If no address is marked as default, the first address automatically becomes the default.\n * @maxSize 50\n */\n addresses?: ContactAddress[];\n /** Contact's company information including company name and job title. */\n company?: ContactCompany;\n /**\n * Locale in\n * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * Typically, this is a lowercase 2-letter language code,\n * followed by a hyphen, followed by an uppercase 2-letter country code.\n * For example, `en-US` for U.S. English, and `de-DE` for Germany German.\n * @format LANGUAGE_TAG\n */\n locale?: string | null;\n /**\n * Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.\n * @format LOCAL_DATE\n */\n birthdate?: string | null;\n /**\n * IANA time zone identifier for the contact's location.\n * Valid values are IANA time zone IDs, such as 'Europe/Rome' or 'America/New_York'.\n * @maxLength 50\n */\n timeZone?: string | null;\n /**\n * Site contributor user ID assigned to manage communication with this contact.\n * Must be a valid GUID referencing an existing site contributor.\n * Only one assignee can be set per contact.\n * @format GUID\n */\n assigneeId?: string | null;\n /**\n * List of business location IDs associated with this contact.\n * Used for multi-location businesses to organize contacts by physical business locations.\n * Each ID must be a valid GUID referencing an existing business location.\n * @format GUID\n * @maxSize 50\n */\n locationIds?: string[];\n /**\n * Contact's profile image.\n * If the contact is also a site member, clients should prefer to view `member_info.profile_info.photo`\n * when it exists, as it reflects the member's current profile photo.\n */\n image?: string;\n /**\n * Details about the origin of the contact.\n * This field is immutable and set automatically when the contact is created.\n * @immutable\n */\n source?: ContactSource;\n /**\n * Details about the contact's most recent activity on the site.\n * Includes activity date and template ID. This field is read-only and updated automatically.\n * @readonly\n */\n lastActivity?: ContactActivity;\n /**\n * IDs of the segments the contact belongs to.\n * Segments are used for organizing and targeting groups of contacts.\n * @maxSize 60\n * @readonly\n * @format GUID\n */\n segmentIds?: string[];\n /**\n * Contact's site membership information including member ID, status, and profile details.\n * This field is read-only and populated automatically when the contact is also a site member.\n *\n * Updates are eventually consistent: changes to the underlying member, identity, or profile are reflected after the corresponding events are processed.\n * @readonly\n */\n memberInfo?: MemberInfo;\n /**\n * Contact's display name. The field is used for sorting only and is not returned.\n * @internal\n * @maxLength 1000\n * @readonly\n */\n displayName?: string | null;\n /** Tags assigned to the contact for organization and filtering. */\n tags?: PrivateTags;\n /**\n * Extended fields for storing custom contact data beyond the standard fields.\n * Allows adding custom properties specific to business needs.\n * To define a custom extended field, use the [Schema Service API](https://dev.wix.com/docs/api-reference/business-management/data-extension-schema/about-the-data-extension-schema-api) with the contacts FQDN: `wix.contacts.*.contact`.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface ContactName {\n /**\n * Contact's first name.\n * @maxLength 1000\n */\n first?: string | null;\n /**\n * Contact's last name.\n * @maxLength 1000\n */\n last?: string | null;\n /**\n * Contact's full name. Automatically generated from first and last names.\n * @internal\n * @maxLength 1000\n * @readonly\n */\n full?: string | null;\n}\n\nexport interface ContactEmail {\n /**\n * Main email address for the contact. Used for communication and contact matching.\n *\n * Stored in normalized form: leading and trailing whitespace is trimmed and the address is lowercased.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string;\n /**\n * Indicates the recipient's opt-in or opt-out status for marketing emails.\n * This field is read-only and managed by the subscription system.\n *\n * Updates are eventually consistent, reflecting marketing consent changes after they're processed.\n * @readonly\n */\n subscriptionStatus?: ContactSubscription;\n /**\n * Indicates the last reported delivery status of emails sent to this address.\n * This field is read-only and updated automatically by the email delivery system.\n *\n * - `NOT_SET`: No delivery status reported. Default value.\n * - `VALID`: Emails are being successfully delivered to this address.\n * - `BOUNCED`: The last email to this address bounced or was rejected by the recipient's email server.\n * - `SPAM_COMPLAINT`: Recipient registered a spam complaint with their email provider.\n * - `INACTIVE`: Multiple emails have been delivered without any engagement from the recipient.\n * @readonly\n */\n deliverabilityStatus?: EmailDeliverabilityStatusWithLiterals;\n}\n\nexport interface ContactSubscription {\n /**\n * Indicates the recipient's opt-in or opt-out status for marketing communications.\n *\n * - `NO_SUBSCRIPTION_STATUS`: No status exists. Used when a phone is not a valid E164 number.\n * - `NOT_SET`: No subscription status specified. Default value.\n * - `PENDING`: Subscription confirmation was requested, but recipient hasn't confirmed yet.\n * - `SUBSCRIBED`: Recipient has explicitly opted in to receive marketing communications.\n * - `UNSUBSCRIBED`: Recipient has opted out of marketing communications.\n */\n status?: SubscriptionStatusWithLiterals;\n /** Date and time when the subscription status was last updated. */\n _updatedDate?: Date | null;\n}\n\nexport enum SubscriptionStatus {\n NO_SUBSCRIPTION_STATUS = 'NO_SUBSCRIPTION_STATUS',\n NOT_SET = 'NOT_SET',\n PENDING = 'PENDING',\n SUBSCRIBED = 'SUBSCRIBED',\n UNSUBSCRIBED = 'UNSUBSCRIBED',\n}\n\n/** @enumType */\nexport type SubscriptionStatusWithLiterals =\n | SubscriptionStatus\n | 'NO_SUBSCRIPTION_STATUS'\n | 'NOT_SET'\n | 'PENDING'\n | 'SUBSCRIBED'\n | 'UNSUBSCRIBED';\n\nexport enum EmailDeliverabilityStatus {\n NOT_SET = 'NOT_SET',\n VALID = 'VALID',\n BOUNCED = 'BOUNCED',\n SPAM_COMPLAINT = 'SPAM_COMPLAINT',\n INACTIVE = 'INACTIVE',\n}\n\n/** @enumType */\nexport type EmailDeliverabilityStatusWithLiterals =\n | EmailDeliverabilityStatus\n | 'NOT_SET'\n | 'VALID'\n | 'BOUNCED'\n | 'SPAM_COMPLAINT'\n | 'INACTIVE';\n\nexport interface AdditionalEmail {\n /**\n * Additional email address for the contact.\n * Does not affect subscription status or contact matching logic.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string;\n}\n\nexport interface ContactPhone {\n /**\n * Phone type classification. Helps categorize the phone number's purpose.\n *\n * Default: `OTHER`\n */\n tag?: PhoneTagWithLiterals;\n /**\n * [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code for the phone number.\n * This field is private and maintained for backwards compatibility.\n * @internal\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Primary phone number for the contact. Used for communication and contact matching.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string;\n /**\n * Phone number in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format (e.g., +12345550123).\n * This field is automatically generated from the phone field if it represents a valid E.164 number.\n * @readonly\n * @maxLength 50\n */\n e164?: string | null;\n /**\n * Indicates the recipient's opt-in or opt-out status for SMS/text message marketing.\n * This field is read-only and managed by the subscription system.\n *\n * Updates are eventually consistent, reflecting marketing consent changes after they're processed.\n * @readonly\n */\n subscriptionStatus?: ContactSubscription;\n /**\n * Indicates the delivery status for SMS messages sent to this phone number.\n * This field is read-only and updated automatically by the SMS delivery system.\n * - `NO_PHONE_DELIVERABILITY_STATUS`: No status exists. Used when the phone is not a valid E164 number.\n * - `NOT_SET`: No delivery status reported. Default when the phone is a valid E164 number.\n * - `VALID`: Last message was sent and delivered successfully.\n * - `INVALID`: The number is invalid (landline, number disconnected, etc.).\n * @readonly\n */\n deliverabilityStatus?: PhoneDeliverabilityStatusWithLiterals;\n}\n\nexport enum PhoneTag {\n OTHER = 'OTHER',\n MAIN = 'MAIN',\n HOME = 'HOME',\n MOBILE = 'MOBILE',\n WORK = 'WORK',\n FAX = 'FAX',\n}\n\n/** @enumType */\nexport type PhoneTagWithLiterals =\n | PhoneTag\n | 'OTHER'\n | 'MAIN'\n | 'HOME'\n | 'MOBILE'\n | 'WORK'\n | 'FAX';\n\nexport enum PhoneDeliverabilityStatus {\n NO_PHONE_DELIVERABILITY_STATUS = 'NO_PHONE_DELIVERABILITY_STATUS',\n NOT_SET = 'NOT_SET',\n VALID = 'VALID',\n INVALID = 'INVALID',\n}\n\n/** @enumType */\nexport type PhoneDeliverabilityStatusWithLiterals =\n | PhoneDeliverabilityStatus\n | 'NO_PHONE_DELIVERABILITY_STATUS'\n | 'NOT_SET'\n | 'VALID'\n | 'INVALID';\n\nexport interface AdditionalPhone {\n /**\n * Phone type classification for the additional phone number.\n *\n * Default: `OTHER`\n */\n tag?: PhoneTagWithLiterals;\n /**\n * [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code for the additional phone number.\n * This field is private and maintained for backwards compatibility.\n * @internal\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Additional phone number for the contact.\n * Does not affect subscription status or contact matching logic.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string;\n /**\n * Additional phone number in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format (e.g., +12345550123).\n * This field is automatically generated from the phone field if it represents a valid E.164 number.\n * @readonly\n * @maxLength 50\n */\n e164?: string | null;\n}\n\nexport interface ContactAddress {\n /**\n * Address type classification. Helps categorize the address purpose.\n *\n * Default: `OTHER`\n */\n tag?: AddressTagWithLiterals;\n /**\n * Physical address information including street, city, country, and postal code.\n * Contains structured address data following common address formatting standards.\n */\n address?: Address;\n /**\n * Whether this address is the contact's default address.\n * Only one address can be designated as default per contact.\n * If no address is explicitly set as default, the first address automatically becomes the default.\n */\n defaultAddress?: boolean | null;\n /**\n * Address ID.\n * @format GUID\n */\n _id?: string | null;\n /** Address recipient information for delivery purposes. */\n recipient?: Recipient;\n}\n\nexport enum AddressTag {\n OTHER = 'OTHER',\n HOME = 'HOME',\n WORK = 'WORK',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type AddressTagWithLiterals =\n | AddressTag\n | 'OTHER'\n | 'HOME'\n | 'WORK'\n | 'BILLING'\n | 'SHIPPING';\n\n/** Physical address, such as a billing or shipping address. */\nexport interface Address extends AddressStreetOneOf {\n /** Street address object, with number and name in separate fields. */\n streetAddress?: StreetAddress;\n /**\n * Main address line, usually street and number, as free text.\n * @maxLength 1000\n */\n addressLine1?: string | null;\n /**\n * 2-letter country code in an\n * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. For example, `NY`.\n * @format SUBDIVISION\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 300\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 100\n */\n postalCode?: string | null;\n /**\n * Free text providing more detailed address information,\n * such as apartment, suite, or floor.\n * @maxLength 1000\n */\n addressLine2?: string | null;\n /**\n * Human-readable address string.\n * If not provided, the value is generated from the available address data.\n * @maxLength 2000\n */\n formatted?: string | null;\n /**\n * Instructions to help someone find the address, such as landmarks or where the entrance is.\n * @maxLength 200\n */\n hint?: string | null;\n /** Coordinates of the physical address. */\n location?: AddressLocation;\n /**\n * Full country name.\n * @maxLength 100\n */\n countryFullname?: string | null;\n /**\n * Hierarchical list of subdivisions, where the first array item is the highest level of hierarchy, and so on.\n * @maxSize 6\n */\n subdivisions?: Subdivision[];\n /**\n * Subdivision full name.\n * @maxLength 100\n */\n subdivisionFullname?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street address object, with number and name in separate fields. */\n streetAddress?: StreetAddress;\n /**\n * Main address line, usually street and number, as free text.\n * @maxLength 1000\n */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /**\n * Street number.\n * @maxLength 100\n */\n number?: string;\n /**\n * Street name.\n * @maxLength 300\n */\n name?: string;\n /**\n * Apartment number.\n * @maxLength 50\n */\n apt?: string;\n /**\n * Optional formatted version of the street address line.\n * @maxLength 2000\n */\n formattedAddressLine?: string | null;\n}\n\nexport interface AddressLocation {\n /**\n * Address latitude.\n * @min -90\n * @max 90\n */\n latitude?: number | null;\n /**\n * Address longitude.\n * @min -180\n * @max 180\n */\n longitude?: number | null;\n}\n\nexport interface Subdivision {\n /**\n * Subdivision short code.\n * @maxLength 20\n */\n code?: string;\n /**\n * Full subdivision name.\n * @maxLength 100\n */\n name?: string;\n /** Subdivision level. */\n type?: SubdivisionTypeWithLiterals;\n /**\n * Free text description of subdivision type.\n * Examples: `\"state\"`, `\"province\"`, `\"prefecture\"`.\n * @maxLength 100\n */\n typeInfo?: string | null;\n /**\n * Standard organization details, such as ISO.\n * @internal\n */\n standardDetails?: StandardDetails;\n}\n\nexport enum SubdivisionType {\n UNKNOWN_SUBDIVISION_TYPE = 'UNKNOWN_SUBDIVISION_TYPE',\n /** State. */\n ADMINISTRATIVE_AREA_LEVEL_1 = 'ADMINISTRATIVE_AREA_LEVEL_1',\n /** County. */\n ADMINISTRATIVE_AREA_LEVEL_2 = 'ADMINISTRATIVE_AREA_LEVEL_2',\n /** City/town. */\n ADMINISTRATIVE_AREA_LEVEL_3 = 'ADMINISTRATIVE_AREA_LEVEL_3',\n /** Neighborhood/quarter. */\n ADMINISTRATIVE_AREA_LEVEL_4 = 'ADMINISTRATIVE_AREA_LEVEL_4',\n /** Street/block. */\n ADMINISTRATIVE_AREA_LEVEL_5 = 'ADMINISTRATIVE_AREA_LEVEL_5',\n /** Equivalent to `ADMINISTRATIVE_AREA_LEVEL_0`. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */\n COUNTRY = 'COUNTRY',\n}\n\n/** @enumType */\nexport type SubdivisionTypeWithLiterals =\n | SubdivisionType\n | 'UNKNOWN_SUBDIVISION_TYPE'\n | 'ADMINISTRATIVE_AREA_LEVEL_1'\n | 'ADMINISTRATIVE_AREA_LEVEL_2'\n | 'ADMINISTRATIVE_AREA_LEVEL_3'\n | 'ADMINISTRATIVE_AREA_LEVEL_4'\n | 'ADMINISTRATIVE_AREA_LEVEL_5'\n | 'COUNTRY';\n\n/** Subdivision concordance values. */\nexport interface StandardDetails {\n /**\n * Subdivision code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). For example, `US-NY`, `GB-SCT`, `NO-30`.\n * @maxLength 20\n */\n iso31662?: string | null;\n}\n\nexport interface Recipient {\n /**\n * Recipient's first name.\n * @maxLength 1000\n */\n firstName?: string | null;\n /**\n * Recipient's last name.\n * @maxLength 1000\n */\n lastName?: string | null;\n /**\n * Recipient's company name.\n * @maxLength 1000\n */\n company?: string | null;\n /**\n * Recipient's phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string | null;\n}\n\nexport interface ContactCompany {\n /**\n * Contact's company name.\n * @maxLength 1000\n */\n name?: string | null;\n /**\n * Contact's job title.\n * @maxLength 1000\n */\n jobTitle?: string | null;\n}\n\nexport interface ContactSource {\n /**\n * ID of the user who created this contact.\n * @readonly\n * @format GUID\n * @immutable\n */\n userId?: string | null;\n /**\n * ID of the application that created this contact.\n * @readonly\n * @format GUID\n * @immutable\n */\n appId?: string | null;\n /**\n * Additional information about the contact's origin or creation context.\n * @maxLength 1000\n * @immutable\n */\n additionalInfo?: string | null;\n}\n\nexport interface ContactActivity {\n /** Date and time when the contact's most recent activity occurred. */\n date?: Date | null;\n /**\n * ID of the activity template that defines the type of activity performed.\n * References a template in the contacts activity log system.\n * @format GUID\n */\n templateId?: string | null;\n}\n\n/**\n * Information about the site member linked to the contact.\n *\n * This object is read-only and populated automatically when the contact is linked to a member. It's eventually consistent with the member's data, so changes made to the member may take a short time to appear here.\n */\nexport interface MemberInfo {\n /**\n * Member ID.\n * @format GUID\n */\n memberId?: string | null;\n /** Date and time the member signed up. */\n signupDate?: Date | null;\n /**\n * Email the member uses to log in.\n * @format EMAIL\n */\n email?: string | null;\n /** Whether the email is verified. */\n emailVerified?: boolean | null;\n /** Whether the member is required to verify their email before they can log in. */\n emailVerificationRequired?: boolean | null;\n /**\n * Whether the member must still complete required profile fields (custom signup fields the site owner\n * marked as required) before their registration is finalized. Set for a social sign-up that was parked\n * awaiting the profile-completion step.\n */\n requireProfileCompletion?: boolean | null;\n /**\n * Member status.\n * - `PENDING`: Member created and is waiting for approval by site owner.\n * - `ACTIVE`: Member can log in to the site.\n * - `BLOCKED`: Member is blocked and cannot log in to the site.\n * - `OFFLINE`: Member is a [managed writer](https://support.wix.com/en/article/wix-blog-adding-managed-writers-to-your-blog) for the site blog and cannot log in to the site.\n */\n status?: MemberStatusWithLiterals;\n /** Information about the member's public profile. */\n profileInfo?: ProfileInfo;\n /** Information about the member's user account. */\n userInfo?: UserInfo;\n /** Information about the member's login sessions. */\n sessionInfo?: SessionInfo;\n /** Information about the groups the member belongs to. */\n groupInfo?: GroupInfo;\n}\n\nexport enum MemberStatus {\n PENDING = 'PENDING',\n ACTIVE = 'ACTIVE',\n BLOCKED = 'BLOCKED',\n OFFLINE = 'OFFLINE',\n}\n\n/** @enumType */\nexport type MemberStatusWithLiterals =\n | MemberStatus\n | 'PENDING'\n | 'ACTIVE'\n | 'BLOCKED'\n | 'OFFLINE';\n\nexport interface ProfileInfo {\n /**\n * Member's nickname.\n * @maxLength 255\n */\n nickname?: string | null;\n /** Whether the member's profile is visible to other site members and visitors. */\n privacyStatus?: PrivacyStatusWithLiterals;\n /** Whether the member has been reported by another member. */\n reported?: boolean | null;\n /** Whether the member has been muted and can't post or comment on the site. */\n muted?: boolean | null;\n /** Member's profile photo. */\n photo?: string;\n}\n\nexport enum PrivacyStatus {\n PRIVATE = 'PRIVATE',\n PUBLIC = 'PUBLIC',\n}\n\n/** @enumType */\nexport type PrivacyStatusWithLiterals = PrivacyStatus | 'PRIVATE' | 'PUBLIC';\n\nexport interface UserInfo {\n /**\n * User ID.\n * @format GUID\n */\n userId?: string;\n /** Member's role on the site. */\n role?: RoleWithLiterals;\n}\n\nexport enum Role {\n OWNER = 'OWNER',\n CONTRIBUTOR = 'CONTRIBUTOR',\n MEMBER = 'MEMBER',\n}\n\n/** @enumType */\nexport type RoleWithLiterals = Role | 'OWNER' | 'CONTRIBUTOR' | 'MEMBER';\n\nexport interface SessionInfo {\n /** Date and time the member last logged in to the site from a browser. */\n lastWebLogin?: Date | null;\n /** Date and time the member last logged in from one of the mobile apps. */\n lastMobileLogin?: Date | null;\n /**\n * Mobile apps the member has ever logged in to.\n * @maxSize 50\n * @maxLength 50\n */\n mobileAppNames?: string[];\n}\n\nexport interface GroupInfo {\n /**\n * IDs of the groups the member belongs to.\n * @format GUID\n * @maxSize 1000\n */\n groupIds?: string[];\n}\n\n/** Tags assigned to an entity that require an additional permission to access. */\nexport interface PrivateTags {\n /** Tags that require an additional permission to access, normally not given to site members or visitors. */\n privateTags?: TagList;\n}\n\nexport interface TagList {\n /**\n * A list of tag IDs.\n * To create a tag, use the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) with the contacts FQDN: `wix.contacts.*.contact`.\n * @maxSize 1000\n * @maxLength 5\n */\n tagIds?: string[];\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\n/**\n * Message for reindexing search data to a given search schema. Support both upsert and delete flows as well as\n * performs context manipulation with adding tenant, provided in message to callscope.\n */\nexport interface ReindexMessage extends ReindexMessageActionOneOf {\n upsert?: Upsert;\n delete?: ReindexMessageDelete;\n entityFqdn?: string;\n tenantId?: string;\n eventTime?: Date | null;\n entityEventSequence?: string | null;\n schema?: Schema;\n}\n\n/** @oneof */\nexport interface ReindexMessageActionOneOf {\n upsert?: Upsert;\n delete?: ReindexMessageDelete;\n}\n\nexport interface Upsert {\n entityId?: string;\n entityAsJson?: string;\n}\n\nexport interface ReindexMessageDelete {\n entityId?: string;\n}\n\nexport interface Schema {\n label?: string;\n clusterName?: string;\n}\n\n/** Triggered when one or more contacts are merged into another contact. */\nexport interface ContactMerged {\n /**\n * ID of the contact the source contacts were merged into.\n * @format GUID\n */\n targetContactId?: string;\n /**\n * IDs of contacts that were merged into the target contact.\n * @format GUID\n * @minSize 1\n * @maxSize 5\n */\n sourceContactIds?: string[];\n /** Updated target contact. */\n targetContact?: Contact;\n}\n\n/** Triggered when a contact's email subscription status changes. */\nexport interface ContactEmailSubscriptionUpdated {\n /**\n * The updated contact ID.\n * @format GUID\n */\n contactId?: string;\n /** The revision of the contact. */\n revision?: string | null;\n /** The email of the contact with the updated subscription status. */\n email?: ContactEmail;\n /** Date and time the contact was updated with the email subscription status. */\n _updatedDate?: Date | null;\n}\n\n/** Triggered when a contact's SMS subscription status changes. */\nexport interface ContactPhoneSubscriptionUpdated {\n /**\n * The updated contact ID.\n * @format GUID\n */\n contactId?: string;\n /** The revision of the contact. */\n revision?: string | null;\n /** The phone of the contact with the updated subscription status. */\n phone?: ContactPhone;\n /** Date and time the contact was updated with the SMS subscription status. */\n _updatedDate?: Date | null;\n}\n\n/** Triggered when a contact's image is uploaded. */\nexport interface ContactImageUploaded {\n /**\n * The updated contact ID.\n * @format GUID\n */\n contactId?: string;\n /** The revision of the contact. */\n revision?: string | null;\n /** The contact's uploaded image. */\n image?: string;\n /** Date and time the contact's image was updated. */\n _updatedDate?: Date | null;\n /**\n * The upload ID.\n * @format GUID\n */\n uploadId?: string | null;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BulkUpdateContactSubscriptionsRequest {\n /**\n * A filter for the contacts that the subscription statuses will be applied to.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter: Record<string, any> | null;\n /** Free text to match in searchable fields for the contacts that the subscription statuses will be applied to. */\n search?: SearchDetails;\n /** The subscription status to apply to the contact's email address. */\n emailSubscriptionStatus?: V5SubscriptionStatusWithLiterals;\n /** The subscription status to apply to the contact's phone. */\n phoneSubscriptionStatus?: V5SubscriptionStatusWithLiterals;\n}\n\nexport interface SearchDetails {\n /** How separate search terms in `expression` are combined. */\n mode?: ModeWithLiterals;\n /**\n * Search term or expression.\n * @maxLength 100\n */\n expression?: string | null;\n /**\n * Fields to search in. If empty, searches all searchable fields. Use dot notation to specify the JSON path.\n * @maxLength 200\n * @maxSize 20\n */\n fields?: string[];\n /** Whether to use fuzzy search, which allows typos using a managed proximity algorithm. */\n fuzzy?: boolean;\n}\n\nexport enum Mode {\n /** Any of the search terms must be present. */\n OR = 'OR',\n /** All search terms must be present. */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\nexport enum V5SubscriptionStatus {\n /** No subscription status has been reported yet. */\n NOT_SET = 'NOT_SET',\n /** Opted in to receive marketing messages. */\n SUBSCRIBED = 'SUBSCRIBED',\n /** Opted out of receiving marketing messages. */\n UNSUBSCRIBED = 'UNSUBSCRIBED',\n}\n\n/** @enumType */\nexport type V5SubscriptionStatusWithLiterals =\n | V5SubscriptionStatus\n | 'NOT_SET'\n | 'SUBSCRIBED'\n | 'UNSUBSCRIBED';\n\nexport interface BulkUpdateContactSubscriptionsResponse {\n /**\n * Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) to retrieve the status of the asynchronous operation.\n * @format GUID\n */\n jobId?: string;\n}\n\n/** Message for reindexing an entity across all active schemas (for fqdn). Tenant needs to be provided in call context. */\nexport interface ReindexEntityForFQDN extends ReindexEntityForFQDNActionOneOf {\n /** to upsert an entity */\n index?: Index;\n /** to remove an entity */\n delete?: Delete;\n /** to report completion of reindexing */\n reportBatchCompleted?: ReportBatchCompleted;\n /** to bulk upsert entities */\n bulkIndex?: BulkIndex;\n /** to bulk delete entities */\n bulkDelete?: BulkDelete;\n /**\n * entity fqdn\n * @maxLength 256\n */\n entityFqdn?: string;\n /** event time */\n eventTime?: Date | null;\n}\n\n/** @oneof */\nexport interface ReindexEntityForFQDNActionOneOf {\n /** to upsert an entity */\n index?: Index;\n /** to remove an entity */\n delete?: Delete;\n /** to report completion of reindexing */\n reportBatchCompleted?: ReportBatchCompleted;\n /** to bulk upsert entities */\n bulkIndex?: BulkIndex;\n /** to bulk delete entities */\n bulkDelete?: BulkDelete;\n}\n\n/** Will create or update entity in search index */\nexport interface Index {\n /**\n * entity id\n * @format GUID\n */\n entityId?: string;\n /** entity as json string */\n entityAsJson?: string;\n /** entity sequence for versioning */\n entityEventSequence?: string | null;\n}\n\n/** Will delete entity from search index */\nexport interface Delete {\n /**\n * entity id\n * @format GUID\n */\n entityId?: string;\n /** entity sequence for versioning */\n entityEventSequence?: string | null;\n}\n\n/** Will report completion of reindexing */\nexport interface ReportBatchCompleted {\n /** completion time */\n batchStart?: Date | null;\n}\n\n/** Will create or update entities in search index. Max 1000 entities per message. */\nexport interface BulkIndex {\n items?: Index[];\n}\n\n/** Will delete entities from search index. Max 1000 entities per message. */\nexport interface BulkDelete {\n items?: Delete[];\n}\n\nexport interface CreateContactRequest {\n /** Contact to create. */\n contact: Contact;\n /**\n * Whether to create the contact even if it duplicates an existing contact.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\nexport interface CreateContactResponse {\n /** Created contact. */\n contact?: Contact;\n /**\n * The upload ID of the image upload process.\n * @maxLength 100\n */\n imageUploadId?: string | null;\n}\n\nexport interface DuplicateContactExists {\n /**\n * ID of an existing contact that matches a duplicate in the request.\n * @format GUID\n */\n matchingContactId?: string | null;\n /** Field or fields of an existing contact that match a duplicate in the request. */\n matchType?: MatchTypeWithLiterals;\n}\n\nexport enum MatchType {\n EMAIL = 'EMAIL',\n PHONE = 'PHONE',\n EXTERNAL_ID = 'EXTERNAL_ID',\n EMAIL_AND_PHONE = 'EMAIL_AND_PHONE',\n}\n\n/** @enumType */\nexport type MatchTypeWithLiterals =\n | MatchType\n | 'EMAIL'\n | 'PHONE'\n | 'EXTERNAL_ID'\n | 'EMAIL_AND_PHONE';\n\nexport interface GetContactRequest {\n /**\n * ID of the contact to retrieve.\n * @format GUID\n */\n contactId: string;\n /**\n * Whether to read the contact from the database in a consistent manner.\n * @internal\n */\n consistent?: boolean | null;\n}\n\nexport interface GetContactResponse {\n /** Retrieved contact. */\n contact?: Contact;\n}\n\nexport interface UpdateContactRequest {\n /** Contact to update. May be partial. */\n contact: Contact;\n /**\n * Set of fields to update.\n *\n * Fields that aren't included in `fieldMask.paths` are ignored.\n * @internal\n */\n fieldMask?: string[];\n /**\n * Whether to update the contact even if it becomes a duplicate of another contact.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\nexport interface UpdateContactResponse {\n /** Updated contact. */\n contact?: Contact;\n /**\n * The upload ID of the image upload process.\n * @maxLength 100\n */\n imageUploadId?: string | null;\n}\n\nexport interface UpsertContactRequest {\n /** Contact to upsert. */\n contact: Contact;\n /**\n * Set of fields to update.\n *\n * Fields that aren't included in `fieldMask.paths` are ignored.\n * @internal\n */\n fieldMask?: string[];\n /** Mode that determines how an existing contact is updated when a match is found. See the endpoint description for the supported modes. */\n upsertMode?: UpsertModeWithLiterals;\n /** Whether to update the contact even if it's a site member. */\n updateMember?: boolean | null;\n}\n\nexport enum UpsertMode {\n /** Replaces existing field values. Default value. */\n OVERWRITE = 'OVERWRITE',\n /** Sets a non-array field only if it doesn't already have a value, and appends to array fields. */\n APPEND = 'APPEND',\n /** Overwrites non-array fields and appends to array fields. */\n OVERWRITE_APPEND_ARRAYS = 'OVERWRITE_APPEND_ARRAYS',\n}\n\n/** @enumType */\nexport type UpsertModeWithLiterals =\n | UpsertMode\n | 'OVERWRITE'\n | 'APPEND'\n | 'OVERWRITE_APPEND_ARRAYS';\n\nexport interface UpsertContactResponse {\n /** Upserted contact. */\n contact?: Contact;\n /** The action performed on the contact. */\n action?: UpsertContactResponseActionWithLiterals;\n /**\n * The upload ID of the image upload process.\n * @maxLength 100\n */\n imageUploadId?: string | null;\n}\n\nexport enum UpsertContactResponseAction {\n UPDATED = 'UPDATED',\n CREATED = 'CREATED',\n}\n\n/** @enumType */\nexport type UpsertContactResponseActionWithLiterals =\n | UpsertContactResponseAction\n | 'UPDATED'\n | 'CREATED';\n\nexport interface FailedMemberUpdate {\n /**\n * Contact ID.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport interface UpdateContactTagsRequest {\n /**\n * ID of the contact whose tags to update.\n * @format GUID\n */\n contactId: string;\n /** Tags to assign. */\n assignTags?: PrivateTags;\n /** Tags to unassign. */\n unassignTags?: PrivateTags;\n}\n\nexport interface UpdateContactTagsResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface MergeContactsRequest {\n /**\n * Target contact ID.\n * @format GUID\n */\n targetContactId: string;\n /**\n * Revision number of the target contact, which increments by 1 each time the contact is updated.\n * The current revision must be passed to prevent conflicting changes.\n */\n targetContactRevision: string | null;\n /** Contact to overwrite the target with, instead of merging in the source contacts' data. See the endpoint description for details. */\n targetContact?: Contact;\n /**\n * Set of fields to update.\n *\n * Fields that aren't included in `fieldMask.paths` are ignored.\n * @internal\n */\n fieldMask?: string[];\n /**\n * IDs of up to 5 contacts to merge into the target contact.\n * If merging more than one source contact,\n * the first source is given precedence, then the second, and so on.\n * @minSize 1\n * @maxSize 5\n * @format GUID\n */\n sourceContactIds?: string[];\n /**\n * Whether to return a preview of the merged contact instead of performing the actual merge.\n *\n * Default: `false`\n */\n preview?: boolean | null;\n /**\n * Whether to update the target contact even if it becomes a duplicate of another contact. Relevant only when `targetContact` is provided.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\nexport interface MergeContactsResponse {\n /** Updated target contact. */\n contact?: Contact;\n}\n\nexport interface DeleteContactRequest {\n /**\n * ID of the contact to delete.\n * @format GUID\n */\n contactId: string;\n /**\n * Whether to delete the contact even if it's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMember?: boolean | null;\n}\n\nexport interface DeleteContactResponse {}\n\nexport interface FindMatchingContactsRequest {\n /**\n * Contact external ID.\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Email address.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string | null;\n /**\n * Phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string | null;\n}\n\nexport interface FindMatchingContactsResponse {\n /** Matching contacts, ordered by match strength. At most 100 contacts are returned. */\n contacts?: Contact[];\n}\n\nexport interface QueryContactsRequest {\n /** WQL expression. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n /**\n * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n *\n * If multiple filters are provided, they are combined with AND operator.\n *\n * Example:\n * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n * @internal\n * @maxSize 10\n */\n selectItemsBy?: Record<string, any>[] | null;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryContactsResponse {\n /** Retrieved contacts. */\n contacts?: Contact[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\n/** Paging metadata for cursor-based pagination. */\nexport interface CursorPagingMetadata {\n /** Number of items returned in the current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n /**\n * Total number of items matching the filter.\n * Available only on the first page of Search results, not included in Query or List results.\n * If the Search results span multiple pages, the value of `total` can exceed the number of items returned on the first page.\n */\n total?: number | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface SearchContactsRequest {\n /** WQL search expression. */\n search?: CursorSearch;\n /**\n * Name Format for sorting and searching.\n * When sorting by `displayName`, the returned contacts are ordered by first and last names, by default.\n * Alternatively, when sorting by `displayName` with `BY_LAST_NAME`, the returned contacts are ordered by last and first names.\n * For contacts that do not have names, sorting is by email or phone.\n * When searching by `name.full`, the contacts returned are matched and ordered by first and last names.\n * Alternatively, when searching by `name.full` with `BY_LAST_NAME`, the contacts returned\n * are matched and ordered by last and first names.\n */\n nameFormat?: NameFormatWithLiterals;\n /**\n * Natural language query for semantic search. Mutually exclusive with cursor paging with a cursor.\n * @maxLength 1000\n */\n semanticQuery?: string | null;\n}\n\nexport interface CursorSearch extends CursorSearchPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * List of sort objects.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 10\n */\n sort?: Sorting[];\n /**\n * Aggregations, also known as faceted search. Lets you explore large amounts of data by displaying summaries about different partitions of the data, and narrow the navigation to a specific partition.\n * @maxSize 10\n */\n aggregations?: Aggregation[];\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /**\n * UTC offset or IANA time zone. Valid values are\n * ISO 8601 UTC offsets, such as +02:00 or -06:00,\n * and IANA time zone IDs, such as Europe/Rome.\n *\n * Affects the values returned by all filters and aggregations.\n * You can override this behavior in a specific filter by providing\n * timestamps that include a time zone. For example, `\"2023-12-20T10:52:34.795Z\"`.\n * @maxLength 50\n */\n timeZone?: string | null;\n}\n\n/** @oneof */\nexport interface CursorSearchPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Aggregation extends AggregationKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n /** Nested aggregation. */\n nested?: NestedAggregation;\n /**\n * User-defined name for the aggregation. Must be unique. Appears in the aggregation results.\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation. Must match the aggregation type provided in the `kind` field. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by. Use dot notation to specify the JSON path.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n /** Nested aggregation. */\n nested?: NestedAggregation;\n}\n\nexport interface RangeBucket {\n /** Inclusive lower bound of the range. Required if `to` isn't given. */\n from?: number | null;\n /** Exclusive upper bound of the range. Required if `from` isn't given. */\n to?: number | null;\n}\n\nexport enum SortType {\n /** Sorts by number of matches. */\n COUNT = 'COUNT',\n /** Sorts by the field's value, alphabetically. */\n VALUE = 'VALUE',\n}\n\n/** @enumType */\nexport type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';\n\nexport enum SortDirection {\n /** Sorts in descending order. */\n DESC = 'DESC',\n /** Sorts in ascending order. */\n ASC = 'ASC',\n}\n\n/** @enumType */\nexport type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';\n\nexport enum MissingValues {\n /** Missing values are excluded from the aggregation results. */\n EXCLUDE = 'EXCLUDE',\n /** Missing values are included in the aggregation results. */\n INCLUDE = 'INCLUDE',\n}\n\n/** @enumType */\nexport type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';\n\nexport interface IncludeMissingValuesOptions {\n /**\n * Custom name for the bucket that holds missing values.\n *\n * Default: `\"N/A\"` for string fields, `\"0\"` for integer fields, `\"false\"` for boolean fields.\n * @maxLength 20\n */\n addToBucket?: string;\n}\n\nexport enum ScalarType {\n /** Count of distinct values. */\n COUNT_DISTINCT = 'COUNT_DISTINCT',\n /** Minimum value. */\n MIN = 'MIN',\n /** Maximum value. */\n MAX = 'MAX',\n /**\n * Sum of values.\n * @internal\n */\n SUM = 'SUM',\n /**\n * Average of values.\n * @internal\n */\n AVG = 'AVG',\n}\n\n/** @enumType */\nexport type ScalarTypeWithLiterals =\n | ScalarType\n | 'COUNT_DISTINCT'\n | 'MIN'\n | 'MAX';\n\nexport enum NestedAggregationType {\n /** An aggregation where result buckets are dynamically built, one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation where you can define a set of ranges, each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation, such as min, max, sum, or avg. */\n SCALAR = 'SCALAR',\n /** An aggregation where result buckets are dynamically built, one per time interval (hour, day, week, and so on). */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n}\n\n/** @enumType */\nexport type NestedAggregationTypeWithLiterals =\n | NestedAggregationType\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM';\n\nexport interface ValueAggregation extends ValueAggregationOptionsOneOf {\n /** Options for including missing values. Used only when `missingValues` is `INCLUDE`. */\n includeOptions?: IncludeMissingValuesOptions;\n /** How to sort the aggregation results: by number of matches or by field value. */\n sortType?: SortTypeWithLiterals;\n /** Sort direction: ascending or descending. */\n sortDirection?: SortDirectionWithLiterals;\n /**\n * Number of aggregations to return.\n *\n * Default: `10`\n */\n limit?: number | null;\n /**\n * Whether to include missing values in the aggregation results.\n *\n * Default: `EXCLUDE`\n */\n missingValues?: MissingValuesWithLiterals;\n}\n\n/** @oneof */\nexport interface ValueAggregationOptionsOneOf {\n /** Options for including missing values. Used only when `missingValues` is `INCLUDE`. */\n includeOptions?: IncludeMissingValuesOptions;\n}\n\nexport interface RangeAggregation {\n /**\n * Range buckets used for the aggregation. Each entity is placed in the first bucket whose range its value falls into.\n * @maxSize 50\n */\n buckets?: RangeBucket[];\n}\n\nexport interface ScalarAggregation {\n /** Operator for the scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n}\n\nexport interface DateHistogramAggregation {\n /** Interval for the date histogram aggregation. */\n interval?: IntervalWithLiterals;\n}\n\nexport enum Interval {\n /** Yearly interval. */\n YEAR = 'YEAR',\n /** Monthly interval. */\n MONTH = 'MONTH',\n /** Weekly interval. */\n WEEK = 'WEEK',\n /** Daily interval. */\n DAY = 'DAY',\n /** Hourly interval. */\n HOUR = 'HOUR',\n /** Minute interval. */\n MINUTE = 'MINUTE',\n /** Second interval. */\n SECOND = 'SECOND',\n}\n\n/** @enumType */\nexport type IntervalWithLiterals =\n | Interval\n | 'YEAR'\n | 'MONTH'\n | 'WEEK'\n | 'DAY'\n | 'HOUR'\n | 'MINUTE'\n | 'SECOND';\n\nexport interface NestedAggregationItem extends NestedAggregationItemKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n /**\n * User-defined name for the aggregation. Must be unique. Appears in the aggregation results.\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation. Must match the aggregation type provided in the `kind` field. */\n type?: NestedAggregationTypeWithLiterals;\n /**\n * Field to aggregate by. Use dot notation to specify the JSON path.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationItemKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n}\n\nexport enum AggregationType {\n /** An aggregation where result buckets are dynamically built, one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation where you can define a set of ranges, each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation, such as min, max, sum, or avg. */\n SCALAR = 'SCALAR',\n /** An aggregation where result buckets are dynamically built, one per time interval (hour, day, week, and so on). */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n /** Multi-level aggregation, where each next aggregation is nested within the previous one. */\n NESTED = 'NESTED',\n}\n\n/** @enumType */\nexport type AggregationTypeWithLiterals =\n | AggregationType\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM'\n | 'NESTED';\n\n/** Nested aggregation expressed as a list of aggregations, where each next aggregation is nested within the previous one. */\nexport interface NestedAggregation {\n /**\n * Flattened list of aggregations, where each next aggregation is nested within the previous one.\n * @minSize 2\n * @maxSize 3\n */\n nestedAggregations?: NestedAggregationItem[];\n}\n\n/** Name format types for sorting and searching. */\nexport enum NameFormat {\n /** Names will be formatted starting with the first name followed by the last name. */\n BY_FIRST_NAME = 'BY_FIRST_NAME',\n /** Names will be formatted starting with the last name followed by the first name. */\n BY_LAST_NAME = 'BY_LAST_NAME',\n}\n\n/** @enumType */\nexport type NameFormatWithLiterals =\n | NameFormat\n | 'BY_FIRST_NAME'\n | 'BY_LAST_NAME';\n\nexport interface SearchContactsResponse {\n /** Retrieved contacts. */\n contacts?: Contact[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n /** Aggregation data. */\n aggregationData?: AggregationData;\n}\n\nexport interface AggregationData {\n /**\n * Results of the requested aggregations.\n * @maxSize 10000\n */\n results?: AggregationResults[];\n}\n\nexport interface ValueAggregationResult {\n /**\n * Value of the field.\n * @maxLength 100\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number;\n}\n\nexport interface RangeAggregationResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in this range. */\n count?: number;\n}\n\nexport interface ValueResults {\n /**\n * Value aggregation results.\n * @maxSize 250\n */\n results?: ValueAggregationResult[];\n}\n\nexport interface RangeResults {\n /**\n * Range results, returned in the same order as requested.\n * @maxSize 50\n */\n results?: RangeAggregationResult[];\n}\n\nexport interface AggregationResultsScalarResult {\n /** Type of scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface ValueResult {\n /**\n * Value of the field.\n * @maxLength 1000\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number | null;\n}\n\nexport interface RangeResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in this range. */\n count?: number | null;\n}\n\nexport interface ScalarResult {\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface NestedResultValue extends NestedResultValueResultOneOf {\n /** Value aggregation result. */\n value?: ValueResult;\n /** Range aggregation result. */\n range?: RangeResult;\n /** Scalar aggregation result. */\n scalar?: ScalarResult;\n /** Date histogram aggregation result. */\n dateHistogram?: ValueResult;\n}\n\n/** @oneof */\nexport interface NestedResultValueResultOneOf {\n /** Value aggregation result. */\n value?: ValueResult;\n /** Range aggregation result. */\n range?: RangeResult;\n /** Scalar aggregation result. */\n scalar?: ScalarResult;\n /** Date histogram aggregation result. */\n dateHistogram?: ValueResult;\n}\n\nexport interface Results {\n /** Nested aggregation results, keyed by aggregation name. */\n results?: Record<string, NestedResultValue>;\n}\n\nexport interface DateHistogramResult {\n /**\n * Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\n * @maxLength 100\n */\n value?: string;\n /** Count of documents in the bucket. */\n count?: number;\n}\n\nexport interface DateHistogramResults {\n /**\n * Date histogram aggregation results.\n * @maxSize 200\n */\n results?: DateHistogramResult[];\n}\n\n/** Results of the `NESTED` aggregation type in a flattened form. Entries in the resulting array are keyed by the requested aggregation's `name`. */\nexport interface NestedResults {\n /**\n * Nested aggregation results.\n * @maxSize 1000\n */\n results?: Results[];\n}\n\nexport interface AggregationResults extends AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n /**\n * User-defined name of the aggregation, as provided in the search request.\n * @maxLength 100\n */\n name?: string;\n /** Type of aggregation. Matches the `kind` provided in the search request. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by, as provided in the search request.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n}\n\nexport interface CountContactsRequest {\n /**\n * Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match.\n *\n * Supported search properties are:\n *\n * - `name.full`\n * - `email.email`\n * - `phone.phone`\n * - `member_info.email`\n * - `member_info.profile_info.nickname`\n * - `company.name`\n * - `company.job_title`\n *\n * Max: 100 characters\n * @maxLength 100\n */\n search?: string | null;\n}\n\nexport interface CountContactsResponse {\n /** Number of contacts that match the provided filter and search criteria. */\n count?: number;\n}\n\nexport interface GenerateContactImageUploadUrlRequest {\n /**\n * ID of the contact to generate an image upload URL for.\n * @format GUID\n */\n contactId: string;\n /**\n * MIME type. Must be one of: `image/png`, `image/jpeg`.\n *\n * Default: `image/png`\n * @maxLength 100\n */\n mimeType?: string | null;\n}\n\nexport interface GenerateContactImageUploadUrlResponse {\n /**\n * URL to upload the image to.\n * @format WEB_URL\n */\n uploadUrl?: string;\n /**\n * Upload ID. Pass this ID to [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to check the status of the upload.\n * @format GUID\n */\n imageUploadId?: string;\n}\n\nexport interface AddContactAdditionalEmailRequest {\n /**\n * ID of the contact to add an email to.\n * @format GUID\n */\n contactId: string;\n /** Email to add. */\n email: AdditionalEmail;\n /** Contact revision number. */\n revision: string | null;\n}\n\nexport interface AddContactAdditionalEmailResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface AddContactAdditionalPhoneRequest {\n /**\n * ID of the contact to add a phone to.\n * @format GUID\n */\n contactId: string;\n /** Phone to add. */\n phone: AdditionalPhone;\n /** Contact revision number. */\n revision: string | null;\n}\n\nexport interface AddContactAdditionalPhoneResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface AddContactAddressRequest {\n /**\n * ID of the contact to add an address to.\n * @format GUID\n */\n contactId: string;\n /** Address to add. */\n address: ContactAddress;\n /** Contact revision number. */\n revision: string | null;\n}\n\nexport interface AddContactAddressResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface DeleteContactAddressRequest {\n /**\n * ID of the contact to delete the address from.\n * @format GUID\n */\n contactId: string;\n /**\n * ID of the address to delete.\n * @format GUID\n */\n addressId: string;\n /** Contact revision number. */\n revision: string | null;\n}\n\nexport interface DeleteContactAddressResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface UpdateContactAddressRequest {\n /**\n * ID of the contact to update the address on.\n * @format GUID\n */\n contactId: string;\n /** Address to update. Must include `address.id`. */\n address: ContactAddress;\n /** Contact revision number. */\n revision: string | null;\n}\n\nexport interface UpdateContactAddressResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface BulkCreateContactsRequest {\n /**\n * Contacts to create.\n * @minSize 1\n * @maxSize 100\n */\n contacts: Contact[];\n /** Whether to include the created contacts in the response. */\n returnEntity?: boolean;\n /** Whether to create the contact even if it duplicates an existing contact. */\n allowDuplicates?: boolean;\n}\n\nexport interface BulkCreateContactsResponse {\n /**\n * Results of the bulk create operation, including the created contacts and metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkContactResult[];\n /** Metadata regarding the bulk create operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkContactResult {\n /** Metadata regarding the creation of this specific contact. */\n itemMetadata?: ItemMetadata;\n /** Returned only when `returnEntity` is `true` in the request. */\n item?: Contact;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkUpdateContactsRequest {\n /**\n * Contacts to update.\n * @minSize 1\n * @maxSize 100\n */\n contacts: MaskedContact[];\n /** Whether to include the updated contacts in the response. */\n returnEntity?: boolean;\n /** Whether to update the contact even if it becomes a duplicate of another contact. */\n allowDuplicates?: boolean;\n}\n\nexport interface MaskedContact {\n /** Contact to update. May be partial. */\n contact?: Contact;\n /**\n * Explicit list of fields to update.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdateContactsResponse {\n /**\n * Results of the update for each contact.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdateContactsResponseBulkContactResult[];\n /** Metadata regarding the bulk update operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUpdateContactsResponseBulkContactResult {\n /** Metadata regarding the update of this specific contact. */\n itemMetadata?: ItemMetadata;\n /** Returned only when `returnEntity` is `true` in the request. */\n item?: Contact;\n}\n\nexport interface BulkUpdateContactTagsRequest {\n /**\n * IDs of the contacts to add or remove tags on.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds: string[];\n /** Whether to include the updated contacts in the response. */\n returnEntity?: boolean;\n /** Tags to assign. */\n assignTags?: PrivateTags;\n /** Tags to unassign. */\n unassignTags?: PrivateTags;\n}\n\nexport interface BulkUpdateContactTagsResponse {\n /**\n * Results of the tag update for each contact.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdateContactTagsResult[];\n /** Summary of successes and failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUpdateContactTagsResult {\n /** Metadata regarding the tag update for this specific contact. */\n itemMetadata?: ItemMetadata;\n /** Returned only when `returnEntity` is `true` in the request. */\n item?: Contact;\n}\n\nexport interface BulkUpdateContactTagsByFilterRequest {\n /** Filter object. See documentation [here](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters). */\n filter: Record<string, any> | null;\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /** Tags to assign to the matching contacts. */\n assignTags?: PrivateTags;\n /** Tags to unassign from the matching contacts. */\n unassignTags?: PrivateTags;\n}\n\nexport interface BulkUpdateContactTagsByFilterResponse {\n /**\n * Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) to retrieve the status of the asynchronous operation.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkUpsertContactsRequest {\n /**\n * Contacts to create or update.\n * @minSize 1\n * @maxSize 100\n */\n contacts: BulkUpsertContactsRequestMaskedContact[];\n /** Whether to include the upserted contacts in the response. */\n returnEntity?: boolean;\n /** Mode that determines how an existing contact is updated when a match is found. See the endpoint description for the supported modes. */\n upsertMode?: UpsertModeWithLiterals;\n /** Whether to update a contact even if it's a site member. */\n updateMember?: boolean | null;\n}\n\nexport interface BulkUpsertContactsRequestMaskedContact {\n /** Contact to create or update. May be partial. */\n contact?: Contact;\n /**\n * Explicit list of fields to update.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface BulkUpsertContactsResponse {\n /**\n * Results of the upsert for each contact.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpsertContactsResponseBulkContactResult[];\n /** Metadata regarding the bulk upsert operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport enum Action {\n UNKNOWN_ACTION = 'UNKNOWN_ACTION',\n UPDATED = 'UPDATED',\n CREATED = 'CREATED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals =\n | Action\n | 'UNKNOWN_ACTION'\n | 'UPDATED'\n | 'CREATED';\n\nexport interface BulkUpsertContactsResponseBulkContactResult {\n /** Metadata regarding the upsert of this specific contact. */\n itemMetadata?: ItemMetadata;\n /** Returned only when `returnEntity` is `true` in the request. */\n item?: Contact;\n /** The action performed on the contact. */\n action?: ActionWithLiterals;\n}\n\nexport interface BulkDeleteContactsRequest {\n /**\n * IDs of the contacts to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds: string[];\n /**\n * Whether to delete the associated site member for any contact that's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\nexport interface BulkDeleteContactsResponse {\n /**\n * Results of the delete operation for each contact.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkDeleteContactsResponseBulkContactResult[];\n /** Metadata regarding the bulk delete operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteContactsResponseBulkContactResult {\n /** Metadata regarding the deletion of this specific contact. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkDeleteContactsByFilterRequest {\n /**\n * Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter: Record<string, any> | null;\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /**\n * Whether to delete the associated site member for any contact that's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\nexport interface BulkDeleteContactsByFilterResponse {\n /**\n * Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) to retrieve the status of the asynchronous operation.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface RemoveContactFromTrashBinRequest {\n /**\n * ID of the contact to permanently delete from the trash bin.\n * @format GUID\n */\n contactId: string;\n}\n\nexport interface RemoveContactFromTrashBinResponse {}\n\nexport interface RestoreContactFromTrashBinRequest {\n /**\n * ID of the contact to restore from the trash bin.\n * @format GUID\n */\n contactId: string;\n}\n\nexport interface RestoreContactFromTrashBinResponse {\n /** Restored contact. */\n contact?: Contact;\n}\n\nexport interface BulkRestoreContactsFromTrashBinRequest {\n /**\n * IDs of the contacts to restore from the trash bin.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds?: string[];\n /** Whether to include the restored contacts in the response. */\n returnEntity?: boolean;\n}\n\nexport interface BulkRestoreContactsFromTrashBinResponse {\n /**\n * Results of the restore operation for each contact.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkRestoreContactsFromTrashBinResponseBulkContactResult[];\n /** Metadata regarding the bulk restore operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkRestoreContactsFromTrashBinResponseBulkContactResult {\n /** Metadata regarding the restoration of this specific contact. */\n itemMetadata?: ItemMetadata;\n /** Returned only when `returnEntity` is `true` in the request. */\n item?: Contact;\n}\n\nexport interface GetDeletedContactRequest {\n /**\n * ID of the contact to retrieve from the trash bin.\n * @format GUID\n */\n contactId: string;\n}\n\nexport interface GetDeletedContactResponse {\n /** Retrieved contact. */\n contact?: Contact;\n}\n\nexport interface ListDeletedContactsRequest {\n /**\n * External ID.\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Email address.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string | null;\n /**\n * Phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string | null;\n /**\n * Contact IDs.\n * @maxSize 100\n * @format GUID\n */\n contactIds?: string[];\n /** Filters to contacts deleted on or after this date and time. */\n deletedFromDate?: Date | null;\n /** Filters to contacts deleted on or before this date and time. */\n deletedToDate?: Date | null;\n /** Cursor paging. */\n paging?: CursorPaging;\n}\n\nexport interface ListDeletedContactsResponse {\n /** Retrieved contacts. */\n contacts?: Contact[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface BulkAddSegmentToContactsRequest {\n /**\n * Segment ID.\n * @format GUID\n */\n segmentId?: string;\n /**\n * IDs of the contacts to add the segment to.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n contactIds?: string[];\n /**\n * IDs of segments on the contact that no longer exist, used to remove them from the contact.\n * @format GUID\n * @maxSize 100\n */\n existingSegmentIds?: string[];\n}\n\nexport interface BulkAddSegmentToContactsResponse {\n /** Results of the action for each contact. */\n results?: ItemMetadata[];\n /** Metadata regarding the bulk action. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkRemoveSegmentFromContactsRequest {\n /**\n * Segment ID.\n * @format GUID\n */\n segmentId?: string;\n /**\n * IDs of the contacts to remove the segment from.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n contactIds?: string[];\n}\n\nexport interface BulkRemoveSegmentFromContactsResponse {\n /** Results of the action for each contact. */\n results?: ItemMetadata[];\n /** Metadata regarding the bulk action. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface QueryContactsByOffsetInternalRequest {\n /** WQL expression. */\n query?: QueryV2;\n /**\n * Plain text search for an exact match.\n *\n * Supported search properties are:\n *\n * - `name.full`\n * - `email.email`\n * - `phone.phone`\n * - `member_info.email`\n * - `member_info.profile_info.nickname`\n * - `company.name`\n * - `company.job_title`\n *\n * Max: 100 characters\n * @maxLength 100\n */\n search?: string | null;\n /**\n * Whether to omit the total count of matching contacts from the response.\n * @internal\n */\n omitTotal?: boolean | null;\n /**\n * Name Format for sorting and searching.\n * When sorting by `displayName`, the returned contacts are ordered by first and last names, by default.\n * Alternatively, when sorting by `displayName` with `BY_LAST_NAME`, the returned contacts are ordered by last and first names.\n * For contacts that do not have names, sorting is by email or phone.\n * When searching by `name.full`, the contacts returned are matched and ordered by first and last names.\n * Alternatively, when searching by `name.full` with `BY_LAST_NAME`, the contacts returned\n * are matched and ordered by last and first names.\n */\n nameFormat?: QueryContactsByOffsetInternalRequestNameFormatWithLiterals;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 100\n */\n sort?: Sorting[];\n /**\n * Projected fields to return. If `fieldsets` is also specified, the union of `fieldsets` and `fields` is returned.\n * @maxSize 1000\n * @maxLength 100\n */\n fields?: string[];\n /**\n * Predefined, named sets of projected fields to return. Specifying multiple `fieldsets` returns the union of fields from all sets. If `fields` is also specified, the union of `fieldsets` and `fields` is returned.\n * @maxSize 100\n * @maxLength 100\n */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Paging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\n/** Name format types for sorting and searching. */\nexport enum QueryContactsByOffsetInternalRequestNameFormat {\n BY_FIRST_NAME = 'BY_FIRST_NAME',\n BY_LAST_NAME = 'BY_LAST_NAME',\n}\n\n/** @enumType */\nexport type QueryContactsByOffsetInternalRequestNameFormatWithLiterals =\n | QueryContactsByOffsetInternalRequestNameFormat\n | 'BY_FIRST_NAME'\n | 'BY_LAST_NAME';\n\nexport interface QueryContactsByOffsetInternalResponse {\n /** Retrieved contacts. */\n contacts?: Contact[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Whether the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Whether there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n * @internal\n */\n hasNext?: boolean | null;\n}\n\nexport interface GetContactImageUploadStatusRequest {\n /**\n * ID of the contact whose image upload status to retrieve.\n * @format GUID\n */\n contactId: string;\n /**\n * The upload ID of the image upload process. Returned when an image URL is provided while creating or updating a contact, or from [Generate Contact Image Upload Url](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/generate-contact-image-upload-url).\n * @maxLength 100\n */\n imageUploadId: string;\n}\n\nexport interface GetContactImageUploadStatusResponse {\n /** The status of the image upload process. */\n status?: ImageUploadStatusWithLiterals;\n}\n\nexport enum ImageUploadStatus {\n /** Image upload is in progress. */\n IN_PROGRESS = 'IN_PROGRESS',\n /** Image is uploaded. */\n SUCCESS = 'SUCCESS',\n /** Image upload failed. */\n FAILURE = 'FAILURE',\n}\n\n/** @enumType */\nexport type ImageUploadStatusWithLiterals =\n | ImageUploadStatus\n | 'IN_PROGRESS'\n | 'SUCCESS'\n | 'FAILURE';\n\nexport interface BulkUpdatePhoneCountryCodeByFilterRequest {\n /**\n * A filter for the contacts that the country code will be applied to.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /** Free text to match in searchable fields for the contacts that the country code will be applied to. */\n search?: SearchDetails;\n /**\n * [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code to apply.\n *\n * Applied only to contacts whose phone number isn't already in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format. If the phone number still can't be converted to E.164 format after applying the country code, that contact fails with `PHONE_CANNOT_BE_FIXED_WITH_COUNTRY_CODE`.\n * @format COUNTRY\n */\n countryCode: string;\n}\n\nexport interface BulkUpdatePhoneCountryCodeByFilterResponse {\n /**\n * Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) to retrieve the status of the asynchronous operation.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface Empty {}\n\nexport interface MediaFileUploadedEvent {\n fileId?: string;\n path?: string;\n mimeType?: string;\n acl?: string | null;\n size?: string | null;\n dateCreated?: Date | null;\n dateUpdated?: Date | null;\n}\n\n/** @docsIgnore */\nexport type BulkUpdateContactSubscriptionsApplicationErrors = {\n code?: 'MISSING_SUBSCRIPTION_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CreateContactApplicationErrors =\n | {\n code?: 'INSUFFICIENT_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_PHONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MULTIPLE_DEFAULT_ADDRESSES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'EMAIL_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PHONE_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_CONTACT_EXISTS';\n description?: string;\n data?: DuplicateContactExists;\n }\n | {\n code?: 'INVALID_TIME_ZONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_BIRTHDATE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_IMAGE_URL';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateContactApplicationErrors =\n | {\n code?: 'INSUFFICIENT_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_PHONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MULTIPLE_DEFAULT_ADDRESSES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'EMAIL_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PHONE_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_CHANGE_EXTERNAL_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_CONTACT_EXISTS';\n description?: string;\n data?: DuplicateContactExists;\n }\n | {\n code?: 'CANNOT_UPDATE_MEMBER_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_TIME_ZONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_IMAGE_URL';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpsertContactApplicationErrors =\n | {\n code?: 'INSUFFICIENT_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_PHONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MULTIPLE_DEFAULT_ADDRESSES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'EMAIL_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PHONE_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_TIME_ZONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_IMAGE_URL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_CHANGE_EXTERNAL_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_UPDATE_MEMBER_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNAUTHORIZED_UPDATE_MEMBER';\n description?: string;\n data?: FailedMemberUpdate;\n }\n | {\n code?: 'CANNOT_UPDATE_MEMBER';\n description?: string;\n data?: FailedMemberUpdate;\n };\n/** @docsIgnore */\nexport type UpdateContactTagsApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type MergeContactsApplicationErrors =\n | {\n code?: 'CANNOT_MERGE_SOURCE_MEMBER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_UPDATE_MEMBER_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CONTACT_MERGE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SOURCE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INSUFFICIENT_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_PHONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MULTIPLE_DEFAULT_ADDRESSES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'EMAIL_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PHONE_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_CHANGE_EXTERNAL_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_CONTACT_EXISTS';\n description?: string;\n data?: DuplicateContactExists;\n }\n | {\n code?: 'INVALID_TIME_ZONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_IMAGE_URL';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeleteContactApplicationErrors =\n | {\n code?: 'UNAUTHORIZED_DELETE_MEMBER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_DELETE_MEMBER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_DELETE_WIX_USERS_MEMBER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type FindMatchingContactsApplicationErrors = {\n code?: 'NO_IDENTIFIER_PROVIDED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type GenerateContactImageUploadUrlApplicationErrors = {\n code?: 'INVALID_MIME_TYPE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type AddContactAdditionalEmailApplicationErrors =\n | {\n code?: 'EMAIL_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ADDITIONAL_EMAILS_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type AddContactAdditionalPhoneApplicationErrors =\n | {\n code?: 'PHONE_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ADDITIONAL_PHONES_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type AddContactAddressApplicationErrors =\n | {\n code?: 'ADDRESSES_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeleteContactAddressApplicationErrors =\n | {\n code?: 'ADDRESS_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateContactAddressApplicationErrors =\n | {\n code?: 'ADDRESS_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type BulkUpdateContactTagsApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkUpdateContactTagsByFilterApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkDeleteContactsApplicationErrors = {\n code?: 'UNAUTHORIZED_DELETE_MEMBER';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkDeleteContactsByFilterApplicationErrors = {\n code?: 'UNAUTHORIZED_DELETE_MEMBER';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type GetContactImageUploadStatusApplicationErrors = {\n code?: 'UPLOAD_ID_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Updates the email and SMS marketing subscription statuses of multiple contacts that match the provided filter. Works asynchronously.\n *\n * If a requested subscription status matches a contact's current status, that contact is left unchanged. Provide at least one of `emailSubscriptionStatus` or `phoneSubscriptionStatus`.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n * @param filter - A filter for the contacts that the subscription statuses will be applied to.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n * @public\n * @requiredField filter\n * @permissionId CONTACTS.CONTACT_SUBSCRIPTION_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.ContactSubscriptions.BulkUpdateContactSubscriptions\n */\nexport async function bulkUpdateContactSubscriptions(\n filter: Record<string, any>,\n options?: BulkUpdateContactSubscriptionsOptions\n): Promise<\n NonNullablePaths<BulkUpdateContactSubscriptionsResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkUpdateContactSubscriptionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n search: options?.search,\n emailSubscriptionStatus: options?.emailSubscriptionStatus,\n phoneSubscriptionStatus: options?.phoneSubscriptionStatus,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.bulkUpdateContactSubscriptions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0]',\n search: '$[1].search',\n emailSubscriptionStatus: '$[1].emailSubscriptionStatus',\n phoneSubscriptionStatus: '$[1].phoneSubscriptionStatus',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateContactSubscriptionsOptions {\n /** Free text to match in searchable fields for the contacts that the subscription statuses will be applied to. */\n search?: SearchDetails;\n /** The subscription status to apply to the contact's email address. */\n emailSubscriptionStatus?: V5SubscriptionStatusWithLiterals;\n /** The subscription status to apply to the contact's phone. */\n phoneSubscriptionStatus?: V5SubscriptionStatusWithLiterals;\n}\n\n/**\n * Creates a contact.\n *\n * At least one of `name.first`, `name.last`, `email.email`, or `phone.phone` must be provided.\n *\n * Duplicate handling: By default, creation fails if a contact with the same identifiers (`externalId`, `email.email`, or `phone.phone`) already exists. Set `allowDuplicates` to `true` to bypass this check. Learn more about [contact matching and duplicates](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create multiple contacts in a single request, call [Bulk Create Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-create-contacts).\n * @param contact - Contact to create.\n * @public\n * @requiredField contact\n * @permissionId CONTACTS.CONTACT_CREATE\n * @applicableIdentity APP\n * @returns Created contact.\n * @fqn wix.contacts.v5.Contacts.CreateContact\n */\nexport async function createContact(\n contact: Contact,\n options?: CreateContactOptions\n): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: CreateContactApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contact: contact,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.createContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )?.contact!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contact: '$[0]',\n allowDuplicates: '$[1].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['contact', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateContactOptions {\n /**\n * Whether to create the contact even if it duplicates an existing contact.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\n/**\n * Retrieves a single contact by ID.\n * @param contactId - ID of the contact to retrieve.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @returns Retrieved contact.\n * @fqn wix.contacts.v5.Contacts.GetContact\n */\nexport async function getContact(\n contactId: string\n): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.getContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )?.contact!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['contactId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed when updating the contact. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * Restrictions:\n * - `externalId` can be set only once and can't be changed after creation.\n * - The main email of a contact that is a site member can't be changed. Update it through the [Members API](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/member-management/members/introduction) instead.\n * - At least one of `name`, `email`, or `phone` must remain after the update.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To update multiple contacts in a single request, call [Bulk Update Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contacts).\n * @param _id - Contact ID.\n * @public\n * @requiredField _id\n * @requiredField contact\n * @requiredField contact.revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @permissionId CONTACTS.CONTACT_MEMBER_EMAIL_UPDATE\n * @applicableIdentity APP\n * @returns Updated contact.\n * @fqn wix.contacts.v5.Contacts.UpdateContact\n */\nexport async function updateContact(\n _id: string,\n contact: NonNullablePaths<UpdateContact, `revision`, 0>,\n options?: UpdateContactOptions\n): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: UpdateContactApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contact: { ...contact, id: _id },\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.updateContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )?.contact!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { contact: '$[1]' },\n explicitPathsToArguments: {\n 'contact.id': '$[0]',\n allowDuplicates: '$[2].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'contact', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateContact {\n /**\n * Contact ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the Contact is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the Contact.\n *\n * Ignored when creating a Contact.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the contact was created.\n * @readonly\n * @immutable\n */\n _createdDate?: Date | null;\n /**\n * Date and time the contact was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Contact external ID. Used to identify contacts from external systems.\n * This field can only be set once and can't be updated after creation.\n * @maxLength 100\n */\n externalId?: string | null;\n /** Contact's name information including first and last name. */\n name?: ContactName;\n /**\n * The main email of the contact with subscription status and deliverability information.\n * This email is used for contact matching and deduplication logic.\n */\n email?: ContactEmail;\n /**\n * Additional emails of the contact.\n * These emails do not affect subscription status or contact matching/deduplication.\n * The main email field must be set before additional emails can be added.\n * @maxSize 10\n */\n additionalEmails?: AdditionalEmail[];\n /**\n * The main phone of the contact with subscription status and deliverability information.\n * This phone is used for contact matching and deduplication logic.\n * At least one of name, email, or phone is required for contact creation.\n */\n phone?: ContactPhone;\n /**\n * Additional phones of the contact.\n * These phones do not affect subscription status or contact matching/deduplication.\n * The main phone field must be set before additional phones can be added.\n * @maxSize 10\n */\n additionalPhones?: AdditionalPhone[];\n /**\n * Contact's physical addresses.\n * Each address can be tagged (HOME, WORK, BILLING, SHIPPING, OTHER) and one can be set as default.\n * If no address is marked as default, the first address automatically becomes the default.\n * @maxSize 50\n */\n addresses?: ContactAddress[];\n /** Contact's company information including company name and job title. */\n company?: ContactCompany;\n /**\n * Locale in\n * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * Typically, this is a lowercase 2-letter language code,\n * followed by a hyphen, followed by an uppercase 2-letter country code.\n * For example, `en-US` for U.S. English, and `de-DE` for Germany German.\n * @format LANGUAGE_TAG\n */\n locale?: string | null;\n /**\n * Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.\n * @format LOCAL_DATE\n */\n birthdate?: string | null;\n /**\n * IANA time zone identifier for the contact's location.\n * Valid values are IANA time zone IDs, such as 'Europe/Rome' or 'America/New_York'.\n * @maxLength 50\n */\n timeZone?: string | null;\n /**\n * Site contributor user ID assigned to manage communication with this contact.\n * Must be a valid GUID referencing an existing site contributor.\n * Only one assignee can be set per contact.\n * @format GUID\n */\n assigneeId?: string | null;\n /**\n * List of business location IDs associated with this contact.\n * Used for multi-location businesses to organize contacts by physical business locations.\n * Each ID must be a valid GUID referencing an existing business location.\n * @format GUID\n * @maxSize 50\n */\n locationIds?: string[];\n /**\n * Contact's profile image.\n * If the contact is also a site member, clients should prefer to view `member_info.profile_info.photo`\n * when it exists, as it reflects the member's current profile photo.\n */\n image?: string;\n /**\n * Details about the origin of the contact.\n * This field is immutable and set automatically when the contact is created.\n * @immutable\n */\n source?: ContactSource;\n /**\n * Details about the contact's most recent activity on the site.\n * Includes activity date and template ID. This field is read-only and updated automatically.\n * @readonly\n */\n lastActivity?: ContactActivity;\n /**\n * IDs of the segments the contact belongs to.\n * Segments are used for organizing and targeting groups of contacts.\n * @maxSize 60\n * @readonly\n * @format GUID\n */\n segmentIds?: string[];\n /**\n * Contact's site membership information including member ID, status, and profile details.\n * This field is read-only and populated automatically when the contact is also a site member.\n *\n * Updates are eventually consistent: changes to the underlying member, identity, or profile are reflected after the corresponding events are processed.\n * @readonly\n */\n memberInfo?: MemberInfo;\n /**\n * Contact's display name. The field is used for sorting only and is not returned.\n * @internal\n * @maxLength 1000\n * @readonly\n */\n displayName?: string | null;\n /** Tags assigned to the contact for organization and filtering. */\n tags?: PrivateTags;\n /**\n * Extended fields for storing custom contact data beyond the standard fields.\n * Allows adding custom properties specific to business needs.\n * To define a custom extended field, use the [Schema Service API](https://dev.wix.com/docs/api-reference/business-management/data-extension-schema/about-the-data-extension-schema-api) with the contacts FQDN: `wix.contacts.*.contact`.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface UpdateContactOptions {\n /**\n * Whether to update the contact even if it becomes a duplicate of another contact.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\n/**\n * Creates a contact, or updates an existing one when a match is found based on the contact's identifiers.\n *\n * Matching uses `externalId`, `email.email`, and `phone.phone` to find an existing contact. See [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) for the detailed matching rules.\n *\n * Upsert modes: Set `upsertMode` to control how an existing contact is updated:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * Member contacts: Set `updateMember` to `true` when upserting a contact that is a site member.\n *\n * The response's `action` field indicates whether the contact was `CREATED` or `UPDATED`.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create or update multiple contacts in a single request, call [Bulk Upsert Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-upsert-contacts).\n * @param contact - Contact to upsert.\n * @public\n * @requiredField contact\n * @permissionId CONTACTS.CONTACT_UPSERT\n * @permissionId CONTACTS.CONTACT_MEMBER_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.UpsertContact\n */\nexport async function upsertContact(\n contact: Contact,\n options?: UpsertContactOptions\n): Promise<\n NonNullablePaths<\n UpsertContactResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`\n | `action`,\n 5\n > & {\n __applicationErrorsType?: UpsertContactApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contact: contact,\n upsertMode: options?.upsertMode,\n updateMember: options?.updateMember,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.upsertContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contact: '$[0]',\n upsertMode: '$[1].upsertMode',\n updateMember: '$[1].updateMember',\n },\n singleArgumentUnchanged: false,\n },\n ['contact', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpsertContactOptions {\n /** Mode that determines how an existing contact is updated when a match is found. See the endpoint description for the supported modes. */\n upsertMode?: UpsertModeWithLiterals;\n /** Whether to update the contact even if it's a site member. */\n updateMember?: boolean | null;\n}\n\n/**\n * Adds or removes tags on a contact.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags on multiple contacts, call [Bulk Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contact-tags).\n * @param contactId - ID of the contact whose tags to update.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.UpdateContactTags\n */\nexport async function updateContactTags(\n contactId: string,\n options?: UpdateContactTagsOptions\n): Promise<\n NonNullablePaths<\n UpdateContactTagsResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: UpdateContactTagsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.updateContactTags(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateContactTagsOptions {\n /** Tags to assign. */\n assignTags?: PrivateTags;\n /** Tags to unassign. */\n unassignTags?: PrivateTags;\n}\n\n/**\n * Merges up to 5 source contacts into a target contact.\n *\n * The current target contact revision must be passed as `targetContactRevision`. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * The merge behaves in one of two ways, depending on whether you provide `targetContact` in the request:\n *\n * - Without `targetContact`: The source contacts are merged into the existing target contact. Non-empty fields from the sources fill empty fields on the target, and array fields (emails, phones, and addresses) are combined and deduplicated. When you provide multiple sources, they're merged in order: the first source into the second, that result into the third, and so on, and finally into the target. Earlier sources take precedence over later ones.\n * - With `targetContact`: The provided `targetContact` overwrites the target according to `fieldMask`, and the source contacts are deleted without their data being merged in.\n *\n * In both cases, the source contacts are permanently deleted after a successful merge.\n *\n * Set `preview` to `true` to return the merged result without applying it, so you can review the outcome before committing.\n *\n * Restrictions:\n * - Source contacts can't be site members. The target contact can be a site member.\n * - `externalId` can be set only once and can't be changed if it already has a value.\n * - The target contact must remain valid after the merge, keeping at least one of `name`, `email`, or `phone`.\n * @param targetContactId - Target contact ID.\n * @param targetContactRevision - Revision number of the target contact, which increments by 1 each time the contact is updated.\n * The current revision must be passed to prevent conflicting changes.\n * @public\n * @requiredField targetContactId\n * @requiredField targetContactRevision\n * @permissionId CONTACTS.CONTACT_MERGE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.MergeContacts\n */\nexport async function mergeContacts(\n targetContactId: string,\n targetContactRevision: string,\n options?: MergeContactsOptions\n): Promise<\n NonNullablePaths<\n MergeContactsResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: MergeContactsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n targetContactId: targetContactId,\n targetContactRevision: targetContactRevision,\n targetContact: options?.targetContact,\n sourceContactIds: options?.sourceContactIds,\n preview: options?.preview,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'targetContact.image' },\n { path: 'targetContact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'targetContact.addresses.address' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.mergeContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n targetContactId: '$[0]',\n targetContactRevision: '$[1]',\n targetContact: '$[2].targetContact',\n sourceContactIds: '$[2].sourceContactIds',\n preview: '$[2].preview',\n allowDuplicates: '$[2].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['targetContactId', 'targetContactRevision', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface MergeContactsOptions {\n /** Contact to overwrite the target with, instead of merging in the source contacts' data. See the endpoint description for details. */\n targetContact?: Contact;\n /**\n * IDs of up to 5 contacts to merge into the target contact.\n * If merging more than one source contact,\n * the first source is given precedence, then the second, and so on.\n * @minSize 1\n * @maxSize 5\n * @format GUID\n */\n sourceContactIds?: string[];\n /**\n * Whether to return a preview of the merged contact instead of performing the actual merge.\n *\n * Default: `false`\n */\n preview?: boolean | null;\n /**\n * Whether to update the target contact even if it becomes a duplicate of another contact. Relevant only when `targetContact` is provided.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\n/**\n * Deletes a contact.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin). After 90 days, they're permanently deleted.\n *\n * Member contacts: To delete a contact that is also a site member, set `deleteMember` to `true`. This deletes both the contact and the member.\n *\n * Restrictions:\n * - A contact with an active billing subscription can't be deleted.\n * - A site owner or contributor can't be deleted.\n *\n * To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-delete-contacts).\n * @param contactId - ID of the contact to delete.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_DELETE\n * @permissionId MEMBERS.MEMBER_DELETE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.DeleteContact\n */\nexport async function deleteContact(\n contactId: string,\n options?: DeleteContactOptions\n): Promise<\n void & {\n __applicationErrorsType?: DeleteContactApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n deleteMember: options?.deleteMember,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.deleteContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n deleteMember: '$[1].deleteMember',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteContactOptions {\n /**\n * Whether to delete the contact even if it's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMember?: boolean | null;\n}\n\n/**\n * Retrieves a list of up to 100 contacts that match the provided identifiers.\n *\n * Matching uses `externalId`, `email`, and `phone` to find contacts that likely represent the same person. Provide at least one identifier.\n *\n * Results are ordered by match strength: contacts matching more or higher-priority identifiers appear first. Within each group, contacts are ordered by creation date, oldest first. Identifier priority is `externalId` (highest), then `email`, then `phone` (lowest).\n *\n * Learn more about [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n * @public\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.FindMatchingContacts\n */\nexport async function findMatchingContacts(\n options?: FindMatchingContactsOptions\n): Promise<\n NonNullablePaths<\n FindMatchingContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n > & {\n __applicationErrorsType?: FindMatchingContactsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n externalId: options?.externalId,\n email: options?.email,\n phone: options?.phone,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.findMatchingContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contacts.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n externalId: '$[0].externalId',\n email: '$[0].email',\n phone: '$[0].phone',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface FindMatchingContactsOptions {\n /**\n * Contact external ID.\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Email address.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string | null;\n /**\n * Phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string | null;\n}\n\n/**\n * Retrieves a list of up to 100 contacts, given the provided filtering, sorting, and cursor paging.\n *\n *\n * Query Contacts runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n * @public\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.QueryContacts\n */\nexport function queryContacts(): ContactsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Contact,\n 'CURSOR',\n QueryContactsRequest,\n QueryContactsResponse\n >({\n func: async (payload: QueryContactsRequest) => {\n const reqOpts = ambassadorWixContactsV5Contact.queryContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryContactsRequest['query']) => {\n const args = [query, {}] as [QueryContactsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryContactsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contacts.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.addresses.address' }],\n },\n ])\n );\n\n return {\n items: transformedData?.contacts,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ContactsQueryResult extends QueryCursorResult {\n items: Contact[];\n query: ContactsQueryBuilder;\n next: () => Promise<ContactsQueryResult>;\n prev: () => Promise<ContactsQueryResult>;\n}\n\nexport interface ContactsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'externalId'\n | 'email.email'\n | 'phone.phone',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => ContactsQueryBuilder;\n in: (\n propertyName: '_id' | 'externalId' | 'email.email' | 'phone.phone',\n value: any\n ) => ContactsQueryBuilder;\n exists: (\n propertyName: 'externalId' | 'email.email' | 'phone.phone',\n value: boolean\n ) => ContactsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate'>\n ) => ContactsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => ContactsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => ContactsQueryBuilder;\n find: () => Promise<ContactsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.contacts.v5.Contacts.QueryContacts\n * @requiredField query\n */\nexport async function typedQueryContacts(\n query: ContactQuery\n): Promise<\n NonNullablePaths<\n QueryContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixContactsV5Contact.queryContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contacts.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ContactQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id'];\n operators: ['$eq', '$in'];\n sort: 'NONE';\n },\n {\n fields: ['_createdDate', '_updatedDate'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte'];\n sort: 'ASC';\n },\n {\n fields: ['email.email', 'externalId', 'phone.phone'];\n operators: ['$eq', '$exists', '$in'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Contact,\n ContactQuerySpec\n>;\nexport type ContactQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n /** \n When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n\n If multiple filters are provided, they are combined with AND operator.\n\n Example:\n Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] } \n @internal: undefined,\n @maxSize: 10 \n */\n selectItemsBy?:\n | NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['selectItemsBy']\n | null;\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n Contact,\n ContactQuerySpec,\n ContactQuery\n >(),\n search: /*#__PURE__*/ createSearchUtils<\n Contact,\n ContactSearchSpec,\n ContactSearch\n >(),\n};\n\n/**\n * Retrieves a list of contacts using a free-text search combined with filtering and sorting.\n *\n * Search combines free-text matching with filtering, sorting, and cursor paging. To learn about the query syntax, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n *\n * Searchable properties: `name.full`, `email.email`, `phone.phone`, `company.name`, `company.jobTitle`, `memberInfo.email`, and `memberInfo.profileInfo.nickname`.\n *\n * Name format: Set `nameFormat` to control how names are matched and ordered:\n * - `BY_FIRST_NAME`: Orders by first name, then last name.\n * - `BY_LAST_NAME`: Orders by last name, then first name.\n * @param search - WQL search expression.\n * @public\n * @requiredField search\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.SearchContacts\n */\nexport async function searchContacts(\n search: ContactSearch,\n options?: SearchContactsOptions\n): Promise<\n NonNullablePaths<\n SearchContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`\n | `aggregationData.results`\n | `aggregationData.results.${number}.scalar.type`\n | `aggregationData.results.${number}.scalar.value`\n | `aggregationData.results.${number}.name`\n | `aggregationData.results.${number}.type`\n | `aggregationData.results.${number}.fieldPath`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n search: search,\n nameFormat: options?.nameFormat,\n semanticQuery: options?.semanticQuery,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.searchContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contacts.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n search: '$[0]',\n nameFormat: '$[1].nameFormat',\n semanticQuery: '$[1].semanticQuery',\n },\n singleArgumentUnchanged: false,\n },\n ['search', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchContactsOptions {\n /**\n * Name Format for sorting and searching.\n * When sorting by `displayName`, the returned contacts are ordered by first and last names, by default.\n * Alternatively, when sorting by `displayName` with `BY_LAST_NAME`, the returned contacts are ordered by last and first names.\n * For contacts that do not have names, sorting is by email or phone.\n * When searching by `name.full`, the contacts returned are matched and ordered by first and last names.\n * Alternatively, when searching by `name.full` with `BY_LAST_NAME`, the contacts returned\n * are matched and ordered by last and first names.\n */\n nameFormat?: NameFormatWithLiterals;\n /**\n * Natural language query for semantic search. Mutually exclusive with cursor paging with a cursor.\n * @maxLength 1000\n */\n semanticQuery?: string | null;\n}\n\nexport interface ContactSearchSpec extends SearchSpec {\n searchable: [\n 'company.jobTitle',\n 'company.name',\n 'email.email',\n 'memberInfo.email',\n 'memberInfo.profileInfo.nickname',\n 'name.full',\n 'phone.phone'\n ];\n aggregatable: [\n '_createdDate',\n '_id',\n '_updatedDate',\n 'addresses.address.country',\n 'addresses.address.subdivision',\n 'addresses.address.subdivisionFullname',\n 'assigneeId',\n 'email.deliverabilityStatus',\n 'email.subscriptionStatus.status',\n 'lastActivity.date',\n 'locale',\n 'locationIds',\n 'memberInfo.emailVerificationRequired',\n 'memberInfo.emailVerified',\n 'memberInfo.groupInfo.groupIds',\n 'memberInfo.memberId',\n 'memberInfo.profileInfo.muted',\n 'memberInfo.profileInfo.privacyStatus',\n 'memberInfo.profileInfo.reported',\n 'memberInfo.requireProfileCompletion',\n 'memberInfo.sessionInfo.lastMobileLogin',\n 'memberInfo.sessionInfo.lastWebLogin',\n 'memberInfo.sessionInfo.mobileAppNames',\n 'memberInfo.signupDate',\n 'memberInfo.status',\n 'memberInfo.userInfo.role',\n 'phone.deliverabilityStatus',\n 'phone.subscriptionStatus.status',\n 'segmentIds',\n 'source.additionalInfo',\n 'source.appId',\n 'source.userId',\n 'tags.privateTags.tagIds',\n 'timeZone'\n ];\n paging: 'cursor';\n wql: [\n {\n operators: ['$eq', '$exists', '$in', '$ne', '$nin'];\n fields: [\n 'assigneeId',\n 'memberInfo.memberId',\n 'source.appId',\n 'source.userId',\n 'timeZone'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$exists', '$in', '$ne', '$nin'];\n fields: [\n 'memberInfo.profileInfo.privacyStatus',\n 'memberInfo.status',\n 'memberInfo.userInfo.role'\n ];\n sort: 'BOTH';\n },\n {\n operators: ['$eq', '$ne'];\n fields: [\n 'memberInfo.emailVerificationRequired',\n 'memberInfo.emailVerified',\n 'memberInfo.profileInfo.muted',\n 'memberInfo.profileInfo.reported',\n 'memberInfo.requireProfileCompletion'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n fields: [\n '_createdDate',\n '_updatedDate',\n 'lastActivity.date',\n 'memberInfo.sessionInfo.lastMobileLogin',\n 'memberInfo.sessionInfo.lastWebLogin',\n 'memberInfo.signupDate'\n ];\n sort: 'BOTH';\n },\n {\n operators: ['$eq', '$exists', '$in', '$ne', '$nin', '$startsWith'];\n fields: [\n 'company.jobTitle',\n 'company.name',\n 'email.email',\n 'memberInfo.email',\n 'memberInfo.profileInfo.nickname',\n 'name.first',\n 'name.last',\n 'phone.phone'\n ];\n sort: 'BOTH';\n },\n {\n operators: ['$eq', '$in', '$ne', '$nin'];\n fields: [\n '_id',\n 'email.deliverabilityStatus',\n 'email.subscriptionStatus.status',\n 'phone.deliverabilityStatus',\n 'phone.subscriptionStatus.status'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$exists', '$in', '$ne', '$nin', '$startsWith'];\n fields: ['locale', 'phone.e164', 'source.additionalInfo'];\n sort: 'NONE';\n },\n {\n operators: ['$exists', '$hasAll', '$hasSome', '$isEmpty'];\n fields: [\n 'locationIds',\n 'memberInfo.groupInfo.groupIds',\n 'memberInfo.sessionInfo.mobileAppNames',\n 'segmentIds',\n 'tags.privateTags.tagIds'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$exists', '$hasAll', '$hasSome'];\n fields: [\n 'addresses.address.country',\n 'addresses.address.subdivision',\n 'addresses.recipient.phone'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$exists', '$hasAll', '$hasSome', '$startsWith'];\n fields: [\n 'additionalEmails.email',\n 'additionalPhones.e164',\n 'additionalPhones.phone',\n 'addresses.address.addressLine',\n 'addresses.address.city',\n 'addresses.address.postalCode',\n 'addresses.address.streetAddress.name',\n 'addresses.address.subdivisionFullname',\n 'addresses.recipient.company',\n 'addresses.recipient.firstName',\n 'addresses.recipient.lastName'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n fields: ['birthdate'];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<\n Contact,\n ContactSearchSpec\n>;\nexport type ContactSearch = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonSearchWithEntityContext['filter'] | null;\n /** \n List of sort objects.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 10 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonSearchWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n /** \n When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n\n If multiple filters are provided, they are combined with AND operator.\n\n Example:\n Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] } \n @internal: undefined,\n @maxSize: 10 \n */\n selectItemsBy?:\n | NonNullable<\n CommonSearchWithEntityContext['sort']\n >[number]['selectItemsBy']\n | null;\n }[];\n /** \n Aggregations, also known as faceted search. Lets you explore large amounts of data by displaying summaries about different partitions of the data, and narrow the navigation to a specific partition. \n @maxSize: 10 \n */\n aggregations?: {\n /** \n Value aggregation. \n */\n value?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['value'];\n /** \n Range aggregation. \n */\n range?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['range'];\n /** \n Scalar aggregation. \n */\n scalar?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['scalar'];\n /** \n Date histogram aggregation. \n */\n dateHistogram?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['dateHistogram'];\n /** \n Nested aggregation. \n */\n nested?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['nested'];\n /** \n User-defined name for the aggregation. Must be unique. Appears in the aggregation results. \n @maxLength: 100 \n */\n name?:\n | NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['name']\n | null;\n /** \n Type of aggregation. Must match the aggregation type provided in the `kind` field. \n */\n type?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['type'];\n /** \n Field to aggregate by. Use dot notation to specify the JSON path. \n @maxLength: 200 \n */\n fieldPath?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['fieldPath'];\n }[];\n /** \n Free text to match in searchable fields. \n */\n search?: {\n /** \n How separate search terms in `expression` are combined. \n */\n mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];\n /** \n Search term or expression. \n @maxLength: 100 \n */\n expression?:\n | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n | null;\n /** \n Fields to search in. If empty, searches all searchable fields. Use dot notation to specify the JSON path. \n @maxLength: 200,\n @maxSize: 20 \n */\n fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n /** \n Whether to use fuzzy search, which allows typos using a managed proximity algorithm. \n */\n fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n };\n /** \n UTC offset or IANA time zone. Valid values are\n ISO 8601 UTC offsets, such as +02:00 or -06:00,\n and IANA time zone IDs, such as Europe/Rome.\n\n Affects the values returned by all filters and aggregations.\n You can override this behavior in a specific filter by providing\n timestamps that include a time zone. For example, `\"2023-12-20T10:52:34.795Z\"`. \n @maxLength: 50 \n */\n timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\n/**\n * Retrieves the number of contacts that match the provided filter and search criteria.\n * @public\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.CountContacts\n */\nexport async function countContacts(\n options?: CountContactsOptions\n): Promise<NonNullablePaths<CountContactsResponse, `count`, 0>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n search: options?.search,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.countContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n search: '$[0].search',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountContactsOptions {\n /**\n * Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match.\n *\n * Supported search properties are:\n *\n * - `name.full`\n * - `email.email`\n * - `phone.phone`\n * - `member_info.email`\n * - `member_info.profile_info.nickname`\n * - `company.name`\n * - `company.job_title`\n *\n * Max: 100 characters\n * @maxLength 100\n */\n search?: string | null;\n}\n\n/**\n * Generates an upload URL to allow external clients to upload a contact image.\n * To learn how external clients can use the generated upload URL in the response to upload a file,\n * see the [Upload API](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/upload-api) article.\n *\n * You can call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to query the status of the image upload.\n * @param contactId - ID of the contact to generate an image upload URL for.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.GENERATE_IMAGE_UPLOAD_URL\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.GenerateContactImageUploadUrl\n */\nexport async function generateContactImageUploadUrl(\n contactId: string,\n options?: GenerateContactImageUploadUrlOptions\n): Promise<\n NonNullablePaths<\n GenerateContactImageUploadUrlResponse,\n `uploadUrl` | `imageUploadId`,\n 0\n > & {\n __applicationErrorsType?: GenerateContactImageUploadUrlApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n mimeType: options?.mimeType,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.generateContactImageUploadUrl(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n mimeType: '$[1].mimeType',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateContactImageUploadUrlOptions {\n /**\n * MIME type. Must be one of: `image/png`, `image/jpeg`.\n *\n * Default: `image/png`\n * @maxLength 100\n */\n mimeType?: string | null;\n}\n\n/**\n * Adds an additional email to a contact.\n *\n * The contact must have a main email (`email.email`) before an additional email can be added.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param contactId - ID of the contact to add an email to.\n * @param email - Email to add.\n * @public\n * @requiredField contactId\n * @requiredField email\n * @requiredField options\n * @requiredField options.revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.AddContactAdditionalEmail\n */\nexport async function addContactAdditionalEmail(\n contactId: string,\n email: AdditionalEmail,\n options: NonNullablePaths<AddContactAdditionalEmailOptions, `revision`, 0>\n): Promise<\n NonNullablePaths<\n AddContactAdditionalEmailResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAdditionalEmailApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n email: email,\n revision: options?.revision,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.addContactAdditionalEmail(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n email: '$[1]',\n revision: '$[2].revision',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'email', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddContactAdditionalEmailOptions {\n /** Contact revision number. */\n revision: string | null;\n}\n\n/**\n * Adds an additional phone to a contact.\n *\n * The contact must have a main phone (`phone.phone`) before an additional phone can be added. If the contact already has the same phone number with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param contactId - ID of the contact to add a phone to.\n * @param phone - Phone to add.\n * @public\n * @requiredField contactId\n * @requiredField options\n * @requiredField options.revision\n * @requiredField phone\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.AddContactAdditionalPhone\n */\nexport async function addContactAdditionalPhone(\n contactId: string,\n phone: AdditionalPhone,\n options: NonNullablePaths<AddContactAdditionalPhoneOptions, `revision`, 0>\n): Promise<\n NonNullablePaths<\n AddContactAdditionalPhoneResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAdditionalPhoneApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n phone: phone,\n revision: options?.revision,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.addContactAdditionalPhone(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n phone: '$[1]',\n revision: '$[2].revision',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'phone', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddContactAdditionalPhoneOptions {\n /** Contact revision number. */\n revision: string | null;\n}\n\n/**\n * Adds an address to a contact.\n *\n * The address is appended to the contact's list of addresses. If the contact already has the same address with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param contactId - ID of the contact to add an address to.\n * @param address - Address to add.\n * @public\n * @requiredField address\n * @requiredField contactId\n * @requiredField options\n * @requiredField options.revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.AddContactAddress\n */\nexport async function addContactAddress(\n contactId: string,\n address: ContactAddress,\n options: NonNullablePaths<AddContactAddressOptions, `revision`, 0>\n): Promise<\n NonNullablePaths<\n AddContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAddressApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n address: address,\n revision: options?.revision,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'address.address' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.addContactAddress(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n address: '$[1]',\n revision: '$[2].revision',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'address', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddContactAddressOptions {\n /** Contact revision number. */\n revision: string | null;\n}\n\n/**\n * Deletes an address from a contact by address ID.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param revision - Contact revision number.\n * @public\n * @requiredField identifiers\n * @requiredField identifiers.addressId\n * @requiredField identifiers.contactId\n * @requiredField revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.DeleteContactAddress\n */\nexport async function deleteContactAddress(\n identifiers: NonNullablePaths<\n DeleteContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n revision: string\n): Promise<\n NonNullablePaths<\n DeleteContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: DeleteContactAddressApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: identifiers?.contactId,\n addressId: identifiers?.addressId,\n revision: revision,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.deleteContactAddress(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0].contactId',\n addressId: '$[0].addressId',\n revision: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers', 'revision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteContactAddressIdentifiers {\n /**\n * ID of the contact to delete the address from.\n * @format GUID\n */\n contactId: string;\n /**\n * ID of the address to delete.\n * @format GUID\n */\n addressId: string;\n}\n\n/**\n * Updates an address on a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @public\n * @requiredField address\n * @requiredField identifiers\n * @requiredField identifiers.addressId\n * @requiredField identifiers.contactId\n * @requiredField options\n * @requiredField options.revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.UpdateContactAddress\n */\nexport async function updateContactAddress(\n identifiers: NonNullablePaths<\n UpdateContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n address: UpdateContactAddress,\n options: NonNullablePaths<UpdateContactAddressOptions, `revision`, 0>\n): Promise<\n NonNullablePaths<\n UpdateContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: UpdateContactAddressApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contactId: identifiers?.contactId,\n address: { ...address, id: identifiers?.addressId },\n revision: options?.revision,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'address.address' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.updateContactAddress(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { address: '$[1]' },\n explicitPathsToArguments: {\n contactId: '$[0].contactId',\n 'address.id': '$[0].addressId',\n revision: '$[2].revision',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers', 'address', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateContactAddressIdentifiers {\n /**\n * ID of the contact to update the address on.\n * @format GUID\n */\n contactId: string;\n /**\n * Address ID.\n * @format GUID\n */\n addressId?: string | null;\n}\n\nexport interface UpdateContactAddress {\n /**\n * Address type classification. Helps categorize the address purpose.\n *\n * Default: `OTHER`\n */\n tag?: AddressTagWithLiterals;\n /**\n * Physical address information including street, city, country, and postal code.\n * Contains structured address data following common address formatting standards.\n */\n address?: Address;\n /**\n * Whether this address is the contact's default address.\n * Only one address can be designated as default per contact.\n * If no address is explicitly set as default, the first address automatically becomes the default.\n */\n defaultAddress?: boolean | null;\n /**\n * Address ID.\n * @format GUID\n */\n _id?: string | null;\n /** Address recipient information for delivery purposes. */\n recipient?: Recipient;\n}\n\nexport interface UpdateContactAddressOptions {\n /** Contact revision number. */\n revision: string | null;\n}\n\n/**\n * Creates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily has no image. Once the upload succeeds, the contact's image is updated.\n *\n * To create a single contact, call [Create Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/create-contact).\n * @param contacts - Contacts to create.\n * @public\n * @requiredField contacts\n * @permissionId CONTACTS.CONTACT_CREATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkCreateContacts\n */\nexport async function bulkCreateContacts(\n contacts: Contact[],\n options?: BulkCreateContactsOptions\n): Promise<\n NonNullablePaths<\n BulkCreateContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contacts: contacts,\n returnEntity: options?.returnEntity,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'contacts.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'contacts.addresses.address' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.bulkCreateContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.item.image' },\n { path: 'results.item.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'results.item.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contacts: '$[0]',\n returnEntity: '$[1].returnEntity',\n allowDuplicates: '$[1].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['contacts', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateContactsOptions {\n /** Whether to include the created contacts in the response. */\n returnEntity?: boolean;\n /** Whether to create the contact even if it duplicates an existing contact. */\n allowDuplicates?: boolean;\n}\n\n/**\n * Updates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily keeps its previous image. Once the upload succeeds, the contact's image is updated.\n *\n * `externalId` can be set only once. If it already has a value, it can't be updated.\n *\n * To update a single contact, call [Update Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact).\n * @param contacts - Contacts to update.\n * @public\n * @requiredField contacts\n * @requiredField contacts.contact._id\n * @requiredField contacts.contact.revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkUpdateContacts\n */\nexport async function bulkUpdateContacts(\n contacts: NonNullablePaths<\n MaskedContact,\n `contact._id` | `contact.revision`,\n 1\n >[],\n options?: BulkUpdateContactsOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contacts: contacts,\n returnEntity: options?.returnEntity,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'contacts.contact.image' },\n { path: 'contacts.contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'contacts.contact.addresses.address' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.bulkUpdateContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.item.image' },\n { path: 'results.item.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'results.item.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contacts: '$[0]',\n returnEntity: '$[1].returnEntity',\n allowDuplicates: '$[1].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['contacts', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateContactsOptions {\n /** Whether to include the updated contacts in the response. */\n returnEntity?: boolean;\n /** Whether to update the contact even if it becomes a duplicate of another contact. */\n allowDuplicates?: boolean;\n}\n\n/**\n * Adds or removes tags on multiple contacts, specified by contact ID. Works synchronously.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n * @param contactIds - IDs of the contacts to add or remove tags on.\n * @public\n * @requiredField contactIds\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkUpdateContactTags\n */\nexport async function bulkUpdateContactTags(\n contactIds: string[],\n options?: BulkUpdateContactTagsOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateContactTagsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n > & {\n __applicationErrorsType?: BulkUpdateContactTagsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactIds: contactIds,\n returnEntity: options?.returnEntity,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.bulkUpdateContactTags(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.item.image' },\n { path: 'results.item.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'results.item.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactIds: '$[0]',\n returnEntity: '$[1].returnEntity',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n },\n singleArgumentUnchanged: false,\n },\n ['contactIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateContactTagsOptions {\n /** Whether to include the updated contacts in the response. */\n returnEntity?: boolean;\n /** Tags to assign. */\n assignTags?: PrivateTags;\n /** Tags to unassign. */\n unassignTags?: PrivateTags;\n}\n\n/**\n * Adds or removes tags on multiple contacts that match the provided filter. Works asynchronously. An empty filter matches all contacts.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n * @param filter - Filter object. See documentation [here](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters).\n * @public\n * @requiredField filter\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkUpdateContactTagsByFilter\n */\nexport async function bulkUpdateContactTagsByFilter(\n filter: Record<string, any>,\n options?: BulkUpdateContactTagsByFilterOptions\n): Promise<\n NonNullablePaths<BulkUpdateContactTagsByFilterResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkUpdateContactTagsByFilterApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n search: options?.search,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.bulkUpdateContactTagsByFilter(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0]',\n search: '$[1].search',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateContactTagsByFilterOptions {\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /** Tags to assign to the matching contacts. */\n assignTags?: PrivateTags;\n /** Tags to unassign from the matching contacts. */\n unassignTags?: PrivateTags;\n}\n\n/**\n * Creates or updates multiple contacts in a single request. Works synchronously.\n *\n * Each contact is matched against existing contacts using the [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) logic. If a match is found, the contact is updated. Otherwise, a new contact is created.\n *\n * When a contact is updated, `upsertMode` controls how:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * In `APPEND` or `OVERWRITE_APPEND_ARRAYS` mode, the default address flag is ignored unless the contact has no existing addresses.\n *\n * When you provide an image URL and the upsert mode allows the image to be updated, the image is uploaded in the background. The returned contact temporarily has no image if it was created, or its previous image if it was updated. Once the upload succeeds, the contact's image is updated.\n *\n * To create or update a single contact, call [Upsert Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/upsert-contact).\n * @param contacts - Contacts to create or update.\n * @public\n * @requiredField contacts\n * @permissionId CONTACTS.CONTACT_UPSERT\n * @permissionId CONTACTS.CONTACT_MEMBER_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkUpsertContacts\n */\nexport async function bulkUpsertContacts(\n contacts: BulkUpsertContactsRequestMaskedContact[],\n options?: BulkUpsertContactsOptions\n): Promise<\n NonNullablePaths<\n BulkUpsertContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `results.${number}.action`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contacts: contacts,\n returnEntity: options?.returnEntity,\n upsertMode: options?.upsertMode,\n updateMember: options?.updateMember,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'contacts.contact.image' },\n { path: 'contacts.contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'contacts.contact.addresses.address' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.bulkUpsertContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.item.image' },\n { path: 'results.item.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'results.item.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contacts: '$[0]',\n returnEntity: '$[1].returnEntity',\n upsertMode: '$[1].upsertMode',\n updateMember: '$[1].updateMember',\n },\n singleArgumentUnchanged: false,\n },\n ['contacts', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpsertContactsOptions {\n /** Whether to include the upserted contacts in the response. */\n returnEntity?: boolean;\n /** Mode that determines how an existing contact is updated when a match is found. See the endpoint description for the supported modes. */\n upsertMode?: UpsertModeWithLiterals;\n /** Whether to update a contact even if it's a site member. */\n updateMember?: boolean | null;\n}\n\n/**\n * Deletes multiple contacts in a single request. Works synchronously.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * To delete a single contact, call [Delete Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/delete-contact).\n * @param contactIds - IDs of the contacts to delete.\n * @public\n * @requiredField contactIds\n * @permissionId CONTACTS.CONTACT_DELETE\n * @permissionId MEMBERS.MEMBER_DELETE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkDeleteContacts\n */\nexport async function bulkDeleteContacts(\n contactIds: string[],\n options?: BulkDeleteContactsOptions\n): Promise<\n NonNullablePaths<\n BulkDeleteContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n > & {\n __applicationErrorsType?: BulkDeleteContactsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactIds: contactIds,\n deleteMembers: options?.deleteMembers,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.bulkDeleteContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactIds: '$[0]',\n deleteMembers: '$[1].deleteMembers',\n },\n singleArgumentUnchanged: false,\n },\n ['contactIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkDeleteContactsOptions {\n /**\n * Whether to delete the associated site member for any contact that's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\n/**\n * Deletes multiple contacts that match the provided filter. Works asynchronously.\n *\n * All contacts that meet the specified `filter` and `search` criteria are deleted. The request must contain a `filter` value, a `search` value, or both. To preview which contacts match before deleting, call [Search Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/search-contacts) with the same criteria.\n *\n * To check the status of the bulk deletion, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * Individual contacts can fail during processing. These failures appear in the job's results with one of the following error codes:\n * - `CANNOT_DELETE_SITE_MEMBERS`: Contact is a site member and can't be deleted. The site member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION`: Contact has an active billing subscription and can't be deleted.\n * - `CANNOT_DELETE_WIX_USERS_MEMBER`: Site member can't be deleted because it's the owner or a contributor.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION`: Site member was deleted, but the contact was not.\n * - `FAILED_DELETE_CONTACT`: Contact couldn't be deleted.\n * @param filter - Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n * @public\n * @requiredField filter\n * @permissionId CONTACTS.CONTACT_DELETE\n * @permissionId MEMBERS.MEMBER_DELETE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkDeleteContactsByFilter\n */\nexport async function bulkDeleteContactsByFilter(\n filter: Record<string, any>,\n options?: BulkDeleteContactsByFilterOptions\n): Promise<\n NonNullablePaths<BulkDeleteContactsByFilterResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkDeleteContactsByFilterApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n search: options?.search,\n deleteMembers: options?.deleteMembers,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.bulkDeleteContactsByFilter(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0]',\n search: '$[1].search',\n deleteMembers: '$[1].deleteMembers',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkDeleteContactsByFilterOptions {\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /**\n * Whether to delete the associated site member for any contact that's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\n/**\n * Permanently deletes a contact from the trash bin.\n *\n * After removal, the contact can no longer be restored.\n * @param contactId - ID of the contact to permanently delete from the trash bin.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_REMOVE_FROM_TRASHBIN\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.RemoveContactFromTrashBin\n */\nexport async function removeContactFromTrashBin(\n contactId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.removeContactFromTrashBin(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['contactId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Restores a soft-deleted contact from the trash bin.\n *\n * To restore multiple contacts in a single request, call [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n * @param contactId - ID of the contact to restore from the trash bin.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_RESTORE_FROM_TRASHBIN\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.RestoreContactFromTrashBin\n */\nexport async function restoreContactFromTrashBin(\n contactId: string\n): Promise<\n NonNullablePaths<\n RestoreContactFromTrashBinResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.restoreContactFromTrashBin(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['contactId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Restores multiple soft-deleted contacts from the trash bin.\n *\n * To restore a single contact, call [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin).\n * @public\n * @permissionId CONTACTS.CONTACT_RESTORE_FROM_TRASHBIN\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkRestoreContactsFromTrashBin\n */\nexport async function bulkRestoreContactsFromTrashBin(\n options?: BulkRestoreContactsFromTrashBinOptions\n): Promise<\n NonNullablePaths<\n BulkRestoreContactsFromTrashBinResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactIds: options?.contactIds,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.bulkRestoreContactsFromTrashBin(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.item.image' },\n { path: 'results.item.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'results.item.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactIds: '$[0].contactIds',\n returnEntity: '$[0].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkRestoreContactsFromTrashBinOptions {\n /**\n * IDs of the contacts to restore from the trash bin.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds?: string[];\n /** Whether to include the restored contacts in the response. */\n returnEntity?: boolean;\n}\n\n/**\n * Retrieves a soft-deleted contact from the trash bin by ID.\n * @param contactId - ID of the contact to retrieve from the trash bin.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_READ_FROM_TRASHBIN\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.GetDeletedContact\n */\nexport async function getDeletedContact(\n contactId: string\n): Promise<\n NonNullablePaths<\n GetDeletedContactResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.getDeletedContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['contactId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of soft-deleted contacts from the trash bin, filtered by the provided identifiers and deletion date range.\n * @public\n * @permissionId CONTACTS.CONTACT_READ_FROM_TRASHBIN\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.ListDeletedContacts\n */\nexport async function listDeletedContacts(\n options?: ListDeletedContactsOptions\n): Promise<\n NonNullablePaths<\n ListDeletedContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n externalId: options?.externalId,\n email: options?.email,\n phone: options?.phone,\n contactIds: options?.contactIds,\n deletedFromDate: options?.deletedFromDate,\n deletedToDate: options?.deletedToDate,\n paging: options?.paging,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.listDeletedContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'contacts.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n externalId: '$[0].externalId',\n email: '$[0].email',\n phone: '$[0].phone',\n contactIds: '$[0].contactIds',\n deletedFromDate: '$[0].deletedFromDate',\n deletedToDate: '$[0].deletedToDate',\n paging: '$[0].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListDeletedContactsOptions {\n /**\n * External ID.\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Email address.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string | null;\n /**\n * Phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string | null;\n /**\n * Contact IDs.\n * @maxSize 100\n * @format GUID\n */\n contactIds?: string[];\n /** Filters to contacts deleted on or after this date and time. */\n deletedFromDate?: Date | null;\n /** Filters to contacts deleted on or before this date and time. */\n deletedToDate?: Date | null;\n /** Cursor paging. */\n paging?: CursorPaging;\n}\n\n/**\n * Retrieves the status of the contact image upload process.\n * @public\n * @requiredField identifiers\n * @requiredField identifiers.contactId\n * @requiredField identifiers.imageUploadId\n * @permissionId CONTACTS.CONTACT_IMAGE_STATUS_READ\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.GetContactImageUploadStatus\n */\nexport async function getContactImageUploadStatus(\n identifiers: NonNullablePaths<\n GetContactImageUploadStatusIdentifiers,\n `contactId` | `imageUploadId`,\n 0\n >\n): Promise<\n NonNullablePaths<GetContactImageUploadStatusResponse, `status`, 0> & {\n __applicationErrorsType?: GetContactImageUploadStatusApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: identifiers?.contactId,\n imageUploadId: identifiers?.imageUploadId,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.getContactImageUploadStatus(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0].contactId',\n imageUploadId: '$[0].imageUploadId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetContactImageUploadStatusIdentifiers {\n /**\n * ID of the contact whose image upload status to retrieve.\n * @format GUID\n */\n contactId: string;\n /**\n * The upload ID of the image upload process. Returned when an image URL is provided while creating or updating a contact, or from [Generate Contact Image Upload Url](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/generate-contact-image-upload-url).\n * @maxLength 100\n */\n imageUploadId: string;\n}\n\n/**\n * Adds a country code to the main phone of multiple contacts that match the provided filter. Works asynchronously.\n *\n * A contact's main phone is changed only if adding the country code produces a valid phone number. Otherwise, the contact is left unchanged.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n * @public\n * @requiredField options.countryCode\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkUpdatePhoneCountryCodeByFilter\n */\nexport async function bulkUpdatePhoneCountryCodeByFilter(\n options?: NonNullablePaths<\n BulkUpdatePhoneCountryCodeByFilterOptions,\n `countryCode`,\n 0\n >\n): Promise<\n NonNullablePaths<BulkUpdatePhoneCountryCodeByFilterResponse, `jobId`, 0>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n search: options?.search,\n countryCode: options?.countryCode,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.bulkUpdatePhoneCountryCodeByFilter(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n search: '$[0].search',\n countryCode: '$[0].countryCode',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdatePhoneCountryCodeByFilterOptions {\n /**\n * A filter for the contacts that the country code will be applied to.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /** Free text to match in searchable fields for the contacts that the country code will be applied to. */\n search?: SearchDetails;\n /**\n * [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code to apply.\n *\n * Applied only to contacts whose phone number isn't already in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format. If the phone number still can't be converted to E.164 format after applying the country code, that contact fails with `PHONE_CANNOT_BE_FIXED_WITH_COUNTRY_CODE`.\n * @format COUNTRY\n */\n countryCode: string;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixContactsV5ContactsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n _: [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixContactsV5ContactSubscriptionsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n _: [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_crm_contacts-v-5';\n\n/**\n * Updates the email and SMS marketing subscription statuses of multiple contacts that match the provided filter. Works asynchronously.\n *\n * If a requested subscription status matches a contact's current status, that contact is left unchanged. Provide at least one of `emailSubscriptionStatus` or `phoneSubscriptionStatus`.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n */\nexport function bulkUpdateContactSubscriptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateContactSubscriptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn:\n 'wix.contacts.v5.ContactSubscriptions.BulkUpdateContactSubscriptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactSubscriptionsUrl({\n protoPath: '/v5/bulk/contacts/subscriptions/update',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdateContactSubscriptions;\n}\n\n/**\n * Creates a contact.\n *\n * At least one of `name.first`, `name.last`, `email.email`, or `phone.phone` must be provided.\n *\n * Duplicate handling: By default, creation fails if a contact with the same identifiers (`externalId`, `email.email`, or `phone.phone`) already exists. Set `allowDuplicates` to `true` to bypass this check. Learn more about [contact matching and duplicates](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create multiple contacts in a single request, call [Bulk Create Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-create-contacts).\n */\nexport function createContact(payload: object): RequestOptionsFactory<any> {\n function __createContact({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n { path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate' },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.CreateContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createContact;\n}\n\n/** Retrieves a single contact by ID. */\nexport function getContact(payload: object): RequestOptionsFactory<any> {\n function __getContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.GetContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getContact;\n}\n\n/**\n * Updates a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed when updating the contact. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * Restrictions:\n * - `externalId` can be set only once and can't be changed after creation.\n * - The main email of a contact that is a site member can't be changed. Update it through the [Members API](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/member-management/members/introduction) instead.\n * - At least one of `name`, `email`, or `phone` must remain after the update.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To update multiple contacts in a single request, call [Bulk Update Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contacts).\n */\nexport function updateContact(payload: object): RequestOptionsFactory<any> {\n function __updateContact({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n { path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate' },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'PATCH' as any,\n methodFqn: 'wix.contacts.v5.Contacts.UpdateContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contact.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateContact;\n}\n\n/**\n * Creates a contact, or updates an existing one when a match is found based on the contact's identifiers.\n *\n * Matching uses `externalId`, `email.email`, and `phone.phone` to find an existing contact. See [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) for the detailed matching rules.\n *\n * Upsert modes: Set `upsertMode` to control how an existing contact is updated:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * Member contacts: Set `updateMember` to `true` when upserting a contact that is a site member.\n *\n * The response's `action` field indicates whether the contact was `CREATED` or `UPDATED`.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create or update multiple contacts in a single request, call [Bulk Upsert Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-upsert-contacts).\n */\nexport function upsertContact(payload: object): RequestOptionsFactory<any> {\n function __upsertContact({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n { path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate' },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.UpsertContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/upsert',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __upsertContact;\n}\n\n/**\n * Adds or removes tags on a contact.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags on multiple contacts, call [Bulk Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contact-tags).\n */\nexport function updateContactTags(payload: object): RequestOptionsFactory<any> {\n function __updateContactTags({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.UpdateContactTags',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/update-tags',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateContactTags;\n}\n\n/**\n * Merges up to 5 source contacts into a target contact.\n *\n * The current target contact revision must be passed as `targetContactRevision`. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * The merge behaves in one of two ways, depending on whether you provide `targetContact` in the request:\n *\n * - Without `targetContact`: The source contacts are merged into the existing target contact. Non-empty fields from the sources fill empty fields on the target, and array fields (emails, phones, and addresses) are combined and deduplicated. When you provide multiple sources, they're merged in order: the first source into the second, that result into the third, and so on, and finally into the target. Earlier sources take precedence over later ones.\n * - With `targetContact`: The provided `targetContact` overwrites the target according to `fieldMask`, and the source contacts are deleted without their data being merged in.\n *\n * In both cases, the source contacts are permanently deleted after a successful merge.\n *\n * Set `preview` to `true` to return the merged result without applying it, so you can review the outcome before committing.\n *\n * Restrictions:\n * - Source contacts can't be site members. The target contact can be a site member.\n * - `externalId` can be set only once and can't be changed if it already has a value.\n * - The target contact must remain valid after the merge, keeping at least one of `name`, `email`, or `phone`.\n */\nexport function mergeContacts(payload: object): RequestOptionsFactory<any> {\n function __mergeContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'targetContact.createdDate' },\n { path: 'targetContact.updatedDate' },\n { path: 'targetContact.email.subscriptionStatus.updatedDate' },\n { path: 'targetContact.phone.subscriptionStatus.updatedDate' },\n { path: 'targetContact.image.urlExpirationDate' },\n { path: 'targetContact.lastActivity.date' },\n { path: 'targetContact.memberInfo.signupDate' },\n {\n path: 'targetContact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'targetContact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'targetContact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'targetContact.addresses.address.geocode.latitude' },\n { path: 'targetContact.addresses.address.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.MergeContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{targetContactId}/merge',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __mergeContacts;\n}\n\n/**\n * Deletes a contact.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin). After 90 days, they're permanently deleted.\n *\n * Member contacts: To delete a contact that is also a site member, set `deleteMember` to `true`. This deletes both the contact and the member.\n *\n * Restrictions:\n * - A contact with an active billing subscription can't be deleted.\n * - A site owner or contributor can't be deleted.\n *\n * To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-delete-contacts).\n */\nexport function deleteContact(payload: object): RequestOptionsFactory<any> {\n function __deleteContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'DELETE' as any,\n methodFqn: 'wix.contacts.v5.Contacts.DeleteContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteContact;\n}\n\n/**\n * Retrieves a list of up to 100 contacts that match the provided identifiers.\n *\n * Matching uses `externalId`, `email`, and `phone` to find contacts that likely represent the same person. Provide at least one identifier.\n *\n * Results are ordered by match strength: contacts matching more or higher-priority identifiers appear first. Within each group, contacts are ordered by creation date, oldest first. Identifier priority is `externalId` (highest), then `email`, then `phone` (lowest).\n *\n * Learn more about [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\nexport function findMatchingContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __findMatchingContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.FindMatchingContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/find-matching',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contacts.createdDate' },\n { path: 'contacts.updatedDate' },\n { path: 'contacts.email.subscriptionStatus.updatedDate' },\n { path: 'contacts.phone.subscriptionStatus.updatedDate' },\n { path: 'contacts.image.urlExpirationDate' },\n { path: 'contacts.lastActivity.date' },\n { path: 'contacts.memberInfo.signupDate' },\n {\n path: 'contacts.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contacts.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contacts.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contacts.addresses.address.geocode.latitude' },\n { path: 'contacts.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __findMatchingContacts;\n}\n\n/**\n * Retrieves a list of up to 100 contacts, given the provided filtering, sorting, and cursor paging.\n *\n *\n * Query Contacts runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\nexport function queryContacts(payload: object): RequestOptionsFactory<any> {\n function __queryContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.QueryContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contacts.createdDate' },\n { path: 'contacts.updatedDate' },\n { path: 'contacts.email.subscriptionStatus.updatedDate' },\n { path: 'contacts.phone.subscriptionStatus.updatedDate' },\n { path: 'contacts.image.urlExpirationDate' },\n { path: 'contacts.lastActivity.date' },\n { path: 'contacts.memberInfo.signupDate' },\n {\n path: 'contacts.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contacts.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contacts.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contacts.addresses.address.geocode.latitude' },\n { path: 'contacts.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryContacts;\n}\n\n/**\n * Retrieves a list of contacts using a free-text search combined with filtering and sorting.\n *\n * Search combines free-text matching with filtering, sorting, and cursor paging. To learn about the query syntax, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n *\n * Searchable properties: `name.full`, `email.email`, `phone.phone`, `company.name`, `company.jobTitle`, `memberInfo.email`, and `memberInfo.profileInfo.nickname`.\n *\n * Name format: Set `nameFormat` to control how names are matched and ordered:\n * - `BY_FIRST_NAME`: Orders by first name, then last name.\n * - `BY_LAST_NAME`: Orders by last name, then first name.\n */\nexport function searchContacts(payload: object): RequestOptionsFactory<any> {\n function __searchContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'search.aggregations.range.buckets.from' },\n { path: 'search.aggregations.range.buckets.to' },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',\n },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.SearchContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/search',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contacts.createdDate' },\n { path: 'contacts.updatedDate' },\n { path: 'contacts.email.subscriptionStatus.updatedDate' },\n { path: 'contacts.phone.subscriptionStatus.updatedDate' },\n { path: 'contacts.image.urlExpirationDate' },\n { path: 'contacts.lastActivity.date' },\n { path: 'contacts.memberInfo.signupDate' },\n {\n path: 'contacts.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contacts.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contacts.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contacts.addresses.address.geocode.latitude' },\n { path: 'contacts.addresses.address.geocode.longitude' },\n { path: 'aggregationData.results.ranges.results.from' },\n { path: 'aggregationData.results.ranges.results.to' },\n {\n path: 'aggregationData.results.nested.results.results.*.range.from',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.to',\n },\n { path: 'aggregationData.results.scalar.value' },\n {\n path: 'aggregationData.results.nested.results.results.*.scalar.value',\n },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/search',\n data: serializedData,\n host,\n }),\n data: serializedData,\n },\n ],\n };\n\n return metadata;\n }\n\n return __searchContacts;\n}\n\n/** Retrieves the number of contacts that match the provided filter and search criteria. */\nexport function countContacts(payload: object): RequestOptionsFactory<any> {\n function __countContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.CountContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countContacts;\n}\n\n/**\n * Generates an upload URL to allow external clients to upload a contact image.\n * To learn how external clients can use the generated upload URL in the response to upload a file,\n * see the [Upload API](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/upload-api) article.\n *\n * You can call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to query the status of the image upload.\n */\nexport function generateContactImageUploadUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateContactImageUploadUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.GenerateContactImageUploadUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/image/upload-url',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateContactImageUploadUrl;\n}\n\n/**\n * Adds an additional email to a contact.\n *\n * The contact must have a main email (`email.email`) before an additional email can be added.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\nexport function addContactAdditionalEmail(\n payload: object\n): RequestOptionsFactory<any> {\n function __addContactAdditionalEmail({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.AddContactAdditionalEmail',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/additional-emails',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addContactAdditionalEmail;\n}\n\n/**\n * Adds an additional phone to a contact.\n *\n * The contact must have a main phone (`phone.phone`) before an additional phone can be added. If the contact already has the same phone number with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\nexport function addContactAdditionalPhone(\n payload: object\n): RequestOptionsFactory<any> {\n function __addContactAdditionalPhone({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.AddContactAdditionalPhone',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/additional-phones',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addContactAdditionalPhone;\n}\n\n/**\n * Adds an address to a contact.\n *\n * The address is appended to the contact's list of addresses. If the contact already has the same address with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\nexport function addContactAddress(payload: object): RequestOptionsFactory<any> {\n function __addContactAddress({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'address.address.geocode.latitude' },\n { path: 'address.address.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.AddContactAddress',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/addresses',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addContactAddress;\n}\n\n/**\n * Deletes an address from a contact by address ID.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\nexport function deleteContactAddress(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteContactAddress({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'DELETE' as any,\n methodFqn: 'wix.contacts.v5.Contacts.DeleteContactAddress',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/addresses/{addressId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __deleteContactAddress;\n}\n\n/**\n * Updates an address on a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\nexport function updateContactAddress(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateContactAddress({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'address.address.geocode.latitude' },\n { path: 'address.address.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'PATCH' as any,\n methodFqn: 'wix.contacts.v5.Contacts.UpdateContactAddress',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/addresses/{address.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateContactAddress;\n}\n\n/**\n * Creates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily has no image. Once the upload succeeds, the contact's image is updated.\n *\n * To create a single contact, call [Create Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/create-contact).\n */\nexport function bulkCreateContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'contacts.createdDate' },\n { path: 'contacts.updatedDate' },\n { path: 'contacts.email.subscriptionStatus.updatedDate' },\n { path: 'contacts.phone.subscriptionStatus.updatedDate' },\n { path: 'contacts.image.urlExpirationDate' },\n { path: 'contacts.lastActivity.date' },\n { path: 'contacts.memberInfo.signupDate' },\n { path: 'contacts.memberInfo.profileInfo.photo.urlExpirationDate' },\n { path: 'contacts.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contacts.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'contacts.addresses.address.geocode.latitude' },\n { path: 'contacts.addresses.address.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkCreateContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.email.subscriptionStatus.updatedDate' },\n { path: 'results.item.phone.subscriptionStatus.updatedDate' },\n { path: 'results.item.image.urlExpirationDate' },\n { path: 'results.item.lastActivity.date' },\n { path: 'results.item.memberInfo.signupDate' },\n {\n path: 'results.item.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'results.item.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'results.item.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.item.addresses.address.geocode.latitude' },\n { path: 'results.item.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateContacts;\n}\n\n/**\n * Updates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily keeps its previous image. Once the upload succeeds, the contact's image is updated.\n *\n * `externalId` can be set only once. If it already has a value, it can't be updated.\n *\n * To update a single contact, call [Update Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact).\n */\nexport function bulkUpdateContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'contacts.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'contacts.contact.createdDate' },\n { path: 'contacts.contact.updatedDate' },\n { path: 'contacts.contact.email.subscriptionStatus.updatedDate' },\n { path: 'contacts.contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contacts.contact.image.urlExpirationDate' },\n { path: 'contacts.contact.lastActivity.date' },\n { path: 'contacts.contact.memberInfo.signupDate' },\n {\n path: 'contacts.contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contacts.contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contacts.contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'contacts.contact.addresses.address.geocode.latitude' },\n { path: 'contacts.contact.addresses.address.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkUpdateContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.email.subscriptionStatus.updatedDate' },\n { path: 'results.item.phone.subscriptionStatus.updatedDate' },\n { path: 'results.item.image.urlExpirationDate' },\n { path: 'results.item.lastActivity.date' },\n { path: 'results.item.memberInfo.signupDate' },\n {\n path: 'results.item.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'results.item.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'results.item.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.item.addresses.address.geocode.latitude' },\n { path: 'results.item.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateContacts;\n}\n\n/**\n * Adds or removes tags on multiple contacts, specified by contact ID. Works synchronously.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n */\nexport function bulkUpdateContactTags(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateContactTags({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkUpdateContactTags',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/update-tags',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.email.subscriptionStatus.updatedDate' },\n { path: 'results.item.phone.subscriptionStatus.updatedDate' },\n { path: 'results.item.image.urlExpirationDate' },\n { path: 'results.item.lastActivity.date' },\n { path: 'results.item.memberInfo.signupDate' },\n {\n path: 'results.item.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'results.item.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'results.item.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.item.addresses.address.geocode.latitude' },\n { path: 'results.item.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateContactTags;\n}\n\n/**\n * Adds or removes tags on multiple contacts that match the provided filter. Works asynchronously. An empty filter matches all contacts.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n */\nexport function bulkUpdateContactTagsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateContactTagsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkUpdateContactTagsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/update-tags-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdateContactTagsByFilter;\n}\n\n/**\n * Creates or updates multiple contacts in a single request. Works synchronously.\n *\n * Each contact is matched against existing contacts using the [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) logic. If a match is found, the contact is updated. Otherwise, a new contact is created.\n *\n * When a contact is updated, `upsertMode` controls how:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * In `APPEND` or `OVERWRITE_APPEND_ARRAYS` mode, the default address flag is ignored unless the contact has no existing addresses.\n *\n * When you provide an image URL and the upsert mode allows the image to be updated, the image is uploaded in the background. The returned contact temporarily has no image if it was created, or its previous image if it was updated. Once the upload succeeds, the contact's image is updated.\n *\n * To create or update a single contact, call [Upsert Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/upsert-contact).\n */\nexport function bulkUpsertContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpsertContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'contacts.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'contacts.contact.createdDate' },\n { path: 'contacts.contact.updatedDate' },\n { path: 'contacts.contact.email.subscriptionStatus.updatedDate' },\n { path: 'contacts.contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contacts.contact.image.urlExpirationDate' },\n { path: 'contacts.contact.lastActivity.date' },\n { path: 'contacts.contact.memberInfo.signupDate' },\n {\n path: 'contacts.contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contacts.contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contacts.contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'contacts.contact.addresses.address.geocode.latitude' },\n { path: 'contacts.contact.addresses.address.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkUpsertContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/upsert',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.email.subscriptionStatus.updatedDate' },\n { path: 'results.item.phone.subscriptionStatus.updatedDate' },\n { path: 'results.item.image.urlExpirationDate' },\n { path: 'results.item.lastActivity.date' },\n { path: 'results.item.memberInfo.signupDate' },\n {\n path: 'results.item.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'results.item.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'results.item.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.item.addresses.address.geocode.latitude' },\n { path: 'results.item.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpsertContacts;\n}\n\n/**\n * Deletes multiple contacts in a single request. Works synchronously.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * To delete a single contact, call [Delete Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/delete-contact).\n */\nexport function bulkDeleteContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkDeleteContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteContacts;\n}\n\n/**\n * Deletes multiple contacts that match the provided filter. Works asynchronously.\n *\n * All contacts that meet the specified `filter` and `search` criteria are deleted. The request must contain a `filter` value, a `search` value, or both. To preview which contacts match before deleting, call [Search Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/search-contacts) with the same criteria.\n *\n * To check the status of the bulk deletion, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * Individual contacts can fail during processing. These failures appear in the job's results with one of the following error codes:\n * - `CANNOT_DELETE_SITE_MEMBERS`: Contact is a site member and can't be deleted. The site member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION`: Contact has an active billing subscription and can't be deleted.\n * - `CANNOT_DELETE_WIX_USERS_MEMBER`: Site member can't be deleted because it's the owner or a contributor.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION`: Site member was deleted, but the contact was not.\n * - `FAILED_DELETE_CONTACT`: Contact couldn't be deleted.\n */\nexport function bulkDeleteContactsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteContactsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkDeleteContactsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/delete-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteContactsByFilter;\n}\n\n/**\n * Permanently deletes a contact from the trash bin.\n *\n * After removal, the contact can no longer be restored.\n */\nexport function removeContactFromTrashBin(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeContactFromTrashBin({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'DELETE' as any,\n methodFqn: 'wix.contacts.v5.Contacts.RemoveContactFromTrashBin',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/trash-bin/{contactId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __removeContactFromTrashBin;\n}\n\n/**\n * Restores a soft-deleted contact from the trash bin.\n *\n * To restore multiple contacts in a single request, call [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n */\nexport function restoreContactFromTrashBin(\n payload: object\n): RequestOptionsFactory<any> {\n function __restoreContactFromTrashBin({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.RestoreContactFromTrashBin',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/trash-bin/{contactId}/restore',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __restoreContactFromTrashBin;\n}\n\n/**\n * Restores multiple soft-deleted contacts from the trash bin.\n *\n * To restore a single contact, call [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin).\n */\nexport function bulkRestoreContactsFromTrashBin(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkRestoreContactsFromTrashBin({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkRestoreContactsFromTrashBin',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/trash-bin/restore',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.email.subscriptionStatus.updatedDate' },\n { path: 'results.item.phone.subscriptionStatus.updatedDate' },\n { path: 'results.item.image.urlExpirationDate' },\n { path: 'results.item.lastActivity.date' },\n { path: 'results.item.memberInfo.signupDate' },\n {\n path: 'results.item.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'results.item.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'results.item.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.item.addresses.address.geocode.latitude' },\n { path: 'results.item.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkRestoreContactsFromTrashBin;\n}\n\n/** Retrieves a soft-deleted contact from the trash bin by ID. */\nexport function getDeletedContact(payload: object): RequestOptionsFactory<any> {\n function __getDeletedContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.GetDeletedContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/trash-bin/{contactId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n {\n path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDeletedContact;\n}\n\n/** Retrieves a list of soft-deleted contacts from the trash bin, filtered by the provided identifiers and deletion date range. */\nexport function listDeletedContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __listDeletedContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'deletedFromDate' }, { path: 'deletedToDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.ListDeletedContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/trash-bin',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contacts.createdDate' },\n { path: 'contacts.updatedDate' },\n { path: 'contacts.email.subscriptionStatus.updatedDate' },\n { path: 'contacts.phone.subscriptionStatus.updatedDate' },\n { path: 'contacts.image.urlExpirationDate' },\n { path: 'contacts.lastActivity.date' },\n { path: 'contacts.memberInfo.signupDate' },\n {\n path: 'contacts.memberInfo.profileInfo.photo.urlExpirationDate',\n },\n { path: 'contacts.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contacts.memberInfo.sessionInfo.lastMobileLogin' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'contacts.addresses.address.geocode.latitude' },\n { path: 'contacts.addresses.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listDeletedContacts;\n}\n\n/** Retrieves the status of the contact image upload process. */\nexport function getContactImageUploadStatus(\n payload: object\n): RequestOptionsFactory<any> {\n function __getContactImageUploadStatus({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.GetContactImageUploadStatus',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/image-upload/{imageUploadId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getContactImageUploadStatus;\n}\n\n/**\n * Adds a country code to the main phone of multiple contacts that match the provided filter. Works asynchronously.\n *\n * A contact's main phone is changed only if adding the country code produces a valid phone number. Otherwise, the contact is left unchanged.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n */\nexport function bulkUpdatePhoneCountryCodeByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdatePhoneCountryCodeByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkUpdatePhoneCountryCodeByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/update-phone-country-code-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdatePhoneCountryCodeByFilter;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AddContactAdditionalEmailApplicationErrors,\n AddContactAdditionalEmailOptions,\n AddContactAdditionalEmailResponse,\n AddContactAdditionalPhoneApplicationErrors,\n AddContactAdditionalPhoneOptions,\n AddContactAdditionalPhoneResponse,\n AddContactAddressApplicationErrors,\n AddContactAddressOptions,\n AddContactAddressResponse,\n AdditionalEmail,\n AdditionalPhone,\n BulkCreateContactsOptions,\n BulkCreateContactsResponse,\n BulkDeleteContactsApplicationErrors,\n BulkDeleteContactsByFilterApplicationErrors,\n BulkDeleteContactsByFilterOptions,\n BulkDeleteContactsByFilterResponse,\n BulkDeleteContactsOptions,\n BulkDeleteContactsResponse,\n BulkRestoreContactsFromTrashBinOptions,\n BulkRestoreContactsFromTrashBinResponse,\n BulkUpdateContactSubscriptionsApplicationErrors,\n BulkUpdateContactSubscriptionsOptions,\n BulkUpdateContactSubscriptionsResponse,\n BulkUpdateContactTagsApplicationErrors,\n BulkUpdateContactTagsByFilterApplicationErrors,\n BulkUpdateContactTagsByFilterOptions,\n BulkUpdateContactTagsByFilterResponse,\n BulkUpdateContactTagsOptions,\n BulkUpdateContactTagsResponse,\n BulkUpdateContactsOptions,\n BulkUpdateContactsResponse,\n BulkUpdatePhoneCountryCodeByFilterOptions,\n BulkUpdatePhoneCountryCodeByFilterResponse,\n BulkUpsertContactsOptions,\n BulkUpsertContactsRequestMaskedContact,\n BulkUpsertContactsResponse,\n Contact,\n ContactAddress,\n ContactQuery,\n ContactSearch,\n ContactsQueryBuilder,\n CountContactsOptions,\n CountContactsResponse,\n CreateContactApplicationErrors,\n CreateContactOptions,\n DeleteContactAddressApplicationErrors,\n DeleteContactAddressIdentifiers,\n DeleteContactAddressResponse,\n DeleteContactApplicationErrors,\n DeleteContactOptions,\n FindMatchingContactsApplicationErrors,\n FindMatchingContactsOptions,\n FindMatchingContactsResponse,\n GenerateContactImageUploadUrlApplicationErrors,\n GenerateContactImageUploadUrlOptions,\n GenerateContactImageUploadUrlResponse,\n GetContactImageUploadStatusApplicationErrors,\n GetContactImageUploadStatusIdentifiers,\n GetContactImageUploadStatusResponse,\n GetDeletedContactResponse,\n ListDeletedContactsOptions,\n ListDeletedContactsResponse,\n MaskedContact,\n MergeContactsApplicationErrors,\n MergeContactsOptions,\n MergeContactsResponse,\n QueryContactsResponse,\n RestoreContactFromTrashBinResponse,\n SearchContactsOptions,\n SearchContactsResponse,\n UpdateContact,\n UpdateContactAddress,\n UpdateContactAddressApplicationErrors,\n UpdateContactAddressIdentifiers,\n UpdateContactAddressOptions,\n UpdateContactAddressResponse,\n UpdateContactApplicationErrors,\n UpdateContactOptions,\n UpdateContactTagsApplicationErrors,\n UpdateContactTagsOptions,\n UpdateContactTagsResponse,\n UpsertContactApplicationErrors,\n UpsertContactOptions,\n UpsertContactResponse,\n addContactAdditionalEmail as universalAddContactAdditionalEmail,\n addContactAdditionalPhone as universalAddContactAdditionalPhone,\n addContactAddress as universalAddContactAddress,\n bulkCreateContacts as universalBulkCreateContacts,\n bulkDeleteContacts as universalBulkDeleteContacts,\n bulkDeleteContactsByFilter as universalBulkDeleteContactsByFilter,\n bulkRestoreContactsFromTrashBin as universalBulkRestoreContactsFromTrashBin,\n bulkUpdateContactSubscriptions as universalBulkUpdateContactSubscriptions,\n bulkUpdateContactTags as universalBulkUpdateContactTags,\n bulkUpdateContactTagsByFilter as universalBulkUpdateContactTagsByFilter,\n bulkUpdateContacts as universalBulkUpdateContacts,\n bulkUpdatePhoneCountryCodeByFilter as universalBulkUpdatePhoneCountryCodeByFilter,\n bulkUpsertContacts as universalBulkUpsertContacts,\n countContacts as universalCountContacts,\n createContact as universalCreateContact,\n deleteContact as universalDeleteContact,\n deleteContactAddress as universalDeleteContactAddress,\n findMatchingContacts as universalFindMatchingContacts,\n generateContactImageUploadUrl as universalGenerateContactImageUploadUrl,\n getContact as universalGetContact,\n getContactImageUploadStatus as universalGetContactImageUploadStatus,\n getDeletedContact as universalGetDeletedContact,\n listDeletedContacts as universalListDeletedContacts,\n mergeContacts as universalMergeContacts,\n queryContacts as universalQueryContacts,\n removeContactFromTrashBin as universalRemoveContactFromTrashBin,\n restoreContactFromTrashBin as universalRestoreContactFromTrashBin,\n searchContacts as universalSearchContacts,\n typedQueryContacts as universalTypedQueryContacts,\n updateContact as universalUpdateContact,\n updateContactAddress as universalUpdateContactAddress,\n updateContactTags as universalUpdateContactTags,\n upsertContact as universalUpsertContact,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/crm' };\n\nexport function bulkUpdateContactSubscriptions(\n httpClient: HttpClient\n): BulkUpdateContactSubscriptionsSignature {\n return (\n filter: Record<string, any>,\n options?: BulkUpdateContactSubscriptionsOptions\n ) =>\n universalBulkUpdateContactSubscriptions(\n filter,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateContactSubscriptionsSignature {\n /**\n * Updates the email and SMS marketing subscription statuses of multiple contacts that match the provided filter. Works asynchronously.\n *\n * If a requested subscription status matches a contact's current status, that contact is left unchanged. Provide at least one of `emailSubscriptionStatus` or `phoneSubscriptionStatus`.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n * @param - A filter for the contacts that the subscription statuses will be applied to.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n (\n filter: Record<string, any>,\n options?: BulkUpdateContactSubscriptionsOptions\n ): Promise<\n NonNullablePaths<BulkUpdateContactSubscriptionsResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkUpdateContactSubscriptionsApplicationErrors;\n }\n >;\n}\n\nexport function createContact(httpClient: HttpClient): CreateContactSignature {\n return (contact: Contact, options?: CreateContactOptions) =>\n universalCreateContact(\n contact,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateContactSignature {\n /**\n * Creates a contact.\n *\n * At least one of `name.first`, `name.last`, `email.email`, or `phone.phone` must be provided.\n *\n * Duplicate handling: By default, creation fails if a contact with the same identifiers (`externalId`, `email.email`, or `phone.phone`) already exists. Set `allowDuplicates` to `true` to bypass this check. Learn more about [contact matching and duplicates](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create multiple contacts in a single request, call [Bulk Create Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-create-contacts).\n * @param - Contact to create.\n * @returns Created contact.\n */\n (contact: Contact, options?: CreateContactOptions): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: CreateContactApplicationErrors;\n }\n >;\n}\n\nexport function getContact(httpClient: HttpClient): GetContactSignature {\n return (contactId: string) =>\n universalGetContact(\n contactId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetContactSignature {\n /**\n * Retrieves a single contact by ID.\n * @param - ID of the contact to retrieve.\n * @returns Retrieved contact.\n */\n (contactId: string): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n >\n >;\n}\n\nexport function updateContact(httpClient: HttpClient): UpdateContactSignature {\n return (\n _id: string,\n contact: NonNullablePaths<UpdateContact, `revision`, 0>,\n options?: UpdateContactOptions\n ) =>\n universalUpdateContact(\n _id,\n contact,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateContactSignature {\n /**\n * Updates a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed when updating the contact. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * Restrictions:\n * - `externalId` can be set only once and can't be changed after creation.\n * - The main email of a contact that is a site member can't be changed. Update it through the [Members API](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/member-management/members/introduction) instead.\n * - At least one of `name`, `email`, or `phone` must remain after the update.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To update multiple contacts in a single request, call [Bulk Update Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contacts).\n * @param - Contact ID.\n * @returns Updated contact.\n */\n (\n _id: string,\n contact: NonNullablePaths<UpdateContact, `revision`, 0>,\n options?: UpdateContactOptions\n ): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: UpdateContactApplicationErrors;\n }\n >;\n}\n\nexport function upsertContact(httpClient: HttpClient): UpsertContactSignature {\n return (contact: Contact, options?: UpsertContactOptions) =>\n universalUpsertContact(\n contact,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpsertContactSignature {\n /**\n * Creates a contact, or updates an existing one when a match is found based on the contact's identifiers.\n *\n * Matching uses `externalId`, `email.email`, and `phone.phone` to find an existing contact. See [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) for the detailed matching rules.\n *\n * Upsert modes: Set `upsertMode` to control how an existing contact is updated:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * Member contacts: Set `updateMember` to `true` when upserting a contact that is a site member.\n *\n * The response's `action` field indicates whether the contact was `CREATED` or `UPDATED`.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create or update multiple contacts in a single request, call [Bulk Upsert Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-upsert-contacts).\n * @param - Contact to upsert.\n */\n (contact: Contact, options?: UpsertContactOptions): Promise<\n NonNullablePaths<\n UpsertContactResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`\n | `action`,\n 5\n > & {\n __applicationErrorsType?: UpsertContactApplicationErrors;\n }\n >;\n}\n\nexport function updateContactTags(\n httpClient: HttpClient\n): UpdateContactTagsSignature {\n return (contactId: string, options?: UpdateContactTagsOptions) =>\n universalUpdateContactTags(\n contactId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateContactTagsSignature {\n /**\n * Adds or removes tags on a contact.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags on multiple contacts, call [Bulk Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contact-tags).\n * @param - ID of the contact whose tags to update.\n */\n (contactId: string, options?: UpdateContactTagsOptions): Promise<\n NonNullablePaths<\n UpdateContactTagsResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: UpdateContactTagsApplicationErrors;\n }\n >;\n}\n\nexport function mergeContacts(httpClient: HttpClient): MergeContactsSignature {\n return (\n targetContactId: string,\n targetContactRevision: string,\n options?: MergeContactsOptions\n ) =>\n universalMergeContacts(\n targetContactId,\n targetContactRevision,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface MergeContactsSignature {\n /**\n * Merges up to 5 source contacts into a target contact.\n *\n * The current target contact revision must be passed as `targetContactRevision`. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * The merge behaves in one of two ways, depending on whether you provide `targetContact` in the request:\n *\n * - Without `targetContact`: The source contacts are merged into the existing target contact. Non-empty fields from the sources fill empty fields on the target, and array fields (emails, phones, and addresses) are combined and deduplicated. When you provide multiple sources, they're merged in order: the first source into the second, that result into the third, and so on, and finally into the target. Earlier sources take precedence over later ones.\n * - With `targetContact`: The provided `targetContact` overwrites the target according to `fieldMask`, and the source contacts are deleted without their data being merged in.\n *\n * In both cases, the source contacts are permanently deleted after a successful merge.\n *\n * Set `preview` to `true` to return the merged result without applying it, so you can review the outcome before committing.\n *\n * Restrictions:\n * - Source contacts can't be site members. The target contact can be a site member.\n * - `externalId` can be set only once and can't be changed if it already has a value.\n * - The target contact must remain valid after the merge, keeping at least one of `name`, `email`, or `phone`.\n * @param - Target contact ID.\n * @param - Revision number of the target contact, which increments by 1 each time the contact is updated.\n * The current revision must be passed to prevent conflicting changes.\n */\n (\n targetContactId: string,\n targetContactRevision: string,\n options?: MergeContactsOptions\n ): Promise<\n NonNullablePaths<\n MergeContactsResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: MergeContactsApplicationErrors;\n }\n >;\n}\n\nexport function deleteContact(httpClient: HttpClient): DeleteContactSignature {\n return (contactId: string, options?: DeleteContactOptions) =>\n universalDeleteContact(\n contactId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteContactSignature {\n /**\n * Deletes a contact.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin). After 90 days, they're permanently deleted.\n *\n * Member contacts: To delete a contact that is also a site member, set `deleteMember` to `true`. This deletes both the contact and the member.\n *\n * Restrictions:\n * - A contact with an active billing subscription can't be deleted.\n * - A site owner or contributor can't be deleted.\n *\n * To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-delete-contacts).\n * @param - ID of the contact to delete.\n */\n (contactId: string, options?: DeleteContactOptions): Promise<\n void & {\n __applicationErrorsType?: DeleteContactApplicationErrors;\n }\n >;\n}\n\nexport function findMatchingContacts(\n httpClient: HttpClient\n): FindMatchingContactsSignature {\n return (options?: FindMatchingContactsOptions) =>\n universalFindMatchingContacts(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface FindMatchingContactsSignature {\n /**\n * Retrieves a list of up to 100 contacts that match the provided identifiers.\n *\n * Matching uses `externalId`, `email`, and `phone` to find contacts that likely represent the same person. Provide at least one identifier.\n *\n * Results are ordered by match strength: contacts matching more or higher-priority identifiers appear first. Within each group, contacts are ordered by creation date, oldest first. Identifier priority is `externalId` (highest), then `email`, then `phone` (lowest).\n *\n * Learn more about [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n (options?: FindMatchingContactsOptions): Promise<\n NonNullablePaths<\n FindMatchingContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n > & {\n __applicationErrorsType?: FindMatchingContactsApplicationErrors;\n }\n >;\n}\n\nexport function queryContacts(httpClient: HttpClient): QueryContactsSignature {\n return () =>\n universalQueryContacts(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryContactsSignature {\n /**\n * Retrieves a list of up to 100 contacts, given the provided filtering, sorting, and cursor paging.\n *\n *\n * Query Contacts runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\n (): ContactsQueryBuilder;\n}\n\nexport function typedQueryContacts(\n httpClient: HttpClient\n): TypedQueryContactsSignature {\n return (query: ContactQuery) =>\n universalTypedQueryContacts(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryContactsSignature {\n /** */\n (query: ContactQuery): Promise<\n NonNullablePaths<\n QueryContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n >\n >;\n}\n\nexport function searchContacts(\n httpClient: HttpClient\n): SearchContactsSignature {\n return (search: ContactSearch, options?: SearchContactsOptions) =>\n universalSearchContacts(\n search,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchContactsSignature {\n /**\n * Retrieves a list of contacts using a free-text search combined with filtering and sorting.\n *\n * Search combines free-text matching with filtering, sorting, and cursor paging. To learn about the query syntax, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n *\n * Searchable properties: `name.full`, `email.email`, `phone.phone`, `company.name`, `company.jobTitle`, `memberInfo.email`, and `memberInfo.profileInfo.nickname`.\n *\n * Name format: Set `nameFormat` to control how names are matched and ordered:\n * - `BY_FIRST_NAME`: Orders by first name, then last name.\n * - `BY_LAST_NAME`: Orders by last name, then first name.\n * @param - WQL search expression.\n */\n (search: ContactSearch, options?: SearchContactsOptions): Promise<\n NonNullablePaths<\n SearchContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`\n | `aggregationData.results`\n | `aggregationData.results.${number}.scalar.type`\n | `aggregationData.results.${number}.scalar.value`\n | `aggregationData.results.${number}.name`\n | `aggregationData.results.${number}.type`\n | `aggregationData.results.${number}.fieldPath`,\n 4\n >\n >;\n}\n\nexport function countContacts(httpClient: HttpClient): CountContactsSignature {\n return (options?: CountContactsOptions) =>\n universalCountContacts(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountContactsSignature {\n /**\n * Retrieves the number of contacts that match the provided filter and search criteria.\n */\n (options?: CountContactsOptions): Promise<\n NonNullablePaths<CountContactsResponse, `count`, 0>\n >;\n}\n\nexport function generateContactImageUploadUrl(\n httpClient: HttpClient\n): GenerateContactImageUploadUrlSignature {\n return (contactId: string, options?: GenerateContactImageUploadUrlOptions) =>\n universalGenerateContactImageUploadUrl(\n contactId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateContactImageUploadUrlSignature {\n /**\n * Generates an upload URL to allow external clients to upload a contact image.\n * To learn how external clients can use the generated upload URL in the response to upload a file,\n * see the [Upload API](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/upload-api) article.\n *\n * You can call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to query the status of the image upload.\n * @param - ID of the contact to generate an image upload URL for.\n */\n (contactId: string, options?: GenerateContactImageUploadUrlOptions): Promise<\n NonNullablePaths<\n GenerateContactImageUploadUrlResponse,\n `uploadUrl` | `imageUploadId`,\n 0\n > & {\n __applicationErrorsType?: GenerateContactImageUploadUrlApplicationErrors;\n }\n >;\n}\n\nexport function addContactAdditionalEmail(\n httpClient: HttpClient\n): AddContactAdditionalEmailSignature {\n return (\n contactId: string,\n email: AdditionalEmail,\n options: NonNullablePaths<AddContactAdditionalEmailOptions, `revision`, 0>\n ) =>\n universalAddContactAdditionalEmail(\n contactId,\n email,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddContactAdditionalEmailSignature {\n /**\n * Adds an additional email to a contact.\n *\n * The contact must have a main email (`email.email`) before an additional email can be added.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param - ID of the contact to add an email to.\n * @param - Email to add.\n */\n (\n contactId: string,\n email: AdditionalEmail,\n options: NonNullablePaths<AddContactAdditionalEmailOptions, `revision`, 0>\n ): Promise<\n NonNullablePaths<\n AddContactAdditionalEmailResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAdditionalEmailApplicationErrors;\n }\n >;\n}\n\nexport function addContactAdditionalPhone(\n httpClient: HttpClient\n): AddContactAdditionalPhoneSignature {\n return (\n contactId: string,\n phone: AdditionalPhone,\n options: NonNullablePaths<AddContactAdditionalPhoneOptions, `revision`, 0>\n ) =>\n universalAddContactAdditionalPhone(\n contactId,\n phone,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddContactAdditionalPhoneSignature {\n /**\n * Adds an additional phone to a contact.\n *\n * The contact must have a main phone (`phone.phone`) before an additional phone can be added. If the contact already has the same phone number with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param - ID of the contact to add a phone to.\n * @param - Phone to add.\n */\n (\n contactId: string,\n phone: AdditionalPhone,\n options: NonNullablePaths<AddContactAdditionalPhoneOptions, `revision`, 0>\n ): Promise<\n NonNullablePaths<\n AddContactAdditionalPhoneResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAdditionalPhoneApplicationErrors;\n }\n >;\n}\n\nexport function addContactAddress(\n httpClient: HttpClient\n): AddContactAddressSignature {\n return (\n contactId: string,\n address: ContactAddress,\n options: NonNullablePaths<AddContactAddressOptions, `revision`, 0>\n ) =>\n universalAddContactAddress(\n contactId,\n address,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddContactAddressSignature {\n /**\n * Adds an address to a contact.\n *\n * The address is appended to the contact's list of addresses. If the contact already has the same address with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param - ID of the contact to add an address to.\n * @param - Address to add.\n */\n (\n contactId: string,\n address: ContactAddress,\n options: NonNullablePaths<AddContactAddressOptions, `revision`, 0>\n ): Promise<\n NonNullablePaths<\n AddContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAddressApplicationErrors;\n }\n >;\n}\n\nexport function deleteContactAddress(\n httpClient: HttpClient\n): DeleteContactAddressSignature {\n return (\n identifiers: NonNullablePaths<\n DeleteContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n revision: string\n ) =>\n universalDeleteContactAddress(\n identifiers,\n revision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteContactAddressSignature {\n /**\n * Deletes an address from a contact by address ID.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param - Contact revision number.\n */\n (\n identifiers: NonNullablePaths<\n DeleteContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n revision: string\n ): Promise<\n NonNullablePaths<\n DeleteContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: DeleteContactAddressApplicationErrors;\n }\n >;\n}\n\nexport function updateContactAddress(\n httpClient: HttpClient\n): UpdateContactAddressSignature {\n return (\n identifiers: NonNullablePaths<\n UpdateContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n address: UpdateContactAddress,\n options: NonNullablePaths<UpdateContactAddressOptions, `revision`, 0>\n ) =>\n universalUpdateContactAddress(\n identifiers,\n address,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateContactAddressSignature {\n /**\n * Updates an address on a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\n (\n identifiers: NonNullablePaths<\n UpdateContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n address: UpdateContactAddress,\n options: NonNullablePaths<UpdateContactAddressOptions, `revision`, 0>\n ): Promise<\n NonNullablePaths<\n UpdateContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: UpdateContactAddressApplicationErrors;\n }\n >;\n}\n\nexport function bulkCreateContacts(\n httpClient: HttpClient\n): BulkCreateContactsSignature {\n return (contacts: Contact[], options?: BulkCreateContactsOptions) =>\n universalBulkCreateContacts(\n contacts,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateContactsSignature {\n /**\n * Creates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily has no image. Once the upload succeeds, the contact's image is updated.\n *\n * To create a single contact, call [Create Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/create-contact).\n * @param - Contacts to create.\n */\n (contacts: Contact[], options?: BulkCreateContactsOptions): Promise<\n NonNullablePaths<\n BulkCreateContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n >;\n}\n\nexport function bulkUpdateContacts(\n httpClient: HttpClient\n): BulkUpdateContactsSignature {\n return (\n contacts: NonNullablePaths<\n MaskedContact,\n `contact._id` | `contact.revision`,\n 1\n >[],\n options?: BulkUpdateContactsOptions\n ) =>\n universalBulkUpdateContacts(\n contacts,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateContactsSignature {\n /**\n * Updates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily keeps its previous image. Once the upload succeeds, the contact's image is updated.\n *\n * `externalId` can be set only once. If it already has a value, it can't be updated.\n *\n * To update a single contact, call [Update Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact).\n * @param - Contacts to update.\n */\n (\n contacts: NonNullablePaths<\n MaskedContact,\n `contact._id` | `contact.revision`,\n 1\n >[],\n options?: BulkUpdateContactsOptions\n ): Promise<\n NonNullablePaths<\n BulkUpdateContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n >;\n}\n\nexport function bulkUpdateContactTags(\n httpClient: HttpClient\n): BulkUpdateContactTagsSignature {\n return (contactIds: string[], options?: BulkUpdateContactTagsOptions) =>\n universalBulkUpdateContactTags(\n contactIds,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateContactTagsSignature {\n /**\n * Adds or removes tags on multiple contacts, specified by contact ID. Works synchronously.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n * @param - IDs of the contacts to add or remove tags on.\n */\n (contactIds: string[], options?: BulkUpdateContactTagsOptions): Promise<\n NonNullablePaths<\n BulkUpdateContactTagsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n > & {\n __applicationErrorsType?: BulkUpdateContactTagsApplicationErrors;\n }\n >;\n}\n\nexport function bulkUpdateContactTagsByFilter(\n httpClient: HttpClient\n): BulkUpdateContactTagsByFilterSignature {\n return (\n filter: Record<string, any>,\n options?: BulkUpdateContactTagsByFilterOptions\n ) =>\n universalBulkUpdateContactTagsByFilter(\n filter,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateContactTagsByFilterSignature {\n /**\n * Adds or removes tags on multiple contacts that match the provided filter. Works asynchronously. An empty filter matches all contacts.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n * @param - Filter object. See documentation [here](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters).\n */\n (\n filter: Record<string, any>,\n options?: BulkUpdateContactTagsByFilterOptions\n ): Promise<\n NonNullablePaths<BulkUpdateContactTagsByFilterResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkUpdateContactTagsByFilterApplicationErrors;\n }\n >;\n}\n\nexport function bulkUpsertContacts(\n httpClient: HttpClient\n): BulkUpsertContactsSignature {\n return (\n contacts: BulkUpsertContactsRequestMaskedContact[],\n options?: BulkUpsertContactsOptions\n ) =>\n universalBulkUpsertContacts(\n contacts,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpsertContactsSignature {\n /**\n * Creates or updates multiple contacts in a single request. Works synchronously.\n *\n * Each contact is matched against existing contacts using the [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) logic. If a match is found, the contact is updated. Otherwise, a new contact is created.\n *\n * When a contact is updated, `upsertMode` controls how:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * In `APPEND` or `OVERWRITE_APPEND_ARRAYS` mode, the default address flag is ignored unless the contact has no existing addresses.\n *\n * When you provide an image URL and the upsert mode allows the image to be updated, the image is uploaded in the background. The returned contact temporarily has no image if it was created, or its previous image if it was updated. Once the upload succeeds, the contact's image is updated.\n *\n * To create or update a single contact, call [Upsert Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/upsert-contact).\n * @param - Contacts to create or update.\n */\n (\n contacts: BulkUpsertContactsRequestMaskedContact[],\n options?: BulkUpsertContactsOptions\n ): Promise<\n NonNullablePaths<\n BulkUpsertContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `results.${number}.action`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n >;\n}\n\nexport function bulkDeleteContacts(\n httpClient: HttpClient\n): BulkDeleteContactsSignature {\n return (contactIds: string[], options?: BulkDeleteContactsOptions) =>\n universalBulkDeleteContacts(\n contactIds,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteContactsSignature {\n /**\n * Deletes multiple contacts in a single request. Works synchronously.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * To delete a single contact, call [Delete Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/delete-contact).\n * @param - IDs of the contacts to delete.\n */\n (contactIds: string[], options?: BulkDeleteContactsOptions): Promise<\n NonNullablePaths<\n BulkDeleteContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n > & {\n __applicationErrorsType?: BulkDeleteContactsApplicationErrors;\n }\n >;\n}\n\nexport function bulkDeleteContactsByFilter(\n httpClient: HttpClient\n): BulkDeleteContactsByFilterSignature {\n return (\n filter: Record<string, any>,\n options?: BulkDeleteContactsByFilterOptions\n ) =>\n universalBulkDeleteContactsByFilter(\n filter,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteContactsByFilterSignature {\n /**\n * Deletes multiple contacts that match the provided filter. Works asynchronously.\n *\n * All contacts that meet the specified `filter` and `search` criteria are deleted. The request must contain a `filter` value, a `search` value, or both. To preview which contacts match before deleting, call [Search Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/search-contacts) with the same criteria.\n *\n * To check the status of the bulk deletion, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * Individual contacts can fail during processing. These failures appear in the job's results with one of the following error codes:\n * - `CANNOT_DELETE_SITE_MEMBERS`: Contact is a site member and can't be deleted. The site member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION`: Contact has an active billing subscription and can't be deleted.\n * - `CANNOT_DELETE_WIX_USERS_MEMBER`: Site member can't be deleted because it's the owner or a contributor.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION`: Site member was deleted, but the contact was not.\n * - `FAILED_DELETE_CONTACT`: Contact couldn't be deleted.\n * @param - Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n (\n filter: Record<string, any>,\n options?: BulkDeleteContactsByFilterOptions\n ): Promise<\n NonNullablePaths<BulkDeleteContactsByFilterResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkDeleteContactsByFilterApplicationErrors;\n }\n >;\n}\n\nexport function removeContactFromTrashBin(\n httpClient: HttpClient\n): RemoveContactFromTrashBinSignature {\n return (contactId: string) =>\n universalRemoveContactFromTrashBin(\n contactId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveContactFromTrashBinSignature {\n /**\n * Permanently deletes a contact from the trash bin.\n *\n * After removal, the contact can no longer be restored.\n * @param - ID of the contact to permanently delete from the trash bin.\n */\n (contactId: string): Promise<void>;\n}\n\nexport function restoreContactFromTrashBin(\n httpClient: HttpClient\n): RestoreContactFromTrashBinSignature {\n return (contactId: string) =>\n universalRestoreContactFromTrashBin(\n contactId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RestoreContactFromTrashBinSignature {\n /**\n * Restores a soft-deleted contact from the trash bin.\n *\n * To restore multiple contacts in a single request, call [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n * @param - ID of the contact to restore from the trash bin.\n */\n (contactId: string): Promise<\n NonNullablePaths<\n RestoreContactFromTrashBinResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n >\n >;\n}\n\nexport function bulkRestoreContactsFromTrashBin(\n httpClient: HttpClient\n): BulkRestoreContactsFromTrashBinSignature {\n return (options?: BulkRestoreContactsFromTrashBinOptions) =>\n universalBulkRestoreContactsFromTrashBin(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkRestoreContactsFromTrashBinSignature {\n /**\n * Restores multiple soft-deleted contacts from the trash bin.\n *\n * To restore a single contact, call [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin).\n */\n (options?: BulkRestoreContactsFromTrashBinOptions): Promise<\n NonNullablePaths<\n BulkRestoreContactsFromTrashBinResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n >;\n}\n\nexport function getDeletedContact(\n httpClient: HttpClient\n): GetDeletedContactSignature {\n return (contactId: string) =>\n universalGetDeletedContact(\n contactId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetDeletedContactSignature {\n /**\n * Retrieves a soft-deleted contact from the trash bin by ID.\n * @param - ID of the contact to retrieve from the trash bin.\n */\n (contactId: string): Promise<\n NonNullablePaths<\n GetDeletedContactResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n >\n >;\n}\n\nexport function listDeletedContacts(\n httpClient: HttpClient\n): ListDeletedContactsSignature {\n return (options?: ListDeletedContactsOptions) =>\n universalListDeletedContacts(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListDeletedContactsSignature {\n /**\n * Retrieves a list of soft-deleted contacts from the trash bin, filtered by the provided identifiers and deletion date range.\n */\n (options?: ListDeletedContactsOptions): Promise<\n NonNullablePaths<\n ListDeletedContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n >\n >;\n}\n\nexport function getContactImageUploadStatus(\n httpClient: HttpClient\n): GetContactImageUploadStatusSignature {\n return (\n identifiers: NonNullablePaths<\n GetContactImageUploadStatusIdentifiers,\n `contactId` | `imageUploadId`,\n 0\n >\n ) =>\n universalGetContactImageUploadStatus(\n identifiers,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetContactImageUploadStatusSignature {\n /**\n * Retrieves the status of the contact image upload process.\n */\n (\n identifiers: NonNullablePaths<\n GetContactImageUploadStatusIdentifiers,\n `contactId` | `imageUploadId`,\n 0\n >\n ): Promise<\n NonNullablePaths<GetContactImageUploadStatusResponse, `status`, 0> & {\n __applicationErrorsType?: GetContactImageUploadStatusApplicationErrors;\n }\n >;\n}\n\nexport function bulkUpdatePhoneCountryCodeByFilter(\n httpClient: HttpClient\n): BulkUpdatePhoneCountryCodeByFilterSignature {\n return (\n options?: NonNullablePaths<\n BulkUpdatePhoneCountryCodeByFilterOptions,\n `countryCode`,\n 0\n >\n ) =>\n universalBulkUpdatePhoneCountryCodeByFilter(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdatePhoneCountryCodeByFilterSignature {\n /**\n * Adds a country code to the main phone of multiple contacts that match the provided filter. Works asynchronously.\n *\n * A contact's main phone is changed only if adding the country code produces a valid phone number. Otherwise, the contact is left unchanged.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n */\n (\n options?: NonNullablePaths<\n BulkUpdatePhoneCountryCodeByFilterOptions,\n `countryCode`,\n 0\n >\n ): Promise<\n NonNullablePaths<BulkUpdatePhoneCountryCodeByFilterResponse, `jobId`, 0>\n >;\n}\n\nexport {\n AccountInfo,\n Action,\n ActionEvent,\n AddContactAdditionalEmailOptions,\n AddContactAdditionalEmailRequest,\n AddContactAdditionalEmailResponse,\n AddContactAdditionalPhoneOptions,\n AddContactAdditionalPhoneRequest,\n AddContactAdditionalPhoneResponse,\n AddContactAddressOptions,\n AddContactAddressRequest,\n AddContactAddressResponse,\n AdditionalEmail,\n AdditionalPhone,\n Address,\n AddressLocation,\n AddressStreetOneOf,\n AddressTag,\n Aggregation,\n AggregationData,\n AggregationKindOneOf,\n AggregationResults,\n AggregationResultsResultOneOf,\n AggregationResultsScalarResult,\n AggregationType,\n ApplicationError,\n BulkActionMetadata,\n BulkAddSegmentToContactsRequest,\n BulkAddSegmentToContactsResponse,\n BulkContactResult,\n BulkCreateContactsOptions,\n BulkCreateContactsRequest,\n BulkCreateContactsResponse,\n BulkDelete,\n BulkDeleteContactsByFilterOptions,\n BulkDeleteContactsByFilterRequest,\n BulkDeleteContactsByFilterResponse,\n BulkDeleteContactsOptions,\n BulkDeleteContactsRequest,\n BulkDeleteContactsResponse,\n BulkDeleteContactsResponseBulkContactResult,\n BulkIndex,\n BulkRemoveSegmentFromContactsRequest,\n BulkRemoveSegmentFromContactsResponse,\n BulkRestoreContactsFromTrashBinOptions,\n BulkRestoreContactsFromTrashBinRequest,\n BulkRestoreContactsFromTrashBinResponse,\n BulkRestoreContactsFromTrashBinResponseBulkContactResult,\n BulkUpdateContactSubscriptionsOptions,\n BulkUpdateContactSubscriptionsRequest,\n BulkUpdateContactSubscriptionsResponse,\n BulkUpdateContactTagsByFilterOptions,\n BulkUpdateContactTagsByFilterRequest,\n BulkUpdateContactTagsByFilterResponse,\n BulkUpdateContactTagsOptions,\n BulkUpdateContactTagsRequest,\n BulkUpdateContactTagsResponse,\n BulkUpdateContactTagsResult,\n BulkUpdateContactsOptions,\n BulkUpdateContactsRequest,\n BulkUpdateContactsResponse,\n BulkUpdateContactsResponseBulkContactResult,\n BulkUpdatePhoneCountryCodeByFilterOptions,\n BulkUpdatePhoneCountryCodeByFilterRequest,\n BulkUpdatePhoneCountryCodeByFilterResponse,\n BulkUpsertContactsOptions,\n BulkUpsertContactsRequest,\n BulkUpsertContactsRequestMaskedContact,\n BulkUpsertContactsResponse,\n BulkUpsertContactsResponseBulkContactResult,\n Contact,\n ContactActivity,\n ContactAddress,\n ContactCompany,\n ContactEmail,\n ContactEmailSubscriptionUpdated,\n ContactImageUploaded,\n ContactMerged,\n ContactName,\n ContactPhone,\n ContactPhoneSubscriptionUpdated,\n ContactQuerySpec,\n ContactSearchSpec,\n ContactSource,\n ContactSubscription,\n ContactsQueryBuilder,\n ContactsQueryResult,\n CountContactsOptions,\n CountContactsRequest,\n CountContactsResponse,\n CreateContactOptions,\n CreateContactRequest,\n CreateContactResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Cursors,\n DateHistogramAggregation,\n DateHistogramResult,\n DateHistogramResults,\n Delete,\n DeleteContactAddressIdentifiers,\n DeleteContactAddressRequest,\n DeleteContactAddressResponse,\n DeleteContactOptions,\n DeleteContactRequest,\n DeleteContactResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n DuplicateContactExists,\n EmailDeliverabilityStatus,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n FailedMemberUpdate,\n FindMatchingContactsOptions,\n FindMatchingContactsRequest,\n FindMatchingContactsResponse,\n GenerateContactImageUploadUrlOptions,\n GenerateContactImageUploadUrlRequest,\n GenerateContactImageUploadUrlResponse,\n GetContactImageUploadStatusIdentifiers,\n GetContactImageUploadStatusRequest,\n GetContactImageUploadStatusResponse,\n GetContactRequest,\n GetContactResponse,\n GetDeletedContactRequest,\n GetDeletedContactResponse,\n GroupInfo,\n IdentificationData,\n IdentificationDataIdOneOf,\n ImageUploadStatus,\n IncludeMissingValuesOptions,\n Index,\n Interval,\n ItemMetadata,\n ListDeletedContactsOptions,\n ListDeletedContactsRequest,\n ListDeletedContactsResponse,\n MaskedContact,\n MatchType,\n MediaFileUploadedEvent,\n MemberInfo,\n MemberStatus,\n MergeContactsOptions,\n MergeContactsRequest,\n MergeContactsResponse,\n MessageEnvelope,\n MissingValues,\n Mode,\n NameFormat,\n NestedAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregationType,\n NestedResultValue,\n NestedResultValueResultOneOf,\n NestedResults,\n Paging,\n PagingMetadataV2,\n PhoneDeliverabilityStatus,\n PhoneTag,\n PrivacyStatus,\n PrivateTags,\n ProfileInfo,\n QueryContactsByOffsetInternalRequest,\n QueryContactsByOffsetInternalRequestNameFormat,\n QueryContactsByOffsetInternalResponse,\n QueryContactsRequest,\n QueryContactsResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n RangeAggregation,\n RangeAggregationResult,\n RangeBucket,\n RangeResult,\n RangeResults,\n Recipient,\n ReindexEntityForFQDN,\n ReindexEntityForFQDNActionOneOf,\n ReindexMessage,\n ReindexMessageActionOneOf,\n ReindexMessageDelete,\n RemoveContactFromTrashBinRequest,\n RemoveContactFromTrashBinResponse,\n ReportBatchCompleted,\n RestoreContactFromTrashBinRequest,\n RestoreContactFromTrashBinResponse,\n RestoreInfo,\n Results,\n Role,\n ScalarAggregation,\n ScalarResult,\n ScalarType,\n Schema,\n SearchContactsOptions,\n SearchContactsRequest,\n SearchContactsResponse,\n SearchDetails,\n SessionInfo,\n SortDirection,\n SortOrder,\n SortType,\n Sorting,\n StandardDetails,\n StreetAddress,\n Subdivision,\n SubdivisionType,\n SubscriptionStatus,\n TagList,\n UpdateContact,\n UpdateContactAddress,\n UpdateContactAddressIdentifiers,\n UpdateContactAddressOptions,\n UpdateContactAddressRequest,\n UpdateContactAddressResponse,\n UpdateContactOptions,\n UpdateContactRequest,\n UpdateContactResponse,\n UpdateContactTagsOptions,\n UpdateContactTagsRequest,\n UpdateContactTagsResponse,\n Upsert,\n UpsertContactOptions,\n UpsertContactRequest,\n UpsertContactResponse,\n UpsertContactResponseAction,\n UpsertMode,\n UserInfo,\n V5SubscriptionStatus,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n ValueAggregationResult,\n ValueResult,\n ValueResults,\n WebhookIdentityType,\n utils,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\n","import {\n bulkUpdateContactSubscriptions as publicBulkUpdateContactSubscriptions,\n createContact as publicCreateContact,\n getContact as publicGetContact,\n updateContact as publicUpdateContact,\n upsertContact as publicUpsertContact,\n updateContactTags as publicUpdateContactTags,\n mergeContacts as publicMergeContacts,\n deleteContact as publicDeleteContact,\n findMatchingContacts as publicFindMatchingContacts,\n queryContacts as publicQueryContacts,\n typedQueryContacts as publicTypedQueryContacts,\n searchContacts as publicSearchContacts,\n countContacts as publicCountContacts,\n generateContactImageUploadUrl as publicGenerateContactImageUploadUrl,\n addContactAdditionalEmail as publicAddContactAdditionalEmail,\n addContactAdditionalPhone as publicAddContactAdditionalPhone,\n addContactAddress as publicAddContactAddress,\n deleteContactAddress as publicDeleteContactAddress,\n updateContactAddress as publicUpdateContactAddress,\n bulkCreateContacts as publicBulkCreateContacts,\n bulkUpdateContacts as publicBulkUpdateContacts,\n bulkUpdateContactTags as publicBulkUpdateContactTags,\n bulkUpdateContactTagsByFilter as publicBulkUpdateContactTagsByFilter,\n bulkUpsertContacts as publicBulkUpsertContacts,\n bulkDeleteContacts as publicBulkDeleteContacts,\n bulkDeleteContactsByFilter as publicBulkDeleteContactsByFilter,\n removeContactFromTrashBin as publicRemoveContactFromTrashBin,\n restoreContactFromTrashBin as publicRestoreContactFromTrashBin,\n bulkRestoreContactsFromTrashBin as publicBulkRestoreContactsFromTrashBin,\n getDeletedContact as publicGetDeletedContact,\n listDeletedContacts as publicListDeletedContacts,\n getContactImageUploadStatus as publicGetContactImageUploadStatus,\n bulkUpdatePhoneCountryCodeByFilter as publicBulkUpdatePhoneCountryCodeByFilter,\n} from './contacts-v5-contact-contacts-v-5.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n ContactQuery,\n ContactsQueryBuilder,\n typedQueryContacts as universalTypedQueryContacts,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\n\nfunction customQueryContacts(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryContacts(httpClient)(),\n typedQueryFunction: (query: ContactQuery) =>\n publicTypedQueryContacts(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ContactsQueryBuilder;\n function overloadedQuery(\n query: ContactQuery\n ): ReturnType<typeof universalTypedQueryContacts>;\n function overloadedQuery(query?: ContactQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const bulkUpdateContactSubscriptions: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateContactSubscriptions> &\n typeof publicBulkUpdateContactSubscriptions\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateContactSubscriptions);\nexport const createContact: MaybeContext<\n BuildRESTFunction<typeof publicCreateContact> & typeof publicCreateContact\n> = /*#__PURE__*/ createRESTModule(publicCreateContact);\nexport const getContact: MaybeContext<\n BuildRESTFunction<typeof publicGetContact> & typeof publicGetContact\n> = /*#__PURE__*/ createRESTModule(publicGetContact);\nexport const updateContact: MaybeContext<\n BuildRESTFunction<typeof publicUpdateContact> & typeof publicUpdateContact\n> = /*#__PURE__*/ createRESTModule(publicUpdateContact);\nexport const upsertContact: MaybeContext<\n BuildRESTFunction<typeof publicUpsertContact> & typeof publicUpsertContact\n> = /*#__PURE__*/ createRESTModule(publicUpsertContact);\nexport const updateContactTags: MaybeContext<\n BuildRESTFunction<typeof publicUpdateContactTags> &\n typeof publicUpdateContactTags\n> = /*#__PURE__*/ createRESTModule(publicUpdateContactTags);\nexport const mergeContacts: MaybeContext<\n BuildRESTFunction<typeof publicMergeContacts> & typeof publicMergeContacts\n> = /*#__PURE__*/ createRESTModule(publicMergeContacts);\nexport const deleteContact: MaybeContext<\n BuildRESTFunction<typeof publicDeleteContact> & typeof publicDeleteContact\n> = /*#__PURE__*/ createRESTModule(publicDeleteContact);\nexport const findMatchingContacts: MaybeContext<\n BuildRESTFunction<typeof publicFindMatchingContacts> &\n typeof publicFindMatchingContacts\n> = /*#__PURE__*/ createRESTModule(publicFindMatchingContacts);\nexport const searchContacts: MaybeContext<\n BuildRESTFunction<typeof publicSearchContacts> & typeof publicSearchContacts\n> = /*#__PURE__*/ createRESTModule(publicSearchContacts);\nexport const countContacts: MaybeContext<\n BuildRESTFunction<typeof publicCountContacts> & typeof publicCountContacts\n> = /*#__PURE__*/ createRESTModule(publicCountContacts);\nexport const generateContactImageUploadUrl: MaybeContext<\n BuildRESTFunction<typeof publicGenerateContactImageUploadUrl> &\n typeof publicGenerateContactImageUploadUrl\n> = /*#__PURE__*/ createRESTModule(publicGenerateContactImageUploadUrl);\nexport const addContactAdditionalEmail: MaybeContext<\n BuildRESTFunction<typeof publicAddContactAdditionalEmail> &\n typeof publicAddContactAdditionalEmail\n> = /*#__PURE__*/ createRESTModule(publicAddContactAdditionalEmail);\nexport const addContactAdditionalPhone: MaybeContext<\n BuildRESTFunction<typeof publicAddContactAdditionalPhone> &\n typeof publicAddContactAdditionalPhone\n> = /*#__PURE__*/ createRESTModule(publicAddContactAdditionalPhone);\nexport const addContactAddress: MaybeContext<\n BuildRESTFunction<typeof publicAddContactAddress> &\n typeof publicAddContactAddress\n> = /*#__PURE__*/ createRESTModule(publicAddContactAddress);\nexport const deleteContactAddress: MaybeContext<\n BuildRESTFunction<typeof publicDeleteContactAddress> &\n typeof publicDeleteContactAddress\n> = /*#__PURE__*/ createRESTModule(publicDeleteContactAddress);\nexport const updateContactAddress: MaybeContext<\n BuildRESTFunction<typeof publicUpdateContactAddress> &\n typeof publicUpdateContactAddress\n> = /*#__PURE__*/ createRESTModule(publicUpdateContactAddress);\nexport const bulkCreateContacts: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateContacts> &\n typeof publicBulkCreateContacts\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateContacts);\nexport const bulkUpdateContacts: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateContacts> &\n typeof publicBulkUpdateContacts\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateContacts);\nexport const bulkUpdateContactTags: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateContactTags> &\n typeof publicBulkUpdateContactTags\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateContactTags);\nexport const bulkUpdateContactTagsByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateContactTagsByFilter> &\n typeof publicBulkUpdateContactTagsByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateContactTagsByFilter);\nexport const bulkUpsertContacts: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpsertContacts> &\n typeof publicBulkUpsertContacts\n> = /*#__PURE__*/ createRESTModule(publicBulkUpsertContacts);\nexport const bulkDeleteContacts: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteContacts> &\n typeof publicBulkDeleteContacts\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteContacts);\nexport const bulkDeleteContactsByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteContactsByFilter> &\n typeof publicBulkDeleteContactsByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteContactsByFilter);\nexport const removeContactFromTrashBin: MaybeContext<\n BuildRESTFunction<typeof publicRemoveContactFromTrashBin> &\n typeof publicRemoveContactFromTrashBin\n> = /*#__PURE__*/ createRESTModule(publicRemoveContactFromTrashBin);\nexport const restoreContactFromTrashBin: MaybeContext<\n BuildRESTFunction<typeof publicRestoreContactFromTrashBin> &\n typeof publicRestoreContactFromTrashBin\n> = /*#__PURE__*/ createRESTModule(publicRestoreContactFromTrashBin);\nexport const bulkRestoreContactsFromTrashBin: MaybeContext<\n BuildRESTFunction<typeof publicBulkRestoreContactsFromTrashBin> &\n typeof publicBulkRestoreContactsFromTrashBin\n> = /*#__PURE__*/ createRESTModule(publicBulkRestoreContactsFromTrashBin);\nexport const getDeletedContact: MaybeContext<\n BuildRESTFunction<typeof publicGetDeletedContact> &\n typeof publicGetDeletedContact\n> = /*#__PURE__*/ createRESTModule(publicGetDeletedContact);\nexport const listDeletedContacts: MaybeContext<\n BuildRESTFunction<typeof publicListDeletedContacts> &\n typeof publicListDeletedContacts\n> = /*#__PURE__*/ createRESTModule(publicListDeletedContacts);\nexport const getContactImageUploadStatus: MaybeContext<\n BuildRESTFunction<typeof publicGetContactImageUploadStatus> &\n typeof publicGetContactImageUploadStatus\n> = /*#__PURE__*/ createRESTModule(publicGetContactImageUploadStatus);\nexport const bulkUpdatePhoneCountryCodeByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdatePhoneCountryCodeByFilter> &\n typeof publicBulkUpdatePhoneCountryCodeByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdatePhoneCountryCodeByFilter);\nexport const queryContacts: MaybeContext<\n BuildRESTFunction<typeof customQueryContacts> & typeof customQueryContacts\n> = /*#__PURE__*/ createRESTModule(customQueryContacts);\n\nexport {\n SubscriptionStatus,\n EmailDeliverabilityStatus,\n PhoneTag,\n PhoneDeliverabilityStatus,\n AddressTag,\n SubdivisionType,\n MemberStatus,\n PrivacyStatus,\n Role,\n WebhookIdentityType,\n Mode,\n V5SubscriptionStatus,\n MatchType,\n UpsertMode,\n UpsertContactResponseAction,\n SortOrder,\n SortType,\n SortDirection,\n MissingValues,\n ScalarType,\n NestedAggregationType,\n Interval,\n AggregationType,\n NameFormat,\n Action,\n QueryContactsByOffsetInternalRequestNameFormat,\n ImageUploadStatus,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\nexport {\n Contact,\n ContactName,\n ContactEmail,\n ContactSubscription,\n AdditionalEmail,\n ContactPhone,\n AdditionalPhone,\n ContactAddress,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n StandardDetails,\n Recipient,\n ContactCompany,\n ContactSource,\n ContactActivity,\n MemberInfo,\n ProfileInfo,\n UserInfo,\n SessionInfo,\n GroupInfo,\n PrivateTags,\n TagList,\n ExtendedFields,\n ReindexMessage,\n ReindexMessageActionOneOf,\n Upsert,\n ReindexMessageDelete,\n Schema,\n ContactMerged,\n ContactEmailSubscriptionUpdated,\n ContactPhoneSubscriptionUpdated,\n ContactImageUploaded,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BulkUpdateContactSubscriptionsRequest,\n SearchDetails,\n BulkUpdateContactSubscriptionsResponse,\n ReindexEntityForFQDN,\n ReindexEntityForFQDNActionOneOf,\n Index,\n Delete,\n ReportBatchCompleted,\n BulkIndex,\n BulkDelete,\n CreateContactRequest,\n CreateContactResponse,\n DuplicateContactExists,\n GetContactRequest,\n GetContactResponse,\n UpdateContactRequest,\n UpdateContactResponse,\n UpsertContactRequest,\n UpsertContactResponse,\n FailedMemberUpdate,\n UpdateContactTagsRequest,\n UpdateContactTagsResponse,\n MergeContactsRequest,\n MergeContactsResponse,\n DeleteContactRequest,\n DeleteContactResponse,\n FindMatchingContactsRequest,\n FindMatchingContactsResponse,\n QueryContactsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryContactsResponse,\n CursorPagingMetadata,\n Cursors,\n SearchContactsRequest,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Aggregation,\n AggregationKindOneOf,\n RangeBucket,\n IncludeMissingValuesOptions,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n RangeAggregation,\n ScalarAggregation,\n DateHistogramAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregation,\n SearchContactsResponse,\n AggregationData,\n ValueAggregationResult,\n RangeAggregationResult,\n ValueResults,\n RangeResults,\n AggregationResultsScalarResult,\n ValueResult,\n RangeResult,\n ScalarResult,\n NestedResultValue,\n NestedResultValueResultOneOf,\n Results,\n DateHistogramResult,\n DateHistogramResults,\n NestedResults,\n AggregationResults,\n AggregationResultsResultOneOf,\n CountContactsRequest,\n CountContactsResponse,\n GenerateContactImageUploadUrlRequest,\n GenerateContactImageUploadUrlResponse,\n AddContactAdditionalEmailRequest,\n AddContactAdditionalEmailResponse,\n AddContactAdditionalPhoneRequest,\n AddContactAdditionalPhoneResponse,\n AddContactAddressRequest,\n AddContactAddressResponse,\n DeleteContactAddressRequest,\n DeleteContactAddressResponse,\n UpdateContactAddressRequest,\n UpdateContactAddressResponse,\n BulkCreateContactsRequest,\n BulkCreateContactsResponse,\n ItemMetadata,\n ApplicationError,\n BulkContactResult,\n BulkActionMetadata,\n BulkUpdateContactsRequest,\n MaskedContact,\n BulkUpdateContactsResponse,\n BulkUpdateContactsResponseBulkContactResult,\n BulkUpdateContactTagsRequest,\n BulkUpdateContactTagsResponse,\n BulkUpdateContactTagsResult,\n BulkUpdateContactTagsByFilterRequest,\n BulkUpdateContactTagsByFilterResponse,\n BulkUpsertContactsRequest,\n BulkUpsertContactsRequestMaskedContact,\n BulkUpsertContactsResponse,\n BulkUpsertContactsResponseBulkContactResult,\n BulkDeleteContactsRequest,\n BulkDeleteContactsResponse,\n BulkDeleteContactsResponseBulkContactResult,\n BulkDeleteContactsByFilterRequest,\n BulkDeleteContactsByFilterResponse,\n RemoveContactFromTrashBinRequest,\n RemoveContactFromTrashBinResponse,\n RestoreContactFromTrashBinRequest,\n RestoreContactFromTrashBinResponse,\n BulkRestoreContactsFromTrashBinRequest,\n BulkRestoreContactsFromTrashBinResponse,\n BulkRestoreContactsFromTrashBinResponseBulkContactResult,\n GetDeletedContactRequest,\n GetDeletedContactResponse,\n ListDeletedContactsRequest,\n ListDeletedContactsResponse,\n BulkAddSegmentToContactsRequest,\n BulkAddSegmentToContactsResponse,\n BulkRemoveSegmentFromContactsRequest,\n BulkRemoveSegmentFromContactsResponse,\n QueryContactsByOffsetInternalRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Paging,\n QueryContactsByOffsetInternalResponse,\n PagingMetadataV2,\n GetContactImageUploadStatusRequest,\n GetContactImageUploadStatusResponse,\n BulkUpdatePhoneCountryCodeByFilterRequest,\n BulkUpdatePhoneCountryCodeByFilterResponse,\n Empty,\n MediaFileUploadedEvent,\n BulkUpdateContactSubscriptionsOptions,\n CreateContactOptions,\n UpdateContact,\n UpdateContactOptions,\n UpsertContactOptions,\n UpdateContactTagsOptions,\n MergeContactsOptions,\n DeleteContactOptions,\n FindMatchingContactsOptions,\n ContactsQueryResult,\n ContactsQueryBuilder,\n ContactQuerySpec,\n SearchContactsOptions,\n ContactSearchSpec,\n CountContactsOptions,\n GenerateContactImageUploadUrlOptions,\n AddContactAdditionalEmailOptions,\n AddContactAdditionalPhoneOptions,\n AddContactAddressOptions,\n DeleteContactAddressIdentifiers,\n UpdateContactAddressIdentifiers,\n UpdateContactAddress,\n UpdateContactAddressOptions,\n BulkCreateContactsOptions,\n BulkUpdateContactsOptions,\n BulkUpdateContactTagsOptions,\n BulkUpdateContactTagsByFilterOptions,\n BulkUpsertContactsOptions,\n BulkDeleteContactsOptions,\n BulkDeleteContactsByFilterOptions,\n BulkRestoreContactsFromTrashBinOptions,\n ListDeletedContactsOptions,\n GetContactImageUploadStatusIdentifiers,\n BulkUpdatePhoneCountryCodeByFilterOptions,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\nexport { utils } from './contacts-v5-contact-contacts-v-5.universal.js';\nexport {\n SubscriptionStatusWithLiterals,\n EmailDeliverabilityStatusWithLiterals,\n PhoneTagWithLiterals,\n PhoneDeliverabilityStatusWithLiterals,\n AddressTagWithLiterals,\n SubdivisionTypeWithLiterals,\n MemberStatusWithLiterals,\n PrivacyStatusWithLiterals,\n RoleWithLiterals,\n WebhookIdentityTypeWithLiterals,\n ModeWithLiterals,\n V5SubscriptionStatusWithLiterals,\n MatchTypeWithLiterals,\n UpsertModeWithLiterals,\n UpsertContactResponseActionWithLiterals,\n SortOrderWithLiterals,\n SortTypeWithLiterals,\n SortDirectionWithLiterals,\n MissingValuesWithLiterals,\n ScalarTypeWithLiterals,\n NestedAggregationTypeWithLiterals,\n IntervalWithLiterals,\n AggregationTypeWithLiterals,\n NameFormatWithLiterals,\n ActionWithLiterals,\n QueryContactsByOffsetInternalRequestNameFormatWithLiterals,\n ImageUploadStatusWithLiterals,\n BulkUpdateContactSubscriptionsApplicationErrors,\n CreateContactApplicationErrors,\n UpdateContactApplicationErrors,\n UpsertContactApplicationErrors,\n UpdateContactTagsApplicationErrors,\n MergeContactsApplicationErrors,\n DeleteContactApplicationErrors,\n FindMatchingContactsApplicationErrors,\n GenerateContactImageUploadUrlApplicationErrors,\n AddContactAdditionalEmailApplicationErrors,\n AddContactAdditionalPhoneApplicationErrors,\n AddContactAddressApplicationErrors,\n DeleteContactAddressApplicationErrors,\n UpdateContactAddressApplicationErrors,\n BulkUpdateContactTagsApplicationErrors,\n BulkUpdateContactTagsByFilterApplicationErrors,\n BulkDeleteContactsApplicationErrors,\n BulkDeleteContactsByFilterApplicationErrors,\n GetContactImageUploadStatusApplicationErrors,\n CommonQueryWithEntityContext,\n ContactQuery,\n CommonSearchWithEntityContext,\n ContactSearch,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA,EAAA,iCAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,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AAiBA,cAAmB;AAC/C,IAAMC,iBAEK,2DAAiBA,cAAmB;AAC/C,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,iBAEK,2DAAiBA,cAAmB;AAC/C,IAAMC,iBAEK,2DAAiBA,cAAmB;AAC/C,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,iBAEK,2DAAiBA,cAAmB;AAC/C,IAAMC,iCAGK,2DAAiBA,8BAAmC;AAC/D,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,iCAGK,2DAAiBA,8BAAmC;AAC/D,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,8BAGK,2DAAiBA,2BAAgC;AAC5D,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMC,8BAGK,2DAAiBA,2BAAgC;AAC5D,IAAMC,mCAGK,2DAAiBA,gCAAqC;AACjE,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,+BAGK,2DAAiBA,4BAAiC;AAC7D,IAAMC,sCAGK,2DAAiBA,mCAAwC;AACpE,IAAMhC,iBAEK,2DAAiB,mBAAmB;","names":["addContactAdditionalEmail","addContactAdditionalPhone","addContactAddress","bulkCreateContacts","bulkDeleteContacts","bulkDeleteContactsByFilter","bulkRestoreContactsFromTrashBin","bulkUpdateContactSubscriptions","bulkUpdateContactTags","bulkUpdateContactTagsByFilter","bulkUpdateContacts","bulkUpdatePhoneCountryCodeByFilter","bulkUpsertContacts","countContacts","createContact","deleteContact","deleteContactAddress","findMatchingContacts","generateContactImageUploadUrl","getContact","getContactImageUploadStatus","getDeletedContact","listDeletedContacts","mergeContacts","queryContacts","removeContactFromTrashBin","restoreContactFromTrashBin","searchContacts","updateContact","updateContactAddress","updateContactTags","upsertContact","import_float","import_timestamp","import_rest_modules","payload","import_address","import_image","import_transform_paths","SubscriptionStatus","EmailDeliverabilityStatus","PhoneTag","PhoneDeliverabilityStatus","AddressTag","SubdivisionType","MemberStatus","PrivacyStatus","Role","WebhookIdentityType","Mode","V5SubscriptionStatus","MatchType","UpsertMode","UpsertContactResponseAction","SortOrder","SortType","SortDirection","MissingValues","ScalarType","NestedAggregationType","Interval","AggregationType","NameFormat","Action","QueryContactsByOffsetInternalRequestNameFormat","ImageUploadStatus","bulkUpdateContactSubscriptions","sdkTransformError","createContact","getContact","updateContact","upsertContact","updateContactTags","mergeContacts","deleteContact","findMatchingContacts","queryContacts","searchContacts","countContacts","generateContactImageUploadUrl","addContactAdditionalEmail","addContactAdditionalPhone","addContactAddress","deleteContactAddress","updateContactAddress","bulkCreateContacts","bulkUpdateContacts","bulkUpdateContactTags","bulkUpdateContactTagsByFilter","bulkUpsertContacts","bulkDeleteContacts","bulkDeleteContactsByFilter","removeContactFromTrashBin","restoreContactFromTrashBin","bulkRestoreContactsFromTrashBin","getDeletedContact","listDeletedContacts","getContactImageUploadStatus","bulkUpdatePhoneCountryCodeByFilter","bulkUpdateContactSubscriptions","createContact","getContact","updateContact","upsertContact","updateContactTags","mergeContacts","deleteContact","findMatchingContacts","queryContacts","typedQueryContacts","searchContacts","countContacts","generateContactImageUploadUrl","addContactAdditionalEmail","addContactAdditionalPhone","addContactAddress","deleteContactAddress","updateContactAddress","bulkCreateContacts","bulkUpdateContacts","bulkUpdateContactTags","bulkUpdateContactTagsByFilter","bulkUpsertContacts","bulkDeleteContacts","bulkDeleteContactsByFilter","removeContactFromTrashBin","restoreContactFromTrashBin","bulkRestoreContactsFromTrashBin","getDeletedContact","listDeletedContacts","getContactImageUploadStatus","bulkUpdatePhoneCountryCodeByFilter","import_rest_modules","queryContacts","typedQueryContacts","bulkUpdateContactSubscriptions","createContact","getContact","updateContact","upsertContact","updateContactTags","mergeContacts","deleteContact","findMatchingContacts","searchContacts","countContacts","generateContactImageUploadUrl","addContactAdditionalEmail","addContactAdditionalPhone","addContactAddress","deleteContactAddress","updateContactAddress","bulkCreateContacts","bulkUpdateContacts","bulkUpdateContactTags","bulkUpdateContactTagsByFilter","bulkUpsertContacts","bulkDeleteContacts","bulkDeleteContactsByFilter","removeContactFromTrashBin","restoreContactFromTrashBin","bulkRestoreContactsFromTrashBin","getDeletedContact","listDeletedContacts","getContactImageUploadStatus","bulkUpdatePhoneCountryCodeByFilter"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/contacts-v5-contact-contacts-v-5.universal.ts","../../src/contacts-v5-contact-contacts-v-5.http.ts","../../src/contacts-v5-contact-contacts-v-5.public.ts","../../src/contacts-v5-contact-contacts-v-5.context.ts"],"sourcesContent":["export * from './src/contacts-v5-contact-contacts-v-5.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n Search as SearchSdkType,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n SearchSpec,\n} from '@wix/sdk-types';\nimport * as ambassadorWixContactsV5Contact from './contacts-v5-contact-contacts-v-5.http.js';\n// @ts-ignore\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'contact.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'contact.addresses.address' }];\nconst TRANSFORM_PATHS_2 = [\n { path: 'targetContact.image' },\n { path: 'targetContact.memberInfo.profileInfo.photo' },\n];\nconst TRANSFORM_PATHS_3 = [{ path: 'targetContact.addresses.address' }];\nconst TRANSFORM_PATHS_4 = [\n { path: 'contacts.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n];\nconst TRANSFORM_PATHS_5 = [{ path: 'contacts.addresses.address' }];\nconst TRANSFORM_PATHS_6 = [{ path: 'address.address' }];\nconst TRANSFORM_PATHS_7 = [\n { path: 'results.item.image' },\n { path: 'results.item.memberInfo.profileInfo.photo' },\n];\nconst TRANSFORM_PATHS_8 = [{ path: 'results.item.addresses.address' }];\nconst TRANSFORM_PATHS_9 = [\n { path: 'contacts.contact.image' },\n { path: 'contacts.contact.memberInfo.profileInfo.photo' },\n];\nconst TRANSFORM_PATHS_10 = [{ path: 'contacts.contact.addresses.address' }];\n\nimport { createSearchUtils } from '@wix/sdk-runtime/search-builder-utils';\n\n/** A contact represents a person in a site's contact list. It stores profile details such as name, email addresses, phone numbers, and addresses, and can optionally be linked to a site member. */\nexport interface Contact {\n /**\n * Contact ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the Contact is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the Contact.\n *\n * Ignored when creating a Contact.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the contact was created.\n * @readonly\n * @immutable\n */\n _createdDate?: Date | null;\n /**\n * Date and time the contact was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Contact external ID. Used to identify contacts from external systems.\n * This field can only be set once and can't be updated after creation.\n * @maxLength 100\n */\n externalId?: string | null;\n /** Contact's name information including first and last name. */\n name?: ContactName;\n /**\n * The main email of the contact with subscription status and deliverability information.\n * This email is used for contact matching and deduplication logic.\n */\n email?: ContactEmail;\n /**\n * Additional emails of the contact.\n * These emails do not affect subscription status or contact matching/deduplication.\n * The main email field must be set before additional emails can be added.\n * @maxSize 10\n */\n additionalEmails?: AdditionalEmail[];\n /**\n * The main phone of the contact with subscription status and deliverability information.\n * This phone is used for contact matching and deduplication logic.\n * At least one of name, email, or phone is required for contact creation.\n */\n phone?: ContactPhone;\n /**\n * Additional phones of the contact.\n * These phones do not affect subscription status or contact matching/deduplication.\n * The main phone field must be set before additional phones can be added.\n * @maxSize 10\n */\n additionalPhones?: AdditionalPhone[];\n /**\n * Contact's physical addresses.\n * Each address can be tagged (HOME, WORK, BILLING, SHIPPING, OTHER) and one can be set as default.\n * If no address is marked as default, the first address automatically becomes the default.\n * @maxSize 50\n */\n addresses?: ContactAddress[];\n /** Contact's company information including company name and job title. */\n company?: ContactCompany;\n /**\n * Locale in\n * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * Typically, this is a lowercase 2-letter language code,\n * followed by a hyphen, followed by an uppercase 2-letter country code.\n * For example, `en-US` for U.S. English, and `de-DE` for Germany German.\n * @format LANGUAGE_TAG\n */\n locale?: string | null;\n /**\n * Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.\n * @format LOCAL_DATE\n */\n birthdate?: string | null;\n /**\n * IANA time zone identifier for the contact's location.\n * Valid values are IANA time zone IDs, such as 'Europe/Rome' or 'America/New_York'.\n * @maxLength 50\n */\n timeZone?: string | null;\n /**\n * Site contributor user ID assigned to manage communication with this contact.\n * Must be a valid GUID referencing an existing site contributor.\n * Only one assignee can be set per contact.\n * @format GUID\n */\n assigneeId?: string | null;\n /**\n * List of business location IDs associated with this contact.\n * Used for multi-location businesses to organize contacts by physical business locations.\n * Each ID must be a valid GUID referencing an existing business location.\n * @format GUID\n * @maxSize 50\n */\n locationIds?: string[];\n /**\n * Contact's profile image.\n * If the contact is also a site member, clients should prefer to view `member_info.profile_info.photo`\n * when it exists, as it reflects the member's current profile photo.\n */\n image?: string;\n /**\n * Details about the origin of the contact.\n * This field is immutable and set automatically when the contact is created.\n * @immutable\n */\n source?: ContactSource;\n /**\n * Details about the contact's most recent activity on the site.\n * Includes activity date and template ID. This field is read-only and updated automatically.\n * @readonly\n */\n lastActivity?: ContactActivity;\n /**\n * IDs of the segments the contact belongs to.\n * Segments are used for organizing and targeting groups of contacts.\n * @maxSize 60\n * @readonly\n * @format GUID\n */\n segmentIds?: string[];\n /**\n * Contact's site membership information including member ID, status, and profile details.\n * This field is read-only and populated automatically when the contact is also a site member.\n *\n * Updates are eventually consistent: changes to the underlying member, identity, or profile are reflected after the corresponding events are processed.\n * @readonly\n */\n memberInfo?: MemberInfo;\n /**\n * Contact's display name. The field is used for sorting only and is not returned.\n * @internal\n * @maxLength 1000\n * @readonly\n */\n displayName?: string | null;\n /** Tags assigned to the contact for organization and filtering. */\n tags?: PrivateTags;\n /**\n * Extended fields for storing custom contact data beyond the standard fields.\n * Allows adding custom properties specific to business needs.\n * To define a custom extended field, use the [Schema Service API](https://dev.wix.com/docs/api-reference/business-management/data-extension-schema/about-the-data-extension-schema-api) with the contacts FQDN: `wix.contacts.*.contact`.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface ContactName {\n /**\n * Contact's first name.\n * @maxLength 1000\n */\n first?: string | null;\n /**\n * Contact's last name.\n * @maxLength 1000\n */\n last?: string | null;\n /**\n * Contact's full name. Automatically generated from first and last names.\n * @internal\n * @maxLength 1000\n * @readonly\n */\n full?: string | null;\n}\n\nexport interface ContactEmail {\n /**\n * Main email address for the contact. Used for communication and contact matching.\n *\n * Stored in normalized form: leading and trailing whitespace is trimmed and the address is lowercased.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string;\n /**\n * Indicates the recipient's opt-in or opt-out status for marketing emails.\n * This field is read-only and managed by the subscription system.\n *\n * Updates are eventually consistent, reflecting marketing consent changes after they're processed.\n * @readonly\n */\n subscriptionStatus?: ContactSubscription;\n /**\n * Indicates the last reported delivery status of emails sent to this address.\n * This field is read-only and updated automatically by the email delivery system.\n *\n * - `NOT_SET`: No delivery status reported. Default value.\n * - `VALID`: Emails are being successfully delivered to this address.\n * - `BOUNCED`: The last email to this address bounced or was rejected by the recipient's email server.\n * - `SPAM_COMPLAINT`: Recipient registered a spam complaint with their email provider.\n * - `INACTIVE`: Multiple emails have been delivered without any engagement from the recipient.\n * @readonly\n */\n deliverabilityStatus?: EmailDeliverabilityStatusWithLiterals;\n}\n\nexport interface ContactSubscription {\n /**\n * Indicates the recipient's opt-in or opt-out status for marketing communications.\n *\n * - `NO_SUBSCRIPTION_STATUS`: No status exists. Used when a phone is not a valid E164 number.\n * - `NOT_SET`: No subscription status specified. Default value.\n * - `PENDING`: Subscription confirmation was requested, but recipient hasn't confirmed yet.\n * - `SUBSCRIBED`: Recipient has explicitly opted in to receive marketing communications.\n * - `UNSUBSCRIBED`: Recipient has opted out of marketing communications.\n */\n status?: SubscriptionStatusWithLiterals;\n /** Date and time when the subscription status was last updated. */\n _updatedDate?: Date | null;\n}\n\nexport enum SubscriptionStatus {\n NO_SUBSCRIPTION_STATUS = 'NO_SUBSCRIPTION_STATUS',\n NOT_SET = 'NOT_SET',\n PENDING = 'PENDING',\n SUBSCRIBED = 'SUBSCRIBED',\n UNSUBSCRIBED = 'UNSUBSCRIBED',\n}\n\n/** @enumType */\nexport type SubscriptionStatusWithLiterals =\n | SubscriptionStatus\n | 'NO_SUBSCRIPTION_STATUS'\n | 'NOT_SET'\n | 'PENDING'\n | 'SUBSCRIBED'\n | 'UNSUBSCRIBED';\n\nexport enum EmailDeliverabilityStatus {\n NOT_SET = 'NOT_SET',\n VALID = 'VALID',\n BOUNCED = 'BOUNCED',\n SPAM_COMPLAINT = 'SPAM_COMPLAINT',\n INACTIVE = 'INACTIVE',\n}\n\n/** @enumType */\nexport type EmailDeliverabilityStatusWithLiterals =\n | EmailDeliverabilityStatus\n | 'NOT_SET'\n | 'VALID'\n | 'BOUNCED'\n | 'SPAM_COMPLAINT'\n | 'INACTIVE';\n\nexport interface AdditionalEmail {\n /**\n * Additional email address for the contact.\n * Does not affect subscription status or contact matching logic.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string;\n}\n\nexport interface ContactPhone {\n /**\n * Phone type classification. Helps categorize the phone number's purpose.\n *\n * Default: `OTHER`\n */\n tag?: PhoneTagWithLiterals;\n /**\n * [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code for the phone number.\n * This field is private and maintained for backwards compatibility.\n * @internal\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Primary phone number for the contact. Used for communication and contact matching.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string;\n /**\n * Phone number in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format (e.g., +12345550123).\n * This field is automatically generated from the phone field if it represents a valid E.164 number.\n * @readonly\n * @maxLength 50\n */\n e164?: string | null;\n /**\n * Indicates the recipient's opt-in or opt-out status for SMS/text message marketing.\n * This field is read-only and managed by the subscription system.\n *\n * Updates are eventually consistent, reflecting marketing consent changes after they're processed.\n * @readonly\n */\n subscriptionStatus?: ContactSubscription;\n /**\n * Indicates the delivery status for SMS messages sent to this phone number.\n * This field is read-only and updated automatically by the SMS delivery system.\n * - `NO_PHONE_DELIVERABILITY_STATUS`: No status exists. Used when the phone is not a valid E164 number.\n * - `NOT_SET`: No delivery status reported. Default when the phone is a valid E164 number.\n * - `VALID`: Last message was sent and delivered successfully.\n * - `INVALID`: The number is invalid (landline, number disconnected, etc.).\n * @readonly\n */\n deliverabilityStatus?: PhoneDeliverabilityStatusWithLiterals;\n}\n\nexport enum PhoneTag {\n OTHER = 'OTHER',\n MAIN = 'MAIN',\n HOME = 'HOME',\n MOBILE = 'MOBILE',\n WORK = 'WORK',\n FAX = 'FAX',\n}\n\n/** @enumType */\nexport type PhoneTagWithLiterals =\n | PhoneTag\n | 'OTHER'\n | 'MAIN'\n | 'HOME'\n | 'MOBILE'\n | 'WORK'\n | 'FAX';\n\nexport enum PhoneDeliverabilityStatus {\n NO_PHONE_DELIVERABILITY_STATUS = 'NO_PHONE_DELIVERABILITY_STATUS',\n NOT_SET = 'NOT_SET',\n VALID = 'VALID',\n INVALID = 'INVALID',\n}\n\n/** @enumType */\nexport type PhoneDeliverabilityStatusWithLiterals =\n | PhoneDeliverabilityStatus\n | 'NO_PHONE_DELIVERABILITY_STATUS'\n | 'NOT_SET'\n | 'VALID'\n | 'INVALID';\n\nexport interface AdditionalPhone {\n /**\n * Phone type classification for the additional phone number.\n *\n * Default: `OTHER`\n */\n tag?: PhoneTagWithLiterals;\n /**\n * [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code for the additional phone number.\n * This field is private and maintained for backwards compatibility.\n * @internal\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Additional phone number for the contact.\n * Does not affect subscription status or contact matching logic.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string;\n /**\n * Additional phone number in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format (e.g., +12345550123).\n * This field is automatically generated from the phone field if it represents a valid E.164 number.\n * @readonly\n * @maxLength 50\n */\n e164?: string | null;\n}\n\nexport interface ContactAddress {\n /**\n * Address type classification. Helps categorize the address purpose.\n *\n * Default: `OTHER`\n */\n tag?: AddressTagWithLiterals;\n /**\n * Physical address information including street, city, country, and postal code.\n * Contains structured address data following common address formatting standards.\n */\n address?: Address;\n /**\n * Whether this address is the contact's default address.\n * Only one address can be designated as default per contact.\n * If no address is explicitly set as default, the first address automatically becomes the default.\n */\n defaultAddress?: boolean | null;\n /**\n * Address ID.\n * @format GUID\n */\n _id?: string | null;\n /** Address recipient information for delivery purposes. */\n recipient?: Recipient;\n}\n\nexport enum AddressTag {\n OTHER = 'OTHER',\n HOME = 'HOME',\n WORK = 'WORK',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type AddressTagWithLiterals =\n | AddressTag\n | 'OTHER'\n | 'HOME'\n | 'WORK'\n | 'BILLING'\n | 'SHIPPING';\n\n/** Physical address, such as a billing or shipping address. */\nexport interface Address extends AddressStreetOneOf {\n /** Street address object, with number and name in separate fields. */\n streetAddress?: StreetAddress;\n /**\n * Main address line, usually street and number, as free text.\n * @maxLength 1000\n */\n addressLine1?: string | null;\n /**\n * 2-letter country code in an\n * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. For example, `NY`.\n * @format SUBDIVISION\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 300\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 100\n */\n postalCode?: string | null;\n /**\n * Free text providing more detailed address information,\n * such as apartment, suite, or floor.\n * @maxLength 1000\n */\n addressLine2?: string | null;\n /**\n * Human-readable address string.\n * If not provided, the value is generated from the available address data.\n * @maxLength 2000\n */\n formatted?: string | null;\n /**\n * Instructions to help someone find the address, such as landmarks or where the entrance is.\n * @maxLength 200\n */\n hint?: string | null;\n /** Coordinates of the physical address. */\n location?: AddressLocation;\n /**\n * Full country name.\n * @maxLength 100\n */\n countryFullname?: string | null;\n /**\n * Hierarchical list of subdivisions, where the first array item is the highest level of hierarchy, and so on.\n * @maxSize 6\n */\n subdivisions?: Subdivision[];\n /**\n * Subdivision full name.\n * @maxLength 100\n */\n subdivisionFullname?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street address object, with number and name in separate fields. */\n streetAddress?: StreetAddress;\n /**\n * Main address line, usually street and number, as free text.\n * @maxLength 1000\n */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /**\n * Street number.\n * @maxLength 100\n */\n number?: string;\n /**\n * Street name.\n * @maxLength 300\n */\n name?: string;\n /**\n * Apartment number.\n * @maxLength 50\n */\n apt?: string;\n /**\n * Optional formatted version of the street address line.\n * @maxLength 2000\n */\n formattedAddressLine?: string | null;\n}\n\nexport interface AddressLocation {\n /**\n * Address latitude.\n * @min -90\n * @max 90\n */\n latitude?: number | null;\n /**\n * Address longitude.\n * @min -180\n * @max 180\n */\n longitude?: number | null;\n}\n\nexport interface Subdivision {\n /**\n * Subdivision short code.\n * @maxLength 20\n */\n code?: string;\n /**\n * Full subdivision name.\n * @maxLength 100\n */\n name?: string;\n /** Subdivision level. */\n type?: SubdivisionTypeWithLiterals;\n /**\n * Free text description of subdivision type.\n * Examples: `\"state\"`, `\"province\"`, `\"prefecture\"`.\n * @maxLength 100\n */\n typeInfo?: string | null;\n /**\n * Standard organization details, such as ISO.\n * @internal\n */\n standardDetails?: StandardDetails;\n}\n\nexport enum SubdivisionType {\n UNKNOWN_SUBDIVISION_TYPE = 'UNKNOWN_SUBDIVISION_TYPE',\n /** State. */\n ADMINISTRATIVE_AREA_LEVEL_1 = 'ADMINISTRATIVE_AREA_LEVEL_1',\n /** County. */\n ADMINISTRATIVE_AREA_LEVEL_2 = 'ADMINISTRATIVE_AREA_LEVEL_2',\n /** City/town. */\n ADMINISTRATIVE_AREA_LEVEL_3 = 'ADMINISTRATIVE_AREA_LEVEL_3',\n /** Neighborhood/quarter. */\n ADMINISTRATIVE_AREA_LEVEL_4 = 'ADMINISTRATIVE_AREA_LEVEL_4',\n /** Street/block. */\n ADMINISTRATIVE_AREA_LEVEL_5 = 'ADMINISTRATIVE_AREA_LEVEL_5',\n /** Equivalent to `ADMINISTRATIVE_AREA_LEVEL_0`. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */\n COUNTRY = 'COUNTRY',\n}\n\n/** @enumType */\nexport type SubdivisionTypeWithLiterals =\n | SubdivisionType\n | 'UNKNOWN_SUBDIVISION_TYPE'\n | 'ADMINISTRATIVE_AREA_LEVEL_1'\n | 'ADMINISTRATIVE_AREA_LEVEL_2'\n | 'ADMINISTRATIVE_AREA_LEVEL_3'\n | 'ADMINISTRATIVE_AREA_LEVEL_4'\n | 'ADMINISTRATIVE_AREA_LEVEL_5'\n | 'COUNTRY';\n\n/** Subdivision concordance values. */\nexport interface StandardDetails {\n /**\n * Subdivision code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). For example, `US-NY`, `GB-SCT`, `NO-30`.\n * @maxLength 20\n */\n iso31662?: string | null;\n}\n\nexport interface Recipient {\n /**\n * Recipient's first name.\n * @maxLength 1000\n */\n firstName?: string | null;\n /**\n * Recipient's last name.\n * @maxLength 1000\n */\n lastName?: string | null;\n /**\n * Recipient's company name.\n * @maxLength 1000\n */\n company?: string | null;\n /**\n * Recipient's phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string | null;\n}\n\nexport interface ContactCompany {\n /**\n * Contact's company name.\n * @maxLength 1000\n */\n name?: string | null;\n /**\n * Contact's job title.\n * @maxLength 1000\n */\n jobTitle?: string | null;\n}\n\nexport interface ContactSource {\n /**\n * ID of the user who created this contact.\n * @readonly\n * @format GUID\n * @immutable\n */\n userId?: string | null;\n /**\n * ID of the application that created this contact.\n * @readonly\n * @format GUID\n * @immutable\n */\n appId?: string | null;\n /**\n * Additional information about the contact's origin or creation context.\n * @maxLength 1000\n * @immutable\n */\n additionalInfo?: string | null;\n}\n\nexport interface ContactActivity {\n /** Date and time when the contact's most recent activity occurred. */\n date?: Date | null;\n /**\n * ID of the activity template that defines the type of activity performed.\n * References a template in the contacts activity log system.\n * @format GUID\n */\n templateId?: string | null;\n}\n\n/**\n * Information about the site member linked to the contact.\n *\n * This object is read-only and populated automatically when the contact is linked to a member. It's eventually consistent with the member's data, so changes made to the member may take a short time to appear here.\n */\nexport interface MemberInfo {\n /**\n * Member ID.\n * @format GUID\n */\n memberId?: string | null;\n /** Date and time the member signed up. */\n signupDate?: Date | null;\n /**\n * Email the member uses to log in.\n * @format EMAIL\n */\n email?: string | null;\n /** Whether the email is verified. */\n emailVerified?: boolean | null;\n /** Whether the member is required to verify their email before they can log in. */\n emailVerificationRequired?: boolean | null;\n /**\n * Whether the member must still complete required profile fields (custom signup fields the site owner\n * marked as required) before their registration is finalized. Set for a social sign-up that was parked\n * awaiting the profile-completion step.\n */\n requireProfileCompletion?: boolean | null;\n /**\n * Member status.\n * - `PENDING`: Member created and is waiting for approval by site owner.\n * - `ACTIVE`: Member can log in to the site.\n * - `BLOCKED`: Member is blocked and cannot log in to the site.\n * - `OFFLINE`: Member is a [managed writer](https://support.wix.com/en/article/wix-blog-adding-managed-writers-to-your-blog) for the site blog and cannot log in to the site.\n */\n status?: MemberStatusWithLiterals;\n /** Information about the member's public profile. */\n profileInfo?: ProfileInfo;\n /** Information about the member's user account. */\n userInfo?: UserInfo;\n /** Information about the member's login sessions. */\n sessionInfo?: SessionInfo;\n /** Information about the groups the member belongs to. */\n groupInfo?: GroupInfo;\n}\n\nexport enum MemberStatus {\n PENDING = 'PENDING',\n ACTIVE = 'ACTIVE',\n BLOCKED = 'BLOCKED',\n OFFLINE = 'OFFLINE',\n}\n\n/** @enumType */\nexport type MemberStatusWithLiterals =\n | MemberStatus\n | 'PENDING'\n | 'ACTIVE'\n | 'BLOCKED'\n | 'OFFLINE';\n\nexport interface ProfileInfo {\n /**\n * Member's nickname.\n * @maxLength 255\n */\n nickname?: string | null;\n /** Whether the member's profile is visible to other site members and visitors. */\n privacyStatus?: PrivacyStatusWithLiterals;\n /** Whether the member has been reported by another member. */\n reported?: boolean | null;\n /** Whether the member has been muted and can't post or comment on the site. */\n muted?: boolean | null;\n /** Member's profile photo. */\n photo?: string;\n}\n\nexport enum PrivacyStatus {\n PRIVATE = 'PRIVATE',\n PUBLIC = 'PUBLIC',\n}\n\n/** @enumType */\nexport type PrivacyStatusWithLiterals = PrivacyStatus | 'PRIVATE' | 'PUBLIC';\n\nexport interface UserInfo {\n /**\n * User ID.\n * @format GUID\n */\n userId?: string;\n /** Member's role on the site. */\n role?: RoleWithLiterals;\n}\n\nexport enum Role {\n OWNER = 'OWNER',\n CONTRIBUTOR = 'CONTRIBUTOR',\n MEMBER = 'MEMBER',\n}\n\n/** @enumType */\nexport type RoleWithLiterals = Role | 'OWNER' | 'CONTRIBUTOR' | 'MEMBER';\n\nexport interface SessionInfo {\n /** Date and time the member last logged in to the site from a browser. */\n lastWebLogin?: Date | null;\n /** Date and time the member last logged in from one of the mobile apps. */\n lastMobileLogin?: Date | null;\n /**\n * Mobile apps the member has ever logged in to.\n * @maxSize 50\n * @maxLength 50\n */\n mobileAppNames?: string[];\n}\n\nexport interface GroupInfo {\n /**\n * IDs of the groups the member belongs to.\n * @format GUID\n * @maxSize 1000\n */\n groupIds?: string[];\n}\n\n/** Tags assigned to an entity that require an additional permission to access. */\nexport interface PrivateTags {\n /** Tags that require an additional permission to access, normally not given to site members or visitors. */\n privateTags?: TagList;\n}\n\nexport interface TagList {\n /**\n * A list of tag IDs.\n * To create a tag, use the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) with the contacts FQDN: `wix.contacts.*.contact`.\n * @maxSize 1000\n * @maxLength 5\n */\n tagIds?: string[];\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\n/**\n * Message for reindexing search data to a given search schema. Support both upsert and delete flows as well as\n * performs context manipulation with adding tenant, provided in message to callscope.\n */\nexport interface ReindexMessage extends ReindexMessageActionOneOf {\n upsert?: Upsert;\n delete?: ReindexMessageDelete;\n entityFqdn?: string;\n tenantId?: string;\n eventTime?: Date | null;\n entityEventSequence?: string | null;\n schema?: Schema;\n}\n\n/** @oneof */\nexport interface ReindexMessageActionOneOf {\n upsert?: Upsert;\n delete?: ReindexMessageDelete;\n}\n\nexport interface Upsert {\n entityId?: string;\n entityAsJson?: string;\n}\n\nexport interface ReindexMessageDelete {\n entityId?: string;\n}\n\nexport interface Schema {\n label?: string;\n clusterName?: string;\n}\n\n/** Triggered when one or more contacts are merged into another contact. */\nexport interface ContactMerged {\n /**\n * ID of the contact the source contacts were merged into.\n * @format GUID\n */\n targetContactId?: string;\n /**\n * IDs of contacts that were merged into the target contact.\n * @format GUID\n * @minSize 1\n * @maxSize 5\n */\n sourceContactIds?: string[];\n /** Updated target contact. */\n targetContact?: Contact;\n}\n\n/** Triggered when a contact's email subscription status changes. */\nexport interface ContactEmailSubscriptionUpdated {\n /**\n * The updated contact ID.\n * @format GUID\n */\n contactId?: string;\n /** The revision of the contact. */\n revision?: string | null;\n /** The email of the contact with the updated subscription status. */\n email?: ContactEmail;\n /** Date and time the contact was updated with the email subscription status. */\n _updatedDate?: Date | null;\n}\n\n/** Triggered when a contact's SMS subscription status changes. */\nexport interface ContactPhoneSubscriptionUpdated {\n /**\n * The updated contact ID.\n * @format GUID\n */\n contactId?: string;\n /** The revision of the contact. */\n revision?: string | null;\n /** The phone of the contact with the updated subscription status. */\n phone?: ContactPhone;\n /** Date and time the contact was updated with the SMS subscription status. */\n _updatedDate?: Date | null;\n}\n\n/** Triggered when a contact's image is uploaded. */\nexport interface ContactImageUploaded {\n /**\n * The updated contact ID.\n * @format GUID\n */\n contactId?: string;\n /** The revision of the contact. */\n revision?: string | null;\n /** The contact's uploaded image. */\n image?: string;\n /** Date and time the contact's image was updated. */\n _updatedDate?: Date | null;\n /**\n * The upload ID.\n * @format GUID\n */\n uploadId?: string | null;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BulkUpdateContactSubscriptionsRequest {\n /**\n * A filter for the contacts that the subscription statuses will be applied to.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter: Record<string, any> | null;\n /** Free text to match in searchable fields for the contacts that the subscription statuses will be applied to. */\n search?: SearchDetails;\n /** The subscription status to apply to the contact's email address. */\n emailSubscriptionStatus?: V5SubscriptionStatusWithLiterals;\n /** The subscription status to apply to the contact's phone. */\n phoneSubscriptionStatus?: V5SubscriptionStatusWithLiterals;\n}\n\nexport interface SearchDetails {\n /** How separate search terms in `expression` are combined. */\n mode?: ModeWithLiterals;\n /**\n * Search term or expression.\n * @maxLength 100\n */\n expression?: string | null;\n /**\n * Fields to search in. If empty, searches all searchable fields. Use dot notation to specify the JSON path.\n * @maxLength 200\n * @maxSize 20\n */\n fields?: string[];\n /** Whether to use fuzzy search, which allows typos using a managed proximity algorithm. */\n fuzzy?: boolean;\n}\n\nexport enum Mode {\n /** Any of the search terms must be present. */\n OR = 'OR',\n /** All search terms must be present. */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\nexport enum V5SubscriptionStatus {\n /** No subscription status has been reported yet. */\n NOT_SET = 'NOT_SET',\n /** Opted in to receive marketing messages. */\n SUBSCRIBED = 'SUBSCRIBED',\n /** Opted out of receiving marketing messages. */\n UNSUBSCRIBED = 'UNSUBSCRIBED',\n}\n\n/** @enumType */\nexport type V5SubscriptionStatusWithLiterals =\n | V5SubscriptionStatus\n | 'NOT_SET'\n | 'SUBSCRIBED'\n | 'UNSUBSCRIBED';\n\nexport interface BulkUpdateContactSubscriptionsResponse {\n /**\n * Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) to retrieve the status of the asynchronous operation.\n * @format GUID\n */\n jobId?: string;\n}\n\n/** Message for reindexing an entity across all active schemas (for fqdn). Tenant needs to be provided in call context. */\nexport interface ReindexEntityForFQDN extends ReindexEntityForFQDNActionOneOf {\n /** to upsert an entity */\n index?: Index;\n /** to remove an entity */\n delete?: Delete;\n /** to report completion of reindexing */\n reportBatchCompleted?: ReportBatchCompleted;\n /** to bulk upsert entities */\n bulkIndex?: BulkIndex;\n /** to bulk delete entities */\n bulkDelete?: BulkDelete;\n /**\n * entity fqdn\n * @maxLength 256\n */\n entityFqdn?: string;\n /** event time */\n eventTime?: Date | null;\n}\n\n/** @oneof */\nexport interface ReindexEntityForFQDNActionOneOf {\n /** to upsert an entity */\n index?: Index;\n /** to remove an entity */\n delete?: Delete;\n /** to report completion of reindexing */\n reportBatchCompleted?: ReportBatchCompleted;\n /** to bulk upsert entities */\n bulkIndex?: BulkIndex;\n /** to bulk delete entities */\n bulkDelete?: BulkDelete;\n}\n\n/** Will create or update entity in search index */\nexport interface Index {\n /**\n * entity id\n * @format GUID\n */\n entityId?: string;\n /** entity as json string */\n entityAsJson?: string;\n /** entity sequence for versioning */\n entityEventSequence?: string | null;\n}\n\n/** Will delete entity from search index */\nexport interface Delete {\n /**\n * entity id\n * @format GUID\n */\n entityId?: string;\n /** entity sequence for versioning */\n entityEventSequence?: string | null;\n}\n\n/** Will report completion of reindexing */\nexport interface ReportBatchCompleted {\n /** completion time */\n batchStart?: Date | null;\n}\n\n/** Will create or update entities in search index. Max 1000 entities per message. */\nexport interface BulkIndex {\n items?: Index[];\n}\n\n/** Will delete entities from search index. Max 1000 entities per message. */\nexport interface BulkDelete {\n items?: Delete[];\n}\n\nexport interface CreateContactRequest {\n /** Contact to create. */\n contact: Contact;\n /**\n * Whether to create the contact even if it duplicates an existing contact.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\nexport interface CreateContactResponse {\n /** Created contact. */\n contact?: Contact;\n /**\n * The upload ID of the image upload process.\n * @maxLength 100\n */\n imageUploadId?: string | null;\n}\n\nexport interface DuplicateContactExists {\n /**\n * ID of an existing contact that matches a duplicate in the request.\n * @format GUID\n */\n matchingContactId?: string | null;\n /** Field or fields of an existing contact that match a duplicate in the request. */\n matchType?: MatchTypeWithLiterals;\n}\n\nexport enum MatchType {\n EMAIL = 'EMAIL',\n PHONE = 'PHONE',\n EXTERNAL_ID = 'EXTERNAL_ID',\n EMAIL_AND_PHONE = 'EMAIL_AND_PHONE',\n}\n\n/** @enumType */\nexport type MatchTypeWithLiterals =\n | MatchType\n | 'EMAIL'\n | 'PHONE'\n | 'EXTERNAL_ID'\n | 'EMAIL_AND_PHONE';\n\nexport interface GetContactRequest {\n /**\n * ID of the contact to retrieve.\n * @format GUID\n */\n contactId: string;\n /**\n * Whether to read the contact from the database in a consistent manner.\n * @internal\n */\n consistent?: boolean | null;\n}\n\nexport interface GetContactResponse {\n /** Retrieved contact. */\n contact?: Contact;\n}\n\nexport interface UpdateContactRequest {\n /** Contact to update. May be partial. */\n contact: Contact;\n /**\n * Set of fields to update.\n *\n * Fields that aren't included in `fieldMask.paths` are ignored.\n * @internal\n */\n fieldMask?: string[];\n /**\n * Whether to update the contact even if it becomes a duplicate of another contact.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\nexport interface UpdateContactResponse {\n /** Updated contact. */\n contact?: Contact;\n /**\n * The upload ID of the image upload process.\n * @maxLength 100\n */\n imageUploadId?: string | null;\n}\n\nexport interface UpsertContactRequest {\n /** Contact to upsert. */\n contact: Contact;\n /**\n * Set of fields to update.\n *\n * Fields that aren't included in `fieldMask.paths` are ignored.\n * @internal\n */\n fieldMask?: string[];\n /** Mode that determines how an existing contact is updated when a match is found. See the endpoint description for the supported modes. */\n upsertMode?: UpsertModeWithLiterals;\n /** Whether to update the contact even if it's a site member. */\n updateMember?: boolean | null;\n}\n\nexport enum UpsertMode {\n /** Replaces existing field values. Default value. */\n OVERWRITE = 'OVERWRITE',\n /** Sets a non-array field only if it doesn't already have a value, and appends to array fields. */\n APPEND = 'APPEND',\n /** Overwrites non-array fields and appends to array fields. */\n OVERWRITE_APPEND_ARRAYS = 'OVERWRITE_APPEND_ARRAYS',\n}\n\n/** @enumType */\nexport type UpsertModeWithLiterals =\n | UpsertMode\n | 'OVERWRITE'\n | 'APPEND'\n | 'OVERWRITE_APPEND_ARRAYS';\n\nexport interface UpsertContactResponse {\n /** Upserted contact. */\n contact?: Contact;\n /** The action performed on the contact. */\n action?: UpsertContactResponseActionWithLiterals;\n /**\n * The upload ID of the image upload process.\n * @maxLength 100\n */\n imageUploadId?: string | null;\n}\n\nexport enum UpsertContactResponseAction {\n UPDATED = 'UPDATED',\n CREATED = 'CREATED',\n}\n\n/** @enumType */\nexport type UpsertContactResponseActionWithLiterals =\n | UpsertContactResponseAction\n | 'UPDATED'\n | 'CREATED';\n\nexport interface FailedMemberUpdate {\n /**\n * Contact ID.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport interface UpdateContactTagsRequest {\n /**\n * ID of the contact whose tags to update.\n * @format GUID\n */\n contactId: string;\n /** Tags to assign. */\n assignTags?: PrivateTags;\n /** Tags to unassign. */\n unassignTags?: PrivateTags;\n}\n\nexport interface UpdateContactTagsResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface MergeContactsRequest {\n /**\n * Target contact ID.\n * @format GUID\n */\n targetContactId: string;\n /**\n * Revision number of the target contact, which increments by 1 each time the contact is updated.\n * The current revision must be passed to prevent conflicting changes.\n */\n targetContactRevision: string | null;\n /** Contact to overwrite the target with, instead of merging in the source contacts' data. See the endpoint description for details. */\n targetContact?: Contact;\n /**\n * Set of fields to update.\n *\n * Fields that aren't included in `fieldMask.paths` are ignored.\n * @internal\n */\n fieldMask?: string[];\n /**\n * IDs of up to 5 contacts to merge into the target contact.\n * If merging more than one source contact,\n * the first source is given precedence, then the second, and so on.\n * @minSize 1\n * @maxSize 5\n * @format GUID\n */\n sourceContactIds?: string[];\n /**\n * Whether to return a preview of the merged contact instead of performing the actual merge.\n *\n * Default: `false`\n */\n preview?: boolean | null;\n /**\n * Whether to update the target contact even if it becomes a duplicate of another contact. Relevant only when `targetContact` is provided.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\nexport interface MergeContactsResponse {\n /** Updated target contact. */\n contact?: Contact;\n}\n\nexport interface DeleteContactRequest {\n /**\n * ID of the contact to delete.\n * @format GUID\n */\n contactId: string;\n /**\n * Whether to delete the contact even if it's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMember?: boolean | null;\n}\n\nexport interface DeleteContactResponse {}\n\nexport interface FindMatchingContactsRequest {\n /**\n * Contact external ID.\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Email address.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string | null;\n /**\n * Phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string | null;\n}\n\nexport interface FindMatchingContactsResponse {\n /** Matching contacts, ordered by match strength. At most 100 contacts are returned. */\n contacts?: Contact[];\n}\n\nexport interface QueryContactsRequest {\n /** WQL expression. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n /**\n * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n *\n * If multiple filters are provided, they are combined with AND operator.\n *\n * Example:\n * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n * @internal\n * @maxSize 10\n */\n selectItemsBy?: Record<string, any>[] | null;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryContactsResponse {\n /** Retrieved contacts. */\n contacts?: Contact[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\n/** Paging metadata for cursor-based pagination. */\nexport interface CursorPagingMetadata {\n /** Number of items returned in the current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n /**\n * Total number of items matching the filter.\n * Available only on the first page of Search results, not included in Query or List results.\n * If the Search results span multiple pages, the value of `total` can exceed the number of items returned on the first page.\n */\n total?: number | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface SearchContactsRequest {\n /** WQL search expression. */\n search?: CursorSearch;\n /**\n * Name Format for sorting and searching.\n * When sorting by `displayName`, the returned contacts are ordered by first and last names, by default.\n * Alternatively, when sorting by `displayName` with `BY_LAST_NAME`, the returned contacts are ordered by last and first names.\n * For contacts that do not have names, sorting is by email or phone.\n * When searching by `name.full`, the contacts returned are matched and ordered by first and last names.\n * Alternatively, when searching by `name.full` with `BY_LAST_NAME`, the contacts returned\n * are matched and ordered by last and first names.\n */\n nameFormat?: NameFormatWithLiterals;\n /**\n * Natural language query for semantic search. Mutually exclusive with cursor paging with a cursor.\n * @maxLength 1000\n */\n semanticQuery?: string | null;\n}\n\nexport interface CursorSearch extends CursorSearchPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * List of sort objects.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 10\n */\n sort?: Sorting[];\n /**\n * Aggregations, also known as faceted search. Lets you explore large amounts of data by displaying summaries about different partitions of the data, and narrow the navigation to a specific partition.\n * @maxSize 10\n */\n aggregations?: Aggregation[];\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /**\n * UTC offset or IANA time zone. Valid values are\n * ISO 8601 UTC offsets, such as +02:00 or -06:00,\n * and IANA time zone IDs, such as Europe/Rome.\n *\n * Affects the values returned by all filters and aggregations.\n * You can override this behavior in a specific filter by providing\n * timestamps that include a time zone. For example, `\"2023-12-20T10:52:34.795Z\"`.\n * @maxLength 50\n */\n timeZone?: string | null;\n}\n\n/** @oneof */\nexport interface CursorSearchPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Aggregation extends AggregationKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n /** Nested aggregation. */\n nested?: NestedAggregation;\n /**\n * User-defined name for the aggregation. Must be unique. Appears in the aggregation results.\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation. Must match the aggregation type provided in the `kind` field. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by. Use dot notation to specify the JSON path.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n /** Nested aggregation. */\n nested?: NestedAggregation;\n}\n\nexport interface RangeBucket {\n /** Inclusive lower bound of the range. Required if `to` isn't given. */\n from?: number | null;\n /** Exclusive upper bound of the range. Required if `from` isn't given. */\n to?: number | null;\n}\n\nexport enum SortType {\n /** Sorts by number of matches. */\n COUNT = 'COUNT',\n /** Sorts by the field's value, alphabetically. */\n VALUE = 'VALUE',\n}\n\n/** @enumType */\nexport type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';\n\nexport enum SortDirection {\n /** Sorts in descending order. */\n DESC = 'DESC',\n /** Sorts in ascending order. */\n ASC = 'ASC',\n}\n\n/** @enumType */\nexport type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';\n\nexport enum MissingValues {\n /** Missing values are excluded from the aggregation results. */\n EXCLUDE = 'EXCLUDE',\n /** Missing values are included in the aggregation results. */\n INCLUDE = 'INCLUDE',\n}\n\n/** @enumType */\nexport type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';\n\nexport interface IncludeMissingValuesOptions {\n /**\n * Custom name for the bucket that holds missing values.\n *\n * Default: `\"N/A\"` for string fields, `\"0\"` for integer fields, `\"false\"` for boolean fields.\n * @maxLength 20\n */\n addToBucket?: string;\n}\n\nexport enum ScalarType {\n /** Count of distinct values. */\n COUNT_DISTINCT = 'COUNT_DISTINCT',\n /** Minimum value. */\n MIN = 'MIN',\n /** Maximum value. */\n MAX = 'MAX',\n /**\n * Sum of values.\n * @internal\n */\n SUM = 'SUM',\n /**\n * Average of values.\n * @internal\n */\n AVG = 'AVG',\n}\n\n/** @enumType */\nexport type ScalarTypeWithLiterals =\n | ScalarType\n | 'COUNT_DISTINCT'\n | 'MIN'\n | 'MAX';\n\nexport enum NestedAggregationType {\n /** An aggregation where result buckets are dynamically built, one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation where you can define a set of ranges, each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation, such as min, max, sum, or avg. */\n SCALAR = 'SCALAR',\n /** An aggregation where result buckets are dynamically built, one per time interval (hour, day, week, and so on). */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n}\n\n/** @enumType */\nexport type NestedAggregationTypeWithLiterals =\n | NestedAggregationType\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM';\n\nexport interface ValueAggregation extends ValueAggregationOptionsOneOf {\n /** Options for including missing values. Used only when `missingValues` is `INCLUDE`. */\n includeOptions?: IncludeMissingValuesOptions;\n /** How to sort the aggregation results: by number of matches or by field value. */\n sortType?: SortTypeWithLiterals;\n /** Sort direction: ascending or descending. */\n sortDirection?: SortDirectionWithLiterals;\n /**\n * Number of aggregations to return.\n *\n * Default: `10`\n */\n limit?: number | null;\n /**\n * Whether to include missing values in the aggregation results.\n *\n * Default: `EXCLUDE`\n */\n missingValues?: MissingValuesWithLiterals;\n}\n\n/** @oneof */\nexport interface ValueAggregationOptionsOneOf {\n /** Options for including missing values. Used only when `missingValues` is `INCLUDE`. */\n includeOptions?: IncludeMissingValuesOptions;\n}\n\nexport interface RangeAggregation {\n /**\n * Range buckets used for the aggregation. Each entity is placed in the first bucket whose range its value falls into.\n * @maxSize 50\n */\n buckets?: RangeBucket[];\n}\n\nexport interface ScalarAggregation {\n /** Operator for the scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n}\n\nexport interface DateHistogramAggregation {\n /** Interval for the date histogram aggregation. */\n interval?: IntervalWithLiterals;\n}\n\nexport enum Interval {\n /** Yearly interval. */\n YEAR = 'YEAR',\n /** Monthly interval. */\n MONTH = 'MONTH',\n /** Weekly interval. */\n WEEK = 'WEEK',\n /** Daily interval. */\n DAY = 'DAY',\n /** Hourly interval. */\n HOUR = 'HOUR',\n /** Minute interval. */\n MINUTE = 'MINUTE',\n /** Second interval. */\n SECOND = 'SECOND',\n}\n\n/** @enumType */\nexport type IntervalWithLiterals =\n | Interval\n | 'YEAR'\n | 'MONTH'\n | 'WEEK'\n | 'DAY'\n | 'HOUR'\n | 'MINUTE'\n | 'SECOND';\n\nexport interface NestedAggregationItem extends NestedAggregationItemKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n /**\n * User-defined name for the aggregation. Must be unique. Appears in the aggregation results.\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation. Must match the aggregation type provided in the `kind` field. */\n type?: NestedAggregationTypeWithLiterals;\n /**\n * Field to aggregate by. Use dot notation to specify the JSON path.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationItemKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n}\n\nexport enum AggregationType {\n /** An aggregation where result buckets are dynamically built, one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation where you can define a set of ranges, each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation, such as min, max, sum, or avg. */\n SCALAR = 'SCALAR',\n /** An aggregation where result buckets are dynamically built, one per time interval (hour, day, week, and so on). */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n /** Multi-level aggregation, where each next aggregation is nested within the previous one. */\n NESTED = 'NESTED',\n}\n\n/** @enumType */\nexport type AggregationTypeWithLiterals =\n | AggregationType\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM'\n | 'NESTED';\n\n/** Nested aggregation expressed as a list of aggregations, where each next aggregation is nested within the previous one. */\nexport interface NestedAggregation {\n /**\n * Flattened list of aggregations, where each next aggregation is nested within the previous one.\n * @minSize 2\n * @maxSize 3\n */\n nestedAggregations?: NestedAggregationItem[];\n}\n\n/** Name format types for sorting and searching. */\nexport enum NameFormat {\n /** Names will be formatted starting with the first name followed by the last name. */\n BY_FIRST_NAME = 'BY_FIRST_NAME',\n /** Names will be formatted starting with the last name followed by the first name. */\n BY_LAST_NAME = 'BY_LAST_NAME',\n}\n\n/** @enumType */\nexport type NameFormatWithLiterals =\n | NameFormat\n | 'BY_FIRST_NAME'\n | 'BY_LAST_NAME';\n\nexport interface SearchContactsResponse {\n /** Retrieved contacts. */\n contacts?: Contact[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n /** Aggregation data. */\n aggregationData?: AggregationData;\n}\n\nexport interface AggregationData {\n /**\n * Results of the requested aggregations.\n * @maxSize 10000\n */\n results?: AggregationResults[];\n}\n\nexport interface ValueAggregationResult {\n /**\n * Value of the field.\n * @maxLength 100\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number;\n}\n\nexport interface RangeAggregationResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in this range. */\n count?: number;\n}\n\nexport interface ValueResults {\n /**\n * Value aggregation results.\n * @maxSize 250\n */\n results?: ValueAggregationResult[];\n}\n\nexport interface RangeResults {\n /**\n * Range results, returned in the same order as requested.\n * @maxSize 50\n */\n results?: RangeAggregationResult[];\n}\n\nexport interface AggregationResultsScalarResult {\n /** Type of scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface ValueResult {\n /**\n * Value of the field.\n * @maxLength 1000\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number | null;\n}\n\nexport interface RangeResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in this range. */\n count?: number | null;\n}\n\nexport interface ScalarResult {\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface NestedResultValue extends NestedResultValueResultOneOf {\n /** Value aggregation result. */\n value?: ValueResult;\n /** Range aggregation result. */\n range?: RangeResult;\n /** Scalar aggregation result. */\n scalar?: ScalarResult;\n /** Date histogram aggregation result. */\n dateHistogram?: ValueResult;\n}\n\n/** @oneof */\nexport interface NestedResultValueResultOneOf {\n /** Value aggregation result. */\n value?: ValueResult;\n /** Range aggregation result. */\n range?: RangeResult;\n /** Scalar aggregation result. */\n scalar?: ScalarResult;\n /** Date histogram aggregation result. */\n dateHistogram?: ValueResult;\n}\n\nexport interface Results {\n /** Nested aggregation results, keyed by aggregation name. */\n results?: Record<string, NestedResultValue>;\n}\n\nexport interface DateHistogramResult {\n /**\n * Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\n * @maxLength 100\n */\n value?: string;\n /** Count of documents in the bucket. */\n count?: number;\n}\n\nexport interface DateHistogramResults {\n /**\n * Date histogram aggregation results.\n * @maxSize 200\n */\n results?: DateHistogramResult[];\n}\n\n/** Results of the `NESTED` aggregation type in a flattened form. Entries in the resulting array are keyed by the requested aggregation's `name`. */\nexport interface NestedResults {\n /**\n * Nested aggregation results.\n * @maxSize 1000\n */\n results?: Results[];\n}\n\nexport interface AggregationResults extends AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n /**\n * User-defined name of the aggregation, as provided in the search request.\n * @maxLength 100\n */\n name?: string;\n /** Type of aggregation. Matches the `kind` provided in the search request. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by, as provided in the search request.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n}\n\nexport interface CountContactsRequest {\n /**\n * Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match.\n *\n * Supported search properties are:\n *\n * - `name.full`\n * - `email.email`\n * - `phone.phone`\n * - `member_info.email`\n * - `member_info.profile_info.nickname`\n * - `company.name`\n * - `company.job_title`\n *\n * Max: 100 characters\n * @maxLength 100\n */\n search?: string | null;\n}\n\nexport interface CountContactsResponse {\n /** Number of contacts that match the provided filter and search criteria. */\n count?: number;\n}\n\nexport interface GenerateContactImageUploadUrlRequest {\n /**\n * ID of the contact to generate an image upload URL for.\n * @format GUID\n */\n contactId: string;\n /**\n * MIME type. Must be one of: `image/png`, `image/jpeg`.\n *\n * Default: `image/png`\n * @maxLength 100\n */\n mimeType?: string | null;\n}\n\nexport interface GenerateContactImageUploadUrlResponse {\n /**\n * URL to upload the image to.\n * @format WEB_URL\n */\n uploadUrl?: string;\n /**\n * Upload ID. Pass this ID to [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to check the status of the upload.\n * @format GUID\n */\n imageUploadId?: string;\n}\n\nexport interface AddContactAdditionalEmailRequest {\n /**\n * ID of the contact to add an email to.\n * @format GUID\n */\n contactId: string;\n /** Email to add. */\n email: AdditionalEmail;\n /** Contact revision number. */\n revision: string | null;\n}\n\nexport interface AddContactAdditionalEmailResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface AddContactAdditionalPhoneRequest {\n /**\n * ID of the contact to add a phone to.\n * @format GUID\n */\n contactId: string;\n /** Phone to add. */\n phone: AdditionalPhone;\n /** Contact revision number. */\n revision: string | null;\n}\n\nexport interface AddContactAdditionalPhoneResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface AddContactAddressRequest {\n /**\n * ID of the contact to add an address to.\n * @format GUID\n */\n contactId: string;\n /** Address to add. */\n address: ContactAddress;\n /** Contact revision number. */\n revision: string | null;\n}\n\nexport interface AddContactAddressResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface DeleteContactAddressRequest {\n /**\n * ID of the contact to delete the address from.\n * @format GUID\n */\n contactId: string;\n /**\n * ID of the address to delete.\n * @format GUID\n */\n addressId: string;\n /** Contact revision number. */\n revision: string | null;\n}\n\nexport interface DeleteContactAddressResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface UpdateContactAddressRequest {\n /**\n * ID of the contact to update the address on.\n * @format GUID\n */\n contactId: string;\n /** Address to update. Must include `address.id`. */\n address: ContactAddress;\n /** Contact revision number. */\n revision: string | null;\n}\n\nexport interface UpdateContactAddressResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface BulkCreateContactsRequest {\n /**\n * Contacts to create.\n * @minSize 1\n * @maxSize 100\n */\n contacts: Contact[];\n /** Whether to include the created contacts in the response. */\n returnEntity?: boolean;\n /** Whether to create the contact even if it duplicates an existing contact. */\n allowDuplicates?: boolean;\n}\n\nexport interface BulkCreateContactsResponse {\n /**\n * Results of the bulk create operation, including the created contacts and metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkContactResult[];\n /** Metadata regarding the bulk create operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkContactResult {\n /** Metadata regarding the creation of this specific contact. */\n itemMetadata?: ItemMetadata;\n /** Returned only when `returnEntity` is `true` in the request. */\n item?: Contact;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkUpdateContactsRequest {\n /**\n * Contacts to update.\n * @minSize 1\n * @maxSize 100\n */\n contacts: MaskedContact[];\n /** Whether to include the updated contacts in the response. */\n returnEntity?: boolean;\n /** Whether to update the contact even if it becomes a duplicate of another contact. */\n allowDuplicates?: boolean;\n}\n\nexport interface MaskedContact {\n /** Contact to update. May be partial. */\n contact?: Contact;\n /**\n * Explicit list of fields to update.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdateContactsResponse {\n /**\n * Results of the update for each contact.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdateContactsResponseBulkContactResult[];\n /** Metadata regarding the bulk update operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUpdateContactsResponseBulkContactResult {\n /** Metadata regarding the update of this specific contact. */\n itemMetadata?: ItemMetadata;\n /** Returned only when `returnEntity` is `true` in the request. */\n item?: Contact;\n}\n\nexport interface BulkUpdateContactTagsRequest {\n /**\n * IDs of the contacts to add or remove tags on.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds: string[];\n /** Whether to include the updated contacts in the response. */\n returnEntity?: boolean;\n /** Tags to assign. */\n assignTags?: PrivateTags;\n /** Tags to unassign. */\n unassignTags?: PrivateTags;\n}\n\nexport interface BulkUpdateContactTagsResponse {\n /**\n * Results of the tag update for each contact.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdateContactTagsResult[];\n /** Summary of successes and failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUpdateContactTagsResult {\n /** Metadata regarding the tag update for this specific contact. */\n itemMetadata?: ItemMetadata;\n /** Returned only when `returnEntity` is `true` in the request. */\n item?: Contact;\n}\n\nexport interface BulkUpdateContactTagsByFilterRequest {\n /** Filter object. See documentation [here](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters). */\n filter: Record<string, any> | null;\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /** Tags to assign to the matching contacts. */\n assignTags?: PrivateTags;\n /** Tags to unassign from the matching contacts. */\n unassignTags?: PrivateTags;\n}\n\nexport interface BulkUpdateContactTagsByFilterResponse {\n /**\n * Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) to retrieve the status of the asynchronous operation.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkUpsertContactsRequest {\n /**\n * Contacts to create or update.\n * @minSize 1\n * @maxSize 100\n */\n contacts: BulkUpsertContactsRequestMaskedContact[];\n /** Whether to include the upserted contacts in the response. */\n returnEntity?: boolean;\n /** Mode that determines how an existing contact is updated when a match is found. See the endpoint description for the supported modes. */\n upsertMode?: UpsertModeWithLiterals;\n /** Whether to update a contact even if it's a site member. */\n updateMember?: boolean | null;\n}\n\nexport interface BulkUpsertContactsRequestMaskedContact {\n /** Contact to create or update. May be partial. */\n contact?: Contact;\n /**\n * Explicit list of fields to update.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface BulkUpsertContactsResponse {\n /**\n * Results of the upsert for each contact.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpsertContactsResponseBulkContactResult[];\n /** Metadata regarding the bulk upsert operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport enum Action {\n UNKNOWN_ACTION = 'UNKNOWN_ACTION',\n UPDATED = 'UPDATED',\n CREATED = 'CREATED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals =\n | Action\n | 'UNKNOWN_ACTION'\n | 'UPDATED'\n | 'CREATED';\n\nexport interface BulkUpsertContactsResponseBulkContactResult {\n /** Metadata regarding the upsert of this specific contact. */\n itemMetadata?: ItemMetadata;\n /** Returned only when `returnEntity` is `true` in the request. */\n item?: Contact;\n /** The action performed on the contact. */\n action?: ActionWithLiterals;\n}\n\nexport interface BulkDeleteContactsRequest {\n /**\n * IDs of the contacts to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds: string[];\n /**\n * Whether to delete the associated site member for any contact that's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\nexport interface BulkDeleteContactsResponse {\n /**\n * Results of the delete operation for each contact.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkDeleteContactsResponseBulkContactResult[];\n /** Metadata regarding the bulk delete operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteContactsResponseBulkContactResult {\n /** Metadata regarding the deletion of this specific contact. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkDeleteContactsByFilterRequest {\n /**\n * Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter: Record<string, any> | null;\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /**\n * Whether to delete the associated site member for any contact that's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\nexport interface BulkDeleteContactsByFilterResponse {\n /**\n * Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) to retrieve the status of the asynchronous operation.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface RemoveContactFromTrashBinRequest {\n /**\n * ID of the contact to permanently delete from the trash bin.\n * @format GUID\n */\n contactId: string;\n}\n\nexport interface RemoveContactFromTrashBinResponse {}\n\nexport interface RestoreContactFromTrashBinRequest {\n /**\n * ID of the contact to restore from the trash bin.\n * @format GUID\n */\n contactId: string;\n}\n\nexport interface RestoreContactFromTrashBinResponse {\n /** Restored contact. */\n contact?: Contact;\n}\n\nexport interface BulkRestoreContactsFromTrashBinRequest {\n /**\n * IDs of the contacts to restore from the trash bin.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds?: string[];\n /** Whether to include the restored contacts in the response. */\n returnEntity?: boolean;\n}\n\nexport interface BulkRestoreContactsFromTrashBinResponse {\n /**\n * Results of the restore operation for each contact.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkRestoreContactsFromTrashBinResponseBulkContactResult[];\n /** Metadata regarding the bulk restore operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkRestoreContactsFromTrashBinResponseBulkContactResult {\n /** Metadata regarding the restoration of this specific contact. */\n itemMetadata?: ItemMetadata;\n /** Returned only when `returnEntity` is `true` in the request. */\n item?: Contact;\n}\n\nexport interface GetDeletedContactRequest {\n /**\n * ID of the contact to retrieve from the trash bin.\n * @format GUID\n */\n contactId: string;\n}\n\nexport interface GetDeletedContactResponse {\n /** Retrieved contact. */\n contact?: Contact;\n}\n\nexport interface ListDeletedContactsRequest {\n /**\n * External ID.\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Email address.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string | null;\n /**\n * Phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string | null;\n /**\n * Contact IDs.\n * @maxSize 100\n * @format GUID\n */\n contactIds?: string[];\n /** Filters to contacts deleted on or after this date and time. */\n deletedFromDate?: Date | null;\n /** Filters to contacts deleted on or before this date and time. */\n deletedToDate?: Date | null;\n /** Cursor paging. */\n paging?: CursorPaging;\n}\n\nexport interface ListDeletedContactsResponse {\n /** Retrieved contacts. */\n contacts?: Contact[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface BulkAddSegmentToContactsRequest {\n /**\n * Segment ID.\n * @format GUID\n */\n segmentId?: string;\n /**\n * IDs of the contacts to add the segment to.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n contactIds?: string[];\n /**\n * IDs of segments on the contact that no longer exist, used to remove them from the contact.\n * @format GUID\n * @maxSize 100\n */\n existingSegmentIds?: string[];\n}\n\nexport interface BulkAddSegmentToContactsResponse {\n /** Results of the action for each contact. */\n results?: ItemMetadata[];\n /** Metadata regarding the bulk action. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkRemoveSegmentFromContactsRequest {\n /**\n * Segment ID.\n * @format GUID\n */\n segmentId?: string;\n /**\n * IDs of the contacts to remove the segment from.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n contactIds?: string[];\n}\n\nexport interface BulkRemoveSegmentFromContactsResponse {\n /** Results of the action for each contact. */\n results?: ItemMetadata[];\n /** Metadata regarding the bulk action. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface QueryContactsByOffsetInternalRequest {\n /** WQL expression. */\n query?: QueryV2;\n /**\n * Plain text search for an exact match.\n *\n * Supported search properties are:\n *\n * - `name.full`\n * - `email.email`\n * - `phone.phone`\n * - `member_info.email`\n * - `member_info.profile_info.nickname`\n * - `company.name`\n * - `company.job_title`\n *\n * Max: 100 characters\n * @maxLength 100\n */\n search?: string | null;\n /**\n * Whether to omit the total count of matching contacts from the response.\n * @internal\n */\n omitTotal?: boolean | null;\n /**\n * Name Format for sorting and searching.\n * When sorting by `displayName`, the returned contacts are ordered by first and last names, by default.\n * Alternatively, when sorting by `displayName` with `BY_LAST_NAME`, the returned contacts are ordered by last and first names.\n * For contacts that do not have names, sorting is by email or phone.\n * When searching by `name.full`, the contacts returned are matched and ordered by first and last names.\n * Alternatively, when searching by `name.full` with `BY_LAST_NAME`, the contacts returned\n * are matched and ordered by last and first names.\n */\n nameFormat?: QueryContactsByOffsetInternalRequestNameFormatWithLiterals;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 100\n */\n sort?: Sorting[];\n /**\n * Projected fields to return. If `fieldsets` is also specified, the union of `fieldsets` and `fields` is returned.\n * @maxSize 1000\n * @maxLength 100\n */\n fields?: string[];\n /**\n * Predefined, named sets of projected fields to return. Specifying multiple `fieldsets` returns the union of fields from all sets. If `fields` is also specified, the union of `fieldsets` and `fields` is returned.\n * @maxSize 100\n * @maxLength 100\n */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Paging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\n/** Name format types for sorting and searching. */\nexport enum QueryContactsByOffsetInternalRequestNameFormat {\n BY_FIRST_NAME = 'BY_FIRST_NAME',\n BY_LAST_NAME = 'BY_LAST_NAME',\n}\n\n/** @enumType */\nexport type QueryContactsByOffsetInternalRequestNameFormatWithLiterals =\n | QueryContactsByOffsetInternalRequestNameFormat\n | 'BY_FIRST_NAME'\n | 'BY_LAST_NAME';\n\nexport interface QueryContactsByOffsetInternalResponse {\n /** Retrieved contacts. */\n contacts?: Contact[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Whether the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Whether there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n * @internal\n */\n hasNext?: boolean | null;\n}\n\nexport interface GetContactImageUploadStatusRequest {\n /**\n * ID of the contact whose image upload status to retrieve.\n * @format GUID\n */\n contactId: string;\n /**\n * The upload ID of the image upload process. Returned when an image URL is provided while creating or updating a contact, or from [Generate Contact Image Upload Url](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/generate-contact-image-upload-url).\n * @maxLength 100\n */\n imageUploadId: string;\n}\n\nexport interface GetContactImageUploadStatusResponse {\n /** The status of the image upload process. */\n status?: ImageUploadStatusWithLiterals;\n}\n\nexport enum ImageUploadStatus {\n /** Image upload is in progress. */\n IN_PROGRESS = 'IN_PROGRESS',\n /** Image is uploaded. */\n SUCCESS = 'SUCCESS',\n /** Image upload failed. */\n FAILURE = 'FAILURE',\n}\n\n/** @enumType */\nexport type ImageUploadStatusWithLiterals =\n | ImageUploadStatus\n | 'IN_PROGRESS'\n | 'SUCCESS'\n | 'FAILURE';\n\nexport interface BulkUpdatePhoneCountryCodeByFilterRequest {\n /**\n * A filter for the contacts that the country code will be applied to.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /** Free text to match in searchable fields for the contacts that the country code will be applied to. */\n search?: SearchDetails;\n /**\n * [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code to apply.\n *\n * Applied only to contacts whose phone number isn't already in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format. If the phone number still can't be converted to E.164 format after applying the country code, that contact fails with `PHONE_CANNOT_BE_FIXED_WITH_COUNTRY_CODE`.\n * @format COUNTRY\n */\n countryCode: string;\n}\n\nexport interface BulkUpdatePhoneCountryCodeByFilterResponse {\n /**\n * Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) to retrieve the status of the asynchronous operation.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface Empty {}\n\nexport interface MediaFileUploadedEvent {\n fileId?: string;\n path?: string;\n mimeType?: string;\n acl?: string | null;\n size?: string | null;\n dateCreated?: Date | null;\n dateUpdated?: Date | null;\n}\n\n/** @docsIgnore */\nexport type BulkUpdateContactSubscriptionsApplicationErrors = {\n code?: 'MISSING_SUBSCRIPTION_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CreateContactApplicationErrors =\n | {\n code?: 'INSUFFICIENT_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_PHONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MULTIPLE_DEFAULT_ADDRESSES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'EMAIL_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PHONE_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_CONTACT_EXISTS';\n description?: string;\n data?: DuplicateContactExists;\n }\n | {\n code?: 'INVALID_TIME_ZONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_BIRTHDATE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_IMAGE_URL';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateContactApplicationErrors =\n | {\n code?: 'INSUFFICIENT_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_PHONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MULTIPLE_DEFAULT_ADDRESSES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'EMAIL_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PHONE_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_CHANGE_EXTERNAL_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_CONTACT_EXISTS';\n description?: string;\n data?: DuplicateContactExists;\n }\n | {\n code?: 'CANNOT_UPDATE_MEMBER_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_TIME_ZONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_IMAGE_URL';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpsertContactApplicationErrors =\n | {\n code?: 'INSUFFICIENT_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_PHONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MULTIPLE_DEFAULT_ADDRESSES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'EMAIL_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PHONE_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_TIME_ZONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_IMAGE_URL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_CHANGE_EXTERNAL_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_UPDATE_MEMBER_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNAUTHORIZED_UPDATE_MEMBER';\n description?: string;\n data?: FailedMemberUpdate;\n }\n | {\n code?: 'CANNOT_UPDATE_MEMBER';\n description?: string;\n data?: FailedMemberUpdate;\n };\n/** @docsIgnore */\nexport type UpdateContactTagsApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type MergeContactsApplicationErrors =\n | {\n code?: 'CANNOT_MERGE_SOURCE_MEMBER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_UPDATE_MEMBER_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CONTACT_MERGE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SOURCE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INSUFFICIENT_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_PHONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MULTIPLE_DEFAULT_ADDRESSES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'EMAIL_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PHONE_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_CHANGE_EXTERNAL_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_CONTACT_EXISTS';\n description?: string;\n data?: DuplicateContactExists;\n }\n | {\n code?: 'INVALID_TIME_ZONE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_IMAGE_URL';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeleteContactApplicationErrors =\n | {\n code?: 'UNAUTHORIZED_DELETE_MEMBER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_DELETE_MEMBER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_DELETE_WIX_USERS_MEMBER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type FindMatchingContactsApplicationErrors = {\n code?: 'NO_IDENTIFIER_PROVIDED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type GenerateContactImageUploadUrlApplicationErrors = {\n code?: 'INVALID_MIME_TYPE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type AddContactAdditionalEmailApplicationErrors =\n | {\n code?: 'EMAIL_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ADDITIONAL_EMAILS_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type AddContactAdditionalPhoneApplicationErrors =\n | {\n code?: 'PHONE_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ADDITIONAL_PHONES_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type AddContactAddressApplicationErrors =\n | {\n code?: 'ADDRESSES_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeleteContactAddressApplicationErrors =\n | {\n code?: 'ADDRESS_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS_ID';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateContactAddressApplicationErrors =\n | {\n code?: 'ADDRESS_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type BulkUpdateContactTagsApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkUpdateContactTagsByFilterApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkDeleteContactsApplicationErrors = {\n code?: 'UNAUTHORIZED_DELETE_MEMBER';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkDeleteContactsByFilterApplicationErrors = {\n code?: 'UNAUTHORIZED_DELETE_MEMBER';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type GetContactImageUploadStatusApplicationErrors = {\n code?: 'UPLOAD_ID_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Updates the email and SMS marketing subscription statuses of multiple contacts that match the provided filter. Works asynchronously.\n *\n * If a requested subscription status matches a contact's current status, that contact is left unchanged. Provide at least one of `emailSubscriptionStatus` or `phoneSubscriptionStatus`.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n * @param filter - A filter for the contacts that the subscription statuses will be applied to.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n * @public\n * @requiredField filter\n * @permissionId CONTACTS.CONTACT_SUBSCRIPTION_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.ContactSubscriptions.BulkUpdateContactSubscriptions\n */\nexport async function bulkUpdateContactSubscriptions(\n filter: Record<string, any>,\n options?: BulkUpdateContactSubscriptionsOptions\n): Promise<\n NonNullablePaths<BulkUpdateContactSubscriptionsResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkUpdateContactSubscriptionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n search: options?.search,\n emailSubscriptionStatus: options?.emailSubscriptionStatus,\n phoneSubscriptionStatus: options?.phoneSubscriptionStatus,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.bulkUpdateContactSubscriptions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0]',\n search: '$[1].search',\n emailSubscriptionStatus: '$[1].emailSubscriptionStatus',\n phoneSubscriptionStatus: '$[1].phoneSubscriptionStatus',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateContactSubscriptionsOptions {\n /** Free text to match in searchable fields for the contacts that the subscription statuses will be applied to. */\n search?: SearchDetails;\n /** The subscription status to apply to the contact's email address. */\n emailSubscriptionStatus?: V5SubscriptionStatusWithLiterals;\n /** The subscription status to apply to the contact's phone. */\n phoneSubscriptionStatus?: V5SubscriptionStatusWithLiterals;\n}\n\n/**\n * Creates a contact.\n *\n * At least one of `name.first`, `name.last`, `email.email`, or `phone.phone` must be provided.\n *\n * Duplicate handling: By default, creation fails if a contact with the same identifiers (`externalId`, `email.email`, or `phone.phone`) already exists. Set `allowDuplicates` to `true` to bypass this check. Learn more about [contact matching and duplicates](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create multiple contacts in a single request, call [Bulk Create Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-create-contacts).\n * @param contact - Contact to create.\n * @public\n * @requiredField contact\n * @permissionId CONTACTS.CONTACT_CREATE\n * @applicableIdentity APP\n * @returns Created contact.\n * @fqn wix.contacts.v5.Contacts.CreateContact\n */\nexport async function createContact(\n contact: Contact,\n options?: CreateContactOptions\n): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: CreateContactApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contact: contact,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.createContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )?.contact!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contact: '$[0]',\n allowDuplicates: '$[1].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['contact', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateContactOptions {\n /**\n * Whether to create the contact even if it duplicates an existing contact.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\n/**\n * Retrieves a single contact by ID.\n * @param contactId - ID of the contact to retrieve.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @returns Retrieved contact.\n * @fqn wix.contacts.v5.Contacts.GetContact\n */\nexport async function getContact(\n contactId: string\n): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.getContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )?.contact!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['contactId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed when updating the contact. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * Restrictions:\n * - `externalId` can be set only once and can't be changed after creation.\n * - The main email of a contact that is a site member can't be changed. Update it through the [Members API](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/member-management/members/introduction) instead.\n * - At least one of `name`, `email`, or `phone` must remain after the update.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To update multiple contacts in a single request, call [Bulk Update Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contacts).\n * @param _id - Contact ID.\n * @public\n * @requiredField _id\n * @requiredField contact\n * @requiredField contact.revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @permissionId CONTACTS.CONTACT_MEMBER_EMAIL_UPDATE\n * @applicableIdentity APP\n * @returns Updated contact.\n * @fqn wix.contacts.v5.Contacts.UpdateContact\n */\nexport async function updateContact(\n _id: string,\n contact: NonNullablePaths<UpdateContact, `revision`, 0>,\n options?: UpdateContactOptions\n): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: UpdateContactApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contact: { ...contact, id: _id },\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.updateContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )?.contact!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { contact: '$[1]' },\n explicitPathsToArguments: {\n 'contact.id': '$[0]',\n allowDuplicates: '$[2].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'contact', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateContact {\n /**\n * Contact ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the Contact is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the Contact.\n *\n * Ignored when creating a Contact.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the contact was created.\n * @readonly\n * @immutable\n */\n _createdDate?: Date | null;\n /**\n * Date and time the contact was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Contact external ID. Used to identify contacts from external systems.\n * This field can only be set once and can't be updated after creation.\n * @maxLength 100\n */\n externalId?: string | null;\n /** Contact's name information including first and last name. */\n name?: ContactName;\n /**\n * The main email of the contact with subscription status and deliverability information.\n * This email is used for contact matching and deduplication logic.\n */\n email?: ContactEmail;\n /**\n * Additional emails of the contact.\n * These emails do not affect subscription status or contact matching/deduplication.\n * The main email field must be set before additional emails can be added.\n * @maxSize 10\n */\n additionalEmails?: AdditionalEmail[];\n /**\n * The main phone of the contact with subscription status and deliverability information.\n * This phone is used for contact matching and deduplication logic.\n * At least one of name, email, or phone is required for contact creation.\n */\n phone?: ContactPhone;\n /**\n * Additional phones of the contact.\n * These phones do not affect subscription status or contact matching/deduplication.\n * The main phone field must be set before additional phones can be added.\n * @maxSize 10\n */\n additionalPhones?: AdditionalPhone[];\n /**\n * Contact's physical addresses.\n * Each address can be tagged (HOME, WORK, BILLING, SHIPPING, OTHER) and one can be set as default.\n * If no address is marked as default, the first address automatically becomes the default.\n * @maxSize 50\n */\n addresses?: ContactAddress[];\n /** Contact's company information including company name and job title. */\n company?: ContactCompany;\n /**\n * Locale in\n * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * Typically, this is a lowercase 2-letter language code,\n * followed by a hyphen, followed by an uppercase 2-letter country code.\n * For example, `en-US` for U.S. English, and `de-DE` for Germany German.\n * @format LANGUAGE_TAG\n */\n locale?: string | null;\n /**\n * Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.\n * @format LOCAL_DATE\n */\n birthdate?: string | null;\n /**\n * IANA time zone identifier for the contact's location.\n * Valid values are IANA time zone IDs, such as 'Europe/Rome' or 'America/New_York'.\n * @maxLength 50\n */\n timeZone?: string | null;\n /**\n * Site contributor user ID assigned to manage communication with this contact.\n * Must be a valid GUID referencing an existing site contributor.\n * Only one assignee can be set per contact.\n * @format GUID\n */\n assigneeId?: string | null;\n /**\n * List of business location IDs associated with this contact.\n * Used for multi-location businesses to organize contacts by physical business locations.\n * Each ID must be a valid GUID referencing an existing business location.\n * @format GUID\n * @maxSize 50\n */\n locationIds?: string[];\n /**\n * Contact's profile image.\n * If the contact is also a site member, clients should prefer to view `member_info.profile_info.photo`\n * when it exists, as it reflects the member's current profile photo.\n */\n image?: string;\n /**\n * Details about the origin of the contact.\n * This field is immutable and set automatically when the contact is created.\n * @immutable\n */\n source?: ContactSource;\n /**\n * Details about the contact's most recent activity on the site.\n * Includes activity date and template ID. This field is read-only and updated automatically.\n * @readonly\n */\n lastActivity?: ContactActivity;\n /**\n * IDs of the segments the contact belongs to.\n * Segments are used for organizing and targeting groups of contacts.\n * @maxSize 60\n * @readonly\n * @format GUID\n */\n segmentIds?: string[];\n /**\n * Contact's site membership information including member ID, status, and profile details.\n * This field is read-only and populated automatically when the contact is also a site member.\n *\n * Updates are eventually consistent: changes to the underlying member, identity, or profile are reflected after the corresponding events are processed.\n * @readonly\n */\n memberInfo?: MemberInfo;\n /**\n * Contact's display name. The field is used for sorting only and is not returned.\n * @internal\n * @maxLength 1000\n * @readonly\n */\n displayName?: string | null;\n /** Tags assigned to the contact for organization and filtering. */\n tags?: PrivateTags;\n /**\n * Extended fields for storing custom contact data beyond the standard fields.\n * Allows adding custom properties specific to business needs.\n * To define a custom extended field, use the [Schema Service API](https://dev.wix.com/docs/api-reference/business-management/data-extension-schema/about-the-data-extension-schema-api) with the contacts FQDN: `wix.contacts.*.contact`.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface UpdateContactOptions {\n /**\n * Whether to update the contact even if it becomes a duplicate of another contact.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\n/**\n * Creates a contact, or updates an existing one when a match is found based on the contact's identifiers.\n *\n * Matching uses `externalId`, `email.email`, and `phone.phone` to find an existing contact. See [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) for the detailed matching rules.\n *\n * Upsert modes: Set `upsertMode` to control how an existing contact is updated:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * Member contacts: Set `updateMember` to `true` when upserting a contact that is a site member.\n *\n * The response's `action` field indicates whether the contact was `CREATED` or `UPDATED`.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create or update multiple contacts in a single request, call [Bulk Upsert Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-upsert-contacts).\n * @param contact - Contact to upsert.\n * @public\n * @requiredField contact\n * @permissionId CONTACTS.CONTACT_UPSERT\n * @permissionId CONTACTS.CONTACT_MEMBER_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.UpsertContact\n */\nexport async function upsertContact(\n contact: Contact,\n options?: UpsertContactOptions\n): Promise<\n NonNullablePaths<\n UpsertContactResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`\n | `action`,\n 5\n > & {\n __applicationErrorsType?: UpsertContactApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contact: contact,\n upsertMode: options?.upsertMode,\n updateMember: options?.updateMember,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.upsertContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contact: '$[0]',\n upsertMode: '$[1].upsertMode',\n updateMember: '$[1].updateMember',\n },\n singleArgumentUnchanged: false,\n },\n ['contact', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpsertContactOptions {\n /** Mode that determines how an existing contact is updated when a match is found. See the endpoint description for the supported modes. */\n upsertMode?: UpsertModeWithLiterals;\n /** Whether to update the contact even if it's a site member. */\n updateMember?: boolean | null;\n}\n\n/**\n * Adds or removes tags on a contact.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags on multiple contacts, call [Bulk Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contact-tags).\n * @param contactId - ID of the contact whose tags to update.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.UpdateContactTags\n */\nexport async function updateContactTags(\n contactId: string,\n options?: UpdateContactTagsOptions\n): Promise<\n NonNullablePaths<\n UpdateContactTagsResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: UpdateContactTagsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.updateContactTags(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateContactTagsOptions {\n /** Tags to assign. */\n assignTags?: PrivateTags;\n /** Tags to unassign. */\n unassignTags?: PrivateTags;\n}\n\n/**\n * Merges up to 5 source contacts into a target contact.\n *\n * The current target contact revision must be passed as `targetContactRevision`. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * The merge behaves in one of two ways, depending on whether you provide `targetContact` in the request:\n *\n * - Without `targetContact`: The source contacts are merged into the existing target contact. Non-empty fields from the sources fill empty fields on the target, and array fields (emails, phones, and addresses) are combined and deduplicated. When you provide multiple sources, they're merged in order: the first source into the second, that result into the third, and so on, and finally into the target. Earlier sources take precedence over later ones.\n * - With `targetContact`: The provided `targetContact` overwrites the target according to `fieldMask`, and the source contacts are deleted without their data being merged in.\n *\n * In both cases, the source contacts are permanently deleted after a successful merge.\n *\n * Set `preview` to `true` to return the merged result without applying it, so you can review the outcome before committing.\n *\n * Restrictions:\n * - Source contacts can't be site members. The target contact can be a site member.\n * - `externalId` can be set only once and can't be changed if it already has a value.\n * - The target contact must remain valid after the merge, keeping at least one of `name`, `email`, or `phone`.\n * @param targetContactId - Target contact ID.\n * @param targetContactRevision - Revision number of the target contact, which increments by 1 each time the contact is updated.\n * The current revision must be passed to prevent conflicting changes.\n * @public\n * @requiredField targetContactId\n * @requiredField targetContactRevision\n * @permissionId CONTACTS.CONTACT_MERGE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.MergeContacts\n */\nexport async function mergeContacts(\n targetContactId: string,\n targetContactRevision: string,\n options?: MergeContactsOptions\n): Promise<\n NonNullablePaths<\n MergeContactsResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: MergeContactsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n targetContactId: targetContactId,\n targetContactRevision: targetContactRevision,\n targetContact: options?.targetContact,\n sourceContactIds: options?.sourceContactIds,\n preview: options?.preview,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: TRANSFORM_PATHS_2,\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_3,\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.mergeContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n targetContactId: '$[0]',\n targetContactRevision: '$[1]',\n targetContact: '$[2].targetContact',\n sourceContactIds: '$[2].sourceContactIds',\n preview: '$[2].preview',\n allowDuplicates: '$[2].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['targetContactId', 'targetContactRevision', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface MergeContactsOptions {\n /** Contact to overwrite the target with, instead of merging in the source contacts' data. See the endpoint description for details. */\n targetContact?: Contact;\n /**\n * IDs of up to 5 contacts to merge into the target contact.\n * If merging more than one source contact,\n * the first source is given precedence, then the second, and so on.\n * @minSize 1\n * @maxSize 5\n * @format GUID\n */\n sourceContactIds?: string[];\n /**\n * Whether to return a preview of the merged contact instead of performing the actual merge.\n *\n * Default: `false`\n */\n preview?: boolean | null;\n /**\n * Whether to update the target contact even if it becomes a duplicate of another contact. Relevant only when `targetContact` is provided.\n * More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n allowDuplicates?: boolean;\n}\n\n/**\n * Deletes a contact.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin). After 90 days, they're permanently deleted.\n *\n * Member contacts: To delete a contact that is also a site member, set `deleteMember` to `true`. This deletes both the contact and the member.\n *\n * Restrictions:\n * - A contact with an active billing subscription can't be deleted.\n * - A site owner or contributor can't be deleted.\n *\n * To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-delete-contacts).\n * @param contactId - ID of the contact to delete.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_DELETE\n * @permissionId MEMBERS.MEMBER_DELETE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.DeleteContact\n */\nexport async function deleteContact(\n contactId: string,\n options?: DeleteContactOptions\n): Promise<\n void & {\n __applicationErrorsType?: DeleteContactApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n deleteMember: options?.deleteMember,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.deleteContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n deleteMember: '$[1].deleteMember',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteContactOptions {\n /**\n * Whether to delete the contact even if it's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMember?: boolean | null;\n}\n\n/**\n * Retrieves a list of up to 100 contacts that match the provided identifiers.\n *\n * Matching uses `externalId`, `email`, and `phone` to find contacts that likely represent the same person. Provide at least one identifier.\n *\n * Results are ordered by match strength: contacts matching more or higher-priority identifiers appear first. Within each group, contacts are ordered by creation date, oldest first. Identifier priority is `externalId` (highest), then `email`, then `phone` (lowest).\n *\n * Learn more about [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n * @public\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.FindMatchingContacts\n */\nexport async function findMatchingContacts(\n options?: FindMatchingContactsOptions\n): Promise<\n NonNullablePaths<\n FindMatchingContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n > & {\n __applicationErrorsType?: FindMatchingContactsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n externalId: options?.externalId,\n email: options?.email,\n phone: options?.phone,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.findMatchingContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_4,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_5,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n externalId: '$[0].externalId',\n email: '$[0].email',\n phone: '$[0].phone',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface FindMatchingContactsOptions {\n /**\n * Contact external ID.\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Email address.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string | null;\n /**\n * Phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string | null;\n}\n\n/**\n * Retrieves a list of up to 100 contacts, given the provided filtering, sorting, and cursor paging.\n *\n *\n * Query Contacts runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n * @public\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.QueryContacts\n */\nexport function queryContacts(): ContactsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Contact,\n 'CURSOR',\n QueryContactsRequest,\n QueryContactsResponse\n >({\n func: async (payload: QueryContactsRequest) => {\n const reqOpts = ambassadorWixContactsV5Contact.queryContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryContactsRequest['query']) => {\n const args = [query, {}] as [QueryContactsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryContactsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_4,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_5,\n },\n ])\n );\n\n return {\n items: transformedData?.contacts,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ContactsQueryResult extends QueryCursorResult {\n items: Contact[];\n query: ContactsQueryBuilder;\n next: () => Promise<ContactsQueryResult>;\n prev: () => Promise<ContactsQueryResult>;\n}\n\nexport interface ContactsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'externalId'\n | 'email.email'\n | 'phone.phone',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => ContactsQueryBuilder;\n in: (\n propertyName: '_id' | 'externalId' | 'email.email' | 'phone.phone',\n value: any\n ) => ContactsQueryBuilder;\n exists: (\n propertyName: 'externalId' | 'email.email' | 'phone.phone',\n value: boolean\n ) => ContactsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate'>\n ) => ContactsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => ContactsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => ContactsQueryBuilder;\n find: () => Promise<ContactsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.contacts.v5.Contacts.QueryContacts\n * @requiredField query\n */\nexport async function typedQueryContacts(\n query: ContactQuery\n): Promise<\n NonNullablePaths<\n QueryContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixContactsV5Contact.queryContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_4,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_5,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ContactQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id'];\n operators: ['$eq', '$in'];\n sort: 'NONE';\n },\n {\n fields: ['_createdDate', '_updatedDate'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte'];\n sort: 'ASC';\n },\n {\n fields: ['email.email', 'externalId', 'phone.phone'];\n operators: ['$eq', '$exists', '$in'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Contact,\n ContactQuerySpec\n>;\nexport type ContactQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n /** \n When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n\n If multiple filters are provided, they are combined with AND operator.\n\n Example:\n Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] } \n @internal: undefined,\n @maxSize: 10 \n */\n selectItemsBy?:\n | NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['selectItemsBy']\n | null;\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n Contact,\n ContactQuerySpec,\n ContactQuery\n >(),\n search: /*#__PURE__*/ createSearchUtils<\n Contact,\n ContactSearchSpec,\n ContactSearch\n >(),\n};\n\n/**\n * Retrieves a list of contacts using a free-text search combined with filtering and sorting.\n *\n * Search combines free-text matching with filtering, sorting, and cursor paging. To learn about the query syntax, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n *\n * Searchable properties: `name.full`, `email.email`, `phone.phone`, `company.name`, `company.jobTitle`, `memberInfo.email`, and `memberInfo.profileInfo.nickname`.\n *\n * Name format: Set `nameFormat` to control how names are matched and ordered:\n * - `BY_FIRST_NAME`: Orders by first name, then last name.\n * - `BY_LAST_NAME`: Orders by last name, then first name.\n * @param search - WQL search expression.\n * @public\n * @requiredField search\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.SearchContacts\n */\nexport async function searchContacts(\n search: ContactSearch,\n options?: SearchContactsOptions\n): Promise<\n NonNullablePaths<\n SearchContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`\n | `aggregationData.results`\n | `aggregationData.results.${number}.scalar.type`\n | `aggregationData.results.${number}.scalar.value`\n | `aggregationData.results.${number}.name`\n | `aggregationData.results.${number}.type`\n | `aggregationData.results.${number}.fieldPath`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n search: search,\n nameFormat: options?.nameFormat,\n semanticQuery: options?.semanticQuery,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.searchContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_4,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_5,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n search: '$[0]',\n nameFormat: '$[1].nameFormat',\n semanticQuery: '$[1].semanticQuery',\n },\n singleArgumentUnchanged: false,\n },\n ['search', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchContactsOptions {\n /**\n * Name Format for sorting and searching.\n * When sorting by `displayName`, the returned contacts are ordered by first and last names, by default.\n * Alternatively, when sorting by `displayName` with `BY_LAST_NAME`, the returned contacts are ordered by last and first names.\n * For contacts that do not have names, sorting is by email or phone.\n * When searching by `name.full`, the contacts returned are matched and ordered by first and last names.\n * Alternatively, when searching by `name.full` with `BY_LAST_NAME`, the contacts returned\n * are matched and ordered by last and first names.\n */\n nameFormat?: NameFormatWithLiterals;\n /**\n * Natural language query for semantic search. Mutually exclusive with cursor paging with a cursor.\n * @maxLength 1000\n */\n semanticQuery?: string | null;\n}\n\nexport interface ContactSearchSpec extends SearchSpec {\n searchable: [\n 'company.jobTitle',\n 'company.name',\n 'email.email',\n 'memberInfo.email',\n 'memberInfo.profileInfo.nickname',\n 'name.full',\n 'phone.phone'\n ];\n aggregatable: [\n '_createdDate',\n '_id',\n '_updatedDate',\n 'addresses.address.country',\n 'addresses.address.subdivision',\n 'addresses.address.subdivisionFullname',\n 'assigneeId',\n 'email.deliverabilityStatus',\n 'email.subscriptionStatus.status',\n 'lastActivity.date',\n 'locale',\n 'locationIds',\n 'memberInfo.emailVerificationRequired',\n 'memberInfo.emailVerified',\n 'memberInfo.groupInfo.groupIds',\n 'memberInfo.memberId',\n 'memberInfo.profileInfo.muted',\n 'memberInfo.profileInfo.privacyStatus',\n 'memberInfo.profileInfo.reported',\n 'memberInfo.requireProfileCompletion',\n 'memberInfo.sessionInfo.lastMobileLogin',\n 'memberInfo.sessionInfo.lastWebLogin',\n 'memberInfo.sessionInfo.mobileAppNames',\n 'memberInfo.signupDate',\n 'memberInfo.status',\n 'memberInfo.userInfo.role',\n 'phone.deliverabilityStatus',\n 'phone.subscriptionStatus.status',\n 'segmentIds',\n 'source.additionalInfo',\n 'source.appId',\n 'source.userId',\n 'tags.privateTags.tagIds',\n 'timeZone'\n ];\n paging: 'cursor';\n wql: [\n {\n operators: ['$eq', '$exists', '$in', '$ne', '$nin'];\n fields: [\n 'assigneeId',\n 'memberInfo.memberId',\n 'source.appId',\n 'source.userId',\n 'timeZone'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$exists', '$in', '$ne', '$nin'];\n fields: [\n 'memberInfo.profileInfo.privacyStatus',\n 'memberInfo.status',\n 'memberInfo.userInfo.role'\n ];\n sort: 'BOTH';\n },\n {\n operators: ['$eq', '$ne'];\n fields: [\n 'memberInfo.emailVerificationRequired',\n 'memberInfo.emailVerified',\n 'memberInfo.profileInfo.muted',\n 'memberInfo.profileInfo.reported',\n 'memberInfo.requireProfileCompletion'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n fields: [\n '_createdDate',\n '_updatedDate',\n 'lastActivity.date',\n 'memberInfo.sessionInfo.lastMobileLogin',\n 'memberInfo.sessionInfo.lastWebLogin',\n 'memberInfo.signupDate'\n ];\n sort: 'BOTH';\n },\n {\n operators: ['$eq', '$exists', '$in', '$ne', '$nin', '$startsWith'];\n fields: [\n 'company.jobTitle',\n 'company.name',\n 'email.email',\n 'memberInfo.email',\n 'memberInfo.profileInfo.nickname',\n 'name.first',\n 'name.last',\n 'phone.phone'\n ];\n sort: 'BOTH';\n },\n {\n operators: ['$eq', '$in', '$ne', '$nin'];\n fields: [\n '_id',\n 'email.deliverabilityStatus',\n 'email.subscriptionStatus.status',\n 'phone.deliverabilityStatus',\n 'phone.subscriptionStatus.status'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$exists', '$in', '$ne', '$nin', '$startsWith'];\n fields: ['locale', 'phone.e164', 'source.additionalInfo'];\n sort: 'NONE';\n },\n {\n operators: ['$exists', '$hasAll', '$hasSome', '$isEmpty'];\n fields: [\n 'locationIds',\n 'memberInfo.groupInfo.groupIds',\n 'memberInfo.sessionInfo.mobileAppNames',\n 'segmentIds',\n 'tags.privateTags.tagIds'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$exists', '$hasAll', '$hasSome'];\n fields: [\n 'addresses.address.country',\n 'addresses.address.subdivision',\n 'addresses.recipient.phone'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$exists', '$hasAll', '$hasSome', '$startsWith'];\n fields: [\n 'additionalEmails.email',\n 'additionalPhones.e164',\n 'additionalPhones.phone',\n 'addresses.address.addressLine',\n 'addresses.address.city',\n 'addresses.address.postalCode',\n 'addresses.address.streetAddress.name',\n 'addresses.address.subdivisionFullname',\n 'addresses.recipient.company',\n 'addresses.recipient.firstName',\n 'addresses.recipient.lastName'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n fields: ['birthdate'];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<\n Contact,\n ContactSearchSpec\n>;\nexport type ContactSearch = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonSearchWithEntityContext['filter'] | null;\n /** \n List of sort objects.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 10 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonSearchWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n /** \n When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n\n If multiple filters are provided, they are combined with AND operator.\n\n Example:\n Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] } \n @internal: undefined,\n @maxSize: 10 \n */\n selectItemsBy?:\n | NonNullable<\n CommonSearchWithEntityContext['sort']\n >[number]['selectItemsBy']\n | null;\n }[];\n /** \n Aggregations, also known as faceted search. Lets you explore large amounts of data by displaying summaries about different partitions of the data, and narrow the navigation to a specific partition. \n @maxSize: 10 \n */\n aggregations?: {\n /** \n Value aggregation. \n */\n value?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['value'];\n /** \n Range aggregation. \n */\n range?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['range'];\n /** \n Scalar aggregation. \n */\n scalar?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['scalar'];\n /** \n Date histogram aggregation. \n */\n dateHistogram?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['dateHistogram'];\n /** \n Nested aggregation. \n */\n nested?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['nested'];\n /** \n User-defined name for the aggregation. Must be unique. Appears in the aggregation results. \n @maxLength: 100 \n */\n name?:\n | NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['name']\n | null;\n /** \n Type of aggregation. Must match the aggregation type provided in the `kind` field. \n */\n type?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['type'];\n /** \n Field to aggregate by. Use dot notation to specify the JSON path. \n @maxLength: 200 \n */\n fieldPath?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['fieldPath'];\n }[];\n /** \n Free text to match in searchable fields. \n */\n search?: {\n /** \n How separate search terms in `expression` are combined. \n */\n mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];\n /** \n Search term or expression. \n @maxLength: 100 \n */\n expression?:\n | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n | null;\n /** \n Fields to search in. If empty, searches all searchable fields. Use dot notation to specify the JSON path. \n @maxLength: 200,\n @maxSize: 20 \n */\n fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n /** \n Whether to use fuzzy search, which allows typos using a managed proximity algorithm. \n */\n fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n };\n /** \n UTC offset or IANA time zone. Valid values are\n ISO 8601 UTC offsets, such as +02:00 or -06:00,\n and IANA time zone IDs, such as Europe/Rome.\n\n Affects the values returned by all filters and aggregations.\n You can override this behavior in a specific filter by providing\n timestamps that include a time zone. For example, `\"2023-12-20T10:52:34.795Z\"`. \n @maxLength: 50 \n */\n timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\n/**\n * Retrieves the number of contacts that match the provided filter and search criteria.\n * @public\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.CountContacts\n */\nexport async function countContacts(\n options?: CountContactsOptions\n): Promise<NonNullablePaths<CountContactsResponse, `count`, 0>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n search: options?.search,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.countContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n search: '$[0].search',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountContactsOptions {\n /**\n * Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match.\n *\n * Supported search properties are:\n *\n * - `name.full`\n * - `email.email`\n * - `phone.phone`\n * - `member_info.email`\n * - `member_info.profile_info.nickname`\n * - `company.name`\n * - `company.job_title`\n *\n * Max: 100 characters\n * @maxLength 100\n */\n search?: string | null;\n}\n\n/**\n * Generates an upload URL to allow external clients to upload a contact image.\n * To learn how external clients can use the generated upload URL in the response to upload a file,\n * see the [Upload API](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/upload-api) article.\n *\n * You can call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to query the status of the image upload.\n * @param contactId - ID of the contact to generate an image upload URL for.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.GENERATE_IMAGE_UPLOAD_URL\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.GenerateContactImageUploadUrl\n */\nexport async function generateContactImageUploadUrl(\n contactId: string,\n options?: GenerateContactImageUploadUrlOptions\n): Promise<\n NonNullablePaths<\n GenerateContactImageUploadUrlResponse,\n `uploadUrl` | `imageUploadId`,\n 0\n > & {\n __applicationErrorsType?: GenerateContactImageUploadUrlApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n mimeType: options?.mimeType,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.generateContactImageUploadUrl(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n mimeType: '$[1].mimeType',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateContactImageUploadUrlOptions {\n /**\n * MIME type. Must be one of: `image/png`, `image/jpeg`.\n *\n * Default: `image/png`\n * @maxLength 100\n */\n mimeType?: string | null;\n}\n\n/**\n * Adds an additional email to a contact.\n *\n * The contact must have a main email (`email.email`) before an additional email can be added.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param contactId - ID of the contact to add an email to.\n * @param email - Email to add.\n * @public\n * @requiredField contactId\n * @requiredField email\n * @requiredField options\n * @requiredField options.revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.AddContactAdditionalEmail\n */\nexport async function addContactAdditionalEmail(\n contactId: string,\n email: AdditionalEmail,\n options: NonNullablePaths<AddContactAdditionalEmailOptions, `revision`, 0>\n): Promise<\n NonNullablePaths<\n AddContactAdditionalEmailResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAdditionalEmailApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n email: email,\n revision: options?.revision,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.addContactAdditionalEmail(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n email: '$[1]',\n revision: '$[2].revision',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'email', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddContactAdditionalEmailOptions {\n /** Contact revision number. */\n revision: string | null;\n}\n\n/**\n * Adds an additional phone to a contact.\n *\n * The contact must have a main phone (`phone.phone`) before an additional phone can be added. If the contact already has the same phone number with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param contactId - ID of the contact to add a phone to.\n * @param phone - Phone to add.\n * @public\n * @requiredField contactId\n * @requiredField options\n * @requiredField options.revision\n * @requiredField phone\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.AddContactAdditionalPhone\n */\nexport async function addContactAdditionalPhone(\n contactId: string,\n phone: AdditionalPhone,\n options: NonNullablePaths<AddContactAdditionalPhoneOptions, `revision`, 0>\n): Promise<\n NonNullablePaths<\n AddContactAdditionalPhoneResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAdditionalPhoneApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n phone: phone,\n revision: options?.revision,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.addContactAdditionalPhone(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n phone: '$[1]',\n revision: '$[2].revision',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'phone', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddContactAdditionalPhoneOptions {\n /** Contact revision number. */\n revision: string | null;\n}\n\n/**\n * Adds an address to a contact.\n *\n * The address is appended to the contact's list of addresses. If the contact already has the same address with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param contactId - ID of the contact to add an address to.\n * @param address - Address to add.\n * @public\n * @requiredField address\n * @requiredField contactId\n * @requiredField options\n * @requiredField options.revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.AddContactAddress\n */\nexport async function addContactAddress(\n contactId: string,\n address: ContactAddress,\n options: NonNullablePaths<AddContactAddressOptions, `revision`, 0>\n): Promise<\n NonNullablePaths<\n AddContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAddressApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n address: address,\n revision: options?.revision,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_6,\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.addContactAddress(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n address: '$[1]',\n revision: '$[2].revision',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'address', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddContactAddressOptions {\n /** Contact revision number. */\n revision: string | null;\n}\n\n/**\n * Deletes an address from a contact by address ID.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param revision - Contact revision number.\n * @public\n * @requiredField identifiers\n * @requiredField identifiers.addressId\n * @requiredField identifiers.contactId\n * @requiredField revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.DeleteContactAddress\n */\nexport async function deleteContactAddress(\n identifiers: NonNullablePaths<\n DeleteContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n revision: string\n): Promise<\n NonNullablePaths<\n DeleteContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: DeleteContactAddressApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: identifiers?.contactId,\n addressId: identifiers?.addressId,\n revision: revision,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.deleteContactAddress(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0].contactId',\n addressId: '$[0].addressId',\n revision: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers', 'revision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteContactAddressIdentifiers {\n /**\n * ID of the contact to delete the address from.\n * @format GUID\n */\n contactId: string;\n /**\n * ID of the address to delete.\n * @format GUID\n */\n addressId: string;\n}\n\n/**\n * Updates an address on a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @public\n * @requiredField address\n * @requiredField identifiers\n * @requiredField identifiers.addressId\n * @requiredField identifiers.contactId\n * @requiredField options\n * @requiredField options.revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.UpdateContactAddress\n */\nexport async function updateContactAddress(\n identifiers: NonNullablePaths<\n UpdateContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n address: UpdateContactAddress,\n options: NonNullablePaths<UpdateContactAddressOptions, `revision`, 0>\n): Promise<\n NonNullablePaths<\n UpdateContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: UpdateContactAddressApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contactId: identifiers?.contactId,\n address: { ...address, id: identifiers?.addressId },\n revision: options?.revision,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_6,\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.updateContactAddress(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { address: '$[1]' },\n explicitPathsToArguments: {\n contactId: '$[0].contactId',\n 'address.id': '$[0].addressId',\n revision: '$[2].revision',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers', 'address', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateContactAddressIdentifiers {\n /**\n * ID of the contact to update the address on.\n * @format GUID\n */\n contactId: string;\n /**\n * Address ID.\n * @format GUID\n */\n addressId?: string | null;\n}\n\nexport interface UpdateContactAddress {\n /**\n * Address type classification. Helps categorize the address purpose.\n *\n * Default: `OTHER`\n */\n tag?: AddressTagWithLiterals;\n /**\n * Physical address information including street, city, country, and postal code.\n * Contains structured address data following common address formatting standards.\n */\n address?: Address;\n /**\n * Whether this address is the contact's default address.\n * Only one address can be designated as default per contact.\n * If no address is explicitly set as default, the first address automatically becomes the default.\n */\n defaultAddress?: boolean | null;\n /**\n * Address ID.\n * @format GUID\n */\n _id?: string | null;\n /** Address recipient information for delivery purposes. */\n recipient?: Recipient;\n}\n\nexport interface UpdateContactAddressOptions {\n /** Contact revision number. */\n revision: string | null;\n}\n\n/**\n * Creates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily has no image. Once the upload succeeds, the contact's image is updated.\n *\n * To create a single contact, call [Create Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/create-contact).\n * @param contacts - Contacts to create.\n * @public\n * @requiredField contacts\n * @permissionId CONTACTS.CONTACT_CREATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkCreateContacts\n */\nexport async function bulkCreateContacts(\n contacts: Contact[],\n options?: BulkCreateContactsOptions\n): Promise<\n NonNullablePaths<\n BulkCreateContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contacts: contacts,\n returnEntity: options?.returnEntity,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: TRANSFORM_PATHS_4,\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_5,\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.bulkCreateContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_7,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_8,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contacts: '$[0]',\n returnEntity: '$[1].returnEntity',\n allowDuplicates: '$[1].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['contacts', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateContactsOptions {\n /** Whether to include the created contacts in the response. */\n returnEntity?: boolean;\n /** Whether to create the contact even if it duplicates an existing contact. */\n allowDuplicates?: boolean;\n}\n\n/**\n * Updates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily keeps its previous image. Once the upload succeeds, the contact's image is updated.\n *\n * `externalId` can be set only once. If it already has a value, it can't be updated.\n *\n * To update a single contact, call [Update Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact).\n * @param contacts - Contacts to update.\n * @public\n * @requiredField contacts\n * @requiredField contacts.contact._id\n * @requiredField contacts.contact.revision\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkUpdateContacts\n */\nexport async function bulkUpdateContacts(\n contacts: NonNullablePaths<\n MaskedContact,\n `contact._id` | `contact.revision`,\n 1\n >[],\n options?: BulkUpdateContactsOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contacts: contacts,\n returnEntity: options?.returnEntity,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: TRANSFORM_PATHS_9,\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_10,\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.bulkUpdateContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_7,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_8,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contacts: '$[0]',\n returnEntity: '$[1].returnEntity',\n allowDuplicates: '$[1].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['contacts', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateContactsOptions {\n /** Whether to include the updated contacts in the response. */\n returnEntity?: boolean;\n /** Whether to update the contact even if it becomes a duplicate of another contact. */\n allowDuplicates?: boolean;\n}\n\n/**\n * Adds or removes tags on multiple contacts, specified by contact ID. Works synchronously.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n * @param contactIds - IDs of the contacts to add or remove tags on.\n * @public\n * @requiredField contactIds\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkUpdateContactTags\n */\nexport async function bulkUpdateContactTags(\n contactIds: string[],\n options?: BulkUpdateContactTagsOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateContactTagsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n > & {\n __applicationErrorsType?: BulkUpdateContactTagsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactIds: contactIds,\n returnEntity: options?.returnEntity,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.bulkUpdateContactTags(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_7,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_8,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactIds: '$[0]',\n returnEntity: '$[1].returnEntity',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n },\n singleArgumentUnchanged: false,\n },\n ['contactIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateContactTagsOptions {\n /** Whether to include the updated contacts in the response. */\n returnEntity?: boolean;\n /** Tags to assign. */\n assignTags?: PrivateTags;\n /** Tags to unassign. */\n unassignTags?: PrivateTags;\n}\n\n/**\n * Adds or removes tags on multiple contacts that match the provided filter. Works asynchronously. An empty filter matches all contacts.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n * @param filter - Filter object. See documentation [here](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters).\n * @public\n * @requiredField filter\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkUpdateContactTagsByFilter\n */\nexport async function bulkUpdateContactTagsByFilter(\n filter: Record<string, any>,\n options?: BulkUpdateContactTagsByFilterOptions\n): Promise<\n NonNullablePaths<BulkUpdateContactTagsByFilterResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkUpdateContactTagsByFilterApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n search: options?.search,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.bulkUpdateContactTagsByFilter(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0]',\n search: '$[1].search',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateContactTagsByFilterOptions {\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /** Tags to assign to the matching contacts. */\n assignTags?: PrivateTags;\n /** Tags to unassign from the matching contacts. */\n unassignTags?: PrivateTags;\n}\n\n/**\n * Creates or updates multiple contacts in a single request. Works synchronously.\n *\n * Each contact is matched against existing contacts using the [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) logic. If a match is found, the contact is updated. Otherwise, a new contact is created.\n *\n * When a contact is updated, `upsertMode` controls how:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * In `APPEND` or `OVERWRITE_APPEND_ARRAYS` mode, the default address flag is ignored unless the contact has no existing addresses.\n *\n * When you provide an image URL and the upsert mode allows the image to be updated, the image is uploaded in the background. The returned contact temporarily has no image if it was created, or its previous image if it was updated. Once the upload succeeds, the contact's image is updated.\n *\n * To create or update a single contact, call [Upsert Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/upsert-contact).\n * @param contacts - Contacts to create or update.\n * @public\n * @requiredField contacts\n * @permissionId CONTACTS.CONTACT_UPSERT\n * @permissionId CONTACTS.CONTACT_MEMBER_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkUpsertContacts\n */\nexport async function bulkUpsertContacts(\n contacts: BulkUpsertContactsRequestMaskedContact[],\n options?: BulkUpsertContactsOptions\n): Promise<\n NonNullablePaths<\n BulkUpsertContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `results.${number}.action`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contacts: contacts,\n returnEntity: options?.returnEntity,\n upsertMode: options?.upsertMode,\n updateMember: options?.updateMember,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: TRANSFORM_PATHS_9,\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_10,\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV5Contact.bulkUpsertContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_7,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_8,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contacts: '$[0]',\n returnEntity: '$[1].returnEntity',\n upsertMode: '$[1].upsertMode',\n updateMember: '$[1].updateMember',\n },\n singleArgumentUnchanged: false,\n },\n ['contacts', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpsertContactsOptions {\n /** Whether to include the upserted contacts in the response. */\n returnEntity?: boolean;\n /** Mode that determines how an existing contact is updated when a match is found. See the endpoint description for the supported modes. */\n upsertMode?: UpsertModeWithLiterals;\n /** Whether to update a contact even if it's a site member. */\n updateMember?: boolean | null;\n}\n\n/**\n * Deletes multiple contacts in a single request. Works synchronously.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * To delete a single contact, call [Delete Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/delete-contact).\n * @param contactIds - IDs of the contacts to delete.\n * @public\n * @requiredField contactIds\n * @permissionId CONTACTS.CONTACT_DELETE\n * @permissionId MEMBERS.MEMBER_DELETE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkDeleteContacts\n */\nexport async function bulkDeleteContacts(\n contactIds: string[],\n options?: BulkDeleteContactsOptions\n): Promise<\n NonNullablePaths<\n BulkDeleteContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n > & {\n __applicationErrorsType?: BulkDeleteContactsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactIds: contactIds,\n deleteMembers: options?.deleteMembers,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.bulkDeleteContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactIds: '$[0]',\n deleteMembers: '$[1].deleteMembers',\n },\n singleArgumentUnchanged: false,\n },\n ['contactIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkDeleteContactsOptions {\n /**\n * Whether to delete the associated site member for any contact that's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\n/**\n * Deletes multiple contacts that match the provided filter. Works asynchronously.\n *\n * All contacts that meet the specified `filter` and `search` criteria are deleted. The request must contain a `filter` value, a `search` value, or both. To preview which contacts match before deleting, call [Search Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/search-contacts) with the same criteria.\n *\n * To check the status of the bulk deletion, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * Individual contacts can fail during processing. These failures appear in the job's results with one of the following error codes:\n * - `CANNOT_DELETE_SITE_MEMBERS`: Contact is a site member and can't be deleted. The site member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION`: Contact has an active billing subscription and can't be deleted.\n * - `CANNOT_DELETE_WIX_USERS_MEMBER`: Site member can't be deleted because it's the owner or a contributor.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION`: Site member was deleted, but the contact was not.\n * - `FAILED_DELETE_CONTACT`: Contact couldn't be deleted.\n * @param filter - Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n * @public\n * @requiredField filter\n * @permissionId CONTACTS.CONTACT_DELETE\n * @permissionId MEMBERS.MEMBER_DELETE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkDeleteContactsByFilter\n */\nexport async function bulkDeleteContactsByFilter(\n filter: Record<string, any>,\n options?: BulkDeleteContactsByFilterOptions\n): Promise<\n NonNullablePaths<BulkDeleteContactsByFilterResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkDeleteContactsByFilterApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n search: options?.search,\n deleteMembers: options?.deleteMembers,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.bulkDeleteContactsByFilter(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0]',\n search: '$[1].search',\n deleteMembers: '$[1].deleteMembers',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkDeleteContactsByFilterOptions {\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /**\n * Whether to delete the associated site member for any contact that's a site member. If `true`, the site member is also deleted.\n *\n * Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\n/**\n * Permanently deletes a contact from the trash bin.\n *\n * After removal, the contact can no longer be restored.\n * @param contactId - ID of the contact to permanently delete from the trash bin.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_REMOVE_FROM_TRASHBIN\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.RemoveContactFromTrashBin\n */\nexport async function removeContactFromTrashBin(\n contactId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.removeContactFromTrashBin(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['contactId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Restores a soft-deleted contact from the trash bin.\n *\n * To restore multiple contacts in a single request, call [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n * @param contactId - ID of the contact to restore from the trash bin.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_RESTORE_FROM_TRASHBIN\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.RestoreContactFromTrashBin\n */\nexport async function restoreContactFromTrashBin(\n contactId: string\n): Promise<\n NonNullablePaths<\n RestoreContactFromTrashBinResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.restoreContactFromTrashBin(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['contactId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Restores multiple soft-deleted contacts from the trash bin.\n *\n * To restore a single contact, call [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin).\n * @public\n * @permissionId CONTACTS.CONTACT_RESTORE_FROM_TRASHBIN\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkRestoreContactsFromTrashBin\n */\nexport async function bulkRestoreContactsFromTrashBin(\n options?: BulkRestoreContactsFromTrashBinOptions\n): Promise<\n NonNullablePaths<\n BulkRestoreContactsFromTrashBinResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactIds: options?.contactIds,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.bulkRestoreContactsFromTrashBin(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_7,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_8,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactIds: '$[0].contactIds',\n returnEntity: '$[0].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkRestoreContactsFromTrashBinOptions {\n /**\n * IDs of the contacts to restore from the trash bin.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds?: string[];\n /** Whether to include the restored contacts in the response. */\n returnEntity?: boolean;\n}\n\n/**\n * Retrieves a soft-deleted contact from the trash bin by ID.\n * @param contactId - ID of the contact to retrieve from the trash bin.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_READ_FROM_TRASHBIN\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.GetDeletedContact\n */\nexport async function getDeletedContact(\n contactId: string\n): Promise<\n NonNullablePaths<\n GetDeletedContactResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.getDeletedContact(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['contactId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of soft-deleted contacts from the trash bin, filtered by the provided identifiers and deletion date range.\n * @public\n * @permissionId CONTACTS.CONTACT_READ_FROM_TRASHBIN\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.ListDeletedContacts\n */\nexport async function listDeletedContacts(\n options?: ListDeletedContactsOptions\n): Promise<\n NonNullablePaths<\n ListDeletedContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n externalId: options?.externalId,\n email: options?.email,\n phone: options?.phone,\n contactIds: options?.contactIds,\n deletedFromDate: options?.deletedFromDate,\n deletedToDate: options?.deletedToDate,\n paging: options?.paging,\n });\n\n const reqOpts = ambassadorWixContactsV5Contact.listDeletedContacts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_4,\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_5,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n externalId: '$[0].externalId',\n email: '$[0].email',\n phone: '$[0].phone',\n contactIds: '$[0].contactIds',\n deletedFromDate: '$[0].deletedFromDate',\n deletedToDate: '$[0].deletedToDate',\n paging: '$[0].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListDeletedContactsOptions {\n /**\n * External ID.\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Email address.\n * @format EMAIL\n * @maxLength 320\n */\n email?: string | null;\n /**\n * Phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string | null;\n /**\n * Contact IDs.\n * @maxSize 100\n * @format GUID\n */\n contactIds?: string[];\n /** Filters to contacts deleted on or after this date and time. */\n deletedFromDate?: Date | null;\n /** Filters to contacts deleted on or before this date and time. */\n deletedToDate?: Date | null;\n /** Cursor paging. */\n paging?: CursorPaging;\n}\n\n/**\n * Retrieves the status of the contact image upload process.\n * @public\n * @requiredField identifiers\n * @requiredField identifiers.contactId\n * @requiredField identifiers.imageUploadId\n * @permissionId CONTACTS.CONTACT_IMAGE_STATUS_READ\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.GetContactImageUploadStatus\n */\nexport async function getContactImageUploadStatus(\n identifiers: NonNullablePaths<\n GetContactImageUploadStatusIdentifiers,\n `contactId` | `imageUploadId`,\n 0\n >\n): Promise<\n NonNullablePaths<GetContactImageUploadStatusResponse, `status`, 0> & {\n __applicationErrorsType?: GetContactImageUploadStatusApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: identifiers?.contactId,\n imageUploadId: identifiers?.imageUploadId,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.getContactImageUploadStatus(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0].contactId',\n imageUploadId: '$[0].imageUploadId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetContactImageUploadStatusIdentifiers {\n /**\n * ID of the contact whose image upload status to retrieve.\n * @format GUID\n */\n contactId: string;\n /**\n * The upload ID of the image upload process. Returned when an image URL is provided while creating or updating a contact, or from [Generate Contact Image Upload Url](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/generate-contact-image-upload-url).\n * @maxLength 100\n */\n imageUploadId: string;\n}\n\n/**\n * Adds a country code to the main phone of multiple contacts that match the provided filter. Works asynchronously.\n *\n * A contact's main phone is changed only if adding the country code produces a valid phone number. Otherwise, the contact is left unchanged.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n * @public\n * @requiredField options.countryCode\n * @permissionId CONTACTS.CONTACT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.contacts.v5.Contacts.BulkUpdatePhoneCountryCodeByFilter\n */\nexport async function bulkUpdatePhoneCountryCodeByFilter(\n options?: NonNullablePaths<\n BulkUpdatePhoneCountryCodeByFilterOptions,\n `countryCode`,\n 0\n >\n): Promise<\n NonNullablePaths<BulkUpdatePhoneCountryCodeByFilterResponse, `jobId`, 0>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n search: options?.search,\n countryCode: options?.countryCode,\n });\n\n const reqOpts =\n ambassadorWixContactsV5Contact.bulkUpdatePhoneCountryCodeByFilter(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n search: '$[0].search',\n countryCode: '$[0].countryCode',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdatePhoneCountryCodeByFilterOptions {\n /**\n * A filter for the contacts that the country code will be applied to.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /** Free text to match in searchable fields for the contacts that the country code will be applied to. */\n search?: SearchDetails;\n /**\n * [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code to apply.\n *\n * Applied only to contacts whose phone number isn't already in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format. If the phone number still can't be converted to E.164 format after applying the country code, that contact fails with `PHONE_CANNOT_BE_FIXED_WITH_COUNTRY_CODE`.\n * @format COUNTRY\n */\n countryCode: string;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'contact.createdDate' },\n { path: 'contact.updatedDate' },\n { path: 'contact.email.subscriptionStatus.updatedDate' },\n { path: 'contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contact.image.urlExpirationDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.memberInfo.signupDate' },\n { path: 'contact.memberInfo.profileInfo.photo.urlExpirationDate' },\n { path: 'contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contact.memberInfo.sessionInfo.lastMobileLogin' },\n];\nconst TRANSFORM_PATHS_1 = [\n { path: 'contact.addresses.address.geocode.latitude' },\n { path: 'contact.addresses.address.geocode.longitude' },\n];\nconst TRANSFORM_PATHS_2 = [{ path: 'fieldMask' }];\nconst TRANSFORM_PATHS_3 = [\n { path: 'targetContact.createdDate' },\n { path: 'targetContact.updatedDate' },\n { path: 'targetContact.email.subscriptionStatus.updatedDate' },\n { path: 'targetContact.phone.subscriptionStatus.updatedDate' },\n { path: 'targetContact.image.urlExpirationDate' },\n { path: 'targetContact.lastActivity.date' },\n { path: 'targetContact.memberInfo.signupDate' },\n { path: 'targetContact.memberInfo.profileInfo.photo.urlExpirationDate' },\n { path: 'targetContact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'targetContact.memberInfo.sessionInfo.lastMobileLogin' },\n];\nconst TRANSFORM_PATHS_4 = [\n { path: 'targetContact.addresses.address.geocode.latitude' },\n { path: 'targetContact.addresses.address.geocode.longitude' },\n];\nconst TRANSFORM_PATHS_5 = [\n { path: 'contacts.createdDate' },\n { path: 'contacts.updatedDate' },\n { path: 'contacts.email.subscriptionStatus.updatedDate' },\n { path: 'contacts.phone.subscriptionStatus.updatedDate' },\n { path: 'contacts.image.urlExpirationDate' },\n { path: 'contacts.lastActivity.date' },\n { path: 'contacts.memberInfo.signupDate' },\n { path: 'contacts.memberInfo.profileInfo.photo.urlExpirationDate' },\n { path: 'contacts.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contacts.memberInfo.sessionInfo.lastMobileLogin' },\n];\nconst TRANSFORM_PATHS_6 = [\n { path: 'contacts.addresses.address.geocode.latitude' },\n { path: 'contacts.addresses.address.geocode.longitude' },\n];\nconst TRANSFORM_PATHS_7 = [\n { path: 'search.aggregations.range.buckets.from' },\n { path: 'search.aggregations.range.buckets.to' },\n { path: 'search.aggregations.nested.nestedAggregations.range.buckets.from' },\n { path: 'search.aggregations.nested.nestedAggregations.range.buckets.to' },\n];\nconst TRANSFORM_PATHS_8 = [\n { path: 'contacts.addresses.address.geocode.latitude' },\n { path: 'contacts.addresses.address.geocode.longitude' },\n { path: 'aggregationData.results.ranges.results.from' },\n { path: 'aggregationData.results.ranges.results.to' },\n { path: 'aggregationData.results.nested.results.results.*.range.from' },\n { path: 'aggregationData.results.nested.results.results.*.range.to' },\n { path: 'aggregationData.results.scalar.value' },\n { path: 'aggregationData.results.nested.results.results.*.scalar.value' },\n];\nconst TRANSFORM_PATHS_9 = [\n { path: 'address.address.geocode.latitude' },\n { path: 'address.address.geocode.longitude' },\n];\nconst TRANSFORM_PATHS_10 = [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.email.subscriptionStatus.updatedDate' },\n { path: 'results.item.phone.subscriptionStatus.updatedDate' },\n { path: 'results.item.image.urlExpirationDate' },\n { path: 'results.item.lastActivity.date' },\n { path: 'results.item.memberInfo.signupDate' },\n { path: 'results.item.memberInfo.profileInfo.photo.urlExpirationDate' },\n { path: 'results.item.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'results.item.memberInfo.sessionInfo.lastMobileLogin' },\n];\nconst TRANSFORM_PATHS_11 = [\n { path: 'results.item.addresses.address.geocode.latitude' },\n { path: 'results.item.addresses.address.geocode.longitude' },\n];\nconst TRANSFORM_PATHS_12 = [{ path: 'contacts.fieldMask' }];\nconst TRANSFORM_PATHS_13 = [\n { path: 'contacts.contact.createdDate' },\n { path: 'contacts.contact.updatedDate' },\n { path: 'contacts.contact.email.subscriptionStatus.updatedDate' },\n { path: 'contacts.contact.phone.subscriptionStatus.updatedDate' },\n { path: 'contacts.contact.image.urlExpirationDate' },\n { path: 'contacts.contact.lastActivity.date' },\n { path: 'contacts.contact.memberInfo.signupDate' },\n { path: 'contacts.contact.memberInfo.profileInfo.photo.urlExpirationDate' },\n { path: 'contacts.contact.memberInfo.sessionInfo.lastWebLogin' },\n { path: 'contacts.contact.memberInfo.sessionInfo.lastMobileLogin' },\n];\nconst TRANSFORM_PATHS_14 = [\n { path: 'contacts.contact.addresses.address.geocode.latitude' },\n { path: 'contacts.contact.addresses.address.geocode.longitude' },\n];\nconst TRANSFORM_PATHS_15 = [\n { path: 'deletedFromDate' },\n { path: 'deletedToDate' },\n];\n\nfunction resolveWixContactsV5ContactsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n _: [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixContactsV5ContactSubscriptionsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/contacts-v5-app',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n _: [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/_api/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/contacts/v5/contacts',\n destPath: '/v5/contacts',\n },\n {\n srcPath: '/contacts/v5/bulk/contacts',\n destPath: '/v5/bulk/contacts',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_crm_contacts-v-5';\n\n/**\n * Updates the email and SMS marketing subscription statuses of multiple contacts that match the provided filter. Works asynchronously.\n *\n * If a requested subscription status matches a contact's current status, that contact is left unchanged. Provide at least one of `emailSubscriptionStatus` or `phoneSubscriptionStatus`.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n */\nexport function bulkUpdateContactSubscriptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateContactSubscriptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn:\n 'wix.contacts.v5.ContactSubscriptions.BulkUpdateContactSubscriptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactSubscriptionsUrl({\n protoPath: '/v5/bulk/contacts/subscriptions/update',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdateContactSubscriptions;\n}\n\n/**\n * Creates a contact.\n *\n * At least one of `name.first`, `name.last`, `email.email`, or `phone.phone` must be provided.\n *\n * Duplicate handling: By default, creation fails if a contact with the same identifiers (`externalId`, `email.email`, or `phone.phone`) already exists. Set `allowDuplicates` to `true` to bypass this check. Learn more about [contact matching and duplicates](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create multiple contacts in a single request, call [Bulk Create Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-create-contacts).\n */\nexport function createContact(payload: object): RequestOptionsFactory<any> {\n function __createContact({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.CreateContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createContact;\n}\n\n/** Retrieves a single contact by ID. */\nexport function getContact(payload: object): RequestOptionsFactory<any> {\n function __getContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.GetContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getContact;\n}\n\n/**\n * Updates a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed when updating the contact. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * Restrictions:\n * - `externalId` can be set only once and can't be changed after creation.\n * - The main email of a contact that is a site member can't be changed. Update it through the [Members API](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/member-management/members/introduction) instead.\n * - At least one of `name`, `email`, or `phone` must remain after the update.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To update multiple contacts in a single request, call [Bulk Update Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contacts).\n */\nexport function updateContact(payload: object): RequestOptionsFactory<any> {\n function __updateContact({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_2,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'PATCH' as any,\n methodFqn: 'wix.contacts.v5.Contacts.UpdateContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contact.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateContact;\n}\n\n/**\n * Creates a contact, or updates an existing one when a match is found based on the contact's identifiers.\n *\n * Matching uses `externalId`, `email.email`, and `phone.phone` to find an existing contact. See [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) for the detailed matching rules.\n *\n * Upsert modes: Set `upsertMode` to control how an existing contact is updated:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * Member contacts: Set `updateMember` to `true` when upserting a contact that is a site member.\n *\n * The response's `action` field indicates whether the contact was `CREATED` or `UPDATED`.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create or update multiple contacts in a single request, call [Bulk Upsert Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-upsert-contacts).\n */\nexport function upsertContact(payload: object): RequestOptionsFactory<any> {\n function __upsertContact({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_2,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.UpsertContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/upsert',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __upsertContact;\n}\n\n/**\n * Adds or removes tags on a contact.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags on multiple contacts, call [Bulk Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contact-tags).\n */\nexport function updateContactTags(payload: object): RequestOptionsFactory<any> {\n function __updateContactTags({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.UpdateContactTags',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/update-tags',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateContactTags;\n}\n\n/**\n * Merges up to 5 source contacts into a target contact.\n *\n * The current target contact revision must be passed as `targetContactRevision`. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * The merge behaves in one of two ways, depending on whether you provide `targetContact` in the request:\n *\n * - Without `targetContact`: The source contacts are merged into the existing target contact. Non-empty fields from the sources fill empty fields on the target, and array fields (emails, phones, and addresses) are combined and deduplicated. When you provide multiple sources, they're merged in order: the first source into the second, that result into the third, and so on, and finally into the target. Earlier sources take precedence over later ones.\n * - With `targetContact`: The provided `targetContact` overwrites the target according to `fieldMask`, and the source contacts are deleted without their data being merged in.\n *\n * In both cases, the source contacts are permanently deleted after a successful merge.\n *\n * Set `preview` to `true` to return the merged result without applying it, so you can review the outcome before committing.\n *\n * Restrictions:\n * - Source contacts can't be site members. The target contact can be a site member.\n * - `externalId` can be set only once and can't be changed if it already has a value.\n * - The target contact must remain valid after the merge, keeping at least one of `name`, `email`, or `phone`.\n */\nexport function mergeContacts(payload: object): RequestOptionsFactory<any> {\n function __mergeContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_2,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_3,\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_4,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.MergeContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{targetContactId}/merge',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __mergeContacts;\n}\n\n/**\n * Deletes a contact.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin). After 90 days, they're permanently deleted.\n *\n * Member contacts: To delete a contact that is also a site member, set `deleteMember` to `true`. This deletes both the contact and the member.\n *\n * Restrictions:\n * - A contact with an active billing subscription can't be deleted.\n * - A site owner or contributor can't be deleted.\n *\n * To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-delete-contacts).\n */\nexport function deleteContact(payload: object): RequestOptionsFactory<any> {\n function __deleteContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'DELETE' as any,\n methodFqn: 'wix.contacts.v5.Contacts.DeleteContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteContact;\n}\n\n/**\n * Retrieves a list of up to 100 contacts that match the provided identifiers.\n *\n * Matching uses `externalId`, `email`, and `phone` to find contacts that likely represent the same person. Provide at least one identifier.\n *\n * Results are ordered by match strength: contacts matching more or higher-priority identifiers appear first. Within each group, contacts are ordered by creation date, oldest first. Identifier priority is `externalId` (highest), then `email`, then `phone` (lowest).\n *\n * Learn more about [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\nexport function findMatchingContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __findMatchingContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.FindMatchingContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/find-matching',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_5,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_6,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __findMatchingContacts;\n}\n\n/**\n * Retrieves a list of up to 100 contacts, given the provided filtering, sorting, and cursor paging.\n *\n *\n * Query Contacts runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\nexport function queryContacts(payload: object): RequestOptionsFactory<any> {\n function __queryContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.QueryContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_5,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_6,\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryContacts;\n}\n\n/**\n * Retrieves a list of contacts using a free-text search combined with filtering and sorting.\n *\n * Search combines free-text matching with filtering, sorting, and cursor paging. To learn about the query syntax, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n *\n * Searchable properties: `name.full`, `email.email`, `phone.phone`, `company.name`, `company.jobTitle`, `memberInfo.email`, and `memberInfo.profileInfo.nickname`.\n *\n * Name format: Set `nameFormat` to control how names are matched and ordered:\n * - `BY_FIRST_NAME`: Orders by first name, then last name.\n * - `BY_LAST_NAME`: Orders by last name, then first name.\n */\nexport function searchContacts(payload: object): RequestOptionsFactory<any> {\n function __searchContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_7,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.SearchContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/search',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_5,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_8,\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/search',\n data: serializedData,\n host,\n }),\n data: serializedData,\n },\n ],\n };\n\n return metadata;\n }\n\n return __searchContacts;\n}\n\n/** Retrieves the number of contacts that match the provided filter and search criteria. */\nexport function countContacts(payload: object): RequestOptionsFactory<any> {\n function __countContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.CountContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countContacts;\n}\n\n/**\n * Generates an upload URL to allow external clients to upload a contact image.\n * To learn how external clients can use the generated upload URL in the response to upload a file,\n * see the [Upload API](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/upload-api) article.\n *\n * You can call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to query the status of the image upload.\n */\nexport function generateContactImageUploadUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateContactImageUploadUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.GenerateContactImageUploadUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/image/upload-url',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateContactImageUploadUrl;\n}\n\n/**\n * Adds an additional email to a contact.\n *\n * The contact must have a main email (`email.email`) before an additional email can be added.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\nexport function addContactAdditionalEmail(\n payload: object\n): RequestOptionsFactory<any> {\n function __addContactAdditionalEmail({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.AddContactAdditionalEmail',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/additional-emails',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addContactAdditionalEmail;\n}\n\n/**\n * Adds an additional phone to a contact.\n *\n * The contact must have a main phone (`phone.phone`) before an additional phone can be added. If the contact already has the same phone number with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\nexport function addContactAdditionalPhone(\n payload: object\n): RequestOptionsFactory<any> {\n function __addContactAdditionalPhone({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.AddContactAdditionalPhone',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/additional-phones',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addContactAdditionalPhone;\n}\n\n/**\n * Adds an address to a contact.\n *\n * The address is appended to the contact's list of addresses. If the contact already has the same address with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\nexport function addContactAddress(payload: object): RequestOptionsFactory<any> {\n function __addContactAddress({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_9,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.AddContactAddress',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/addresses',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addContactAddress;\n}\n\n/**\n * Deletes an address from a contact by address ID.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\nexport function deleteContactAddress(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteContactAddress({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'DELETE' as any,\n methodFqn: 'wix.contacts.v5.Contacts.DeleteContactAddress',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/addresses/{addressId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __deleteContactAddress;\n}\n\n/**\n * Updates an address on a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\nexport function updateContactAddress(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateContactAddress({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_9,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'PATCH' as any,\n methodFqn: 'wix.contacts.v5.Contacts.UpdateContactAddress',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/addresses/{address.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateContactAddress;\n}\n\n/**\n * Creates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily has no image. Once the upload succeeds, the contact's image is updated.\n *\n * To create a single contact, call [Create Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/create-contact).\n */\nexport function bulkCreateContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_5,\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_6,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkCreateContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_10,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_11,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateContacts;\n}\n\n/**\n * Updates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily keeps its previous image. Once the upload succeeds, the contact's image is updated.\n *\n * `externalId` can be set only once. If it already has a value, it can't be updated.\n *\n * To update a single contact, call [Update Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact).\n */\nexport function bulkUpdateContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_12,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_13,\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_14,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkUpdateContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_10,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_11,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateContacts;\n}\n\n/**\n * Adds or removes tags on multiple contacts, specified by contact ID. Works synchronously.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n */\nexport function bulkUpdateContactTags(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateContactTags({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkUpdateContactTags',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/update-tags',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_10,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_11,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateContactTags;\n}\n\n/**\n * Adds or removes tags on multiple contacts that match the provided filter. Works asynchronously. An empty filter matches all contacts.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n */\nexport function bulkUpdateContactTagsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateContactTagsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkUpdateContactTagsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/update-tags-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdateContactTagsByFilter;\n}\n\n/**\n * Creates or updates multiple contacts in a single request. Works synchronously.\n *\n * Each contact is matched against existing contacts using the [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) logic. If a match is found, the contact is updated. Otherwise, a new contact is created.\n *\n * When a contact is updated, `upsertMode` controls how:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * In `APPEND` or `OVERWRITE_APPEND_ARRAYS` mode, the default address flag is ignored unless the contact has no existing addresses.\n *\n * When you provide an image URL and the upsert mode allows the image to be updated, the image is uploaded in the background. The returned contact temporarily has no image if it was created, or its previous image if it was updated. Once the upload succeeds, the contact's image is updated.\n *\n * To create or update a single contact, call [Upsert Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/upsert-contact).\n */\nexport function bulkUpsertContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpsertContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_12,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_13,\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_14,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkUpsertContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/upsert',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_10,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_11,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpsertContacts;\n}\n\n/**\n * Deletes multiple contacts in a single request. Works synchronously.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * To delete a single contact, call [Delete Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/delete-contact).\n */\nexport function bulkDeleteContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkDeleteContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteContacts;\n}\n\n/**\n * Deletes multiple contacts that match the provided filter. Works asynchronously.\n *\n * All contacts that meet the specified `filter` and `search` criteria are deleted. The request must contain a `filter` value, a `search` value, or both. To preview which contacts match before deleting, call [Search Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/search-contacts) with the same criteria.\n *\n * To check the status of the bulk deletion, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * Individual contacts can fail during processing. These failures appear in the job's results with one of the following error codes:\n * - `CANNOT_DELETE_SITE_MEMBERS`: Contact is a site member and can't be deleted. The site member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION`: Contact has an active billing subscription and can't be deleted.\n * - `CANNOT_DELETE_WIX_USERS_MEMBER`: Site member can't be deleted because it's the owner or a contributor.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION`: Site member was deleted, but the contact was not.\n * - `FAILED_DELETE_CONTACT`: Contact couldn't be deleted.\n */\nexport function bulkDeleteContactsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteContactsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkDeleteContactsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/delete-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteContactsByFilter;\n}\n\n/**\n * Permanently deletes a contact from the trash bin.\n *\n * After removal, the contact can no longer be restored.\n */\nexport function removeContactFromTrashBin(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeContactFromTrashBin({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'DELETE' as any,\n methodFqn: 'wix.contacts.v5.Contacts.RemoveContactFromTrashBin',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/trash-bin/{contactId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __removeContactFromTrashBin;\n}\n\n/**\n * Restores a soft-deleted contact from the trash bin.\n *\n * To restore multiple contacts in a single request, call [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n */\nexport function restoreContactFromTrashBin(\n payload: object\n): RequestOptionsFactory<any> {\n function __restoreContactFromTrashBin({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.RestoreContactFromTrashBin',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/trash-bin/{contactId}/restore',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __restoreContactFromTrashBin;\n}\n\n/**\n * Restores multiple soft-deleted contacts from the trash bin.\n *\n * To restore a single contact, call [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin).\n */\nexport function bulkRestoreContactsFromTrashBin(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkRestoreContactsFromTrashBin({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkRestoreContactsFromTrashBin',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/trash-bin/restore',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_10,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_11,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkRestoreContactsFromTrashBin;\n}\n\n/** Retrieves a soft-deleted contact from the trash bin by ID. */\nexport function getDeletedContact(payload: object): RequestOptionsFactory<any> {\n function __getDeletedContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.GetDeletedContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/trash-bin/{contactId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDeletedContact;\n}\n\n/** Retrieves a list of soft-deleted contacts from the trash bin, filtered by the provided identifiers and deletion date range. */\nexport function listDeletedContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __listDeletedContacts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_15,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.ListDeletedContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/trash-bin',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_5,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_6,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listDeletedContacts;\n}\n\n/** Retrieves the status of the contact image upload process. */\nexport function getContactImageUploadStatus(\n payload: object\n): RequestOptionsFactory<any> {\n function __getContactImageUploadStatus({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'GET' as any,\n methodFqn: 'wix.contacts.v5.Contacts.GetContactImageUploadStatus',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/contacts/{contactId}/image-upload/{imageUploadId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getContactImageUploadStatus;\n}\n\n/**\n * Adds a country code to the main phone of multiple contacts that match the provided filter. Works asynchronously.\n *\n * A contact's main phone is changed only if adding the country code produces a valid phone number. Otherwise, the contact is left unchanged.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n */\nexport function bulkUpdatePhoneCountryCodeByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdatePhoneCountryCodeByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v5.contact',\n method: 'POST' as any,\n methodFqn: 'wix.contacts.v5.Contacts.BulkUpdatePhoneCountryCodeByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixContactsV5ContactsUrl({\n protoPath: '/v5/bulk/contacts/update-phone-country-code-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdatePhoneCountryCodeByFilter;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AddContactAdditionalEmailApplicationErrors,\n AddContactAdditionalEmailOptions,\n AddContactAdditionalEmailResponse,\n AddContactAdditionalPhoneApplicationErrors,\n AddContactAdditionalPhoneOptions,\n AddContactAdditionalPhoneResponse,\n AddContactAddressApplicationErrors,\n AddContactAddressOptions,\n AddContactAddressResponse,\n AdditionalEmail,\n AdditionalPhone,\n BulkCreateContactsOptions,\n BulkCreateContactsResponse,\n BulkDeleteContactsApplicationErrors,\n BulkDeleteContactsByFilterApplicationErrors,\n BulkDeleteContactsByFilterOptions,\n BulkDeleteContactsByFilterResponse,\n BulkDeleteContactsOptions,\n BulkDeleteContactsResponse,\n BulkRestoreContactsFromTrashBinOptions,\n BulkRestoreContactsFromTrashBinResponse,\n BulkUpdateContactSubscriptionsApplicationErrors,\n BulkUpdateContactSubscriptionsOptions,\n BulkUpdateContactSubscriptionsResponse,\n BulkUpdateContactTagsApplicationErrors,\n BulkUpdateContactTagsByFilterApplicationErrors,\n BulkUpdateContactTagsByFilterOptions,\n BulkUpdateContactTagsByFilterResponse,\n BulkUpdateContactTagsOptions,\n BulkUpdateContactTagsResponse,\n BulkUpdateContactsOptions,\n BulkUpdateContactsResponse,\n BulkUpdatePhoneCountryCodeByFilterOptions,\n BulkUpdatePhoneCountryCodeByFilterResponse,\n BulkUpsertContactsOptions,\n BulkUpsertContactsRequestMaskedContact,\n BulkUpsertContactsResponse,\n Contact,\n ContactAddress,\n ContactQuery,\n ContactSearch,\n ContactsQueryBuilder,\n CountContactsOptions,\n CountContactsResponse,\n CreateContactApplicationErrors,\n CreateContactOptions,\n DeleteContactAddressApplicationErrors,\n DeleteContactAddressIdentifiers,\n DeleteContactAddressResponse,\n DeleteContactApplicationErrors,\n DeleteContactOptions,\n FindMatchingContactsApplicationErrors,\n FindMatchingContactsOptions,\n FindMatchingContactsResponse,\n GenerateContactImageUploadUrlApplicationErrors,\n GenerateContactImageUploadUrlOptions,\n GenerateContactImageUploadUrlResponse,\n GetContactImageUploadStatusApplicationErrors,\n GetContactImageUploadStatusIdentifiers,\n GetContactImageUploadStatusResponse,\n GetDeletedContactResponse,\n ListDeletedContactsOptions,\n ListDeletedContactsResponse,\n MaskedContact,\n MergeContactsApplicationErrors,\n MergeContactsOptions,\n MergeContactsResponse,\n QueryContactsResponse,\n RestoreContactFromTrashBinResponse,\n SearchContactsOptions,\n SearchContactsResponse,\n UpdateContact,\n UpdateContactAddress,\n UpdateContactAddressApplicationErrors,\n UpdateContactAddressIdentifiers,\n UpdateContactAddressOptions,\n UpdateContactAddressResponse,\n UpdateContactApplicationErrors,\n UpdateContactOptions,\n UpdateContactTagsApplicationErrors,\n UpdateContactTagsOptions,\n UpdateContactTagsResponse,\n UpsertContactApplicationErrors,\n UpsertContactOptions,\n UpsertContactResponse,\n addContactAdditionalEmail as universalAddContactAdditionalEmail,\n addContactAdditionalPhone as universalAddContactAdditionalPhone,\n addContactAddress as universalAddContactAddress,\n bulkCreateContacts as universalBulkCreateContacts,\n bulkDeleteContacts as universalBulkDeleteContacts,\n bulkDeleteContactsByFilter as universalBulkDeleteContactsByFilter,\n bulkRestoreContactsFromTrashBin as universalBulkRestoreContactsFromTrashBin,\n bulkUpdateContactSubscriptions as universalBulkUpdateContactSubscriptions,\n bulkUpdateContactTags as universalBulkUpdateContactTags,\n bulkUpdateContactTagsByFilter as universalBulkUpdateContactTagsByFilter,\n bulkUpdateContacts as universalBulkUpdateContacts,\n bulkUpdatePhoneCountryCodeByFilter as universalBulkUpdatePhoneCountryCodeByFilter,\n bulkUpsertContacts as universalBulkUpsertContacts,\n countContacts as universalCountContacts,\n createContact as universalCreateContact,\n deleteContact as universalDeleteContact,\n deleteContactAddress as universalDeleteContactAddress,\n findMatchingContacts as universalFindMatchingContacts,\n generateContactImageUploadUrl as universalGenerateContactImageUploadUrl,\n getContact as universalGetContact,\n getContactImageUploadStatus as universalGetContactImageUploadStatus,\n getDeletedContact as universalGetDeletedContact,\n listDeletedContacts as universalListDeletedContacts,\n mergeContacts as universalMergeContacts,\n queryContacts as universalQueryContacts,\n removeContactFromTrashBin as universalRemoveContactFromTrashBin,\n restoreContactFromTrashBin as universalRestoreContactFromTrashBin,\n searchContacts as universalSearchContacts,\n typedQueryContacts as universalTypedQueryContacts,\n updateContact as universalUpdateContact,\n updateContactAddress as universalUpdateContactAddress,\n updateContactTags as universalUpdateContactTags,\n upsertContact as universalUpsertContact,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/crm' };\n\nexport function bulkUpdateContactSubscriptions(\n httpClient: HttpClient\n): BulkUpdateContactSubscriptionsSignature {\n return (\n filter: Record<string, any>,\n options?: BulkUpdateContactSubscriptionsOptions\n ) =>\n universalBulkUpdateContactSubscriptions(\n filter,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateContactSubscriptionsSignature {\n /**\n * Updates the email and SMS marketing subscription statuses of multiple contacts that match the provided filter. Works asynchronously.\n *\n * If a requested subscription status matches a contact's current status, that contact is left unchanged. Provide at least one of `emailSubscriptionStatus` or `phoneSubscriptionStatus`.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n * @param - A filter for the contacts that the subscription statuses will be applied to.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n (\n filter: Record<string, any>,\n options?: BulkUpdateContactSubscriptionsOptions\n ): Promise<\n NonNullablePaths<BulkUpdateContactSubscriptionsResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkUpdateContactSubscriptionsApplicationErrors;\n }\n >;\n}\n\nexport function createContact(httpClient: HttpClient): CreateContactSignature {\n return (contact: Contact, options?: CreateContactOptions) =>\n universalCreateContact(\n contact,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateContactSignature {\n /**\n * Creates a contact.\n *\n * At least one of `name.first`, `name.last`, `email.email`, or `phone.phone` must be provided.\n *\n * Duplicate handling: By default, creation fails if a contact with the same identifiers (`externalId`, `email.email`, or `phone.phone`) already exists. Set `allowDuplicates` to `true` to bypass this check. Learn more about [contact matching and duplicates](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create multiple contacts in a single request, call [Bulk Create Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-create-contacts).\n * @param - Contact to create.\n * @returns Created contact.\n */\n (contact: Contact, options?: CreateContactOptions): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: CreateContactApplicationErrors;\n }\n >;\n}\n\nexport function getContact(httpClient: HttpClient): GetContactSignature {\n return (contactId: string) =>\n universalGetContact(\n contactId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetContactSignature {\n /**\n * Retrieves a single contact by ID.\n * @param - ID of the contact to retrieve.\n * @returns Retrieved contact.\n */\n (contactId: string): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n >\n >;\n}\n\nexport function updateContact(httpClient: HttpClient): UpdateContactSignature {\n return (\n _id: string,\n contact: NonNullablePaths<UpdateContact, `revision`, 0>,\n options?: UpdateContactOptions\n ) =>\n universalUpdateContact(\n _id,\n contact,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateContactSignature {\n /**\n * Updates a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed when updating the contact. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * Restrictions:\n * - `externalId` can be set only once and can't be changed after creation.\n * - The main email of a contact that is a site member can't be changed. Update it through the [Members API](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/member-management/members/introduction) instead.\n * - At least one of `name`, `email`, or `phone` must remain after the update.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To update multiple contacts in a single request, call [Bulk Update Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contacts).\n * @param - Contact ID.\n * @returns Updated contact.\n */\n (\n _id: string,\n contact: NonNullablePaths<UpdateContact, `revision`, 0>,\n options?: UpdateContactOptions\n ): Promise<\n NonNullablePaths<\n Contact,\n | `email.email`\n | `email.subscriptionStatus.status`\n | `email.deliverabilityStatus`\n | `additionalEmails`\n | `additionalEmails.${number}.email`\n | `phone.tag`\n | `phone.phone`\n | `phone.deliverabilityStatus`\n | `additionalPhones`\n | `additionalPhones.${number}.tag`\n | `additionalPhones.${number}.phone`\n | `addresses`\n | `addresses.${number}.tag`\n | `addresses.${number}.address.streetAddress.number`\n | `addresses.${number}.address.streetAddress.name`\n | `addresses.${number}.address.streetAddress.apt`\n | `locationIds`\n | `segmentIds`\n | `memberInfo.status`\n | `memberInfo.profileInfo.privacyStatus`\n | `memberInfo.userInfo.userId`\n | `memberInfo.userInfo.role`\n | `memberInfo.sessionInfo.mobileAppNames`\n | `memberInfo.groupInfo.groupIds`\n | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: UpdateContactApplicationErrors;\n }\n >;\n}\n\nexport function upsertContact(httpClient: HttpClient): UpsertContactSignature {\n return (contact: Contact, options?: UpsertContactOptions) =>\n universalUpsertContact(\n contact,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpsertContactSignature {\n /**\n * Creates a contact, or updates an existing one when a match is found based on the contact's identifiers.\n *\n * Matching uses `externalId`, `email.email`, and `phone.phone` to find an existing contact. See [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) for the detailed matching rules.\n *\n * Upsert modes: Set `upsertMode` to control how an existing contact is updated:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * Member contacts: Set `updateMember` to `true` when upserting a contact that is a site member.\n *\n * The response's `action` field indicates whether the contact was `CREATED` or `UPDATED`.\n *\n * Image upload: When you provide an image URL, the image is uploaded asynchronously and an `imageUploadId` is returned for tracking upload progress. Call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.\n *\n * To create or update multiple contacts in a single request, call [Bulk Upsert Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-upsert-contacts).\n * @param - Contact to upsert.\n */\n (contact: Contact, options?: UpsertContactOptions): Promise<\n NonNullablePaths<\n UpsertContactResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`\n | `action`,\n 5\n > & {\n __applicationErrorsType?: UpsertContactApplicationErrors;\n }\n >;\n}\n\nexport function updateContactTags(\n httpClient: HttpClient\n): UpdateContactTagsSignature {\n return (contactId: string, options?: UpdateContactTagsOptions) =>\n universalUpdateContactTags(\n contactId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateContactTagsSignature {\n /**\n * Adds or removes tags on a contact.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags on multiple contacts, call [Bulk Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-update-contact-tags).\n * @param - ID of the contact whose tags to update.\n */\n (contactId: string, options?: UpdateContactTagsOptions): Promise<\n NonNullablePaths<\n UpdateContactTagsResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: UpdateContactTagsApplicationErrors;\n }\n >;\n}\n\nexport function mergeContacts(httpClient: HttpClient): MergeContactsSignature {\n return (\n targetContactId: string,\n targetContactRevision: string,\n options?: MergeContactsOptions\n ) =>\n universalMergeContacts(\n targetContactId,\n targetContactRevision,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface MergeContactsSignature {\n /**\n * Merges up to 5 source contacts into a target contact.\n *\n * The current target contact revision must be passed as `targetContactRevision`. This ensures you're working with the latest contact and prevents unintended overwrites.\n *\n * The merge behaves in one of two ways, depending on whether you provide `targetContact` in the request:\n *\n * - Without `targetContact`: The source contacts are merged into the existing target contact. Non-empty fields from the sources fill empty fields on the target, and array fields (emails, phones, and addresses) are combined and deduplicated. When you provide multiple sources, they're merged in order: the first source into the second, that result into the third, and so on, and finally into the target. Earlier sources take precedence over later ones.\n * - With `targetContact`: The provided `targetContact` overwrites the target according to `fieldMask`, and the source contacts are deleted without their data being merged in.\n *\n * In both cases, the source contacts are permanently deleted after a successful merge.\n *\n * Set `preview` to `true` to return the merged result without applying it, so you can review the outcome before committing.\n *\n * Restrictions:\n * - Source contacts can't be site members. The target contact can be a site member.\n * - `externalId` can be set only once and can't be changed if it already has a value.\n * - The target contact must remain valid after the merge, keeping at least one of `name`, `email`, or `phone`.\n * @param - Target contact ID.\n * @param - Revision number of the target contact, which increments by 1 each time the contact is updated.\n * The current revision must be passed to prevent conflicting changes.\n */\n (\n targetContactId: string,\n targetContactRevision: string,\n options?: MergeContactsOptions\n ): Promise<\n NonNullablePaths<\n MergeContactsResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: MergeContactsApplicationErrors;\n }\n >;\n}\n\nexport function deleteContact(httpClient: HttpClient): DeleteContactSignature {\n return (contactId: string, options?: DeleteContactOptions) =>\n universalDeleteContact(\n contactId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteContactSignature {\n /**\n * Deletes a contact.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin). After 90 days, they're permanently deleted.\n *\n * Member contacts: To delete a contact that is also a site member, set `deleteMember` to `true`. This deletes both the contact and the member.\n *\n * Restrictions:\n * - A contact with an active billing subscription can't be deleted.\n * - A site owner or contributor can't be deleted.\n *\n * To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-delete-contacts).\n * @param - ID of the contact to delete.\n */\n (contactId: string, options?: DeleteContactOptions): Promise<\n void & {\n __applicationErrorsType?: DeleteContactApplicationErrors;\n }\n >;\n}\n\nexport function findMatchingContacts(\n httpClient: HttpClient\n): FindMatchingContactsSignature {\n return (options?: FindMatchingContactsOptions) =>\n universalFindMatchingContacts(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface FindMatchingContactsSignature {\n /**\n * Retrieves a list of up to 100 contacts that match the provided identifiers.\n *\n * Matching uses `externalId`, `email`, and `phone` to find contacts that likely represent the same person. Provide at least one identifier.\n *\n * Results are ordered by match strength: contacts matching more or higher-priority identifiers appear first. Within each group, contacts are ordered by creation date, oldest first. Identifier priority is `externalId` (highest), then `email`, then `phone` (lowest).\n *\n * Learn more about [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n */\n (options?: FindMatchingContactsOptions): Promise<\n NonNullablePaths<\n FindMatchingContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n > & {\n __applicationErrorsType?: FindMatchingContactsApplicationErrors;\n }\n >;\n}\n\nexport function queryContacts(httpClient: HttpClient): QueryContactsSignature {\n return () =>\n universalQueryContacts(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryContactsSignature {\n /**\n * Retrieves a list of up to 100 contacts, given the provided filtering, sorting, and cursor paging.\n *\n *\n * Query Contacts runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\n (): ContactsQueryBuilder;\n}\n\nexport function typedQueryContacts(\n httpClient: HttpClient\n): TypedQueryContactsSignature {\n return (query: ContactQuery) =>\n universalTypedQueryContacts(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryContactsSignature {\n /** */\n (query: ContactQuery): Promise<\n NonNullablePaths<\n QueryContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n >\n >;\n}\n\nexport function searchContacts(\n httpClient: HttpClient\n): SearchContactsSignature {\n return (search: ContactSearch, options?: SearchContactsOptions) =>\n universalSearchContacts(\n search,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchContactsSignature {\n /**\n * Retrieves a list of contacts using a free-text search combined with filtering and sorting.\n *\n * Search combines free-text matching with filtering, sorting, and cursor paging. To learn about the query syntax, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n *\n * Searchable properties: `name.full`, `email.email`, `phone.phone`, `company.name`, `company.jobTitle`, `memberInfo.email`, and `memberInfo.profileInfo.nickname`.\n *\n * Name format: Set `nameFormat` to control how names are matched and ordered:\n * - `BY_FIRST_NAME`: Orders by first name, then last name.\n * - `BY_LAST_NAME`: Orders by last name, then first name.\n * @param - WQL search expression.\n */\n (search: ContactSearch, options?: SearchContactsOptions): Promise<\n NonNullablePaths<\n SearchContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`\n | `aggregationData.results`\n | `aggregationData.results.${number}.scalar.type`\n | `aggregationData.results.${number}.scalar.value`\n | `aggregationData.results.${number}.name`\n | `aggregationData.results.${number}.type`\n | `aggregationData.results.${number}.fieldPath`,\n 4\n >\n >;\n}\n\nexport function countContacts(httpClient: HttpClient): CountContactsSignature {\n return (options?: CountContactsOptions) =>\n universalCountContacts(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountContactsSignature {\n /**\n * Retrieves the number of contacts that match the provided filter and search criteria.\n */\n (options?: CountContactsOptions): Promise<\n NonNullablePaths<CountContactsResponse, `count`, 0>\n >;\n}\n\nexport function generateContactImageUploadUrl(\n httpClient: HttpClient\n): GenerateContactImageUploadUrlSignature {\n return (contactId: string, options?: GenerateContactImageUploadUrlOptions) =>\n universalGenerateContactImageUploadUrl(\n contactId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateContactImageUploadUrlSignature {\n /**\n * Generates an upload URL to allow external clients to upload a contact image.\n * To learn how external clients can use the generated upload URL in the response to upload a file,\n * see the [Upload API](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/upload-api) article.\n *\n * You can call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to query the status of the image upload.\n * @param - ID of the contact to generate an image upload URL for.\n */\n (contactId: string, options?: GenerateContactImageUploadUrlOptions): Promise<\n NonNullablePaths<\n GenerateContactImageUploadUrlResponse,\n `uploadUrl` | `imageUploadId`,\n 0\n > & {\n __applicationErrorsType?: GenerateContactImageUploadUrlApplicationErrors;\n }\n >;\n}\n\nexport function addContactAdditionalEmail(\n httpClient: HttpClient\n): AddContactAdditionalEmailSignature {\n return (\n contactId: string,\n email: AdditionalEmail,\n options: NonNullablePaths<AddContactAdditionalEmailOptions, `revision`, 0>\n ) =>\n universalAddContactAdditionalEmail(\n contactId,\n email,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddContactAdditionalEmailSignature {\n /**\n * Adds an additional email to a contact.\n *\n * The contact must have a main email (`email.email`) before an additional email can be added.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param - ID of the contact to add an email to.\n * @param - Email to add.\n */\n (\n contactId: string,\n email: AdditionalEmail,\n options: NonNullablePaths<AddContactAdditionalEmailOptions, `revision`, 0>\n ): Promise<\n NonNullablePaths<\n AddContactAdditionalEmailResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAdditionalEmailApplicationErrors;\n }\n >;\n}\n\nexport function addContactAdditionalPhone(\n httpClient: HttpClient\n): AddContactAdditionalPhoneSignature {\n return (\n contactId: string,\n phone: AdditionalPhone,\n options: NonNullablePaths<AddContactAdditionalPhoneOptions, `revision`, 0>\n ) =>\n universalAddContactAdditionalPhone(\n contactId,\n phone,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddContactAdditionalPhoneSignature {\n /**\n * Adds an additional phone to a contact.\n *\n * The contact must have a main phone (`phone.phone`) before an additional phone can be added. If the contact already has the same phone number with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param - ID of the contact to add a phone to.\n * @param - Phone to add.\n */\n (\n contactId: string,\n phone: AdditionalPhone,\n options: NonNullablePaths<AddContactAdditionalPhoneOptions, `revision`, 0>\n ): Promise<\n NonNullablePaths<\n AddContactAdditionalPhoneResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAdditionalPhoneApplicationErrors;\n }\n >;\n}\n\nexport function addContactAddress(\n httpClient: HttpClient\n): AddContactAddressSignature {\n return (\n contactId: string,\n address: ContactAddress,\n options: NonNullablePaths<AddContactAddressOptions, `revision`, 0>\n ) =>\n universalAddContactAddress(\n contactId,\n address,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddContactAddressSignature {\n /**\n * Adds an address to a contact.\n *\n * The address is appended to the contact's list of addresses. If the contact already has the same address with the same tag, the request is ignored.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param - ID of the contact to add an address to.\n * @param - Address to add.\n */\n (\n contactId: string,\n address: ContactAddress,\n options: NonNullablePaths<AddContactAddressOptions, `revision`, 0>\n ): Promise<\n NonNullablePaths<\n AddContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: AddContactAddressApplicationErrors;\n }\n >;\n}\n\nexport function deleteContactAddress(\n httpClient: HttpClient\n): DeleteContactAddressSignature {\n return (\n identifiers: NonNullablePaths<\n DeleteContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n revision: string\n ) =>\n universalDeleteContactAddress(\n identifiers,\n revision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteContactAddressSignature {\n /**\n * Deletes an address from a contact by address ID.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n * @param - Contact revision number.\n */\n (\n identifiers: NonNullablePaths<\n DeleteContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n revision: string\n ): Promise<\n NonNullablePaths<\n DeleteContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: DeleteContactAddressApplicationErrors;\n }\n >;\n}\n\nexport function updateContactAddress(\n httpClient: HttpClient\n): UpdateContactAddressSignature {\n return (\n identifiers: NonNullablePaths<\n UpdateContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n address: UpdateContactAddress,\n options: NonNullablePaths<UpdateContactAddressOptions, `revision`, 0>\n ) =>\n universalUpdateContactAddress(\n identifiers,\n address,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateContactAddressSignature {\n /**\n * Updates an address on a contact.\n *\n * Each time the contact is updated, `revision` increments by 1. The current `revision` must be passed. This ensures you're working with the latest contact and prevents unintended overwrites.\n */\n (\n identifiers: NonNullablePaths<\n UpdateContactAddressIdentifiers,\n `addressId` | `contactId`,\n 0\n >,\n address: UpdateContactAddress,\n options: NonNullablePaths<UpdateContactAddressOptions, `revision`, 0>\n ): Promise<\n NonNullablePaths<\n UpdateContactAddressResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: UpdateContactAddressApplicationErrors;\n }\n >;\n}\n\nexport function bulkCreateContacts(\n httpClient: HttpClient\n): BulkCreateContactsSignature {\n return (contacts: Contact[], options?: BulkCreateContactsOptions) =>\n universalBulkCreateContacts(\n contacts,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateContactsSignature {\n /**\n * Creates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily has no image. Once the upload succeeds, the contact's image is updated.\n *\n * To create a single contact, call [Create Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/create-contact).\n * @param - Contacts to create.\n */\n (contacts: Contact[], options?: BulkCreateContactsOptions): Promise<\n NonNullablePaths<\n BulkCreateContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n >;\n}\n\nexport function bulkUpdateContacts(\n httpClient: HttpClient\n): BulkUpdateContactsSignature {\n return (\n contacts: NonNullablePaths<\n MaskedContact,\n `contact._id` | `contact.revision`,\n 1\n >[],\n options?: BulkUpdateContactsOptions\n ) =>\n universalBulkUpdateContacts(\n contacts,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateContactsSignature {\n /**\n * Updates multiple contacts in a single request. Works synchronously.\n *\n * When you provide an image URL for a contact, the image is uploaded in the background and the returned contact temporarily keeps its previous image. Once the upload succeeds, the contact's image is updated.\n *\n * `externalId` can be set only once. If it already has a value, it can't be updated.\n *\n * To update a single contact, call [Update Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact).\n * @param - Contacts to update.\n */\n (\n contacts: NonNullablePaths<\n MaskedContact,\n `contact._id` | `contact.revision`,\n 1\n >[],\n options?: BulkUpdateContactsOptions\n ): Promise<\n NonNullablePaths<\n BulkUpdateContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n >;\n}\n\nexport function bulkUpdateContactTags(\n httpClient: HttpClient\n): BulkUpdateContactTagsSignature {\n return (contactIds: string[], options?: BulkUpdateContactTagsOptions) =>\n universalBulkUpdateContactTags(\n contactIds,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateContactTagsSignature {\n /**\n * Adds or removes tags on multiple contacts, specified by contact ID. Works synchronously.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n * @param - IDs of the contacts to add or remove tags on.\n */\n (contactIds: string[], options?: BulkUpdateContactTagsOptions): Promise<\n NonNullablePaths<\n BulkUpdateContactTagsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n > & {\n __applicationErrorsType?: BulkUpdateContactTagsApplicationErrors;\n }\n >;\n}\n\nexport function bulkUpdateContactTagsByFilter(\n httpClient: HttpClient\n): BulkUpdateContactTagsByFilterSignature {\n return (\n filter: Record<string, any>,\n options?: BulkUpdateContactTagsByFilterOptions\n ) =>\n universalBulkUpdateContactTagsByFilter(\n filter,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateContactTagsByFilterSignature {\n /**\n * Adds or removes tags on multiple contacts that match the provided filter. Works asynchronously. An empty filter matches all contacts.\n *\n * Specify which tags to assign and which to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. At least one tag must be specified to assign or unassign.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * To update tags for a single contact, call [Update Contact Tags](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/update-contact-tags).\n * @param - Filter object. See documentation [here](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters).\n */\n (\n filter: Record<string, any>,\n options?: BulkUpdateContactTagsByFilterOptions\n ): Promise<\n NonNullablePaths<BulkUpdateContactTagsByFilterResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkUpdateContactTagsByFilterApplicationErrors;\n }\n >;\n}\n\nexport function bulkUpsertContacts(\n httpClient: HttpClient\n): BulkUpsertContactsSignature {\n return (\n contacts: BulkUpsertContactsRequestMaskedContact[],\n options?: BulkUpsertContactsOptions\n ) =>\n universalBulkUpsertContacts(\n contacts,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpsertContactsSignature {\n /**\n * Creates or updates multiple contacts in a single request. Works synchronously.\n *\n * Each contact is matched against existing contacts using the [contact matching](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts) logic. If a match is found, the contact is updated. Otherwise, a new contact is created.\n *\n * When a contact is updated, `upsertMode` controls how:\n * - `OVERWRITE` (default): Replaces existing field values.\n * - `APPEND`: Sets a non-array field only if it doesn't already have a value, and appends to array fields.\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields and appends to array fields. `email`/`additionalEmails` and `phone`/`additionalPhones` are each treated as a single array field: the incoming value is set as `email`/`phone` only if none exists yet, otherwise it's appended to `additionalEmails`/`additionalPhones`.\n *\n * In `APPEND` or `OVERWRITE_APPEND_ARRAYS` mode, the default address flag is ignored unless the contact has no existing addresses.\n *\n * When you provide an image URL and the upsert mode allows the image to be updated, the image is uploaded in the background. The returned contact temporarily has no image if it was created, or its previous image if it was updated. Once the upload succeeds, the contact's image is updated.\n *\n * To create or update a single contact, call [Upsert Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/upsert-contact).\n * @param - Contacts to create or update.\n */\n (\n contacts: BulkUpsertContactsRequestMaskedContact[],\n options?: BulkUpsertContactsOptions\n ): Promise<\n NonNullablePaths<\n BulkUpsertContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `results.${number}.action`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n >;\n}\n\nexport function bulkDeleteContacts(\n httpClient: HttpClient\n): BulkDeleteContactsSignature {\n return (contactIds: string[], options?: BulkDeleteContactsOptions) =>\n universalBulkDeleteContacts(\n contactIds,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteContactsSignature {\n /**\n * Deletes multiple contacts in a single request. Works synchronously.\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * To delete a single contact, call [Delete Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/delete-contact).\n * @param - IDs of the contacts to delete.\n */\n (contactIds: string[], options?: BulkDeleteContactsOptions): Promise<\n NonNullablePaths<\n BulkDeleteContactsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n > & {\n __applicationErrorsType?: BulkDeleteContactsApplicationErrors;\n }\n >;\n}\n\nexport function bulkDeleteContactsByFilter(\n httpClient: HttpClient\n): BulkDeleteContactsByFilterSignature {\n return (\n filter: Record<string, any>,\n options?: BulkDeleteContactsByFilterOptions\n ) =>\n universalBulkDeleteContactsByFilter(\n filter,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteContactsByFilterSignature {\n /**\n * Deletes multiple contacts that match the provided filter. Works asynchronously.\n *\n * All contacts that meet the specified `filter` and `search` criteria are deleted. The request must contain a `filter` value, a `search` value, or both. To preview which contacts match before deleting, call [Search Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/search-contacts) with the same criteria.\n *\n * To check the status of the bulk deletion, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n *\n * Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n *\n * Individual contacts can fail during processing. These failures appear in the job's results with one of the following error codes:\n * - `CANNOT_DELETE_SITE_MEMBERS`: Contact is a site member and can't be deleted. The site member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION`: Contact has an active billing subscription and can't be deleted.\n * - `CANNOT_DELETE_WIX_USERS_MEMBER`: Site member can't be deleted because it's the owner or a contributor.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION`: Site member was deleted, but the contact was not.\n * - `FAILED_DELETE_CONTACT`: Contact couldn't be deleted.\n * @param - Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n */\n (\n filter: Record<string, any>,\n options?: BulkDeleteContactsByFilterOptions\n ): Promise<\n NonNullablePaths<BulkDeleteContactsByFilterResponse, `jobId`, 0> & {\n __applicationErrorsType?: BulkDeleteContactsByFilterApplicationErrors;\n }\n >;\n}\n\nexport function removeContactFromTrashBin(\n httpClient: HttpClient\n): RemoveContactFromTrashBinSignature {\n return (contactId: string) =>\n universalRemoveContactFromTrashBin(\n contactId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveContactFromTrashBinSignature {\n /**\n * Permanently deletes a contact from the trash bin.\n *\n * After removal, the contact can no longer be restored.\n * @param - ID of the contact to permanently delete from the trash bin.\n */\n (contactId: string): Promise<void>;\n}\n\nexport function restoreContactFromTrashBin(\n httpClient: HttpClient\n): RestoreContactFromTrashBinSignature {\n return (contactId: string) =>\n universalRestoreContactFromTrashBin(\n contactId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RestoreContactFromTrashBinSignature {\n /**\n * Restores a soft-deleted contact from the trash bin.\n *\n * To restore multiple contacts in a single request, call [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin).\n * @param - ID of the contact to restore from the trash bin.\n */\n (contactId: string): Promise<\n NonNullablePaths<\n RestoreContactFromTrashBinResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n >\n >;\n}\n\nexport function bulkRestoreContactsFromTrashBin(\n httpClient: HttpClient\n): BulkRestoreContactsFromTrashBinSignature {\n return (options?: BulkRestoreContactsFromTrashBinOptions) =>\n universalBulkRestoreContactsFromTrashBin(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkRestoreContactsFromTrashBinSignature {\n /**\n * Restores multiple soft-deleted contacts from the trash bin.\n *\n * To restore a single contact, call [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin).\n */\n (options?: BulkRestoreContactsFromTrashBinOptions): Promise<\n NonNullablePaths<\n BulkRestoreContactsFromTrashBinResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.email.email`\n | `results.${number}.item.email.deliverabilityStatus`\n | `results.${number}.item.phone.tag`\n | `results.${number}.item.phone.phone`\n | `results.${number}.item.phone.deliverabilityStatus`\n | `results.${number}.item.memberInfo.status`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 4\n >\n >;\n}\n\nexport function getDeletedContact(\n httpClient: HttpClient\n): GetDeletedContactSignature {\n return (contactId: string) =>\n universalGetDeletedContact(\n contactId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetDeletedContactSignature {\n /**\n * Retrieves a soft-deleted contact from the trash bin by ID.\n * @param - ID of the contact to retrieve from the trash bin.\n */\n (contactId: string): Promise<\n NonNullablePaths<\n GetDeletedContactResponse,\n | `contact.email.email`\n | `contact.email.subscriptionStatus.status`\n | `contact.email.deliverabilityStatus`\n | `contact.additionalEmails`\n | `contact.additionalEmails.${number}.email`\n | `contact.phone.tag`\n | `contact.phone.phone`\n | `contact.phone.deliverabilityStatus`\n | `contact.additionalPhones`\n | `contact.additionalPhones.${number}.tag`\n | `contact.additionalPhones.${number}.phone`\n | `contact.addresses`\n | `contact.addresses.${number}.tag`\n | `contact.addresses.${number}.address.streetAddress.number`\n | `contact.addresses.${number}.address.streetAddress.name`\n | `contact.addresses.${number}.address.streetAddress.apt`\n | `contact.locationIds`\n | `contact.segmentIds`\n | `contact.memberInfo.status`\n | `contact.memberInfo.profileInfo.privacyStatus`\n | `contact.memberInfo.userInfo.userId`\n | `contact.memberInfo.userInfo.role`\n | `contact.memberInfo.sessionInfo.mobileAppNames`\n | `contact.memberInfo.groupInfo.groupIds`\n | `contact.tags.privateTags.tagIds`,\n 5\n >\n >;\n}\n\nexport function listDeletedContacts(\n httpClient: HttpClient\n): ListDeletedContactsSignature {\n return (options?: ListDeletedContactsOptions) =>\n universalListDeletedContacts(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListDeletedContactsSignature {\n /**\n * Retrieves a list of soft-deleted contacts from the trash bin, filtered by the provided identifiers and deletion date range.\n */\n (options?: ListDeletedContactsOptions): Promise<\n NonNullablePaths<\n ListDeletedContactsResponse,\n | `contacts`\n | `contacts.${number}.email.email`\n | `contacts.${number}.email.subscriptionStatus.status`\n | `contacts.${number}.email.deliverabilityStatus`\n | `contacts.${number}.phone.tag`\n | `contacts.${number}.phone.phone`\n | `contacts.${number}.phone.deliverabilityStatus`\n | `contacts.${number}.memberInfo.status`\n | `contacts.${number}.memberInfo.profileInfo.privacyStatus`\n | `contacts.${number}.memberInfo.userInfo.userId`\n | `contacts.${number}.memberInfo.userInfo.role`,\n 4\n >\n >;\n}\n\nexport function getContactImageUploadStatus(\n httpClient: HttpClient\n): GetContactImageUploadStatusSignature {\n return (\n identifiers: NonNullablePaths<\n GetContactImageUploadStatusIdentifiers,\n `contactId` | `imageUploadId`,\n 0\n >\n ) =>\n universalGetContactImageUploadStatus(\n identifiers,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetContactImageUploadStatusSignature {\n /**\n * Retrieves the status of the contact image upload process.\n */\n (\n identifiers: NonNullablePaths<\n GetContactImageUploadStatusIdentifiers,\n `contactId` | `imageUploadId`,\n 0\n >\n ): Promise<\n NonNullablePaths<GetContactImageUploadStatusResponse, `status`, 0> & {\n __applicationErrorsType?: GetContactImageUploadStatusApplicationErrors;\n }\n >;\n}\n\nexport function bulkUpdatePhoneCountryCodeByFilter(\n httpClient: HttpClient\n): BulkUpdatePhoneCountryCodeByFilterSignature {\n return (\n options?: NonNullablePaths<\n BulkUpdatePhoneCountryCodeByFilterOptions,\n `countryCode`,\n 0\n >\n ) =>\n universalBulkUpdatePhoneCountryCodeByFilter(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdatePhoneCountryCodeByFilterSignature {\n /**\n * Adds a country code to the main phone of multiple contacts that match the provided filter. Works asynchronously.\n *\n * A contact's main phone is changed only if adding the country code produces a valid phone number. Otherwise, the contact is left unchanged.\n *\n * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n */\n (\n options?: NonNullablePaths<\n BulkUpdatePhoneCountryCodeByFilterOptions,\n `countryCode`,\n 0\n >\n ): Promise<\n NonNullablePaths<BulkUpdatePhoneCountryCodeByFilterResponse, `jobId`, 0>\n >;\n}\n\nexport {\n AccountInfo,\n Action,\n ActionEvent,\n AddContactAdditionalEmailOptions,\n AddContactAdditionalEmailRequest,\n AddContactAdditionalEmailResponse,\n AddContactAdditionalPhoneOptions,\n AddContactAdditionalPhoneRequest,\n AddContactAdditionalPhoneResponse,\n AddContactAddressOptions,\n AddContactAddressRequest,\n AddContactAddressResponse,\n AdditionalEmail,\n AdditionalPhone,\n Address,\n AddressLocation,\n AddressStreetOneOf,\n AddressTag,\n Aggregation,\n AggregationData,\n AggregationKindOneOf,\n AggregationResults,\n AggregationResultsResultOneOf,\n AggregationResultsScalarResult,\n AggregationType,\n ApplicationError,\n BulkActionMetadata,\n BulkAddSegmentToContactsRequest,\n BulkAddSegmentToContactsResponse,\n BulkContactResult,\n BulkCreateContactsOptions,\n BulkCreateContactsRequest,\n BulkCreateContactsResponse,\n BulkDelete,\n BulkDeleteContactsByFilterOptions,\n BulkDeleteContactsByFilterRequest,\n BulkDeleteContactsByFilterResponse,\n BulkDeleteContactsOptions,\n BulkDeleteContactsRequest,\n BulkDeleteContactsResponse,\n BulkDeleteContactsResponseBulkContactResult,\n BulkIndex,\n BulkRemoveSegmentFromContactsRequest,\n BulkRemoveSegmentFromContactsResponse,\n BulkRestoreContactsFromTrashBinOptions,\n BulkRestoreContactsFromTrashBinRequest,\n BulkRestoreContactsFromTrashBinResponse,\n BulkRestoreContactsFromTrashBinResponseBulkContactResult,\n BulkUpdateContactSubscriptionsOptions,\n BulkUpdateContactSubscriptionsRequest,\n BulkUpdateContactSubscriptionsResponse,\n BulkUpdateContactTagsByFilterOptions,\n BulkUpdateContactTagsByFilterRequest,\n BulkUpdateContactTagsByFilterResponse,\n BulkUpdateContactTagsOptions,\n BulkUpdateContactTagsRequest,\n BulkUpdateContactTagsResponse,\n BulkUpdateContactTagsResult,\n BulkUpdateContactsOptions,\n BulkUpdateContactsRequest,\n BulkUpdateContactsResponse,\n BulkUpdateContactsResponseBulkContactResult,\n BulkUpdatePhoneCountryCodeByFilterOptions,\n BulkUpdatePhoneCountryCodeByFilterRequest,\n BulkUpdatePhoneCountryCodeByFilterResponse,\n BulkUpsertContactsOptions,\n BulkUpsertContactsRequest,\n BulkUpsertContactsRequestMaskedContact,\n BulkUpsertContactsResponse,\n BulkUpsertContactsResponseBulkContactResult,\n Contact,\n ContactActivity,\n ContactAddress,\n ContactCompany,\n ContactEmail,\n ContactEmailSubscriptionUpdated,\n ContactImageUploaded,\n ContactMerged,\n ContactName,\n ContactPhone,\n ContactPhoneSubscriptionUpdated,\n ContactQuerySpec,\n ContactSearchSpec,\n ContactSource,\n ContactSubscription,\n ContactsQueryBuilder,\n ContactsQueryResult,\n CountContactsOptions,\n CountContactsRequest,\n CountContactsResponse,\n CreateContactOptions,\n CreateContactRequest,\n CreateContactResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Cursors,\n DateHistogramAggregation,\n DateHistogramResult,\n DateHistogramResults,\n Delete,\n DeleteContactAddressIdentifiers,\n DeleteContactAddressRequest,\n DeleteContactAddressResponse,\n DeleteContactOptions,\n DeleteContactRequest,\n DeleteContactResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n DuplicateContactExists,\n EmailDeliverabilityStatus,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n FailedMemberUpdate,\n FindMatchingContactsOptions,\n FindMatchingContactsRequest,\n FindMatchingContactsResponse,\n GenerateContactImageUploadUrlOptions,\n GenerateContactImageUploadUrlRequest,\n GenerateContactImageUploadUrlResponse,\n GetContactImageUploadStatusIdentifiers,\n GetContactImageUploadStatusRequest,\n GetContactImageUploadStatusResponse,\n GetContactRequest,\n GetContactResponse,\n GetDeletedContactRequest,\n GetDeletedContactResponse,\n GroupInfo,\n IdentificationData,\n IdentificationDataIdOneOf,\n ImageUploadStatus,\n IncludeMissingValuesOptions,\n Index,\n Interval,\n ItemMetadata,\n ListDeletedContactsOptions,\n ListDeletedContactsRequest,\n ListDeletedContactsResponse,\n MaskedContact,\n MatchType,\n MediaFileUploadedEvent,\n MemberInfo,\n MemberStatus,\n MergeContactsOptions,\n MergeContactsRequest,\n MergeContactsResponse,\n MessageEnvelope,\n MissingValues,\n Mode,\n NameFormat,\n NestedAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregationType,\n NestedResultValue,\n NestedResultValueResultOneOf,\n NestedResults,\n Paging,\n PagingMetadataV2,\n PhoneDeliverabilityStatus,\n PhoneTag,\n PrivacyStatus,\n PrivateTags,\n ProfileInfo,\n QueryContactsByOffsetInternalRequest,\n QueryContactsByOffsetInternalRequestNameFormat,\n QueryContactsByOffsetInternalResponse,\n QueryContactsRequest,\n QueryContactsResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n RangeAggregation,\n RangeAggregationResult,\n RangeBucket,\n RangeResult,\n RangeResults,\n Recipient,\n ReindexEntityForFQDN,\n ReindexEntityForFQDNActionOneOf,\n ReindexMessage,\n ReindexMessageActionOneOf,\n ReindexMessageDelete,\n RemoveContactFromTrashBinRequest,\n RemoveContactFromTrashBinResponse,\n ReportBatchCompleted,\n RestoreContactFromTrashBinRequest,\n RestoreContactFromTrashBinResponse,\n RestoreInfo,\n Results,\n Role,\n ScalarAggregation,\n ScalarResult,\n ScalarType,\n Schema,\n SearchContactsOptions,\n SearchContactsRequest,\n SearchContactsResponse,\n SearchDetails,\n SessionInfo,\n SortDirection,\n SortOrder,\n SortType,\n Sorting,\n StandardDetails,\n StreetAddress,\n Subdivision,\n SubdivisionType,\n SubscriptionStatus,\n TagList,\n UpdateContact,\n UpdateContactAddress,\n UpdateContactAddressIdentifiers,\n UpdateContactAddressOptions,\n UpdateContactAddressRequest,\n UpdateContactAddressResponse,\n UpdateContactOptions,\n UpdateContactRequest,\n UpdateContactResponse,\n UpdateContactTagsOptions,\n UpdateContactTagsRequest,\n UpdateContactTagsResponse,\n Upsert,\n UpsertContactOptions,\n UpsertContactRequest,\n UpsertContactResponse,\n UpsertContactResponseAction,\n UpsertMode,\n UserInfo,\n V5SubscriptionStatus,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n ValueAggregationResult,\n ValueResult,\n ValueResults,\n WebhookIdentityType,\n utils,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\n","import {\n bulkUpdateContactSubscriptions as publicBulkUpdateContactSubscriptions,\n createContact as publicCreateContact,\n getContact as publicGetContact,\n updateContact as publicUpdateContact,\n upsertContact as publicUpsertContact,\n updateContactTags as publicUpdateContactTags,\n mergeContacts as publicMergeContacts,\n deleteContact as publicDeleteContact,\n findMatchingContacts as publicFindMatchingContacts,\n queryContacts as publicQueryContacts,\n typedQueryContacts as publicTypedQueryContacts,\n searchContacts as publicSearchContacts,\n countContacts as publicCountContacts,\n generateContactImageUploadUrl as publicGenerateContactImageUploadUrl,\n addContactAdditionalEmail as publicAddContactAdditionalEmail,\n addContactAdditionalPhone as publicAddContactAdditionalPhone,\n addContactAddress as publicAddContactAddress,\n deleteContactAddress as publicDeleteContactAddress,\n updateContactAddress as publicUpdateContactAddress,\n bulkCreateContacts as publicBulkCreateContacts,\n bulkUpdateContacts as publicBulkUpdateContacts,\n bulkUpdateContactTags as publicBulkUpdateContactTags,\n bulkUpdateContactTagsByFilter as publicBulkUpdateContactTagsByFilter,\n bulkUpsertContacts as publicBulkUpsertContacts,\n bulkDeleteContacts as publicBulkDeleteContacts,\n bulkDeleteContactsByFilter as publicBulkDeleteContactsByFilter,\n removeContactFromTrashBin as publicRemoveContactFromTrashBin,\n restoreContactFromTrashBin as publicRestoreContactFromTrashBin,\n bulkRestoreContactsFromTrashBin as publicBulkRestoreContactsFromTrashBin,\n getDeletedContact as publicGetDeletedContact,\n listDeletedContacts as publicListDeletedContacts,\n getContactImageUploadStatus as publicGetContactImageUploadStatus,\n bulkUpdatePhoneCountryCodeByFilter as publicBulkUpdatePhoneCountryCodeByFilter,\n} from './contacts-v5-contact-contacts-v-5.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n ContactQuery,\n ContactsQueryBuilder,\n typedQueryContacts as universalTypedQueryContacts,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\n\nfunction customQueryContacts(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryContacts(httpClient)(),\n typedQueryFunction: (query: ContactQuery) =>\n publicTypedQueryContacts(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ContactsQueryBuilder;\n function overloadedQuery(\n query: ContactQuery\n ): ReturnType<typeof universalTypedQueryContacts>;\n function overloadedQuery(query?: ContactQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const bulkUpdateContactSubscriptions: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateContactSubscriptions> &\n typeof publicBulkUpdateContactSubscriptions\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateContactSubscriptions);\nexport const createContact: MaybeContext<\n BuildRESTFunction<typeof publicCreateContact> & typeof publicCreateContact\n> = /*#__PURE__*/ createRESTModule(publicCreateContact);\nexport const getContact: MaybeContext<\n BuildRESTFunction<typeof publicGetContact> & typeof publicGetContact\n> = /*#__PURE__*/ createRESTModule(publicGetContact);\nexport const updateContact: MaybeContext<\n BuildRESTFunction<typeof publicUpdateContact> & typeof publicUpdateContact\n> = /*#__PURE__*/ createRESTModule(publicUpdateContact);\nexport const upsertContact: MaybeContext<\n BuildRESTFunction<typeof publicUpsertContact> & typeof publicUpsertContact\n> = /*#__PURE__*/ createRESTModule(publicUpsertContact);\nexport const updateContactTags: MaybeContext<\n BuildRESTFunction<typeof publicUpdateContactTags> &\n typeof publicUpdateContactTags\n> = /*#__PURE__*/ createRESTModule(publicUpdateContactTags);\nexport const mergeContacts: MaybeContext<\n BuildRESTFunction<typeof publicMergeContacts> & typeof publicMergeContacts\n> = /*#__PURE__*/ createRESTModule(publicMergeContacts);\nexport const deleteContact: MaybeContext<\n BuildRESTFunction<typeof publicDeleteContact> & typeof publicDeleteContact\n> = /*#__PURE__*/ createRESTModule(publicDeleteContact);\nexport const findMatchingContacts: MaybeContext<\n BuildRESTFunction<typeof publicFindMatchingContacts> &\n typeof publicFindMatchingContacts\n> = /*#__PURE__*/ createRESTModule(publicFindMatchingContacts);\nexport const searchContacts: MaybeContext<\n BuildRESTFunction<typeof publicSearchContacts> & typeof publicSearchContacts\n> = /*#__PURE__*/ createRESTModule(publicSearchContacts);\nexport const countContacts: MaybeContext<\n BuildRESTFunction<typeof publicCountContacts> & typeof publicCountContacts\n> = /*#__PURE__*/ createRESTModule(publicCountContacts);\nexport const generateContactImageUploadUrl: MaybeContext<\n BuildRESTFunction<typeof publicGenerateContactImageUploadUrl> &\n typeof publicGenerateContactImageUploadUrl\n> = /*#__PURE__*/ createRESTModule(publicGenerateContactImageUploadUrl);\nexport const addContactAdditionalEmail: MaybeContext<\n BuildRESTFunction<typeof publicAddContactAdditionalEmail> &\n typeof publicAddContactAdditionalEmail\n> = /*#__PURE__*/ createRESTModule(publicAddContactAdditionalEmail);\nexport const addContactAdditionalPhone: MaybeContext<\n BuildRESTFunction<typeof publicAddContactAdditionalPhone> &\n typeof publicAddContactAdditionalPhone\n> = /*#__PURE__*/ createRESTModule(publicAddContactAdditionalPhone);\nexport const addContactAddress: MaybeContext<\n BuildRESTFunction<typeof publicAddContactAddress> &\n typeof publicAddContactAddress\n> = /*#__PURE__*/ createRESTModule(publicAddContactAddress);\nexport const deleteContactAddress: MaybeContext<\n BuildRESTFunction<typeof publicDeleteContactAddress> &\n typeof publicDeleteContactAddress\n> = /*#__PURE__*/ createRESTModule(publicDeleteContactAddress);\nexport const updateContactAddress: MaybeContext<\n BuildRESTFunction<typeof publicUpdateContactAddress> &\n typeof publicUpdateContactAddress\n> = /*#__PURE__*/ createRESTModule(publicUpdateContactAddress);\nexport const bulkCreateContacts: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateContacts> &\n typeof publicBulkCreateContacts\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateContacts);\nexport const bulkUpdateContacts: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateContacts> &\n typeof publicBulkUpdateContacts\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateContacts);\nexport const bulkUpdateContactTags: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateContactTags> &\n typeof publicBulkUpdateContactTags\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateContactTags);\nexport const bulkUpdateContactTagsByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateContactTagsByFilter> &\n typeof publicBulkUpdateContactTagsByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateContactTagsByFilter);\nexport const bulkUpsertContacts: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpsertContacts> &\n typeof publicBulkUpsertContacts\n> = /*#__PURE__*/ createRESTModule(publicBulkUpsertContacts);\nexport const bulkDeleteContacts: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteContacts> &\n typeof publicBulkDeleteContacts\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteContacts);\nexport const bulkDeleteContactsByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteContactsByFilter> &\n typeof publicBulkDeleteContactsByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteContactsByFilter);\nexport const removeContactFromTrashBin: MaybeContext<\n BuildRESTFunction<typeof publicRemoveContactFromTrashBin> &\n typeof publicRemoveContactFromTrashBin\n> = /*#__PURE__*/ createRESTModule(publicRemoveContactFromTrashBin);\nexport const restoreContactFromTrashBin: MaybeContext<\n BuildRESTFunction<typeof publicRestoreContactFromTrashBin> &\n typeof publicRestoreContactFromTrashBin\n> = /*#__PURE__*/ createRESTModule(publicRestoreContactFromTrashBin);\nexport const bulkRestoreContactsFromTrashBin: MaybeContext<\n BuildRESTFunction<typeof publicBulkRestoreContactsFromTrashBin> &\n typeof publicBulkRestoreContactsFromTrashBin\n> = /*#__PURE__*/ createRESTModule(publicBulkRestoreContactsFromTrashBin);\nexport const getDeletedContact: MaybeContext<\n BuildRESTFunction<typeof publicGetDeletedContact> &\n typeof publicGetDeletedContact\n> = /*#__PURE__*/ createRESTModule(publicGetDeletedContact);\nexport const listDeletedContacts: MaybeContext<\n BuildRESTFunction<typeof publicListDeletedContacts> &\n typeof publicListDeletedContacts\n> = /*#__PURE__*/ createRESTModule(publicListDeletedContacts);\nexport const getContactImageUploadStatus: MaybeContext<\n BuildRESTFunction<typeof publicGetContactImageUploadStatus> &\n typeof publicGetContactImageUploadStatus\n> = /*#__PURE__*/ createRESTModule(publicGetContactImageUploadStatus);\nexport const bulkUpdatePhoneCountryCodeByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdatePhoneCountryCodeByFilter> &\n typeof publicBulkUpdatePhoneCountryCodeByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdatePhoneCountryCodeByFilter);\nexport const queryContacts: MaybeContext<\n BuildRESTFunction<typeof customQueryContacts> & typeof customQueryContacts\n> = /*#__PURE__*/ createRESTModule(customQueryContacts);\n\nexport {\n SubscriptionStatus,\n EmailDeliverabilityStatus,\n PhoneTag,\n PhoneDeliverabilityStatus,\n AddressTag,\n SubdivisionType,\n MemberStatus,\n PrivacyStatus,\n Role,\n WebhookIdentityType,\n Mode,\n V5SubscriptionStatus,\n MatchType,\n UpsertMode,\n UpsertContactResponseAction,\n SortOrder,\n SortType,\n SortDirection,\n MissingValues,\n ScalarType,\n NestedAggregationType,\n Interval,\n AggregationType,\n NameFormat,\n Action,\n QueryContactsByOffsetInternalRequestNameFormat,\n ImageUploadStatus,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\nexport {\n Contact,\n ContactName,\n ContactEmail,\n ContactSubscription,\n AdditionalEmail,\n ContactPhone,\n AdditionalPhone,\n ContactAddress,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n StandardDetails,\n Recipient,\n ContactCompany,\n ContactSource,\n ContactActivity,\n MemberInfo,\n ProfileInfo,\n UserInfo,\n SessionInfo,\n GroupInfo,\n PrivateTags,\n TagList,\n ExtendedFields,\n ReindexMessage,\n ReindexMessageActionOneOf,\n Upsert,\n ReindexMessageDelete,\n Schema,\n ContactMerged,\n ContactEmailSubscriptionUpdated,\n ContactPhoneSubscriptionUpdated,\n ContactImageUploaded,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BulkUpdateContactSubscriptionsRequest,\n SearchDetails,\n BulkUpdateContactSubscriptionsResponse,\n ReindexEntityForFQDN,\n ReindexEntityForFQDNActionOneOf,\n Index,\n Delete,\n ReportBatchCompleted,\n BulkIndex,\n BulkDelete,\n CreateContactRequest,\n CreateContactResponse,\n DuplicateContactExists,\n GetContactRequest,\n GetContactResponse,\n UpdateContactRequest,\n UpdateContactResponse,\n UpsertContactRequest,\n UpsertContactResponse,\n FailedMemberUpdate,\n UpdateContactTagsRequest,\n UpdateContactTagsResponse,\n MergeContactsRequest,\n MergeContactsResponse,\n DeleteContactRequest,\n DeleteContactResponse,\n FindMatchingContactsRequest,\n FindMatchingContactsResponse,\n QueryContactsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryContactsResponse,\n CursorPagingMetadata,\n Cursors,\n SearchContactsRequest,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Aggregation,\n AggregationKindOneOf,\n RangeBucket,\n IncludeMissingValuesOptions,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n RangeAggregation,\n ScalarAggregation,\n DateHistogramAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregation,\n SearchContactsResponse,\n AggregationData,\n ValueAggregationResult,\n RangeAggregationResult,\n ValueResults,\n RangeResults,\n AggregationResultsScalarResult,\n ValueResult,\n RangeResult,\n ScalarResult,\n NestedResultValue,\n NestedResultValueResultOneOf,\n Results,\n DateHistogramResult,\n DateHistogramResults,\n NestedResults,\n AggregationResults,\n AggregationResultsResultOneOf,\n CountContactsRequest,\n CountContactsResponse,\n GenerateContactImageUploadUrlRequest,\n GenerateContactImageUploadUrlResponse,\n AddContactAdditionalEmailRequest,\n AddContactAdditionalEmailResponse,\n AddContactAdditionalPhoneRequest,\n AddContactAdditionalPhoneResponse,\n AddContactAddressRequest,\n AddContactAddressResponse,\n DeleteContactAddressRequest,\n DeleteContactAddressResponse,\n UpdateContactAddressRequest,\n UpdateContactAddressResponse,\n BulkCreateContactsRequest,\n BulkCreateContactsResponse,\n ItemMetadata,\n ApplicationError,\n BulkContactResult,\n BulkActionMetadata,\n BulkUpdateContactsRequest,\n MaskedContact,\n BulkUpdateContactsResponse,\n BulkUpdateContactsResponseBulkContactResult,\n BulkUpdateContactTagsRequest,\n BulkUpdateContactTagsResponse,\n BulkUpdateContactTagsResult,\n BulkUpdateContactTagsByFilterRequest,\n BulkUpdateContactTagsByFilterResponse,\n BulkUpsertContactsRequest,\n BulkUpsertContactsRequestMaskedContact,\n BulkUpsertContactsResponse,\n BulkUpsertContactsResponseBulkContactResult,\n BulkDeleteContactsRequest,\n BulkDeleteContactsResponse,\n BulkDeleteContactsResponseBulkContactResult,\n BulkDeleteContactsByFilterRequest,\n BulkDeleteContactsByFilterResponse,\n RemoveContactFromTrashBinRequest,\n RemoveContactFromTrashBinResponse,\n RestoreContactFromTrashBinRequest,\n RestoreContactFromTrashBinResponse,\n BulkRestoreContactsFromTrashBinRequest,\n BulkRestoreContactsFromTrashBinResponse,\n BulkRestoreContactsFromTrashBinResponseBulkContactResult,\n GetDeletedContactRequest,\n GetDeletedContactResponse,\n ListDeletedContactsRequest,\n ListDeletedContactsResponse,\n BulkAddSegmentToContactsRequest,\n BulkAddSegmentToContactsResponse,\n BulkRemoveSegmentFromContactsRequest,\n BulkRemoveSegmentFromContactsResponse,\n QueryContactsByOffsetInternalRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Paging,\n QueryContactsByOffsetInternalResponse,\n PagingMetadataV2,\n GetContactImageUploadStatusRequest,\n GetContactImageUploadStatusResponse,\n BulkUpdatePhoneCountryCodeByFilterRequest,\n BulkUpdatePhoneCountryCodeByFilterResponse,\n Empty,\n MediaFileUploadedEvent,\n BulkUpdateContactSubscriptionsOptions,\n CreateContactOptions,\n UpdateContact,\n UpdateContactOptions,\n UpsertContactOptions,\n UpdateContactTagsOptions,\n MergeContactsOptions,\n DeleteContactOptions,\n FindMatchingContactsOptions,\n ContactsQueryResult,\n ContactsQueryBuilder,\n ContactQuerySpec,\n SearchContactsOptions,\n ContactSearchSpec,\n CountContactsOptions,\n GenerateContactImageUploadUrlOptions,\n AddContactAdditionalEmailOptions,\n AddContactAdditionalPhoneOptions,\n AddContactAddressOptions,\n DeleteContactAddressIdentifiers,\n UpdateContactAddressIdentifiers,\n UpdateContactAddress,\n UpdateContactAddressOptions,\n BulkCreateContactsOptions,\n BulkUpdateContactsOptions,\n BulkUpdateContactTagsOptions,\n BulkUpdateContactTagsByFilterOptions,\n BulkUpsertContactsOptions,\n BulkDeleteContactsOptions,\n BulkDeleteContactsByFilterOptions,\n BulkRestoreContactsFromTrashBinOptions,\n ListDeletedContactsOptions,\n GetContactImageUploadStatusIdentifiers,\n BulkUpdatePhoneCountryCodeByFilterOptions,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\nexport { utils } from './contacts-v5-contact-contacts-v-5.universal.js';\nexport {\n SubscriptionStatusWithLiterals,\n EmailDeliverabilityStatusWithLiterals,\n PhoneTagWithLiterals,\n PhoneDeliverabilityStatusWithLiterals,\n AddressTagWithLiterals,\n SubdivisionTypeWithLiterals,\n MemberStatusWithLiterals,\n PrivacyStatusWithLiterals,\n RoleWithLiterals,\n WebhookIdentityTypeWithLiterals,\n ModeWithLiterals,\n V5SubscriptionStatusWithLiterals,\n MatchTypeWithLiterals,\n UpsertModeWithLiterals,\n UpsertContactResponseActionWithLiterals,\n SortOrderWithLiterals,\n SortTypeWithLiterals,\n SortDirectionWithLiterals,\n MissingValuesWithLiterals,\n ScalarTypeWithLiterals,\n NestedAggregationTypeWithLiterals,\n IntervalWithLiterals,\n AggregationTypeWithLiterals,\n NameFormatWithLiterals,\n ActionWithLiterals,\n QueryContactsByOffsetInternalRequestNameFormatWithLiterals,\n ImageUploadStatusWithLiterals,\n BulkUpdateContactSubscriptionsApplicationErrors,\n CreateContactApplicationErrors,\n UpdateContactApplicationErrors,\n UpsertContactApplicationErrors,\n UpdateContactTagsApplicationErrors,\n MergeContactsApplicationErrors,\n DeleteContactApplicationErrors,\n FindMatchingContactsApplicationErrors,\n GenerateContactImageUploadUrlApplicationErrors,\n AddContactAdditionalEmailApplicationErrors,\n AddContactAdditionalPhoneApplicationErrors,\n AddContactAddressApplicationErrors,\n DeleteContactAddressApplicationErrors,\n UpdateContactAddressApplicationErrors,\n BulkUpdateContactTagsApplicationErrors,\n BulkUpdateContactTagsByFilterApplicationErrors,\n BulkDeleteContactsApplicationErrors,\n BulkDeleteContactsByFilterApplicationErrors,\n GetContactImageUploadStatusApplicationErrors,\n CommonQueryWithEntityContext,\n ContactQuery,\n CommonSearchWithEntityContext,\n ContactSearch,\n} from './contacts-v5-contact-contacts-v-5.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA,EAAA,iCAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,uCAAAC;AAAA,EAAA,sCAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,0CAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,yBAA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2DAAiBA,mBAAwB;AACpD,IAAMC,8BAGK,2DAAiBA,2BAAgC;AAC5D,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMC,8BAGK,2DAAiBA,2BAAgC;AAC5D,IAAMC,mCAGK,2DAAiBA,gCAAqC;AACjE,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,+BAGK,2DAAiBA,4BAAiC;AAC7D,IAAMC,sCAGK,2DAAiBA,mCAAwC;AACpE,IAAMhC,iBAEK,2DAAiB,mBAAmB;","names":["addContactAdditionalEmail","addContactAdditionalPhone","addContactAddress","bulkCreateContacts","bulkDeleteContacts","bulkDeleteContactsByFilter","bulkRestoreContactsFromTrashBin","bulkUpdateContactSubscriptions","bulkUpdateContactTags","bulkUpdateContactTagsByFilter","bulkUpdateContacts","bulkUpdatePhoneCountryCodeByFilter","bulkUpsertContacts","countContacts","createContact","deleteContact","deleteContactAddress","findMatchingContacts","generateContactImageUploadUrl","getContact","getContactImageUploadStatus","getDeletedContact","listDeletedContacts","mergeContacts","queryContacts","removeContactFromTrashBin","restoreContactFromTrashBin","searchContacts","updateContact","updateContactAddress","updateContactTags","upsertContact","import_float","import_timestamp","import_rest_modules","payload","import_address","import_image","import_transform_paths","TRANSFORM_PATHS_0","TRANSFORM_PATHS_1","TRANSFORM_PATHS_2","TRANSFORM_PATHS_3","TRANSFORM_PATHS_4","TRANSFORM_PATHS_5","TRANSFORM_PATHS_6","TRANSFORM_PATHS_7","TRANSFORM_PATHS_8","TRANSFORM_PATHS_9","TRANSFORM_PATHS_10","SubscriptionStatus","EmailDeliverabilityStatus","PhoneTag","PhoneDeliverabilityStatus","AddressTag","SubdivisionType","MemberStatus","PrivacyStatus","Role","WebhookIdentityType","Mode","V5SubscriptionStatus","MatchType","UpsertMode","UpsertContactResponseAction","SortOrder","SortType","SortDirection","MissingValues","ScalarType","NestedAggregationType","Interval","AggregationType","NameFormat","Action","QueryContactsByOffsetInternalRequestNameFormat","ImageUploadStatus","bulkUpdateContactSubscriptions","sdkTransformError","createContact","getContact","updateContact","upsertContact","updateContactTags","mergeContacts","deleteContact","findMatchingContacts","queryContacts","searchContacts","countContacts","generateContactImageUploadUrl","addContactAdditionalEmail","addContactAdditionalPhone","addContactAddress","deleteContactAddress","updateContactAddress","bulkCreateContacts","bulkUpdateContacts","bulkUpdateContactTags","bulkUpdateContactTagsByFilter","bulkUpsertContacts","bulkDeleteContacts","bulkDeleteContactsByFilter","removeContactFromTrashBin","restoreContactFromTrashBin","bulkRestoreContactsFromTrashBin","getDeletedContact","listDeletedContacts","getContactImageUploadStatus","bulkUpdatePhoneCountryCodeByFilter","bulkUpdateContactSubscriptions","createContact","getContact","updateContact","upsertContact","updateContactTags","mergeContacts","deleteContact","findMatchingContacts","queryContacts","typedQueryContacts","searchContacts","countContacts","generateContactImageUploadUrl","addContactAdditionalEmail","addContactAdditionalPhone","addContactAddress","deleteContactAddress","updateContactAddress","bulkCreateContacts","bulkUpdateContacts","bulkUpdateContactTags","bulkUpdateContactTagsByFilter","bulkUpsertContacts","bulkDeleteContacts","bulkDeleteContactsByFilter","removeContactFromTrashBin","restoreContactFromTrashBin","bulkRestoreContactsFromTrashBin","getDeletedContact","listDeletedContacts","getContactImageUploadStatus","bulkUpdatePhoneCountryCodeByFilter","import_rest_modules","queryContacts","typedQueryContacts","bulkUpdateContactSubscriptions","createContact","getContact","updateContact","upsertContact","updateContactTags","mergeContacts","deleteContact","findMatchingContacts","searchContacts","countContacts","generateContactImageUploadUrl","addContactAdditionalEmail","addContactAdditionalPhone","addContactAddress","deleteContactAddress","updateContactAddress","bulkCreateContacts","bulkUpdateContacts","bulkUpdateContactTags","bulkUpdateContactTagsByFilter","bulkUpsertContacts","bulkDeleteContacts","bulkDeleteContactsByFilter","removeContactFromTrashBin","restoreContactFromTrashBin","bulkRestoreContactsFromTrashBin","getDeletedContact","listDeletedContacts","getContactImageUploadStatus","bulkUpdatePhoneCountryCodeByFilter"]}