@wix/auto_sdk_crm_contacts-v-5 1.0.0
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.
- package/build/cjs/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.ts +4256 -0
- package/build/cjs/index.d.ts +522 -0
- package/build/cjs/index.js +3749 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +38 -0
- package/build/cjs/index.typings.js +3445 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2929 -0
- package/build/cjs/meta.js +2558 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/schemas.d.ts +5693 -0
- package/build/cjs/schemas.js +8216 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.mts +4256 -0
- package/build/es/index.d.mts +522 -0
- package/build/es/index.mjs +3666 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +38 -0
- package/build/es/index.typings.mjs +3361 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2929 -0
- package/build/es/meta.mjs +2473 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/schemas.d.mts +5693 -0
- package/build/es/schemas.mjs +8116 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.ts +4256 -0
- package/build/internal/cjs/index.d.ts +522 -0
- package/build/internal/cjs/index.js +3749 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +38 -0
- package/build/internal/cjs/index.typings.js +3445 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2929 -0
- package/build/internal/cjs/meta.js +2558 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/schemas.d.ts +5693 -0
- package/build/internal/cjs/schemas.js +8216 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.mts +4256 -0
- package/build/internal/es/index.d.mts +522 -0
- package/build/internal/es/index.mjs +3666 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +38 -0
- package/build/internal/es/index.typings.mjs +3361 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2929 -0
- package/build/internal/es/meta.mjs +2473 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/build/internal/es/schemas.d.mts +5693 -0
- package/build/internal/es/schemas.mjs +8116 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +61 -0
- package/schemas/package.json +3 -0
|
@@ -0,0 +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\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 cannot 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 /** Contact's profile image. */\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 * List of Contact segment IDs that this 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 /** 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\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 * Default value: OTHER\n */\n tag?: PhoneTagWithLiterals;\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 * Default value: OTHER\n */\n tag?: PhoneTagWithLiterals;\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 * Default value: 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 * Indicates whether this address is the primary/default address for the contact.\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 * All other addresses will have this field set to false.\n */\n defaultAddress?: boolean | null;\n /**\n * Address ID\n * @format GUID\n */\n addressId?: 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 */\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. e.g. 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 address line 1\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\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 /** 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 iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. 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\nexport interface MemberInfo {\n /**\n * Member ID\n * @format GUID\n */\n memberId?: string | null;\n /** Signup date */\n signupDate?: Date | null;\n /**\n * Login email\n * @format EMAIL\n */\n email?: string | null;\n /** Indicate whether the email is verified */\n emailVerified?: boolean | null;\n /** Indicates whether the member is required to verify their email */\n emailVerificationRequired?: 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 /** Profile info */\n profileInfo?: ProfileInfo;\n /** User info */\n userInfo?: UserInfo;\n /** Session info */\n sessionInfo?: SessionInfo;\n /** Group info */\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 * Nickname\n * @maxLength 255\n */\n nickname?: string | null;\n /** Privacy status */\n privacyStatus?: PrivacyStatusWithLiterals;\n /** Indicate whether the member is reported */\n reported?: boolean | null;\n /** Indicate whether the member is muted */\n muted?: boolean | null;\n /** 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 /** The user's role on the website */\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 /** Last time the member logged in to the website */\n lastWebLogin?: Date | null;\n /** Last time the member logged in to one of the mobile apps */\n lastMobileLogin?: Date | null;\n /**\n * List of mobile apps that the member has ever logged in to\n * @maxSize 50\n * @maxLength 50\n */\n mobileAppNames?: string[];\n}\n\nexport interface GroupInfo {\n /**\n * Group IDs\n * @format GUID\n * @maxSize 1000\n */\n groupIds?: string[];\n}\n\nexport interface PrivateTags {\n /** Tags that are exposed to anyone with access to the entity. */\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\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\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 and deliverability status. */\n email?: ContactEmail;\n /** Date and time the contact was updated with the email subscription or deliverability status. */\n _updatedDate?: Date | null;\n}\n\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\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 /** Defines 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 - will search in all searchable fields. Use dot notation to specify json path\n * @maxLength 200\n * @maxSize 20\n */\n fields?: string[];\n /** Flag if should use auto fuzzy search (allowing typos by 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 NOT_SET = 'NOT_SET',\n SUBSCRIBED = 'SUBSCRIBED',\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 * The ID of the bulk update contact subscription job.\n *\n * Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.\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 be created. */\n contact: Contact;\n /**\n * Allows creating a duplicate 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 /** The 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 * The ID of an existing contact that matches a duplicate in the request.\n * @format GUID\n */\n matchingContactId?: string | null;\n /** The field(s) 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\nexport interface GetContactResponse {\n /** The requested Contact. */\n contact?: Contact;\n}\n\nexport interface UpdateContactRequest {\n /** Contact to be updated, may be partial. */\n contact: Contact;\n /**\n * Allows updating 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 be upserted. */\n contact: Contact;\n /** The mode in which the upsert should work in. */\n upsertMode?: UpsertModeWithLiterals;\n /** Indicates whether to update the contact even if it is a site member. */\n updateMember?: boolean | null;\n}\n\nexport enum UpsertMode {\n /** Fields will be overwritten (default). */\n OVERWRITE = 'OVERWRITE',\n /** Fields will be appended. Non-array fields will be set only if it does not have an existing value. */\n APPEND = 'APPEND',\n /** Array fields, will be appended. Non-array fields will be overwritten. */\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 * The contact from which to add or remove tags.\n * @format GUID\n */\n contactId: string;\n /** The tags to add. */\n assignTags?: PrivateTags;\n /** The tags to remove. */\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 /** Target contact revision number, which increments by 1 each time the contact is updated to prevent conflicting changes. */\n targetContactRevision: string | null;\n /** When the target contact is provided, the merged result will be overwritten. */\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 /** Indicates whether to only return a preview of the merged contact or perform the actual merge. */\n preview?: boolean | null;\n /**\n * Allows updating the target contact even if it becomes a duplicate of another contact.\n * This can happen only where the target contact 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 * Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even\n * if it is a site member and the site member is also deleted. 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 /** List of Contacts. 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\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 /** List of Contacts. */\n contacts?: Contact[];\n /** Paging metadata */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in 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` will 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\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 | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to 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 all filters and aggregations returned values.\n * You may override this behavior in a specific filter by providing\n * timestamps including time zone. e.g. `\"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 of aggregation, should be unique, will appear in aggregation results\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation, client must provide matching aggregation field below */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by, use dot notation to specify 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 is not given */\n from?: number | null;\n /** Exclusive upper bound of the range. Required if from is not given */\n to?: number | null;\n}\n\nexport enum SortType {\n /** Should sort by number of matches */\n COUNT = 'COUNT',\n /** Should sort by value of the field alphabetically */\n VALUE = 'VALUE',\n}\n\n/** @enumType */\nexport type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';\n\nexport enum SortDirection {\n /** Should sort in descending order */\n DESC = 'DESC',\n /** Should sort in ascending order */\n ASC = 'ASC',\n}\n\n/** @enumType */\nexport type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';\n\nexport enum MissingValues {\n /** Should missing values be excluded from the aggregation results */\n EXCLUDE = 'EXCLUDE',\n /** Should missing values be included in the aggregation results */\n INCLUDE = 'INCLUDE',\n}\n\n/** @enumType */\nexport type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';\n\nexport interface IncludeMissingValuesOptions {\n /**\n * Can specify custom bucket name. Defaults are [string -> \"N/A\"], [int -> \"0\"], [bool -> \"false\"] ...\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\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 user can define set of ranges - each representing a bucket */\n RANGE = 'RANGE',\n /** A single-value metric aggregation - e.g. min, max, sum, avg */\n SCALAR = 'SCALAR',\n /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */\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 */\n includeOptions?: IncludeMissingValuesOptions;\n /** Should sort by number of matches or value of the field */\n sortType?: SortTypeWithLiterals;\n /** Should sort in ascending or descending order */\n sortDirection?: SortDirectionWithLiterals;\n /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */\n limit?: number | null;\n /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */\n missingValues?: MissingValuesWithLiterals;\n}\n\n/** @oneof */\nexport interface ValueAggregationOptionsOneOf {\n /** Options for including missing values */\n includeOptions?: IncludeMissingValuesOptions;\n}\n\nexport interface RangeAggregation {\n /**\n * List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds\n * @maxSize 50\n */\n buckets?: RangeBucket[];\n}\n\nexport interface ScalarAggregation {\n /** Define the operator for the scalar aggregation */\n type?: ScalarTypeWithLiterals;\n}\n\nexport interface DateHistogramAggregation {\n /** Interval for 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 of aggregation, should be unique, will appear in aggregation results\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation, client must provide matching aggregation field below */\n type?: NestedAggregationTypeWithLiterals;\n /**\n * Field to aggregate by, use dont notation to specify 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 user can define set of ranges - each representing a bucket */\n RANGE = 'RANGE',\n /** A single-value metric aggregation - e.g. min, max, sum, avg */\n SCALAR = 'SCALAR',\n /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n /** Multi-level aggregation, where each next aggregation is nested within 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 through a list of aggregation where each next aggregation is nested within previous one */\nexport interface NestedAggregation {\n /**\n * Flattened list of aggregations, where each next aggregation is nested within 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 /** List of Contacts. */\n contacts?: Contact[];\n /** Paging metadata */\n pagingMetadata?: CursorPagingMetadata;\n /** Aggregation data */\n aggregationData?: AggregationData;\n}\n\nexport interface AggregationData {\n /**\n * key = aggregation name (as derived from search request)\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 * List of value aggregations\n * @maxSize 250\n */\n results?: ValueAggregationResult[];\n}\n\nexport interface RangeResults {\n /**\n * List of ranges returned in 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 /** List of nested aggregations */\n results?: Record<string, NestedResultValue>;\n}\n\nexport interface DateHistogramResult {\n /**\n * Date in 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 * List of date histogram aggregations\n * @maxSize 200\n */\n results?: DateHistogramResult[];\n}\n\n/**\n * Results of `NESTED` aggregation type in a flattened form\n * aggregations in resulting array are keyed by requested aggregation `name`.\n */\nexport interface NestedResults {\n /**\n * List of nested aggregations\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 aggregation as derived from search request\n * @maxLength 100\n */\n name?: string;\n /** Type of aggregation that must match provided kind as derived from search request */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by as derived from 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 */\n count?: number;\n}\n\nexport interface GenerateContactImageUploadUrlRequest {\n /**\n * ID of the contact whose picture is being updated.\n * @format GUID\n */\n contactId: string;\n /**\n * Mime Type. Must be one of: `image/png`, `image/jpeg`.\n * Defaults to `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 * The upload id.\n * @format GUID\n */\n imageUploadId?: string;\n}\n\nexport interface AddContactAdditionalEmailRequest {\n /**\n * ID of the Contact to add an email.\n * @format GUID\n */\n contactId: string;\n /** The email to add. */\n email: AdditionalEmail;\n /** Contact revision number for optimistic concurrency control. */\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.\n * @format GUID\n */\n contactId: string;\n /** The phone to add. */\n phone: AdditionalPhone;\n /** Contact revision number for optimistic concurrency control. */\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.\n * @format GUID\n */\n contactId: string;\n /** The address to add. */\n address: ContactAddress;\n /** Contact revision number for optimistic concurrency control. */\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 from which to delete an address.\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 for optimistic concurrency control. */\n revision: string | null;\n}\n\nexport interface DeleteContactAddressResponse {\n /** Updated Contact after address deletion. */\n contact?: Contact;\n}\n\nexport interface UpdateContactAddressRequest {\n /**\n * ID of the Contact to update address on.\n * @format GUID\n */\n contactId: string;\n /** The updated address (must include address.id). */\n address: ContactAddress;\n /** Contact revision number for optimistic concurrency control. */\n revision: string | null;\n}\n\nexport interface UpdateContactAddressResponse {\n /** Updated Contact after address update. */\n contact?: Contact;\n}\n\nexport interface BulkCreateContactsRequest {\n /**\n * List of Contacts to be created\n * @minSize 1\n * @maxSize 100\n */\n contacts: Contact[];\n /** set to `true` if you wish to receive back the created Contacts in the response */\n returnEntity?: boolean;\n /** Allows creating the contact even if a duplicate already exists. */\n allowDuplicates?: boolean;\n}\n\nexport interface BulkCreateContactsResponse {\n /**\n * List of the bulk create operation results including the 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 specific single create operation */\n itemMetadata?: ItemMetadata;\n /** Only exists if `returnEntity` was set to 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 * List of Contacts to be updated.\n * @minSize 1\n * @maxSize 100\n */\n contacts: MaskedContact[];\n /** set to `true` if you wish to receive back the updated Contacts in the response */\n returnEntity?: boolean;\n /** Allows updating the contact even if it becomes a duplicate of another contact. */\n allowDuplicates?: boolean;\n}\n\nexport interface MaskedContact {\n /** Contact to be updated, may be partial */\n contact?: Contact;\n}\n\nexport interface BulkUpdateContactsResponse {\n /**\n * Results\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 specific single update operation */\n itemMetadata?: ItemMetadata;\n /** Only exists if `returnEntity` was set to true in the request */\n item?: Contact;\n}\n\nexport interface BulkUpdateContactTagsRequest {\n /**\n * The contacts from which to add or remove tags.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds: string[];\n /** set to `true` if you wish to receive back the updated Contacts in the response */\n returnEntity?: boolean;\n /** The tags to add. */\n assignTags?: PrivateTags;\n /** The tags to remove. */\n unassignTags?: PrivateTags;\n}\n\nexport interface BulkUpdateContactTagsResponse {\n /**\n * The results of the update for all contacts in the request.\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 specific single update operation */\n itemMetadata?: ItemMetadata;\n /** Only exists if `returnEntity` was set to true in the request */\n item?: Contact;\n}\n\nexport interface BulkUpdateContactTagsByFilterRequest {\n /** A 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 /** Tag ids to add to the contact. */\n assignTags?: PrivateTags;\n /** Tag ids to remove from the contact. */\n unassignTags?: PrivateTags;\n}\n\nexport interface BulkUpdateContactTagsByFilterResponse {\n /**\n * The ID of the update tags job.\n *\n * Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkUpsertContactsRequest {\n /**\n * List of Contacts to be updated.\n * @minSize 1\n * @maxSize 100\n */\n contacts: BulkUpsertContactsRequestMaskedContact[];\n /** set to `true` if you wish to receive back the updated Contacts in the response */\n returnEntity?: boolean;\n /** The mode in which the upsert should work in. */\n upsertMode?: UpsertModeWithLiterals;\n /** Indicates whether to update a contact even if it is a site member. */\n updateMember?: boolean | null;\n}\n\nexport interface BulkUpsertContactsRequestMaskedContact {\n /** Contact to be updated, may be partial */\n contact?: Contact;\n}\n\nexport interface BulkUpsertContactsResponse {\n /**\n * Results\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpsertContactsResponseBulkContactResult[];\n /** Metadata regarding the bulk update 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 specific single update operation */\n itemMetadata?: ItemMetadata;\n /** Only exists if `returnEntity` was set to true in the request */\n item?: Contact;\n /** The action performed on the contact. */\n action?: ActionWithLiterals;\n}\n\nexport interface BulkDeleteContactsRequest {\n /**\n * Contact ids to be deleted\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds: string[];\n /**\n * Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even\n * if it is a site member and the site member is also deleted. Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\nexport interface BulkDeleteContactsResponse {\n /**\n * Results\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 specific single delete operation */\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 * Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even\n * if it is a site member and the site member is also deleted. Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\nexport interface BulkDeleteContactsByFilterResponse {\n /**\n * The ID of the delete job.\n *\n * Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface RemoveContactFromTrashBinRequest {\n /**\n * Id of the Contact to remove from trashbin.\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 trashbin.\n * @format GUID\n */\n contactId: string;\n}\n\nexport interface RestoreContactFromTrashBinResponse {\n /** The restored Contact. */\n contact?: Contact;\n}\n\nexport interface BulkRestoreContactsFromTrashBinRequest {\n /**\n * List of Contacts to be restored\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds?: string[];\n /** return full entity in response */\n returnEntity?: boolean;\n}\n\nexport interface BulkRestoreContactsFromTrashBinResponse {\n /**\n * Results\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkRestoreContactsFromTrashBinResponseBulkContactResult[];\n /** Metadata regarding the bulk delete operation */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkRestoreContactsFromTrashBinResponseBulkContactResult {\n /** Metadata regarding the specific single restore operation */\n itemMetadata?: ItemMetadata;\n /** Only exists if returnEntity was set to true in the request */\n item?: Contact;\n}\n\nexport interface GetDeletedContactRequest {\n /**\n * Id of the Contact to retrieve from trashbin.\n * @format GUID\n */\n contactId: string;\n}\n\nexport interface GetDeletedContactResponse {\n /** The requested 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 /** From date and time that contact was deleted. */\n deletedFromDate?: Date | null;\n /** Until date and time that contact was deleted. */\n deletedToDate?: Date | null;\n /** Cursor paging. */\n paging?: CursorPaging;\n}\n\nexport interface ListDeletedContactsResponse {\n /** List of 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 * List of Contact ids\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n contactIds?: string[];\n /**\n * List of existing segment ids. It is used to remove segments that no longer exist that are still on the contact.\n * @format GUID\n * @maxSize 100\n */\n existingSegmentIds?: string[];\n}\n\nexport interface BulkAddSegmentToContactsResponse {\n /** List of action results */\n results?: ItemMetadata[];\n /** Metadata on the bulk action */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkRemoveSegmentFromContactsRequest {\n /**\n * Segment id\n * @format GUID\n */\n segmentId?: string;\n /**\n * List of Contact ids\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n contactIds?: string[];\n}\n\nexport interface BulkRemoveSegmentFromContactsResponse {\n /** List of action results */\n results?: ItemMetadata[];\n /** Metadata on 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 * 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 * Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned.\n * @maxSize 1000\n * @maxLength 100\n */\n fields?: string[];\n /**\n * Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are 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 /** List of 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 /** Flag that indicates 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\nexport interface GetContactImageUploadStatusRequest {\n /**\n * Id of the contact for which to retrieve the image upload status.\n * @format GUID\n */\n contactId: string;\n /**\n * The upload ID of the image upload process. Returned in case an image URL was provided when creating or\n * updating a contact. It is also returned from the GenerateContactImageUploadUrl endpoint.\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 * The country code will be added to the contacts main phone number, when adding it the phone, makes it a valid phone number.\n * @format COUNTRY\n */\n countryCode: string;\n}\n\nexport interface BulkUpdatePhoneCountryCodeByFilterResponse {\n /**\n * The ID of the bulk update contact job.\n *\n * Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.\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 * Creates an async job to bulk update email and phone subscription statuses for multiple contacts.\n * If the new subscription status is equal to the current one, there will be no update.\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 * @documentationMaturity preview\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`, 2> & {\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 in the site's contact list.\n *\n * *Required Fields:** At least one of the following must be provided:\n * - `name.first` or `name.last`\n * - `email.email`\n * - `phone.phone`\n *\n * *Duplicate Handling:** By default, creation fails if a contact with the same identifiers\n * (external_id, email, or phone) already exists. Set `allow_duplicates` to true to bypass this check.\n * 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 providing an image URL, the image is uploaded asynchronously.\n * An `image_upload_id` is returned for tracking upload progress.\n * Use [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/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-create-contacts).\n * @param contact - Contact to be created.\n * @public\n * @documentationMaturity preview\n * @requiredField contact\n * @permissionId CONTACTS.CONTACT_CREATE\n * @applicableIdentity APP\n * @returns The 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 6\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 * Allows creating a duplicate 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 * @documentationMaturity preview\n * @requiredField contactId\n * @permissionId CONTACTS.CONTACT_READ\n * @applicableIdentity APP\n * @returns The requested 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 6\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 an existing contact with new information.\n *\n * *Revision Control:** The current `revision` number must be provided to prevent\n * conflicting updates. The revision increments with each update.\n *\n *\n * *Restrictions:**\n * - `external_id` can only be set once and cannot be changed\n * - Site member contacts main email cannot be changed\n * - At least one of name, email, or phone must remain after update\n *\n * *Image Upload:** When providing an image URL, the image is uploaded asynchronously.\n * An `image_upload_id` is returned for tracking upload progress.\n * Use [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/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-update-contacts).\n * @param _id - Contact ID.\n * @public\n * @documentationMaturity preview\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`, 2>,\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 6\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 cannot 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 /** Contact's profile image. */\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 * List of Contact segment IDs that this 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 /** 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 * Allows updating 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 based on matching identifiers.\n *\n * *Matching Logic:** Uses external_id, email, and phone to find existing contacts.\n * See [contact matching documentation](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts)\n * for detailed matching rules.\n *\n * *Upsert Modes:**\n * - `OVERWRITE` (default): Replaces existing field values\n * - `APPEND`: Sets fields only if they don't have existing values; appends to arrays\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields, appends to arrays\n *\n * *Member Contacts:** Set `update_member` to `true` when upserting site member contacts.\n *\n * *Response:** The `action` field indicates whether the contact was `CREATED` or `UPDATED`.\n *\n * *Image Upload:** When providing an image URL, the image is uploaded asynchronously.\n * An `image_upload_id` is returned for tracking upload progress.\n * Use [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/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-upsert-contacts).\n * @param contact - Contact to be upserted.\n * @public\n * @documentationMaturity preview\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 7\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 /** The mode in which the upsert should work in. */\n upsertMode?: UpsertModeWithLiterals;\n /** Indicates whether to update the contact even if it is a site member. */\n updateMember?: boolean | null;\n}\n\n/**\n * Updates tags assigned to a specific contact.\n *\n * *Assignment Logic:** If a tag appears in both assign and unassign lists, it will be assigned.\n * At least one tag must be specified in either the assign or unassign list.\n * @param contactId - The contact from which to add or remove tags.\n * @public\n * @documentationMaturity preview\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 7\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 /** The tags to add. */\n assignTags?: PrivateTags;\n /** The tags to remove. */\n unassignTags?: PrivateTags;\n}\n\n/**\n * Merges multiple source contacts into a single target contact.\n *\n * *Merge Process:**\n * - Source contacts are permanently deleted after successful merge\n * - Target contact is updated with merged information\n * - Data from source contacts is combined based on merge priority\n *\n * *Field Merging Rules:**\n * - Non-empty fields from source contacts fill empty fields in target\n * - Arrays (emails, phones, addresses) are combined and deduplicated\n * - External ID can only be set once and cannot be changed if already set\n *\n * *Restrictions:**\n * - Source contacts cannot be site members\n * - Maximum 5 source contacts per merge operation\n * - Target contact must remain valid after merge\n * @param targetContactId - Target contact ID.\n * @param targetContactRevision - Target contact revision number, which increments by 1 each time the contact is updated to prevent conflicting changes.\n * @public\n * @documentationMaturity preview\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 7\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 /** When the target contact is provided, the merged result will be overwritten. */\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 /** Indicates whether to only return a preview of the merged contact or perform the actual merge. */\n preview?: boolean | null;\n /**\n * Allows updating the target contact even if it becomes a duplicate of another contact.\n * This can happen only where the target contact 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 from the contact list.\n *\n * *Soft Delete:** Contacts are moved to a trash bin and can be restored within 90 days\n * using RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.\n *\n * *Member Contacts:** To delete a contact that is also a site member, set `delete_member` to `true` to delete both the contact and the member. Some member types, such as owners and contributors, can't be deleted.\n *\n * *Restrictions:**\n * - Contacts with active billing subscriptions can't be deleted.\n * - Site owners and contributors can't be deleted.\n *\n * To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-delete-contacts).\n * @param contactId - Id of the Contact to delete.\n * @public\n * @documentationMaturity preview\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 * Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even\n * if it is a site member and the site member is also deleted. Default: `false`\n */\n deleteMember?: boolean | null;\n}\n\n/**\n * Finds contacts that match the provided identifiers using intelligent matching logic.\n *\n * *Matching Logic:** Uses external_id, email, and phone to identify potential duplicates.\n * The system applies sophisticated matching rules to find contacts that likely represent\n * the same person across different data sources.\n *\n * *Result Ordering:** Returns up to 100 contacts ordered by match strength:\n * 1. Contacts matching multiple identifiers (highest priority)\n * 2. Contacts matching single identifiers\n * 3. Within each group, ordered by creation date (oldest first)\n *\n * *Identifier Priority:**\n * 1. External ID (highest priority)\n * 2. Email address\n * 3. Phone number (lowest priority)\n *\n * Learn more: [Contact Matching Documentation](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts)\n * @public\n * @documentationMaturity preview\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 6\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 contacts, given the provided paging, filtering, and sorting.\n *\n *\n * To learn how to query Contacts, 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 * 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 endpoints, 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 * @documentationMaturity preview\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 * @documentationMaturity preview\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 * @documentationMaturity preview\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 * @documentationMaturity preview\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 * @documentationMaturity preview\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 * @documentationMaturity preview\n */\n lt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => ContactsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | 'externalId' | 'email.email' | 'phone.phone',\n value: any\n ) => ContactsQueryBuilder;\n /** @documentationMaturity preview */\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 * @documentationMaturity preview\n */\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 * @documentationMaturity preview\n */\n limit: (limit: number) => ContactsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ContactsQueryBuilder;\n /** @documentationMaturity preview */\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 6\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};\n\nexport const utils = {\n query: {\n ...createQueryUtils<Contact, ContactQuerySpec, ContactQuery>(),\n },\n search: {\n ...createSearchUtils<Contact, ContactSearchSpec, ContactSearch>(),\n },\n};\n\n/**\n * Searches contacts using free-text search combined with filtering and sorting.\n *\n * *Search Capabilities:**\n * - Free-text search across multiple contact fields\n * - Advanced filtering using WQL (Wix Query Language)\n * - Flexible sorting options with name format control\n * - Cursor-based pagination for large result sets\n *\n * *Searchable Fields:**\n * - Full name, first name, last name\n * - Email (main only)\n * - Phone (main only)\n * - Company name and job title\n * - Member nickname\n *\n * *Name Formatting:** Control how names are displayed and sorted:\n * - BY_FIRST_NAME: \"John Smith\" format\n * - BY_LAST_NAME: \"Smith, John\" format\n *\n * Learn more: [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language)\n * @param search - WQL search expression\n * @public\n * @documentationMaturity preview\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 6\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 });\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 },\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\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.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 ];\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 /** \n Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to 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 of aggregation, should be unique, will appear in aggregation results \n @maxLength: 100 \n */\n name?:\n | NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['name']\n | null;\n /** \n Type of aggregation, client must provide matching aggregation field below \n */\n type?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['type'];\n /** \n Field to aggregate by, use dot notation to specify 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 Defines 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 - will search in all searchable fields. Use dot notation to specify json path \n @maxLength: 200,\n @maxSize: 20 \n */\n fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n /** \n Flag if should use auto fuzzy search (allowing typos by 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 all filters and aggregations returned values.\n You may override this behavior in a specific filter by providing\n timestamps including time zone. e.g. `\"2023-12-20T10:52:34.795Z\"` \n @maxLength: 50 \n */\n timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\n/**\n * Returns the total number of contacts matching the specified criteria.\n * @public\n * @documentationMaturity preview\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`, 2>> {\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 whose picture is being updated.\n * @public\n * @documentationMaturity preview\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 2\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 * Defaults to `image/png`.\n * @maxLength 100\n */\n mimeType?: string | null;\n}\n\n/**\n * Adds an email as an additional email.\n * If the contact's email is not set, it cannot have an additional email and\n * EMAIL_REQUIRED error will be returned.\n * @param contactId - ID of the Contact to add an email.\n * @param email - The email to add.\n * @public\n * @documentationMaturity preview\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`, 2>\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 7\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 for optimistic concurrency control. */\n revision: string | null;\n}\n\n/**\n * Adds a phone as an additional phone.\n * If the contact's phone is not set, it cannot have an additional phone and\n * PHONE_REQUIRED error will be returned.\n * Checking if the contact already has the given phone, is done by comparing the phone number and tag.\n * @param contactId - ID of the Contact to add a phone.\n * @param phone - The phone to add.\n * @public\n * @documentationMaturity preview\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`, 2>\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 7\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 for optimistic concurrency control. */\n revision: string | null;\n}\n\n/**\n * Adds a contact's address.\n * Checks that the address does not exist and appends to list of addresses.\n * If the address exists, it is ignored.\n * Checking if the contact already has the given address, is done by comparing the address and tag.\n * @param contactId - ID of the Contact to add an address.\n * @param address - The address to add.\n * @public\n * @documentationMaturity preview\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`, 2>\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 7\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 for optimistic concurrency control. */\n revision: string | null;\n}\n\n/**\n * Deletes a contact's address by address ID.\n * @param revision - Contact revision number for optimistic concurrency control.\n * @public\n * @documentationMaturity preview\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 2\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 7\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 from which to delete an address.\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 a contact's address.\n * @param address - The updated address (must include address.id).\n * @public\n * @documentationMaturity preview\n * @requiredField address\n * @requiredField identifiers\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 `contactId`,\n 2\n >,\n address: ContactAddress,\n options: NonNullablePaths<UpdateContactAddressOptions, `revision`, 2>\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 7\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,\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: {},\n explicitPathsToArguments: {\n contactId: '$[0].contactId',\n address: '$[1]',\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 address on.\n * @format GUID\n */\n contactId: string;\n}\n\nexport interface UpdateContactAddressOptions {\n /** Contact revision number for optimistic concurrency control. */\n revision: string | null;\n}\n\n/**\n * Create multiple Contacts in a single request. Works synchronously.\n *\n * When providing an image url for a contact, the images will be uploaded in the background,\n * and each returned contact will temporarily have no image.\n * Once the upload succeeds, the contacts image will be updated.\n *\n * To create a single contact, call [Create Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/create-contact).\n * @param contacts - List of Contacts to be created\n * @public\n * @documentationMaturity preview\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 6\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 /** set to `true` if you wish to receive back the created Contacts in the response */\n returnEntity?: boolean;\n /** Allows creating the contact even if a duplicate already exists. */\n allowDuplicates?: boolean;\n}\n\n/**\n * Update multiple Contacts in a single request. Works synchronously.\n *\n * When providing an image url for a contact, the images will be uploaded in the background,\n * and each returned contact will temporarily have the previous image.\n * Once the upload succeeds, the contacts image will be updated.\n *\n * The `external_id` of a contact can be set only once and if it is already set it cannot be updated.\n *\n * To update a single contact, call [Update Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/update-contact).\n * @param contacts - List of Contacts to be updated.\n * @public\n * @documentationMaturity preview\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 3\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 6\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 /** set to `true` if you wish to receive back the updated Contacts in the response */\n returnEntity?: boolean;\n /** Allows updating the contact even if it becomes a duplicate of another contact. */\n allowDuplicates?: boolean;\n}\n\n/**\n * Synchronously update tags on multiple contacts, by list of contact ids\n * A tag that appears both in the list of assign and unassign tags, will be assigned.\n * There must be at least one tag to assign or unassign in the request.\n * @param contactIds - The contacts from which to add or remove tags.\n * @public\n * @documentationMaturity preview\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 6\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 /** set to `true` if you wish to receive back the updated Contacts in the response */\n returnEntity?: boolean;\n /** The tags to add. */\n assignTags?: PrivateTags;\n /** The tags to remove. */\n unassignTags?: PrivateTags;\n}\n\n/**\n * Asynchronously update tags on multiple contacts, by provided filter\n * An empty filter will update all contacts\n * A tag that appears both in the list of assign and unassign tags, will be assigned.\n * There must be at least one tag to assign or unassign in the request.\n * @param filter - A 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 * @documentationMaturity preview\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`, 2> & {\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 /** Tag ids to add to the contact. */\n assignTags?: PrivateTags;\n /** Tag ids to remove from the contact. */\n unassignTags?: PrivateTags;\n}\n\n/**\n * Creates or updates multiple contacts in a single request. Works synchronously.\n *\n * Tries finding a contact by the [matching logic](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n * If the contact is found, by the contact identifiers, the contact is updated. Otherwise created.\n *\n * If the contact is being updated, the upsert can run in three modes:\n * `OVERWRITE` (default): Fields will be overwritten.\n *\n * `APPEND`: Fields will be appended. Non-array fields will be set only if it does not have an existing value.\n *\n * `OVERWRITE_APPEND_ARRAYS`: Array fields, will be appended. Non-array fields will be overwritten.\n *\n * When updating in `APPEND` or `OVERWRITE_APPEND_ARRAYS` mode and the request contains addresses,\n * the default address flag will will be ignored unless there are no existing addresses on the contact.\n *\n * When providing an image url for a contact, given that the upsert mode allow the image to be updated,\n * the images will be uploaded in the background, and each returned contact will temporarily\n * have no image if the contact was created or the previous image if the contact was updated.\n * Once the upload succeeds, the contact image will be updated.\n * @param contacts - List of Contacts to be updated.\n * @public\n * @documentationMaturity preview\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 6\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 /** set to `true` if you wish to receive back the updated Contacts in the response */\n returnEntity?: boolean;\n /** The mode in which the upsert should work in. */\n upsertMode?: UpsertModeWithLiterals;\n /** Indicates whether to update a contact even if it is a site member. */\n updateMember?: boolean | null;\n}\n\n/**\n * Delete multiple Contacts in a single request. Works synchronously.\n *\n * When deleting contacts, the contact can be restored up to 90 days using the\n * RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.\n *\n * To delete a single contact, call [Delete Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/delete-contact).\n * @param contactIds - Contact ids to be deleted\n * @public\n * @documentationMaturity preview\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 6\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 * Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even\n * if it is a site member and the site member is also deleted. Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\n/**\n * Deletes multiple contacts.\n *\n * All contacts that meet the specified `filter` and `search` criteria are deleted.\n * The request should contain a `filter` value or a `search` value, or both.\n * To perform a dry run, use the intended filter options with\n * [Search Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/search-contacts).\n *\n * The following errors can happen while processing the bulk and they will appear in the bulk job:\n * - `CANNOT_DELETE_SITE_MEMBERS` - Contact is a site member and cannot be deleted. Site member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION` - Contact has an active billing subscription and cannot be deleted.\n * - `CANNOT_DELETE_WIX_USERS_MEMBER` - Site member cannot be deleted because it is the owner or a contributor.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION` - Site member was deleted, but contact was not.\n * - 'FAILED_DELETE_CONTACT' - Contact could not be deleted.\n *\n * When deleting contacts, the contact can be restored up to 90 days using the\n * RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.\n * @param filter - Filter object.\n *\n * Example:\n * `{ \"filter\": { \"name.last\": \"Smith\" } }`\n * @public\n * @documentationMaturity preview\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`, 2> & {\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 * Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even\n * if it is a site member and the site member is also deleted. Default: `false`\n */\n deleteMembers?: boolean | null;\n}\n\n/**\n * Remove a contact from the trash-bin.\n * The contact will not be able to be restored anymore.\n * @param contactId - Id of the Contact to remove from trashbin.\n * @public\n * @documentationMaturity preview\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 * Restore a contact from the trash-bin.\n * @param contactId - Id of the Contact to restore from trashbin.\n * @public\n * @documentationMaturity preview\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 7\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 * Restore contacts from the trash-bin\n * @public\n * @documentationMaturity preview\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 6\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 * List of Contacts to be restored\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n contactIds?: string[];\n /** return full entity in response */\n returnEntity?: boolean;\n}\n\n/**\n * Retrieves a deleted contact from the trash bin by ID.\n * @param contactId - Id of the Contact to retrieve from trashbin.\n * @public\n * @documentationMaturity preview\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 7\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 * List deleted contacts by the provided identifiers.\n * @public\n * @documentationMaturity preview\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 6\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 /** From date and time that contact was deleted. */\n deletedFromDate?: Date | null;\n /** Until date and time that contact was deleted. */\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 * @documentationMaturity preview\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 2\n >\n): Promise<\n NonNullablePaths<GetContactImageUploadStatusResponse, `status`, 2> & {\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 for which to retrieve the image upload status.\n * @format GUID\n */\n contactId: string;\n /**\n * The upload ID of the image upload process. Returned in case an image URL was provided when creating or\n * updating a contact. It is also returned from the GenerateContactImageUploadUrl endpoint.\n * @maxLength 100\n */\n imageUploadId: string;\n}\n\n/**\n * Adds the requested country code to contact's main phones.\n * The main phone of a contact will be changed if the resulting number with the added country code,\n * is a valid phone number. Otherwise, the contact is not changed.\n * @public\n * @documentationMaturity preview\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 2\n >\n): Promise<\n NonNullablePaths<BulkUpdatePhoneCountryCodeByFilterResponse, `jobId`, 2>\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 * The country code will be added to the contacts main phone number, when adding it the phone, makes it a valid phone number.\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 * Creates an async job to bulk update email and phone subscription statuses for multiple contacts.\n * If the new subscription status is equal to the current one, there will be no update.\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 in the site's contact list.\n *\n * *Required Fields:** At least one of the following must be provided:\n * - `name.first` or `name.last`\n * - `email.email`\n * - `phone.phone`\n *\n * *Duplicate Handling:** By default, creation fails if a contact with the same identifiers\n * (external_id, email, or phone) already exists. Set `allow_duplicates` to true to bypass this check.\n * 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 providing an image URL, the image is uploaded asynchronously.\n * An `image_upload_id` is returned for tracking upload progress.\n * Use [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/rest/crm/members-contacts/contacts/contacts/contact-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 an existing contact with new information.\n *\n * *Revision Control:** The current `revision` number must be provided to prevent\n * conflicting updates. The revision increments with each update.\n *\n *\n * *Restrictions:**\n * - `external_id` can only be set once and cannot be changed\n * - Site member contacts main email cannot be changed\n * - At least one of name, email, or phone must remain after update\n *\n * *Image Upload:** When providing an image URL, the image is uploaded asynchronously.\n * An `image_upload_id` is returned for tracking upload progress.\n * Use [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/rest/crm/members-contacts/contacts/contacts/contact-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 based on matching identifiers.\n *\n * *Matching Logic:** Uses external_id, email, and phone to find existing contacts.\n * See [contact matching documentation](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts)\n * for detailed matching rules.\n *\n * *Upsert Modes:**\n * - `OVERWRITE` (default): Replaces existing field values\n * - `APPEND`: Sets fields only if they don't have existing values; appends to arrays\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields, appends to arrays\n *\n * *Member Contacts:** Set `update_member` to `true` when upserting site member contacts.\n *\n * *Response:** The `action` field indicates whether the contact was `CREATED` or `UPDATED`.\n *\n * *Image Upload:** When providing an image URL, the image is uploaded asynchronously.\n * An `image_upload_id` is returned for tracking upload progress.\n * Use [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/rest/crm/members-contacts/contacts/contacts/contact-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 * Updates tags assigned to a specific contact.\n *\n * *Assignment Logic:** If a tag appears in both assign and unassign lists, it will be assigned.\n * At least one tag must be specified in either the assign or unassign list.\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 multiple source contacts into a single target contact.\n *\n * *Merge Process:**\n * - Source contacts are permanently deleted after successful merge\n * - Target contact is updated with merged information\n * - Data from source contacts is combined based on merge priority\n *\n * *Field Merging Rules:**\n * - Non-empty fields from source contacts fill empty fields in target\n * - Arrays (emails, phones, addresses) are combined and deduplicated\n * - External ID can only be set once and cannot be changed if already set\n *\n * *Restrictions:**\n * - Source contacts cannot be site members\n * - Maximum 5 source contacts per merge operation\n * - Target contact must remain valid after merge\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 from the contact list.\n *\n * *Soft Delete:** Contacts are moved to a trash bin and can be restored within 90 days\n * using RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.\n *\n * *Member Contacts:** To delete a contact that is also a site member, set `delete_member` to `true` to delete both the contact and the member. Some member types, such as owners and contributors, can't be deleted.\n *\n * *Restrictions:**\n * - Contacts with active billing subscriptions can't be deleted.\n * - Site owners and contributors can't be deleted.\n *\n * To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-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 * Finds contacts that match the provided identifiers using intelligent matching logic.\n *\n * *Matching Logic:** Uses external_id, email, and phone to identify potential duplicates.\n * The system applies sophisticated matching rules to find contacts that likely represent\n * the same person across different data sources.\n *\n * *Result Ordering:** Returns up to 100 contacts ordered by match strength:\n * 1. Contacts matching multiple identifiers (highest priority)\n * 2. Contacts matching single identifiers\n * 3. Within each group, ordered by creation date (oldest first)\n *\n * *Identifier Priority:**\n * 1. External ID (highest priority)\n * 2. Email address\n * 3. Phone number (lowest priority)\n *\n * Learn more: [Contact Matching Documentation](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 contacts, given the provided paging, filtering, and sorting.\n *\n *\n * To learn how to query Contacts, 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 * 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 endpoints, 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 * Searches contacts using free-text search combined with filtering and sorting.\n *\n * *Search Capabilities:**\n * - Free-text search across multiple contact fields\n * - Advanced filtering using WQL (Wix Query Language)\n * - Flexible sorting options with name format control\n * - Cursor-based pagination for large result sets\n *\n * *Searchable Fields:**\n * - Full name, first name, last name\n * - Email (main only)\n * - Phone (main only)\n * - Company name and job title\n * - Member nickname\n *\n * *Name Formatting:** Control how names are displayed and sorted:\n * - BY_FIRST_NAME: \"John Smith\" format\n * - BY_LAST_NAME: \"Smith, John\" format\n *\n * Learn more: [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language)\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/** Returns the total number of contacts matching the specified 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 email as an additional email.\n * If the contact's email is not set, it cannot have an additional email and\n * EMAIL_REQUIRED error will be returned.\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 a phone as an additional phone.\n * If the contact's phone is not set, it cannot have an additional phone and\n * PHONE_REQUIRED error will be returned.\n * Checking if the contact already has the given phone, is done by comparing the phone number and tag.\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 a contact's address.\n * Checks that the address does not exist and appends to list of addresses.\n * If the address exists, it is ignored.\n * Checking if the contact already has the given address, is done by comparing the address and tag.\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/** Deletes a contact's address by address ID. */\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/** Updates a contact's address. */\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 * Create multiple Contacts in a single request. Works synchronously.\n *\n * When providing an image url for a contact, the images will be uploaded in the background,\n * and each returned contact will temporarily have no image.\n * Once the upload succeeds, the contacts image will be updated.\n *\n * To create a single contact, call [Create Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-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 * Update multiple Contacts in a single request. Works synchronously.\n *\n * When providing an image url for a contact, the images will be uploaded in the background,\n * and each returned contact will temporarily have the previous image.\n * Once the upload succeeds, the contacts image will be updated.\n *\n * The `external_id` of a contact can be set only once and if it is already set it cannot be updated.\n *\n * To update a single contact, call [Update Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-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 * Synchronously update tags on multiple contacts, by list of contact ids\n * A tag that appears both in the list of assign and unassign tags, will be assigned.\n * There must be at least one tag to assign or unassign in the request.\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 * Asynchronously update tags on multiple contacts, by provided filter\n * An empty filter will update all contacts\n * A tag that appears both in the list of assign and unassign tags, will be assigned.\n * There must be at least one tag to assign or unassign in the request.\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 * Tries finding a contact by the [matching logic](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n * If the contact is found, by the contact identifiers, the contact is updated. Otherwise created.\n *\n * If the contact is being updated, the upsert can run in three modes:\n * `OVERWRITE` (default): Fields will be overwritten.\n *\n * `APPEND`: Fields will be appended. Non-array fields will be set only if it does not have an existing value.\n *\n * `OVERWRITE_APPEND_ARRAYS`: Array fields, will be appended. Non-array fields will be overwritten.\n *\n * When updating in `APPEND` or `OVERWRITE_APPEND_ARRAYS` mode and the request contains addresses,\n * the default address flag will will be ignored unless there are no existing addresses on the contact.\n *\n * When providing an image url for a contact, given that the upsert mode allow the image to be updated,\n * the images will be uploaded in the background, and each returned contact will temporarily\n * have no image if the contact was created or the previous image if the contact was updated.\n * Once the upload succeeds, the contact image will be updated.\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 * Delete multiple Contacts in a single request. Works synchronously.\n *\n * When deleting contacts, the contact can be restored up to 90 days using the\n * RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.\n *\n * To delete a single contact, call [Delete Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-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.\n *\n * All contacts that meet the specified `filter` and `search` criteria are deleted.\n * The request should contain a `filter` value or a `search` value, or both.\n * To perform a dry run, use the intended filter options with\n * [Search Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/search-contacts).\n *\n * The following errors can happen while processing the bulk and they will appear in the bulk job:\n * - `CANNOT_DELETE_SITE_MEMBERS` - Contact is a site member and cannot be deleted. Site member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION` - Contact has an active billing subscription and cannot be deleted.\n * - `CANNOT_DELETE_WIX_USERS_MEMBER` - Site member cannot be deleted because it is the owner or a contributor.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION` - Site member was deleted, but contact was not.\n * - 'FAILED_DELETE_CONTACT' - Contact could not be deleted.\n *\n * When deleting contacts, the contact can be restored up to 90 days using the\n * RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.\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 * Remove a contact from the trash-bin.\n * The contact will not be able to be restored anymore.\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/** Restore a contact from the trash-bin. */\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/** Restore contacts from the trash-bin */\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 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/** List deleted contacts by the provided identifiers. */\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 the requested country code to contact's main phones.\n * The main phone of a contact will be changed if the resulting number with the added country code,\n * is a valid phone number. Otherwise, the contact is not changed.\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 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 * Creates an async job to bulk update email and phone subscription statuses for multiple contacts.\n * If the new subscription status is equal to the current one, there will be no update.\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`, 2> & {\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 in the site's contact list.\n *\n * *Required Fields:** At least one of the following must be provided:\n * - `name.first` or `name.last`\n * - `email.email`\n * - `phone.phone`\n *\n * *Duplicate Handling:** By default, creation fails if a contact with the same identifiers\n * (external_id, email, or phone) already exists. Set `allow_duplicates` to true to bypass this check.\n * 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 providing an image URL, the image is uploaded asynchronously.\n * An `image_upload_id` is returned for tracking upload progress.\n * Use [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/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-create-contacts).\n * @param - Contact to be created.\n * @returns The 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 6\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 The requested 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 6\n >\n >;\n}\n\nexport function updateContact(httpClient: HttpClient): UpdateContactSignature {\n return (\n _id: string,\n contact: NonNullablePaths<UpdateContact, `revision`, 2>,\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 an existing contact with new information.\n *\n * *Revision Control:** The current `revision` number must be provided to prevent\n * conflicting updates. The revision increments with each update.\n *\n *\n * *Restrictions:**\n * - `external_id` can only be set once and cannot be changed\n * - Site member contacts main email cannot be changed\n * - At least one of name, email, or phone must remain after update\n *\n * *Image Upload:** When providing an image URL, the image is uploaded asynchronously.\n * An `image_upload_id` is returned for tracking upload progress.\n * Use [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/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-update-contacts).\n * @param - Contact ID.\n * @returns Updated Contact.\n */\n (\n _id: string,\n contact: NonNullablePaths<UpdateContact, `revision`, 2>,\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 6\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 based on matching identifiers.\n *\n * *Matching Logic:** Uses external_id, email, and phone to find existing contacts.\n * See [contact matching documentation](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts)\n * for detailed matching rules.\n *\n * *Upsert Modes:**\n * - `OVERWRITE` (default): Replaces existing field values\n * - `APPEND`: Sets fields only if they don't have existing values; appends to arrays\n * - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields, appends to arrays\n *\n * *Member Contacts:** Set `update_member` to `true` when upserting site member contacts.\n *\n * *Response:** The `action` field indicates whether the contact was `CREATED` or `UPDATED`.\n *\n * *Image Upload:** When providing an image URL, the image is uploaded asynchronously.\n * An `image_upload_id` is returned for tracking upload progress.\n * Use [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/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-upsert-contacts).\n * @param - Contact to be upserted.\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 7\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 * Updates tags assigned to a specific contact.\n *\n * *Assignment Logic:** If a tag appears in both assign and unassign lists, it will be assigned.\n * At least one tag must be specified in either the assign or unassign list.\n * @param - The contact from which to add or remove tags.\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 7\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 multiple source contacts into a single target contact.\n *\n * *Merge Process:**\n * - Source contacts are permanently deleted after successful merge\n * - Target contact is updated with merged information\n * - Data from source contacts is combined based on merge priority\n *\n * *Field Merging Rules:**\n * - Non-empty fields from source contacts fill empty fields in target\n * - Arrays (emails, phones, addresses) are combined and deduplicated\n * - External ID can only be set once and cannot be changed if already set\n *\n * *Restrictions:**\n * - Source contacts cannot be site members\n * - Maximum 5 source contacts per merge operation\n * - Target contact must remain valid after merge\n * @param - Target contact ID.\n * @param - Target contact revision number, which increments by 1 each time the contact is updated 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 7\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 from the contact list.\n *\n * *Soft Delete:** Contacts are moved to a trash bin and can be restored within 90 days\n * using RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.\n *\n * *Member Contacts:** To delete a contact that is also a site member, set `delete_member` to `true` to delete both the contact and the member. Some member types, such as owners and contributors, can't be deleted.\n *\n * *Restrictions:**\n * - Contacts with active billing subscriptions can't be deleted.\n * - Site owners and contributors can't be deleted.\n *\n * To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-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 * Finds contacts that match the provided identifiers using intelligent matching logic.\n *\n * *Matching Logic:** Uses external_id, email, and phone to identify potential duplicates.\n * The system applies sophisticated matching rules to find contacts that likely represent\n * the same person across different data sources.\n *\n * *Result Ordering:** Returns up to 100 contacts ordered by match strength:\n * 1. Contacts matching multiple identifiers (highest priority)\n * 2. Contacts matching single identifiers\n * 3. Within each group, ordered by creation date (oldest first)\n *\n * *Identifier Priority:**\n * 1. External ID (highest priority)\n * 2. Email address\n * 3. Phone number (lowest priority)\n *\n * Learn more: [Contact Matching Documentation](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 6\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 contacts, given the provided paging, filtering, and sorting.\n *\n *\n * To learn how to query Contacts, 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 * 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 endpoints, 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 6\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 * Searches contacts using free-text search combined with filtering and sorting.\n *\n * *Search Capabilities:**\n * - Free-text search across multiple contact fields\n * - Advanced filtering using WQL (Wix Query Language)\n * - Flexible sorting options with name format control\n * - Cursor-based pagination for large result sets\n *\n * *Searchable Fields:**\n * - Full name, first name, last name\n * - Email (main only)\n * - Phone (main only)\n * - Company name and job title\n * - Member nickname\n *\n * *Name Formatting:** Control how names are displayed and sorted:\n * - BY_FIRST_NAME: \"John Smith\" format\n * - BY_LAST_NAME: \"Smith, John\" format\n *\n * Learn more: [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language)\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 6\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 * Returns the total number of contacts matching the specified criteria.\n */\n (options?: CountContactsOptions): Promise<\n NonNullablePaths<CountContactsResponse, `count`, 2>\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 whose picture is being updated.\n */\n (contactId: string, options?: GenerateContactImageUploadUrlOptions): Promise<\n NonNullablePaths<\n GenerateContactImageUploadUrlResponse,\n `uploadUrl` | `imageUploadId`,\n 2\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`, 2>\n ) =>\n universalAddContactAdditionalEmail(\n contactId,\n email,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddContactAdditionalEmailSignature {\n /**\n * Adds an email as an additional email.\n * If the contact's email is not set, it cannot have an additional email and\n * EMAIL_REQUIRED error will be returned.\n * @param - ID of the Contact to add an email.\n * @param - The email to add.\n */\n (\n contactId: string,\n email: AdditionalEmail,\n options: NonNullablePaths<AddContactAdditionalEmailOptions, `revision`, 2>\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 7\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`, 2>\n ) =>\n universalAddContactAdditionalPhone(\n contactId,\n phone,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddContactAdditionalPhoneSignature {\n /**\n * Adds a phone as an additional phone.\n * If the contact's phone is not set, it cannot have an additional phone and\n * PHONE_REQUIRED error will be returned.\n * Checking if the contact already has the given phone, is done by comparing the phone number and tag.\n * @param - ID of the Contact to add a phone.\n * @param - The phone to add.\n */\n (\n contactId: string,\n phone: AdditionalPhone,\n options: NonNullablePaths<AddContactAdditionalPhoneOptions, `revision`, 2>\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 7\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`, 2>\n ) =>\n universalAddContactAddress(\n contactId,\n address,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddContactAddressSignature {\n /**\n * Adds a contact's address.\n * Checks that the address does not exist and appends to list of addresses.\n * If the address exists, it is ignored.\n * Checking if the contact already has the given address, is done by comparing the address and tag.\n * @param - ID of the Contact to add an address.\n * @param - The address to add.\n */\n (\n contactId: string,\n address: ContactAddress,\n options: NonNullablePaths<AddContactAddressOptions, `revision`, 2>\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 7\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 2\n >,\n revision: string\n ) =>\n universalDeleteContactAddress(\n identifiers,\n revision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteContactAddressSignature {\n /**\n * Deletes a contact's address by address ID.\n * @param - Contact revision number for optimistic concurrency control.\n */\n (\n identifiers: NonNullablePaths<\n DeleteContactAddressIdentifiers,\n `addressId` | `contactId`,\n 2\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 7\n > & {\n __applicationErrorsType?: DeleteContactAddressApplicationErrors;\n }\n >;\n}\n\nexport function updateContactAddress(\n httpClient: HttpClient\n): UpdateContactAddressSignature {\n return (\n identifiers: NonNullablePaths<\n UpdateContactAddressIdentifiers,\n `contactId`,\n 2\n >,\n address: ContactAddress,\n options: NonNullablePaths<UpdateContactAddressOptions, `revision`, 2>\n ) =>\n universalUpdateContactAddress(\n identifiers,\n address,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateContactAddressSignature {\n /**\n * Updates a contact's address.\n * @param - The updated address (must include address.id).\n */\n (\n identifiers: NonNullablePaths<\n UpdateContactAddressIdentifiers,\n `contactId`,\n 2\n >,\n address: ContactAddress,\n options: NonNullablePaths<UpdateContactAddressOptions, `revision`, 2>\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 7\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 * Create multiple Contacts in a single request. Works synchronously.\n *\n * When providing an image url for a contact, the images will be uploaded in the background,\n * and each returned contact will temporarily have no image.\n * Once the upload succeeds, the contacts image will be updated.\n *\n * To create a single contact, call [Create Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/create-contact).\n * @param - List of Contacts to be created\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 6\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 3\n >[],\n options?: BulkUpdateContactsOptions\n ) =>\n universalBulkUpdateContacts(\n contacts,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateContactsSignature {\n /**\n * Update multiple Contacts in a single request. Works synchronously.\n *\n * When providing an image url for a contact, the images will be uploaded in the background,\n * and each returned contact will temporarily have the previous image.\n * Once the upload succeeds, the contacts image will be updated.\n *\n * The `external_id` of a contact can be set only once and if it is already set it cannot be updated.\n *\n * To update a single contact, call [Update Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/update-contact).\n * @param - List of Contacts to be updated.\n */\n (\n contacts: NonNullablePaths<\n MaskedContact,\n `contact._id` | `contact.revision`,\n 3\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 6\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 * Synchronously update tags on multiple contacts, by list of contact ids\n * A tag that appears both in the list of assign and unassign tags, will be assigned.\n * There must be at least one tag to assign or unassign in the request.\n * @param - The contacts from which to add or remove tags.\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 6\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 * Asynchronously update tags on multiple contacts, by provided filter\n * An empty filter will update all contacts\n * A tag that appears both in the list of assign and unassign tags, will be assigned.\n * There must be at least one tag to assign or unassign in the request.\n * @param - A 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`, 2> & {\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 * Tries finding a contact by the [matching logic](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).\n * If the contact is found, by the contact identifiers, the contact is updated. Otherwise created.\n *\n * If the contact is being updated, the upsert can run in three modes:\n * `OVERWRITE` (default): Fields will be overwritten.\n *\n * `APPEND`: Fields will be appended. Non-array fields will be set only if it does not have an existing value.\n *\n * `OVERWRITE_APPEND_ARRAYS`: Array fields, will be appended. Non-array fields will be overwritten.\n *\n * When updating in `APPEND` or `OVERWRITE_APPEND_ARRAYS` mode and the request contains addresses,\n * the default address flag will will be ignored unless there are no existing addresses on the contact.\n *\n * When providing an image url for a contact, given that the upsert mode allow the image to be updated,\n * the images will be uploaded in the background, and each returned contact will temporarily\n * have no image if the contact was created or the previous image if the contact was updated.\n * Once the upload succeeds, the contact image will be updated.\n * @param - List of Contacts to be updated.\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 6\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 * Delete multiple Contacts in a single request. Works synchronously.\n *\n * When deleting contacts, the contact can be restored up to 90 days using the\n * RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.\n *\n * To delete a single contact, call [Delete Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/delete-contact).\n * @param - Contact ids to be deleted\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 6\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.\n *\n * All contacts that meet the specified `filter` and `search` criteria are deleted.\n * The request should contain a `filter` value or a `search` value, or both.\n * To perform a dry run, use the intended filter options with\n * [Search Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/search-contacts).\n *\n * The following errors can happen while processing the bulk and they will appear in the bulk job:\n * - `CANNOT_DELETE_SITE_MEMBERS` - Contact is a site member and cannot be deleted. Site member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION` - Contact has an active billing subscription and cannot be deleted.\n * - `CANNOT_DELETE_WIX_USERS_MEMBER` - Site member cannot be deleted because it is the owner or a contributor.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION` - Site member was deleted, but contact was not.\n * - 'FAILED_DELETE_CONTACT' - Contact could not be deleted.\n *\n * When deleting contacts, the contact can be restored up to 90 days using the\n * RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.\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`, 2> & {\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 * Remove a contact from the trash-bin.\n * The contact will not be able to be restored anymore.\n * @param - Id of the Contact to remove from trashbin.\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 * Restore a contact from the trash-bin.\n * @param - Id of the Contact to restore from trashbin.\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 7\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 * Restore contacts from the 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 6\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 deleted contact from the trash bin by ID.\n * @param - Id of the Contact to retrieve from trashbin.\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 7\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 * List deleted contacts by the provided identifiers.\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 6\n >\n >;\n}\n\nexport function getContactImageUploadStatus(\n httpClient: HttpClient\n): GetContactImageUploadStatusSignature {\n return (\n identifiers: NonNullablePaths<\n GetContactImageUploadStatusIdentifiers,\n `contactId` | `imageUploadId`,\n 2\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 2\n >\n ): Promise<\n NonNullablePaths<GetContactImageUploadStatusResponse, `status`, 2> & {\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 2\n >\n ) =>\n universalBulkUpdatePhoneCountryCodeByFilter(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdatePhoneCountryCodeByFilterSignature {\n /**\n * Adds the requested country code to contact's main phones.\n * The main phone of a contact will be changed if the resulting number with the added country code,\n * is a valid phone number. Otherwise, the contact is not changed.\n */\n (\n options?: NonNullablePaths<\n BulkUpdatePhoneCountryCodeByFilterOptions,\n `countryCode`,\n 2\n >\n ): Promise<\n NonNullablePaths<BulkUpdatePhoneCountryCodeByFilterResponse, `jobId`, 2>\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 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 = 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 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;AA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BA,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"]}
|