@wix/auto_sdk_crm_contacts 1.0.1110 → 1.0.1111
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/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +8 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +8 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +8 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +8 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/contacts-v4-contact-contacts.universal.ts","../../../src/contacts-v4-contact-contacts.http.ts"],"sourcesContent":["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 NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixContactsV4Contact from './contacts-v4-contact-contacts.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';\n\nexport interface Contact {\n /**\n * Contact ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the contact is updated.\n * To prevent conflicting changes,\n * the existing `revision` must be specified when updating a contact.\n * @readonly\n */\n revision?: number;\n /**\n * Details about the contact's source.\n * @readonly\n */\n source?: ContactSource;\n /**\n * Date and time the contact was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the contact was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Details about the contact's last action in the site.\n * @readonly\n */\n lastActivity?: ContactActivity;\n /**\n * Contact's primary phone and email.\n * @readonly\n */\n primaryInfo?: PrimaryContactInfo;\n /** Contact's details. */\n info?: ContactInfo;\n /**\n * Contact's primary email details.\n * @readonly\n */\n primaryEmail?: PrimaryEmail;\n /**\n * Contact's primary phone details.\n * @readonly\n */\n primaryPhone?: PrimaryPhone;\n}\n\nexport interface ContactSource {\n /**\n * Source type.\n * @readonly\n */\n sourceType?: ContactSourceTypeWithLiterals;\n /**\n * App ID, if the contact was created by an app.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n}\n\nexport enum ContactSourceType {\n OTHER = 'OTHER',\n ADMIN = 'ADMIN',\n WIX_APP = 'WIX_APP',\n IMPORT = 'IMPORT',\n THIRD_PARTY = 'THIRD_PARTY',\n WIX_BOOKINGS = 'WIX_BOOKINGS',\n WIX_CHAT = 'WIX_CHAT',\n WIX_EMAIL_MARKETING = 'WIX_EMAIL_MARKETING',\n WIX_EVENTS = 'WIX_EVENTS',\n WIX_FORMS = 'WIX_FORMS',\n WIX_GROUPS = 'WIX_GROUPS',\n WIX_HOTELS = 'WIX_HOTELS',\n WIX_MARKET_PLACE = 'WIX_MARKET_PLACE',\n WIX_MUSIC = 'WIX_MUSIC',\n WIX_RESTAURANTS = 'WIX_RESTAURANTS',\n WIX_SITE_MEMBERS = 'WIX_SITE_MEMBERS',\n WIX_STORES = 'WIX_STORES',\n WIX_CODE = 'WIX_CODE',\n HOPP = 'HOPP',\n}\n\n/** @enumType */\nexport type ContactSourceTypeWithLiterals =\n | ContactSourceType\n | 'OTHER'\n | 'ADMIN'\n | 'WIX_APP'\n | 'IMPORT'\n | 'THIRD_PARTY'\n | 'WIX_BOOKINGS'\n | 'WIX_CHAT'\n | 'WIX_EMAIL_MARKETING'\n | 'WIX_EVENTS'\n | 'WIX_FORMS'\n | 'WIX_GROUPS'\n | 'WIX_HOTELS'\n | 'WIX_MARKET_PLACE'\n | 'WIX_MUSIC'\n | 'WIX_RESTAURANTS'\n | 'WIX_SITE_MEMBERS'\n | 'WIX_STORES'\n | 'WIX_CODE'\n | 'HOPP';\n\nexport interface ContactActivity {\n /** Date and time of the last action. */\n activityDate?: Date | null;\n /** Contact's last action in the site. */\n activityType?: ContactActivityTypeWithLiterals;\n}\n\nexport enum ContactActivityType {\n /** Visited the site. */\n GENERAL = 'GENERAL',\n /** Became a new contact. */\n CONTACT_CREATED = 'CONTACT_CREATED',\n /** Logged in. */\n MEMBER_LOGIN = 'MEMBER_LOGIN',\n /** Requested a site membership. */\n MEMBER_REGISTER = 'MEMBER_REGISTER',\n /** Was approved, blocked, or unblocked. */\n MEMBER_STATUS_CHANGED = 'MEMBER_STATUS_CHANGED',\n /** Submitted a form. */\n FORM_SUBMITTED = 'FORM_SUBMITTED',\n /** Started a chat. */\n INBOX_FORM_SUBMITTED = 'INBOX_FORM_SUBMITTED',\n /** Paid a payment request. */\n INBOX_PAYMENT_REQUEST_PAID = 'INBOX_PAYMENT_REQUEST_PAID',\n /** Received a message from the site. */\n INBOX_MESSAGE_TO_CUSTOMER = 'INBOX_MESSAGE_TO_CUSTOMER',\n /** Sent a new message to the site. */\n INBOX_MESSAGE_FROM_CUSTOMER = 'INBOX_MESSAGE_FROM_CUSTOMER',\n /** Subscribed to a site newsletter through a form. */\n NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED = 'NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED',\n /** Unsubscribed from a site newsletter. */\n NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE = 'NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE',\n /** Made a purchase. */\n ECOM_PURCHASE = 'ECOM_PURCHASE',\n /** Abandoned a shopping cart. */\n ECOM_CART_ABANDON = 'ECOM_CART_ABANDON',\n /** Checked out shopping cart and submitted buyer info (but didn’t complete the purchase yet). */\n ECOM_CHECKOUT_BUYER = 'ECOM_CHECKOUT_BUYER',\n /** Booked an appointment. */\n BOOKINGS_APPOINTMENT = 'BOOKINGS_APPOINTMENT',\n /** Made a Wix Hotels reservation. */\n HOTELS_RESERVATION = 'HOTELS_RESERVATION',\n /** Paid for a Wix Hotels reservation. */\n HOTELS_PURCHASE = 'HOTELS_PURCHASE',\n /** Confirmed a Wix Hotels reservation. */\n HOTELS_CONFIRMATION = 'HOTELS_CONFIRMATION',\n /** Canceled a Wix Hotels reservation. */\n HOTELS_CANCEL = 'HOTELS_CANCEL',\n /** Purchased a video. */\n VIDEO_PURCHASE = 'VIDEO_PURCHASE',\n /** Rented a video. */\n VIDEO_RENT = 'VIDEO_RENT',\n /** Made a purchase with a pay button. */\n CASHIER_BUTTON_PURCHASE = 'CASHIER_BUTTON_PURCHASE',\n /** Became a new Wix Marketplace lead. */\n ARENA_NEW_LEAD = 'ARENA_NEW_LEAD',\n /** RSVP'd to an event. */\n EVENTS_RSVP = 'EVENTS_RSVP',\n /** Paid an invoice. */\n INVOICE_PAY = 'INVOICE_PAY',\n /** An invoice is now overdue. */\n INVOICE_OVERDUE = 'INVOICE_OVERDUE',\n /** Accepted a price quote. */\n PRICE_QUOTE_ACCEPT = 'PRICE_QUOTE_ACCEPT',\n /** A price quote has expired. */\n PRICE_QUOTE_EXPIRE = 'PRICE_QUOTE_EXPIRE',\n /** Ordered food with Wix Restaurants. */\n RESTAURANTS_ORDER = 'RESTAURANTS_ORDER',\n /** Made a Wix Restaurants reservation. */\n RESTAURANTS_RESERVATION = 'RESTAURANTS_RESERVATION',\n /** Opened an email from the site. */\n SHOUTOUT_OPEN = 'SHOUTOUT_OPEN',\n /** Clicked a link in an email from the site. */\n SHOUTOUT_CLICK = 'SHOUTOUT_CLICK',\n /** Merged with another contact. */\n CONTACT_MERGED = 'CONTACT_MERGED',\n /** Subscribed to a site newsletter. */\n NEWSLETTER_SUBSCRIPTION_SUBSCRIBE = 'NEWSLETTER_SUBSCRIPTION_SUBSCRIBE',\n /** Subscription status to site newsletters is pending confirmation. */\n NEWSLETTER_SUBSCRIPTION_PENDING = 'NEWSLETTER_SUBSCRIPTION_PENDING',\n /** Subscription status to site newsletters is not set. */\n NEWSLETTER_SUBSCRIPTION_NOT_SET = 'NEWSLETTER_SUBSCRIPTION_NOT_SET',\n /** Subscribed to phone notifications. */\n PHONE_SUBSCRIPTION_SUBSCRIBE = 'PHONE_SUBSCRIPTION_SUBSCRIBE',\n /** Subscription to phone notificatons is pending confirmation. */\n PHONE_SUBSCRIPTION_PENDING = 'PHONE_SUBSCRIPTION_PENDING',\n /** Subscription to phone notificatons is not set. */\n PHONE_SUBSCRIPTION_NOT_SET = 'PHONE_SUBSCRIPTION_NOT_SET',\n /** Subscribed to phone notifications. */\n PHONE_SUBSCRIPTION_UNSUBSCRIBE = 'PHONE_SUBSCRIPTION_UNSUBSCRIBE',\n}\n\n/** @enumType */\nexport type ContactActivityTypeWithLiterals =\n | ContactActivityType\n | 'GENERAL'\n | 'CONTACT_CREATED'\n | 'MEMBER_LOGIN'\n | 'MEMBER_REGISTER'\n | 'MEMBER_STATUS_CHANGED'\n | 'FORM_SUBMITTED'\n | 'INBOX_FORM_SUBMITTED'\n | 'INBOX_PAYMENT_REQUEST_PAID'\n | 'INBOX_MESSAGE_TO_CUSTOMER'\n | 'INBOX_MESSAGE_FROM_CUSTOMER'\n | 'NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED'\n | 'NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE'\n | 'ECOM_PURCHASE'\n | 'ECOM_CART_ABANDON'\n | 'ECOM_CHECKOUT_BUYER'\n | 'BOOKINGS_APPOINTMENT'\n | 'HOTELS_RESERVATION'\n | 'HOTELS_PURCHASE'\n | 'HOTELS_CONFIRMATION'\n | 'HOTELS_CANCEL'\n | 'VIDEO_PURCHASE'\n | 'VIDEO_RENT'\n | 'CASHIER_BUTTON_PURCHASE'\n | 'ARENA_NEW_LEAD'\n | 'EVENTS_RSVP'\n | 'INVOICE_PAY'\n | 'INVOICE_OVERDUE'\n | 'PRICE_QUOTE_ACCEPT'\n | 'PRICE_QUOTE_EXPIRE'\n | 'RESTAURANTS_ORDER'\n | 'RESTAURANTS_RESERVATION'\n | 'SHOUTOUT_OPEN'\n | 'SHOUTOUT_CLICK'\n | 'CONTACT_MERGED'\n | 'NEWSLETTER_SUBSCRIPTION_SUBSCRIBE'\n | 'NEWSLETTER_SUBSCRIPTION_PENDING'\n | 'NEWSLETTER_SUBSCRIPTION_NOT_SET'\n | 'PHONE_SUBSCRIPTION_SUBSCRIBE'\n | 'PHONE_SUBSCRIPTION_PENDING'\n | 'PHONE_SUBSCRIPTION_NOT_SET'\n | 'PHONE_SUBSCRIPTION_UNSUBSCRIBE';\n\nexport interface ActivityIcon {\n /**\n * Icon name\n * @maxLength 50\n */\n name?: string | null;\n /**\n * Icon url\n * @format WEB_URL\n */\n url?: string | null;\n}\n\nexport interface PrimaryContactInfo {\n /**\n * Primary email address.\n *\n * This property reflects the email address in `info.emails`\n * where `primary` is `true`.\n * @format EMAIL\n * @readonly\n */\n email?: string | null;\n /**\n * Primary phone number.\n *\n * This property reflects the phone number in `info.phones`\n * where `primary` is `true`.\n * @readonly\n */\n phone?: string | null;\n}\n\nexport interface ContactInfo {\n /** Contact's first and last name. */\n name?: ContactName;\n /** Contact's email addresses. */\n emails?: ContactEmailsWrapper;\n /** Contact's phone numbers. */\n phones?: ContactPhonesWrapper;\n /** Contact's street addresses. */\n addresses?: ContactAddressesWrapper;\n /**\n * Contact's company name.\n * @maxLength 1000\n */\n company?: string | null;\n /**\n * Contact's job title.\n * @maxLength 1000\n */\n jobTitle?: 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 * 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 * List of contact's labels.\n *\n * Labels are used to organize contacts. Labels can be\n * added and removed using Label Contact and Unlabel Contact, respectively.\n *\n * To view or manage contact labels, use the Labels API.\n */\n labelKeys?: LabelsWrapper;\n /**\n * Additional custom fields.\n *\n * Empty fields are not returned.\n */\n extendedFields?: ExtendedFieldsWrapper;\n /** Contact's profile picture. */\n picture?: ContactPicture;\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 ContactEmailsWrapper {\n /**\n * List of up to 50 email addresses.\n * @maxSize 50\n */\n items?: ContactEmail[];\n}\n\nexport interface ContactEmail {\n /**\n * Email ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Email type.\n *\n * `UNTAGGED` is shown as \"Other\" in the Contact List.\n */\n tag?: EmailTagWithLiterals;\n /**\n * Email address.\n * @minLength 1\n * @maxLength 320\n */\n email?: string;\n /**\n * Indicates whether this is the contact's primary email address.\n * When changing `primary` to `true` for an email,\n * the contact's other emails become `false`.\n * Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email.\n */\n primary?: boolean | null;\n}\n\nexport enum EmailTag {\n UNTAGGED = 'UNTAGGED',\n MAIN = 'MAIN',\n HOME = 'HOME',\n WORK = 'WORK',\n}\n\n/** @enumType */\nexport type EmailTagWithLiterals =\n | EmailTag\n | 'UNTAGGED'\n | 'MAIN'\n | 'HOME'\n | 'WORK';\n\nexport interface ContactPhonesWrapper {\n /**\n * List of up to 50 phone numbers.\n * @maxSize 50\n */\n items?: ContactPhone[];\n}\n\nexport interface ContactPhone {\n /**\n * Phone ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Phone type.\n *\n * `UNTAGGED` is shown as \"Other\" in the Contact List.\n */\n tag?: PhoneTagWithLiterals;\n /**\n * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string;\n /**\n * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\n * phone number.\n * Automatically generated using `phone` and `countryCode`, pending both values are valid.\n * @readonly\n */\n e164Phone?: string | null;\n /**\n * Indicates whether this is the contact's primary phone number.\n * When changing `primary` to `true` for a phone,\n * the contact's `primary` field for other phones becomes `false`.\n * Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone.\n */\n primary?: boolean | null;\n}\n\nexport enum PhoneTag {\n UNTAGGED = 'UNTAGGED',\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 | 'UNTAGGED'\n | 'MAIN'\n | 'HOME'\n | 'MOBILE'\n | 'WORK'\n | 'FAX';\n\nexport interface ContactAddressesWrapper {\n /**\n * List of up to 50 addresses.\n * @maxSize 50\n */\n items?: ContactAddress[];\n}\n\nexport interface ContactAddress {\n /**\n * Street address ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Address type.\n * `UNTAGGED` is shown as \"Other\" in the Contact List.\n */\n tag?: AddressTagWithLiterals;\n /** Street address. */\n address?: Address;\n}\n\nexport enum AddressTag {\n UNTAGGED = 'UNTAGGED',\n HOME = 'HOME',\n WORK = 'WORK',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type AddressTagWithLiterals =\n | AddressTag\n | 'UNTAGGED'\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 * Code for a subdivision (such as state, prefecture, or province) in an\n * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.\n * @maxLength 100\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 1000\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\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 1000\n */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address's latitude. */\n latitude?: number | null;\n /** Address's longitude. */\n longitude?: number | null;\n}\n\nexport interface Subdivision {\n /** subdivision short code */\n code?: string;\n /** Full subdivision name. */\n name?: string;\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\nexport interface AssigneesWrapper {\n /**\n * List of site contributor user IDs.\n * @format GUID\n * @maxSize 50\n */\n items?: string[];\n}\n\nexport interface LabelsWrapper {\n /**\n * List of contact label keys.\n *\n * Contact labels help categorize contacts. Label keys must exist to be added to the contact.\n * Contact labels can be created or retrieved with Find or Create Label or List Labels.\n * @maxSize 2000\n */\n items?: string[];\n}\n\nexport interface ExtendedFieldsWrapper {\n /**\n * Contact's extended fields,\n * where each key is the field key,\n * and each value is the field's value for the contact.\n *\n * To view and manage extended fields, use the Extended Fields API.\n */\n items?: Record<string, any>;\n}\n\nexport interface LocationsWrapper {\n /**\n * List of location ids.\n * @format GUID\n * @maxSize 50\n */\n items?: string[];\n}\n\n/** TEST contact picture description */\nexport interface ContactPicture {\n /**\n * Image.\n * This can contain an image URL or a Wix Media image ID.\n */\n image?: string;\n}\n\nexport enum ImageProvider {\n UNKNOWN = 'UNKNOWN',\n /** Image stored outside Wix */\n EXTERNAL = 'EXTERNAL',\n /** Stored in wix media platform, Must be uploaded by using `GeneratePictureUploadUrl` */\n WIX_MEDIA = 'WIX_MEDIA',\n}\n\n/** @enumType */\nexport type ImageProviderWithLiterals =\n | ImageProvider\n | 'UNKNOWN'\n | 'EXTERNAL'\n | 'WIX_MEDIA';\n\nexport interface SegmentsWrapper {\n /**\n * List of Contact segment IDs\n * @maxSize 60\n * @format GUID\n */\n items?: string[];\n}\n\nexport interface PrimaryEmail {\n /**\n * Primary email address.\n *\n * This field reflects the email address in `info.emails`\n * where `primary` is `true`.\n * @format EMAIL\n * @readonly\n */\n email?: string | null;\n /**\n * Indicates the recipient's opt-in or opt-out status for marketing emails.\n *\n * Default: `NOT_SET`\n * @readonly\n */\n subscriptionStatus?: SubscriptionStatusWithLiterals;\n /**\n * Indicates last reported status of sent emails.\n *\n * Default: `NOT_SET`\n * @readonly\n */\n deliverabilityStatus?: EmailDeliverabilityStatusWithLiterals;\n}\n\nexport enum SubscriptionStatus {\n /** No status exists. */\n NO_SUBSCRIPTION_STATUS = 'NO_SUBSCRIPTION_STATUS',\n /** No status specified. */\n NOT_SET = 'NOT_SET',\n /** Subscription confirmation was requested, but recipient hasn't confirmed yet. */\n PENDING = 'PENDING',\n /** Recipient has opted in to marketing emails or SMS messages. */\n SUBSCRIBED = 'SUBSCRIBED',\n /** Recipient has opted out of marketing emails or SMS messages. */\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 /** No status reported. */\n NOT_SET = 'NOT_SET',\n /** Emails are being successfully delivered. */\n VALID = 'VALID',\n /** The last email to the recipient bounced or was rejected. */\n BOUNCED = 'BOUNCED',\n /** Recipient registered a spam complaint with their email provider. */\n SPAM_COMPLAINT = 'SPAM_COMPLAINT',\n /** Multiple emails have been delivered without any kind of engagement from the recipient. */\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 PrimaryPhone {\n /**\n * Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\n * Automatically generated using `phone` and `countryCode` when both values are valid.\n * @readonly\n */\n e164Phone?: string | null;\n /**\n * Formatted phone. Automatically generated using `phone` and `countryCode`.\n * @readonly\n */\n formattedPhone?: string | null;\n /**\n * Indicates the recipient's opt-in or opt-out status for SMS messages.\n *\n * Default:\n * - `NOT_SET` when the phone is a valid E164 phone.\n * - `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone.\n * @readonly\n */\n subscriptionStatus?: SubscriptionStatusWithLiterals;\n /**\n * Primary phone number.\n *\n * This field reflects the phone number in `info.phones`\n * where `primary` is `true`.\n * @readonly\n */\n phone?: string | null;\n}\n\nexport enum PhoneDeliverabilityStatus {\n /** No status exists. */\n NO_PHONE_DELIVERABILITY_STATUS = 'NO_PHONE_DELIVERABILITY_STATUS',\n /** No status reported. */\n NOT_SET = 'NOT_SET',\n}\n\n/** @enumType */\nexport type PhoneDeliverabilityStatusWithLiterals =\n | PhoneDeliverabilityStatus\n | 'NO_PHONE_DELIVERABILITY_STATUS'\n | 'NOT_SET';\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 * - `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 * - `BLOCKED': Member is blocked 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 DELETED = 'DELETED',\n BLOCKED = 'BLOCKED',\n OFFLINE = 'OFFLINE',\n}\n\n/** @enumType */\nexport type MemberStatusWithLiterals =\n | MemberStatus\n | 'PENDING'\n | 'ACTIVE'\n | 'DELETED'\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 UNSPECIFIED_ROLE = 'UNSPECIFIED_ROLE',\n OWNER = 'OWNER',\n CONTRIBUTOR = 'CONTRIBUTOR',\n}\n\n/** @enumType */\nexport type RoleWithLiterals =\n | Role\n | 'UNSPECIFIED_ROLE'\n | 'OWNER'\n | 'CONTRIBUTOR';\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 ContactSubmitted {\n /** Pass through data, submitted with the contact */\n passThroughData?: string | null;\n /** Submitted activity */\n activity?: ContactActivity;\n /** Submitted Contact (after processing) */\n contact?: Contact;\n}\n\nexport interface ContactChanged {\n /** The Contact before the changes */\n previousContact?: Contact;\n /** The Contact after the changes */\n currentContact?: Contact;\n}\n\nexport interface ContactEmailSubscriptionUpdated {\n /** The updated contact ID. */\n contactId?: string;\n /** The revision of the contact. */\n revision?: number;\n /** The primary email of the contact with the updated subscription and deliverability status. */\n primaryEmail?: PrimaryEmail;\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 /** The updated contact ID. */\n contactId?: string;\n /** The revision of the contact. */\n revision?: number;\n /** The primary phone of the contact with the updated subscription status. */\n primaryPhone?: PrimaryPhone;\n /** Date and time the contact was updated with the SMS subscription status. */\n _updatedDate?: Date | null;\n}\n\n/**\n * This message is an internal message used by this app and it is used to trigger\n * the update of the subscription status of the contact asynchronously.\n * It is published after a contact is created/updated/merged.\n */\nexport interface ContactPrimaryInfoUpdated {\n /** The updated contact ID. */\n contactId?: string;\n /** Indication whether the primary email was updated. */\n primaryEmailUpdated?: boolean;\n /** Indication whether primary phone was updated. */\n primaryPhoneUpdated?: boolean;\n /** previous primary email subscription status */\n previousPrimaryEmailSubscriptionStatus?: PrimarySubscriptionStatus;\n /** previous primary phone subscription status */\n previousPrimaryPhoneSubscriptionStatus?: PrimarySubscriptionStatus;\n}\n\nexport interface PrimarySubscriptionStatus {\n /** subscription status */\n subscriptionStatus?: SubscriptionStatusWithLiterals;\n}\n\n/**\n * This message is an internal message used by this app and it is used to trigger\n * the update of the contact's last activity is done asynchronously.\n */\nexport interface LastActivityUpdate {\n /**\n * The contact ID.\n * @format GUID\n */\n contactId?: string;\n /** Activity date. */\n activityDate?: Date | null;\n /**\n * Activity translation key.\n * @maxLength 100\n */\n activityTranslationKey?: string;\n /**\n * Activity icon.\n * @maxLength 100\n */\n icon?: string | null;\n}\n\n/** Contact creation options. */\nexport interface CreateContactRequest {\n /** Contact info. */\n info: ContactInfo;\n /**\n * Controls whether the call will succeed\n * if the new contact information contains an email or a phone number already used by another contact.\n *\n * If set to `true`,\n * the call will succeed even if an email address or phone number is used by another contact.\n * If set to `false`,\n * the call will fail if the given email address is used by another contact or,\n * if the email address is not given and the given phone number is used by another contact.\n *\n * Default: `false`\n */\n allowDuplicates?: boolean;\n}\n\n/** Contact. */\nexport interface CreateContactResponse {\n /** Contact. */\n contact?: Contact;\n}\n\nexport interface DuplicateContactExists {\n /** @format GUID */\n duplicateContactId?: string | null;\n /** @format EMAIL */\n duplicateEmail?: string | null;\n /** @format PHONE */\n duplicatePhone?: string | null;\n}\n\nexport interface UpdateContactRequest {\n /**\n * ID of the contact to update.\n * @format GUID\n */\n contactId: string;\n /**\n * Revision number.\n * When updating, include the existing `revision`\n * to prevent conflicting updates.\n */\n revision: number | null;\n /**\n * Controls whether the call will succeed\n * if the new contact information contains an email or a phone number already used by another contact.\n *\n * If set to `true`,\n * the call will succeed even if an email address or phone number is used by another contact.\n * If set to `false`,\n * the call will fail if the given email address is used by another contact or,\n * if the email address is not given and the given phone number is used by another contact.\n *\n * Default: `false`\n */\n allowDuplicates?: boolean;\n /** Contact info. */\n info: ContactInfo;\n}\n\n/** Updated contact. */\nexport interface UpdateContactResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface MergeContactsRequest {\n /**\n * Target contact ID.\n * @format GUID\n */\n targetContactId: string;\n /**\n * Target contact revision number, which increments by 1 each time the contact is updated.\n * To prevent conflicting changes,\n * the target contact's current `revision` must be specified.\n */\n targetContactRevision: number | null;\n /**\n * IDs of up to 5 contacts to merge into the target contact.\n * When you merge 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 */\n sourceContactIds?: string[];\n}\n\nexport interface MergeContactsResponse {\n /** Updated target contact. */\n contact?: Contact;\n}\n\nexport interface ContactMerged {\n /** ID of the contact the source contacts were merged into. */\n targetContactId?: string;\n /** IDs of contacts that were merged into the target contact. */\n sourceContactIds?: string[];\n /** Updated target contact. */\n targetContact?: Contact;\n}\n\nexport interface PreviewMergeContactsRequest {\n /**\n * Target contact ID.\n * @format GUID\n */\n targetContactId: string;\n /**\n * IDs of up to 5 contacts to merge into the target contact.\n * When you merge 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 */\n sourceContactIds?: string[];\n}\n\nexport interface PreviewMergeContactsResponse {\n /** Preview of the 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\nexport interface DeleteContactResponse {}\n\nexport interface LabelContactRequest {\n /**\n * ID of the contact to add labels to.\n * @format GUID\n */\n contactId: string;\n /**\n * List of label keys to add to the contact.\n *\n * Label keys must exist to be added to the contact.\n * Use the Labels API to create or retrieve labels.\n * @minSize 1\n * @maxSize 100\n */\n labelKeys: string[];\n}\n\n/** Updated contact. */\nexport interface LabelContactResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface UnlabelContactRequest {\n /**\n * ID of the contact to remove labels from.\n * @format GUID\n */\n contactId: string;\n /**\n * List of label keys to remove from the contact.\n * @minSize 1\n * @maxSize 100\n */\n labelKeys: string[];\n}\n\n/** Updated contact. */\nexport interface UnlabelContactResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface LabelAndUnlabelContactRequest {\n /**\n * Contact ID.\n * @format GUID\n */\n contactId?: string;\n /**\n * List of label keys to add to the contact.\n *\n * Label keys must exist to be added to the contact.\n * Contact labels can be created or retrieved with\n * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)\n * or\n * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).\n * @minSize 1\n * @maxSize 100\n */\n labelKeysToAdd?: string[];\n /**\n * List of label keys to remove from the contact.\n * @minSize 1\n * @maxSize 100\n */\n labelKeysToRemove?: string[];\n}\n\nexport interface LabelAndUnlabelContactResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface ListContactsRequest {\n /** [Sort order](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter). */\n sort?: Sorting;\n /** [Pagination](https://dev.wix.com/api/rest/getting-started/pagination), defaults to offset = 0 and limit = 50 (max limit 1,000). */\n paging?: Paging;\n /**\n * List of projected fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n * `id` and `revision` are always returned.\n *\n * Supported properties:\n * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n * `info.labelKeys`, `info.locations`, `info.extendedFields`\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /** @maxSize 10 */\n fieldsets?: ContactFieldSetWithLiterals[];\n}\n\nexport interface Sorting {\n /**\n * Field to sort by.\n *\n * Supported properties:\n * `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,\n * `info.jobTitle`, `info.birthdate`\n * @maxLength 100\n */\n fieldName?: string;\n /**\n * Sort order.\n * Use `ASC` for ascending order or `DESC` for descending order.\n *\n * Defaults to `ASC`.\n */\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 Paging {\n /**\n * Number of items to return. Learn more about pagination in [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging).\n *\n * Default: `50`. <br>\n * Maximum: `1000`.\n * @max 1000\n */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport enum ContactFieldSet {\n /** name, primaryEmail, primaryPhone */\n BASIC = 'BASIC',\n /** name, phones, emails, addresses */\n COMMUNICATION_DETAILS = 'COMMUNICATION_DETAILS',\n /** name, primaryInfo(email, phone), extendedFields */\n EXTENDED = 'EXTENDED',\n /** Full contact object */\n FULL = 'FULL',\n}\n\n/** @enumType */\nexport type ContactFieldSetWithLiterals =\n | ContactFieldSet\n | 'BASIC'\n | 'COMMUNICATION_DETAILS'\n | 'EXTENDED'\n | 'FULL';\n\n/** List of contacts. */\nexport interface ListContactsResponse {\n /** List of contacts. */\n contacts?: Contact[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n /** The number of items returned in this response. */\n count?: number | null;\n /** The offset which was requested. */\n offset?: number | null;\n /** The total number of items that match the query. */\n total?: number | null;\n /** A flag that indicates the server failed to calculate 'total' field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface QueryContactsRequest {\n /**\n * @internal\n * @internal\n * @maxLength 100\n */\n search?: string | null;\n /** Query options. */\n query?: Query;\n}\n\nexport interface Query {\n /**\n * Filter object.\n * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)\n * for more information.\n *\n * For a detailed list of supported filters, see\n * [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sorting options.\n * See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)\n * for more information.\n *\n * Max: 1 sort object\n * @maxSize 1\n */\n sort?: Sorting[];\n /** Pagination options. */\n paging?: Paging;\n /**\n * List of projected fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n * `id` and `revision` are always returned.\n *\n * Supported properties:\n * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n * `info.labelKeys`, `info.locations`, `info.extendedFields`\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /**\n * Predefined sets of fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n *\n * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.\n * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.\n * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.\n * - `FULL`: Returns all fields.\n *\n * Default: If `fields` is omitted from the request, `FULL`.\n * @maxSize 10\n */\n fieldsets?: ContactFieldSetWithLiterals[];\n}\n\n/** List of contacts. */\nexport interface QueryContactsResponse {\n /** List of contacts. */\n contacts?: Contact[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface ListFacetsRequest {\n /** Pagination options. */\n paging?: Paging;\n /**\n * Language for localization.\n * @format LANGUAGE\n */\n language?: string | null;\n}\n\nexport interface ListFacetsResponse {\n /** List of facets. */\n facets?: ContactsFacet[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface ContactsFacet {\n /** Type of facet. */\n facetType?: ContactsFacetTypeWithLiterals;\n /**\n * Scope for facet keys.\n * When a facet key exists in a namespace,\n * each key is unique within that namespace.\n *\n * Currently, facets not created by Wix are in the `custom` namespace.\n */\n namespace?: string | null;\n /** Human-readable display name. */\n namespaceDisplayName?: string | null;\n /** Facet key, automatically generated. */\n facetKey?: string | null;\n /** Human-readable name. Shown in the Wix UI. */\n facetDisplayName?: string | null;\n /** Number of contacts the facet applies to. */\n count?: number | null;\n /** Filter used to query contacts of this facet. */\n queryFilter?: Record<string, any> | null;\n}\n\nexport enum ContactsFacetType {\n UNKNOWN = 'UNKNOWN',\n ALL_CONTACTS = 'ALL_CONTACTS',\n NOT_LABELED = 'NOT_LABELED',\n LABEL = 'LABEL',\n SUBSCRIPTION_STATUS = 'SUBSCRIPTION_STATUS',\n MEMBERSHIP_STATUS = 'MEMBERSHIP_STATUS',\n}\n\n/** @enumType */\nexport type ContactsFacetTypeWithLiterals =\n | ContactsFacetType\n | 'UNKNOWN'\n | 'ALL_CONTACTS'\n | 'NOT_LABELED'\n | 'LABEL'\n | 'SUBSCRIPTION_STATUS'\n | 'MEMBERSHIP_STATUS';\n\nexport interface QueryFacetsRequest {\n /** Pagination options. */\n paging?: Paging;\n /**\n * Language for localization.\n * @format LANGUAGE\n */\n language?: string | null;\n /**\n * Filterable fields:\n * - `'info.extendedFields.emailSubscriptions.effectiveEmail'` (`$exists`).\n * - `'info.extendedFields.emailSubscriptions.subscriptionStatus'` (`$eq`, `$ne`, `$in`, `$nin`).\n * - `'info.extendedFields.emailSubscriptions.deliverabilityStatus'` (`$eq`, `$ne`, `$in`, `$nin`).\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface QueryFacetsResponse {\n /** List of facets. */\n facets?: ContactsFacet[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface BulkDeleteContactsRequest {\n /**\n * Filter object.\n *\n * Possible filters:\n * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.\n *\n * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a detailed list of supported filters for contact properties, extended fields, and custom fields.\n *\n *\n * Example:\n * `{ \"filter\": { \"info.name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n *\n * Searchable fields:\n *\n * - `info.name.first`\n * - `info.name.last`\n * - `info.emails.email`\n * - `info.phones.phone`\n * @maxLength 100\n */\n search?: string | null;\n}\n\nexport interface BulkDeleteContactsResponse {\n /**\n * Bulk job ID.\n * The job's status can be retrieved with Get Bulk Job.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkUpdateContactsRequest {\n /**\n * Filter object.\n *\n * Possible filters:\n * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.\n *\n * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a detailed list of supported filters for contact properties, extended fields, and custom fields.\n *\n *\n * Example:\n * `{ \"filter\": { \"info.name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n *\n * Searchable fields:\n *\n * - `info.name.first`\n * - `info.name.last`\n * - `info.emails.email`\n * - `info.phones.phone`\n * @maxLength 100\n */\n search?: string | null;\n /** Contact info. */\n info?: ContactInfo;\n}\n\nexport interface BulkUpdateContactsResponse {\n /**\n * Bulk job ID.\n * The job's status can be retrieved with Get Bulk Job.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkLabelAndUnlabelContactsRequest {\n /**\n * Filter options.\n * Labels will be removed from contacts that meet the `filter` and `search` criteria.\n *\n * See\n * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a list of supported filters and fields.\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n * Labels will be removed from contacts that meet the `filter` and `search` criteria.\n *\n * See\n * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a list of searchable fields.\n * @maxLength 100\n */\n search?: string | null;\n /**\n * List of label keys to add to the contacts.\n *\n * Label keys must exist to be added to the contact.\n * Contact labels can be created or retrieved with\n * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)\n * or\n * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels)\n * @maxSize 100\n */\n labelKeysToAdd?: string[];\n /**\n * List of label keys to remove from the contacts.\n * @maxSize 100\n */\n labelKeysToRemove?: string[];\n}\n\nexport interface BulkLabelAndUnlabelContactsResponse {\n /**\n * Bulk job ID.\n * The job's status can be retrieved with Get Bulk Job.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkUpsertContactsRequest {\n /**\n * @minSize 1\n * @maxSize 100\n */\n info?: ContactInfo[];\n returnFullEntity?: boolean;\n}\n\nexport interface BulkUpsertContactsResponse {\n results?: Item[];\n metadata?: BulkUpsertContactsResponseMetadata;\n}\n\nexport enum Action {\n UNKNOWN = 'UNKNOWN',\n UPDATED = 'UPDATED',\n CREATED = 'CREATED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals = Action | 'UNKNOWN' | 'UPDATED' | 'CREATED';\n\nexport interface Error {\n /** Error code. */\n code?: string;\n /** Error details. */\n message?: string | null;\n}\n\nexport interface Metadata {\n _id?: string | null;\n originalIndex?: number;\n action?: ActionWithLiterals;\n success?: boolean;\n error?: Error;\n}\n\nexport interface Item {\n contact?: Contact;\n metadata?: Metadata;\n}\n\nexport interface BulkUpsertContactsResponseMetadata {\n totalSuccess?: number;\n totalFailure?: number;\n totalCreated?: number;\n totalUpdated?: number;\n}\n\nexport interface UpsertContactRequest {\n info?: ContactInfo;\n}\n\nexport interface UpsertContactResponse {\n /** Upserted contact. */\n contact?: Contact;\n action?: UpsertContactResponseActionWithLiterals;\n}\n\nexport enum UpsertContactResponseAction {\n UNKNOWN = 'UNKNOWN',\n UPDATED = 'UPDATED',\n CREATED = 'CREATED',\n}\n\n/** @enumType */\nexport type UpsertContactResponseActionWithLiterals =\n | UpsertContactResponseAction\n | 'UNKNOWN'\n | 'UPDATED'\n | 'CREATED';\n\nexport interface GeneratePictureUploadUrlRequest {\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:\n * `image/png`, `image/jpeg`.\n * Defaults to `image/png`.\n */\n mimeType?: string | null;\n}\n\nexport interface GeneratePictureUploadUrlResponse {\n /**\n * URL to upload the image\n * @format WEB_URL\n */\n uploadUrl?: string;\n}\n\nexport interface GetContactRequest {\n /**\n * ID of the contact to retrieve.\n * @format GUID\n */\n _id: string;\n /**\n * List of projected fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n * `id` and `revision` are always returned.\n *\n * Supported properties:\n * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n * `info.labelKeys`, `info.locations`, `info.extendedFields`\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /**\n * Predefined sets of fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n *\n * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.\n * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.\n * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.\n * - `FULL`: Returns all fields.\n *\n * Default: If `fields` is omitted from the request, `FULL`.\n * @maxSize 10\n */\n fieldsets?: ContactFieldSetWithLiterals[];\n}\n\n/** The requested contact. */\nexport interface GetContactResponse {\n /** The requested contact. */\n contact?: Contact;\n /** Contact response type. */\n responseType?: GetContactResponseTypeWithLiterals;\n}\n\nexport enum GetContactResponseType {\n /** The specified contact was returned. */\n REGULAR = 'REGULAR',\n /** Not used. */\n IMPLICIT = 'IMPLICIT',\n /** The specified contact was previously merged with another contact and the new contact was returned. */\n MERGED = 'MERGED',\n}\n\n/** @enumType */\nexport type GetContactResponseTypeWithLiterals =\n | GetContactResponseType\n | 'REGULAR'\n | 'IMPLICIT'\n | 'MERGED';\n\nexport interface SyncSubmitContactRequest {\n contactInfo?: ContactInfo;\n activity?: ContactActivity;\n passThroughData?: string | null;\n /** @format GUID */\n contactId?: string;\n submitOperation?: SubmitOperationWithLiterals;\n /** Need to resolve source in allocator, because of server sign */\n sourceType?: ContactSourceTypeWithLiterals;\n sourceId?: string | null;\n hideFromContactList?: boolean;\n}\n\nexport enum SubmitOperation {\n UNKNOWN = 'UNKNOWN',\n CREATE = 'CREATE',\n UPDATE = 'UPDATE',\n}\n\n/** @enumType */\nexport type SubmitOperationWithLiterals =\n | SubmitOperation\n | 'UNKNOWN'\n | 'CREATE'\n | 'UPDATE';\n\nexport interface SyncSubmitContactResponse {}\n\nexport interface CountContactsRequest {}\n\nexport interface CountContactsResponse {\n count?: number;\n}\n\nexport interface SearchContactsRequest {\n /** Search object. Encapsulates filter, sorting, paging and other details */\n search?: Search;\n}\n\nexport interface Search extends SearchPagingMethodOneOf {\n /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */\n cursorPaging?: CursorPaging;\n /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */\n filter?: Record<string, any> | null;\n /** Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}] */\n sort?: Sorting[];\n /**\n * List of projected fields to return.\n *\n * If used in the request,\n * all the fields contained in `fields` and `fieldsets` are returned.\n * If left blank, `fieldsets` is used to determine which fields to return.\n *\n * For a list of valid projected fields, see\n * [Valid Contact Projection Fields](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_valid-contact-projection-fields).\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /**\n * Predefined sets of fields to return.\n *\n * Defaults to `FULL`.\n * Ignored if left empty when `fields` is used in the request.\n *\n * For more information,\n * see [Contact Fieldsets](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_contact-fieldsets).\n * @maxSize 10\n */\n fieldsets?: string[];\n /** free text to match in searchable fields */\n search?: SearchDetails;\n}\n\n/** @oneof */\nexport interface SearchPagingMethodOneOf {\n /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */\n cursorPaging?: CursorPaging;\n}\n\nexport interface SearchDetails {\n /** boolean search mode. Default is `OR` */\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 - server will search in own default fieldsDefault searchable fields:\n *\n * - `info.name.first`\n * - `info.name.last`\n * - `info.emails.email`\n * - `info.phones.phone`\n * @maxLength 100\n * @maxSize 100\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 */\n OR = 'OR',\n /** all */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\nexport interface CursorPaging {\n /**\n * The number of contacts to load (default = 50, max = 1000)\n * @max 1000\n */\n limit?: number | null;\n /** Cursor returned in last query response. Should not be provided on first page request */\n cursor?: string | null;\n}\n\nexport interface SearchContactsResponse {\n /** List of contacts. */\n contacts?: Contact[];\n /** Details on the paged set of results returned. */\n cursorPagingMetadata?: CursorPagingMetadata;\n}\n\n/** This is the preferred message for cursor-paging enabled services */\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\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\nexport interface Cursors {\n /** Cursor pointing to next result page */\n next?: string | null;\n /** Cursor pointing to previous result page */\n prev?: string | null;\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 1000\n */\n contactIds?: string[];\n /**\n * List of existing segment ids\n * @format GUID\n * @maxSize 100\n */\n existsSegmentIds?: 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 ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\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 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 ContactAddedToSegment {\n /** Id of the segment to which the contact was added */\n segmentId?: string;\n /** The contact that was added */\n contact?: Contact;\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 1000\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 ContactRemovedFromSegment {\n /** Id of the segment from which the contact was removed */\n segmentId?: string;\n /** The contact that was removed */\n contact?: Contact;\n}\n\nexport interface ListContactIdsBySegmentRequest {\n /**\n * Segment id\n * @format GUID\n */\n segmentId?: string;\n /** Cursor paging. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface ListContactIdsBySegmentResponse {\n /**\n * List of contact IDs\n * @format GUID\n * @maxSize 1000\n */\n contactIds?: string[];\n /** Paging metadata */\n cursorPagingMetadata?: CursorPagingMetadata;\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}\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/** @docsIgnore */\nexport type CreateContactApplicationErrors =\n | {\n code?: 'DUPLICATE_CONTACT_EXISTS';\n description?: string;\n data?: DuplicateContactExists;\n }\n | {\n code?: 'INSUFFICIENT_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACT_ID_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MULTIPLE_PRIMARY_INFO';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_EXTENDED_FIELD_VALUE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateContactApplicationErrors =\n | {\n code?: 'DUPLICATE_CONTACT_EXISTS';\n description?: string;\n data?: DuplicateContactExists;\n }\n | {\n code?: 'CONTACT_ALREADY_CHANGED';\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?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INSUFFICIENT_UPDATE_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MULTIPLE_PRIMARY_INFO';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_EXTENDED_FIELD_VALUE';\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/** @docsIgnore */\nexport type MergeContactsApplicationErrors =\n | {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'FAILED_PRECONDITION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ILLEGAL_MERGE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type PreviewMergeContactsApplicationErrors =\n | {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'FAILED_PRECONDITION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ILLEGAL_MERGE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeleteContactApplicationErrors =\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_MEMBER_OWNER_OR_CONTRIBUTOR';\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 LabelContactApplicationErrors = {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type UnlabelContactApplicationErrors = {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ListContactsApplicationErrors =\n | {\n code?: 'UNSUPPORTED_SORT_FIELD';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ILLEGAL_LIMIT';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type QueryContactsApplicationErrors =\n | {\n code?: 'UNSUPPORTED_SORT_FIELD';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ILLEGAL_LIMIT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MALFORMED_FILTER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER_FIELD_UNKNOWN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER_OPERATOR';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER_VALUE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER_VALUE_TYPE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type BulkDeleteContactsApplicationErrors = {\n code?: 'NEITHER_FILTER_NOR_SEARCH';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkLabelAndUnlabelContactsApplicationErrors = {\n code?: 'NEITHER_FILTER_NOR_SEARCH';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type GetContactApplicationErrors = {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\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}\n\nexport interface EventMetadata extends BaseEventMetadata {\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\nexport interface ContactCreatedEnvelope {\n entity: Contact;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a contact is created.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Read Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionId CONTACTS.VIEW\n * @webhook\n * @eventType wix.contacts.v4.contact_created\n * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4\n * @slug created\n */\nexport declare function onContactCreated(\n handler: (event: ContactCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ContactDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a contact is deleted.\n *\n * If a contact is deleted as part of a merge, the `originatedFrom` property is sent as `merge`.\n * Otherwise, `originatedFrom` isn't returned.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Read Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionId CONTACTS.VIEW\n * @webhook\n * @eventType wix.contacts.v4.contact_deleted\n * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4\n * @slug deleted\n */\nexport declare function onContactDeleted(\n handler: (event: ContactDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ContactMergedEnvelope {\n data: ContactMerged;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when one or more source contacts are merged into a target contact.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Read Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionId CONTACTS.VIEW\n * @webhook\n * @eventType wix.contacts.v4.contact_merged\n * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4\n * @slug merged\n */\nexport declare function onContactMerged(\n handler: (event: ContactMergedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ContactUpdatedEnvelope {\n entity: Contact;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a contact is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Read Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionId CONTACTS.VIEW\n * @webhook\n * @eventType wix.contacts.v4.contact_updated\n * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4\n * @slug updated\n */\nexport declare function onContactUpdated(\n handler: (event: ContactUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a new contact.\n *\n * The `info` object must include at least one of the following:\n * - Name\n * - Phone number\n * - Email address\n *\n * By default, if the call contains an email already in use by another contact,\n * the new contact won't be created. To override this behavior, set `allowDuplicates` to `true`.\n * @param info - Contact info.\n * @public\n * @requiredField info\n * @param options - Create contact options.\n * @permissionId CONTACTS.MODIFY\n * @applicableIdentity APP\n * @returns Contact.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.CreateContact\n */\nexport async function createContact(\n info: ContactInfo,\n options?: CreateContactOptions\n): Promise<\n NonNullablePaths<\n CreateContactResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\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 info: info,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'info.addresses.items.address' }],\n },\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [{ path: 'info.picture.image' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV4Contact.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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n info: '$[0]',\n allowDuplicates: '$[1].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['info', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateContactOptions {\n /**\n * Controls whether the call will succeed\n * if the new contact information contains an email or a phone number already used by another contact.\n *\n * If set to `true`,\n * the call will succeed even if an email address or phone number is used by another contact.\n * If set to `false`,\n * the call will fail if the given email address is used by another contact or,\n * if the email address is not given and the given phone number is used by another contact.\n *\n * Default: `false`\n */\n allowDuplicates?: boolean;\n}\n\n/**\n * Updates a contact.\n *\n * Each time the contact is updated,\n * `revision` increments by 1.\n * The existing `revision` must be included when updating the contact.\n * This ensures you're working with the latest contact information,\n * and it prevents unintended overwrites.\n *\n * You can't call Update Contact to update the `primaryEmail` of a contact who is also a member.\n * Instead, use the Members API to update the member's login email, which will also update the contact's primary email.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers. Make sure to specify the contact ID when calling Update Contact.\n * @param contactId - ID of the contact to update.\n * @param info - Contact info.\n * @param revision - Revision number.\n * When updating, include the existing `revision`\n * to prevent conflicting updates.\n * @public\n * @requiredField contactId\n * @requiredField info\n * @requiredField revision\n * @param options - Contact update options.\n * @permissionId CONTACTS.MODIFY\n * @permissionId CONTACTS.MODIFY_MEMBERSHIP_STATUS\n * @permissionId CONTACTS.MODIFY_MEMBER_PRIMARY_EMAIL_PERMISSION\n * @applicableIdentity APP\n * @returns Updated contact.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.UpdateContact\n */\nexport async function updateContact(\n contactId: string,\n info: ContactInfo,\n revision: number,\n options?: UpdateContactOptions\n): Promise<\n NonNullablePaths<\n UpdateContactResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\n > & {\n __applicationErrorsType?: UpdateContactApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[4] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n info: info,\n revision: revision,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'info.addresses.items.address' }],\n },\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [{ path: 'info.picture.image' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV4Contact.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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n info: '$[1]',\n revision: '$[2]',\n allowDuplicates: '$[3].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'info', 'revision', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateContactOptions {\n /**\n * Controls whether the call will succeed\n * if the new contact information contains an email or a phone number already used by another contact.\n *\n * If set to `true`,\n * the call will succeed even if an email address or phone number is used by another contact.\n * If set to `false`,\n * the call will fail if the given email address is used by another contact or,\n * if the email address is not given and the given phone number is used by another contact.\n *\n * Default: `false`\n */\n allowDuplicates?: boolean;\n}\n\n/**\n * Merges source contacts into a target contact.\n *\n * Merging contacts has the following effects on the target contact:\n *\n * - No target contact data is overwritten or deleted.\n * - Arrays (emails, phone numbers, addresses, and labels) from the source contacts are added to the target contact's arrays.\n * - If you merge more than one source contact, the 1st source contact specified is added first, then the 2nd, and so on.\n * - If there is duplicate information between the target contact and the source contact, the information isn't duplicated in the target contact's arrays.\n *\n * <blockquote class=\"important\">\n *\n * __Important:__\n * Merges cannot be undone.\n * In REST, call Preview Merge Contacts to test before merging.\n *\n * </blockquote>\n *\n * When you merge contacts, source contacts are typically deleted.\n * However, if a source contact is a site member or a Wix user,\n * the merge will fail because site members and Wix users can't be deleted.\n * This means that site members and Wix users can only be specified as target contacts in a merge.\n *\n * After merging, calling Get Contact with a deleted source contact ID returns the target contact ID.\n * Specifying a deleted source contact ID is not supported on any other method.\n *\n * When contacts are merged:\n *\n * - The Contact Merged event is triggered.\n * - The Contact Updated event is triggered for the target contact. `originatedFrom` is set to `merge`.\n * - The Contact Deleted event is triggered for each source contact. `originatedFrom` is set to `merge`.\n * @param targetContactId - Target contact ID.\n * @param targetContactRevision - Target contact revision number, which increments by 1 each time the contact is updated.\n * To prevent conflicting changes,\n * the target contact's current `revision` must be specified.\n * @public\n * @requiredField targetContactId\n * @requiredField targetContactRevision\n * @param options - Merge contacts options.\n * @permissionId CONTACTS.MERGE\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.MergeContacts\n */\nexport async function mergeContacts(\n targetContactId: string,\n targetContactRevision: number,\n options?: MergeContactsOptions\n): Promise<\n NonNullablePaths<\n MergeContactsResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\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 = renameKeysFromSDKRequestToRESTRequest({\n targetContactId: targetContactId,\n targetContactRevision: targetContactRevision,\n sourceContactIds: options?.sourceContactIds,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.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 sourceContactIds: '$[2].sourceContactIds',\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 /**\n * IDs of up to 5 contacts to merge into the target contact.\n * When you merge 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 */\n sourceContactIds?: string[];\n}\n\n/**\n * Previews merging source contacts into a target contact.\n *\n * This method performs a dry run without deleting or updating any contacts.\n * A preview of the updated target contact is returned,\n * but no data is changed in the contact list.\n *\n * To perform the actual merge, use Merge Contacts.\n * @param targetContactId - Target contact ID.\n * @public\n * @requiredField targetContactId\n * @param options - Preview merge contacts options.\n * @permissionId CONTACTS.MERGE\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.PreviewMergeContacts\n */\nexport async function previewMergeContacts(\n targetContactId: string,\n options?: PreviewMergeContactsOptions\n): Promise<\n NonNullablePaths<\n PreviewMergeContactsResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\n > & {\n __applicationErrorsType?: PreviewMergeContactsApplicationErrors;\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 targetContactId: targetContactId,\n sourceContactIds: options?.sourceContactIds,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.previewMergeContacts(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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n targetContactId: '$[0]',\n sourceContactIds: '$[1].sourceContactIds',\n },\n singleArgumentUnchanged: false,\n },\n ['targetContactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PreviewMergeContactsOptions {\n /**\n * IDs of up to 5 contacts to merge into the target contact.\n * When you merge 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 */\n sourceContactIds?: string[];\n}\n\n/**\n * Deletes a contact.\n *\n * Deleting a contact permanently removes it from the contact list.\n * If a contact is also a site member or Wix user, or has a valid billing subscription,\n * the contact can't be deleted. The related site member or Wix user must first be deleted\n * and any valid billing subscriptions must be canceled, before the contact can be deleted.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Delete Contact.\n * @param contactId - ID of the contact to delete.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.MODIFY\n * @permissionId MEMBERS.MEMBER_DELETE\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.DeleteContact\n */\nexport async function deleteContact(contactId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteContactApplicationErrors;\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 = ambassadorWixContactsV4Contact.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: { contactId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['contactId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Adds labels to a contact.\n *\n * Use the Labels API to create or retrieve labels.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Label Contact.\n * @param contactId - ID of the contact to add labels to.\n * @param labelKeys - List of label keys to add to the contact.\n *\n * Label keys must exist to be added to the contact.\n * Use the Labels API to create or retrieve labels.\n * @public\n * @requiredField contactId\n * @requiredField labelKeys\n * @permissionId CONTACTS.MODIFY\n * @applicableIdentity APP\n * @returns Updated contact.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.LabelContact\n */\nexport async function labelContact(\n contactId: string,\n labelKeys: string[]\n): Promise<\n NonNullablePaths<\n LabelContactResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\n > & {\n __applicationErrorsType?: LabelContactApplicationErrors;\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 labelKeys: labelKeys,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.labelContact(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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]', labelKeys: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'labelKeys']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes labels from a contact.\n *\n * If a label is no longer needed\n * and you want to remove it from all contacts,\n * you can delete by calling Delete Label from the Labels API.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Unlabel Contact.\n * @param contactId - ID of the contact to remove labels from.\n * @param labelKeys - List of label keys to remove from the contact.\n * @public\n * @requiredField contactId\n * @requiredField labelKeys\n * @permissionId CONTACTS.MODIFY\n * @applicableIdentity APP\n * @returns Updated contact.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.UnlabelContact\n */\nexport async function unlabelContact(\n contactId: string,\n labelKeys: string[]\n): Promise<\n NonNullablePaths<\n UnlabelContactResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\n > & {\n __applicationErrorsType?: UnlabelContactApplicationErrors;\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 labelKeys: labelKeys,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.unlabelContact(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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]', labelKeys: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'labelKeys']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 1,000 contacts per request.\n * @public\n * @param options - Object containing list of options for retrieving contacts.\n * @permissionId CONTACTS.VIEW\n * @applicableIdentity APP\n * @returns List of contacts.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.ListContacts\n */\nexport async function listContacts(options?: ListContactsOptions): Promise<\n NonNullablePaths<\n ListContactsResponse,\n | `contacts`\n | `contacts.${number}._id`\n | `contacts.${number}.revision`\n | `contacts.${number}.source.sourceType`\n | `contacts.${number}.lastActivity.activityType`\n | `contacts.${number}.primaryEmail.subscriptionStatus`\n | `contacts.${number}.primaryEmail.deliverabilityStatus`\n | `contacts.${number}.primaryPhone.subscriptionStatus`,\n 5\n > & {\n __applicationErrorsType?: ListContactsApplicationErrors;\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 sort: options?.sort,\n paging: options?.paging,\n fields: options?.fields,\n fieldsets: options?.fieldsets,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.listContacts(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.picture' },\n { path: 'contacts.info.picture.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sort: '$[0].sort',\n paging: '$[0].paging',\n fields: '$[0].fields',\n fieldsets: '$[0].fieldsets',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListContactsOptions {\n /** [Sort order](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter). */\n sort?: Sorting;\n /** [Pagination](https://dev.wix.com/api/rest/getting-started/pagination), defaults to offset = 0 and limit = 50 (max limit 1,000). */\n paging?: Paging;\n /**\n * List of projected fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n * `id` and `revision` are always returned.\n *\n * Supported properties:\n * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n * `info.labelKeys`, `info.locations`, `info.extendedFields`\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /** @maxSize 10 */\n fieldsets?: ContactFieldSetWithLiterals[];\n}\n\n/**\n * Creates a query to retrieve a list of contacts.\n *\n * The `queryContacts()` function builds a query to retrieve a list of contacts and returns a `ContactsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `ContactsQueryBuilder` functions onto the query. `ContactsQueryBuilder` functions enable you to sort, filter, and control the results `queryContacts()` returns.\n *\n * `queryContacts()` runs with these `ContactsQueryBuilder` defaults, which you can override:\n *\n * - `skip(0)`\n * - `limit(50)`\n * - `descending(\"_createdDate\")`\n *\n * The functions that are chained to `queryContacts()` are applied in the order they are called. For example, if you apply `ascending('info.company')` and then `descending('info.name.last')`, the results are sorted first by the company name, and then, if there are multiple results with the same company, the items are sorted by last name.\n * @public\n * @param options - Query contact options.\n * @permissionId CONTACTS.VIEW\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts\n */\nexport function queryContacts(\n options?: QueryContactsOptions\n): ContactsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Contact,\n 'OFFSET',\n QueryContactsRequest,\n QueryContactsResponse\n >({\n func: async (payload: QueryContactsRequest) => {\n const reqOpts = ambassadorWixContactsV4Contact.queryContacts({\n ...payload,\n ...(options ?? {}),\n });\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, options] as [\n QueryContactsRequest['query'],\n QueryContactsOptions\n ];\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.picture' },\n { path: 'contacts.info.picture.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.info.addresses.items.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: 'OFFSET',\n transformationPaths: {},\n });\n}\n\nexport interface QueryContactsOptions {\n /**\n * @internal\n * @maxLength 100\n */\n search?: string | null | undefined;\n}\n\ninterface QueryOffsetResult {\n currentPage: number | undefined;\n totalPages: number | undefined;\n totalCount: number | undefined;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ContactsQueryResult extends QueryOffsetResult {\n items: Contact[];\n query: ContactsQueryBuilder;\n next: () => Promise<ContactsQueryResult>;\n prev: () => Promise<ContactsQueryResult>;\n}\n\nexport interface ContactsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'primaryInfo.email'\n | 'primaryInfo.phone'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.birthdate'\n | 'info.locale',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'primaryInfo.email'\n | 'primaryInfo.phone'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.birthdate'\n | 'info.locale',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'info.birthdate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'info.birthdate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'info.birthdate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'info.birthdate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName:\n | 'primaryInfo.email'\n | 'primaryInfo.phone'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle',\n value: string\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (propertyName: string, value: any[]) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasAll: (propertyName: string, value: any[]) => ContactsQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | 'primaryInfo.email'\n | 'primaryInfo.phone'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.locale',\n value: any\n ) => ContactsQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | 'primaryInfo.email'\n | 'primaryInfo.phone'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.locale',\n value: boolean\n ) => ContactsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | '_createdDate'\n | 'lastActivity.activityDate'\n | 'primaryInfo.email'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.birthdate'\n >\n ) => ContactsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | '_createdDate'\n | 'lastActivity.activityDate'\n | 'primaryInfo.email'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.birthdate'\n >\n ) => ContactsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => ContactsQueryBuilder;\n /** @param skip - Number of items to skip in the query results before returning the results. */\n skip: (skip: number) => ContactsQueryBuilder;\n find: () => Promise<ContactsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts\n * @requiredField query\n * @returns List of contacts.\n */\nexport async function typedQueryContacts(\n query: ContactQuery,\n options?: QueryContactsOptions\n): Promise<\n NonNullablePaths<\n QueryContactsResponse,\n | `contacts`\n | `contacts.${number}._id`\n | `contacts.${number}.revision`\n | `contacts.${number}.source.sourceType`\n | `contacts.${number}.lastActivity.activityType`\n | `contacts.${number}.primaryEmail.subscriptionStatus`\n | `contacts.${number}.primaryEmail.deliverabilityStatus`\n | `contacts.${number}.primaryPhone.subscriptionStatus`,\n 5\n > & {\n __applicationErrorsType?: QueryContactsApplicationErrors;\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 query: query,\n ...options,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.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.picture' },\n { path: 'contacts.info.picture.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.info.addresses.items.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', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ContactQuerySpec extends QuerySpec {\n paging: 'offset';\n wql: [\n {\n fields: ['_id', 'info.locale'];\n operators: ['$eq', '$exists', '$in', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['_createdDate', 'info.birthdate', 'lastActivity.activityDate'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'BOTH';\n },\n {\n fields: ['_updatedDate'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'NONE';\n },\n {\n fields: [\n 'info.company',\n 'info.jobTitle',\n 'info.name.first',\n 'info.name.last',\n 'primaryInfo.email'\n ];\n operators: ['$begins', '$eq', '$exists', '$in', '$ne'];\n sort: 'BOTH';\n },\n {\n fields: ['primaryInfo.phone'];\n operators: ['$begins', '$eq', '$exists', '$in', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['info.labelKeys'];\n operators: ['$hasAll', '$hasSome'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Contact,\n ContactQuerySpec\n>;\nexport type ContactQuery = {\n /** \n Filter object.\n See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)\n for more information.\n\n For a detailed list of supported filters, see\n [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sorting options.\n See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)\n for more information.\n\n Max: 1 sort object \n @maxSize: 1 \n */\n sort?: {\n /** \n Field to sort by.\n\n Supported properties:\n `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,\n `info.jobTitle`, `info.birthdate` \n @maxLength: 100 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order.\n Use `ASC` for ascending order or `DESC` for descending order.\n\n Defaults to `ASC`. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n /** \n Pagination options. \n */\n paging?: {\n /** \n Number of items to return. Learn more about pagination in [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging).\n\n Default: `50`. <br>\n Maximum: `1000`. \n @max: 1000 \n */\n limit?: NonNullable<CommonQueryWithEntityContext['paging']>['limit'] | null;\n /** \n Number of items to skip in the current sort order. \n */\n offset?:\n | NonNullable<CommonQueryWithEntityContext['paging']>['offset']\n | null;\n };\n};\n\n/**\n * Lists facets from the site’s contact list.\n * Facets include labels and subscription statuses.\n * @public\n * @param options - List facets options.\n * @permissionId CONTACTS.VIEW\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.ListFacets\n */\nexport async function listFacets(\n options?: ListFacetsOptions\n): Promise<\n NonNullablePaths<\n ListFacetsResponse,\n `facets` | `facets.${number}.facetType`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paging: options?.paging,\n language: options?.language,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.listFacets(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 paging: '$[0].paging',\n language: '$[0].language',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListFacetsOptions {\n /** Pagination options. */\n paging?: Paging;\n /**\n * Language for localization.\n * @format LANGUAGE\n */\n language?: string | null;\n}\n\n/**\n * Retrieves facets from the site’s contact list by filter.\n * Facets include labels and subscription statuses.\n * @public\n * @param options - Query facets options.\n * @permissionId CONTACTS.VIEW\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryFacets\n */\nexport async function queryFacets(\n options?: QueryFacetsOptions\n): Promise<\n NonNullablePaths<\n QueryFacetsResponse,\n `facets` | `facets.${number}.facetType`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paging: options?.paging,\n language: options?.language,\n filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.queryFacets(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 paging: '$[0].paging',\n language: '$[0].language',\n filter: '$[0].filter',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QueryFacetsOptions {\n /** Pagination options. */\n paging?: Paging;\n /**\n * Language for localization.\n * @format LANGUAGE\n */\n language?: string | null;\n /**\n * Filterable fields:\n * - `'info.extendedFields.emailSubscriptions.effectiveEmail'` (`$exists`).\n * - `'info.extendedFields.emailSubscriptions.subscriptionStatus'` (`$eq`, `$ne`, `$in`, `$nin`).\n * - `'info.extendedFields.emailSubscriptions.deliverabilityStatus'` (`$eq`, `$ne`, `$in`, `$nin`).\n */\n filter?: Record<string, any> | 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, call Query Contacts with the intended filter options.\n *\n * When this method is called, a bulk job is started and the job ID is returned.\n * The job might not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\n *\n * The following errors might occur during the bulk processing and will appear in the bulk job:\n * - `CANNOT_DELETE_SITE_MEMBERS` - Contact is a site member and can't be deleted. Member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION` - Contact has a valid billing subscription and can't be deleted.\n * - `CANNOT_DELETE_MEMBER_OWNER_OR_CONTRIBUTOR` - Member is a Wix user and can't be deleted. This can happen only if the request indicated to delete the member.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION` - Member was deleted, but contact was not. This can happen only if the request indicated to delete the member.\n * - `FAILED_DELETE_CONTACT` - Contact could not be deleted.\n * @public\n * @param options - Bulk delete contacts options.\n * @permissionId CONTACTS.MODIFY\n * @permissionId MEMBERS.MEMBER_DELETE\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkDeleteContacts\n */\nexport async function bulkDeleteContacts(\n options?: BulkDeleteContactsOptions\n): Promise<\n NonNullablePaths<BulkDeleteContactsResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkDeleteContactsApplicationErrors;\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 filter: options?.filter,\n search: options?.search,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.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 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 BulkDeleteContactsOptions {\n /**\n * Filter object.\n *\n * Possible filters:\n * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.\n *\n * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a detailed list of supported filters for contact properties, extended fields, and custom fields.\n *\n *\n * Example:\n * `{ \"filter\": { \"info.name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n *\n * Searchable fields:\n *\n * - `info.name.first`\n * - `info.name.last`\n * - `info.emails.email`\n * - `info.phones.phone`\n * @maxLength 100\n */\n search?: string | null;\n}\n\n/**\n * Updates the specified properties for multiple contacts.\n * Fields that are included in fieldMask.paths are updated,\n * while all other fields stay the same.\n *\n * All contacts that meet the specified `filter` and `search` criteria are updated.\n * To perform a dry run, call Query Contacts with the intended filter options.\n *\n * When this method is used, a bulk job is started and the job ID is returned.\n * The job may not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\n * @public\n * @param options - Bulk update contacts options.\n * @permissionId CONTACTS.MODIFY\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkUpdateContacts\n */\nexport async function bulkUpdateContacts(\n options?: BulkUpdateContactsOptions\n): Promise<NonNullablePaths<BulkUpdateContactsResponse, `jobId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n search: options?.search,\n info: options?.info,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'info.addresses.items.address' }],\n },\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [{ path: 'info.picture.image' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV4Contact.bulkUpdateContacts(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 info: '$[0].info',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateContactsOptions {\n /**\n * Filter object.\n *\n * Possible filters:\n * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.\n *\n * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a detailed list of supported filters for contact properties, extended fields, and custom fields.\n *\n *\n * Example:\n * `{ \"filter\": { \"info.name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n *\n * Searchable fields:\n *\n * - `info.name.first`\n * - `info.name.last`\n * - `info.emails.email`\n * - `info.phones.phone`\n * @maxLength 100\n */\n search?: string | null;\n /** Contact info. */\n info?: ContactInfo;\n}\n\n/**\n * Adds and removes labels from multiple contacts.\n *\n * Labels are added to and removed from all contacts that meet the specified\n * `filter` and `search` criteria.\n * The request should specify a `filter` value, a `search` value, or both.\n * To perform a dry run, call Query Contacts with the intended filter options.\n *\n * When this method is used, a bulk job is started and the job ID is returned.\n * The job might not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\n * @public\n * @param options - Bulk label and unlabel contacts options.\n * @permissionId CONTACTS.MODIFY\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkLabelAndUnlabelContacts\n */\nexport async function bulkLabelAndUnlabelContacts(\n options?: BulkLabelAndUnlabelContactsOptions\n): Promise<\n NonNullablePaths<BulkLabelAndUnlabelContactsResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkLabelAndUnlabelContactsApplicationErrors;\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 filter: options?.filter,\n search: options?.search,\n labelKeysToAdd: options?.labelKeysToAdd,\n labelKeysToRemove: options?.labelKeysToRemove,\n });\n\n const reqOpts =\n ambassadorWixContactsV4Contact.bulkLabelAndUnlabelContacts(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 labelKeysToAdd: '$[0].labelKeysToAdd',\n labelKeysToRemove: '$[0].labelKeysToRemove',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkLabelAndUnlabelContactsOptions {\n /**\n * Filter options.\n * Labels will be removed from contacts that meet the `filter` and `search` criteria.\n *\n * See\n * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a list of supported filters and fields.\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n * Labels will be removed from contacts that meet the `filter` and `search` criteria.\n *\n * See\n * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a list of searchable fields.\n * @maxLength 100\n */\n search?: string | null;\n /**\n * List of label keys to add to the contacts.\n *\n * Label keys must exist to be added to the contact.\n * Contact labels can be created or retrieved with\n * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)\n * or\n * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels)\n * @maxSize 100\n */\n labelKeysToAdd?: string[];\n /**\n * List of label keys to remove from the contacts.\n * @maxSize 100\n */\n labelKeysToRemove?: string[];\n}\n\n/**\n * Retrieves a contact.\n *\n * #### Getting Merged Contacts\n *\n * When a source contact is merged\n * with a target contact, the source contact is deleted.\n * When calling Get Contact for a merged contact,\n * you can use the source or target contact ID.\n * In both bases, the target contact is returned.\n *\n * This is supported only when calling Get Contact on merged contacts.\n * Previously deleted source contact IDs can't be used for any other method.\n * @param _id - ID of the contact to retrieve.\n * @public\n * @requiredField _id\n * @param options - Get contact options.\n * @permissionId CONTACTS.VIEW\n * @applicableIdentity APP\n * @returns The requested contact.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.GetContact\n */\nexport async function getContact(\n _id: string,\n options?: GetContactOptions\n): Promise<\n NonNullablePaths<\n Contact,\n | `_id`\n | `revision`\n | `source.sourceType`\n | `lastActivity.activityType`\n | `info.emails.items`\n | `info.emails.items.${number}.tag`\n | `info.emails.items.${number}.email`\n | `info.phones.items`\n | `info.phones.items.${number}.tag`\n | `info.phones.items.${number}.phone`\n | `info.addresses.items`\n | `info.addresses.items.${number}.tag`\n | `info.addresses.items.${number}.address.streetAddress.number`\n | `info.addresses.items.${number}.address.streetAddress.name`\n | `info.labelKeys.items`\n | `primaryEmail.subscriptionStatus`\n | `primaryEmail.deliverabilityStatus`\n | `primaryPhone.subscriptionStatus`,\n 8\n > & {\n __applicationErrorsType?: GetContactApplicationErrors;\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 id: _id,\n fields: options?.fields,\n fieldsets: options?.fieldsets,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )?.contact!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n fields: '$[1].fields',\n fieldsets: '$[1].fieldsets',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetContactOptions {\n /**\n * List of projected fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n * `id` and `revision` are always returned.\n *\n * Supported properties:\n * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n * `info.labelKeys`, `info.locations`, `info.extendedFields`\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /**\n * Predefined sets of fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n *\n * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.\n * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.\n * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.\n * - `FULL`: Returns all fields.\n *\n * Default: If `fields` is omitted from the request, `FULL`.\n * @maxSize 10\n */\n fieldsets?: ContactFieldSetWithLiterals[];\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 resolveComWixpressContactsCoreApiV4ContactsServiceV4Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n {\n srcPath: '/_api/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n {\n srcPath: '/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n {\n srcPath: '/_api/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n ],\n 'manage.nownia.com': [\n {\n srcPath: '/_api/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n {\n srcPath: '/_api/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n ],\n _: [\n {\n srcPath: '/_api/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n {\n srcPath: '/_api/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n {\n srcPath: '/_api/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_crm_contacts';\n\n/**\n * Creates a new contact.\n *\n * The `info` object must include at least one of the following:\n * - Name\n * - Phone number\n * - Email address\n *\n * By default, if the call contains an email already in use by another contact,\n * the new contact won't be created. To override this behavior, set `allowDuplicates` to `true`.\n */\nexport function createContact(payload: object): RequestOptionsFactory<any> {\n function __createContact({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'info.addresses.items.address.geocode.latitude' },\n { path: 'info.addresses.items.address.geocode.longitude' },\n ],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'info.picture.image.urlExpirationDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.CreateContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createContact;\n}\n\n/**\n * Updates a contact.\n *\n * Each time the contact is updated,\n * `revision` increments by 1.\n * The existing `revision` must be included when updating the contact.\n * This ensures you're working with the latest contact information,\n * and it prevents unintended overwrites.\n *\n * You can't call Update Contact to update the `primaryEmail` of a contact who is also a member.\n * Instead, use the Members API to update the member's login email, which will also update the contact's primary email.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers. Make sure to specify the contact ID when calling Update Contact.\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: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'info.addresses.items.address.geocode.latitude' },\n { path: 'info.addresses.items.address.geocode.longitude' },\n ],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'info.picture.image.urlExpirationDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.UpdateContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{contactId}',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateContact;\n}\n\n/**\n * Merges source contacts into a target contact.\n *\n * Merging contacts has the following effects on the target contact:\n *\n * - No target contact data is overwritten or deleted.\n * - Arrays (emails, phone numbers, addresses, and labels) from the source contacts are added to the target contact's arrays.\n * - If you merge more than one source contact, the 1st source contact specified is added first, then the 2nd, and so on.\n * - If there is duplicate information between the target contact and the source contact, the information isn't duplicated in the target contact's arrays.\n *\n * <blockquote class=\"important\">\n *\n * __Important:__\n * Merges cannot be undone.\n * In REST, call Preview Merge Contacts to test before merging.\n *\n * </blockquote>\n *\n * When you merge contacts, source contacts are typically deleted.\n * However, if a source contact is a site member or a Wix user,\n * the merge will fail because site members and Wix users can't be deleted.\n * This means that site members and Wix users can only be specified as target contacts in a merge.\n *\n * After merging, calling Get Contact with a deleted source contact ID returns the target contact ID.\n * Specifying a deleted source contact ID is not supported on any other method.\n *\n * When contacts are merged:\n *\n * - The Contact Merged event is triggered.\n * - The Contact Updated event is triggered for the target contact. `originatedFrom` is set to `merge`.\n * - The Contact Deleted event is triggered for each source contact. `originatedFrom` is set to `merge`.\n */\nexport function mergeContacts(payload: object): RequestOptionsFactory<any> {\n function __mergeContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.MergeContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{targetContactId}/merge',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __mergeContacts;\n}\n\n/**\n * Previews merging source contacts into a target contact.\n *\n * This method performs a dry run without deleting or updating any contacts.\n * A preview of the updated target contact is returned,\n * but no data is changed in the contact list.\n *\n * To perform the actual merge, use Merge Contacts.\n */\nexport function previewMergeContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __previewMergeContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.PreviewMergeContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{targetContactId}/preview-merge',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __previewMergeContacts;\n}\n\n/**\n * Deletes a contact.\n *\n * Deleting a contact permanently removes it from the contact list.\n * If a contact is also a site member or Wix user, or has a valid billing subscription,\n * the contact can't be deleted. The related site member or Wix user must first be deleted\n * and any valid billing subscriptions must be canceled, before the contact can be deleted.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Delete Contact.\n */\nexport function deleteContact(payload: object): RequestOptionsFactory<any> {\n function __deleteContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.DeleteContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/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 * Adds labels to a contact.\n *\n * Use the Labels API to create or retrieve labels.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Label Contact.\n */\nexport function labelContact(payload: object): RequestOptionsFactory<any> {\n function __labelContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.LabelContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{contactId}/labels',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __labelContact;\n}\n\n/**\n * Removes labels from a contact.\n *\n * If a label is no longer needed\n * and you want to remove it from all contacts,\n * you can delete by calling Delete Label from the Labels API.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Unlabel Contact.\n */\nexport function unlabelContact(payload: object): RequestOptionsFactory<any> {\n function __unlabelContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.UnlabelContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{contactId}/labels',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __unlabelContact;\n}\n\n/** Retrieves a list of up to 1,000 contacts per request. */\nexport function listContacts(payload: object): RequestOptionsFactory<any> {\n function __listContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.ListContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts',\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.lastActivity.activityDate' },\n { path: 'contacts.lastActivity.date' },\n { path: 'contacts.picture.urlExpirationDate' },\n { path: 'contacts.info.picture.image.urlExpirationDate' },\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 {\n path: 'contacts.info.addresses.items.address.geocode.latitude',\n },\n {\n path: 'contacts.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listContacts;\n}\n\n/**\n * Creates a query to retrieve a list of contacts.\n *\n * The `queryContacts()` function builds a query to retrieve a list of contacts and returns a `ContactsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `ContactsQueryBuilder` functions onto the query. `ContactsQueryBuilder` functions enable you to sort, filter, and control the results `queryContacts()` returns.\n *\n * `queryContacts()` runs with these `ContactsQueryBuilder` defaults, which you can override:\n *\n * - `skip(0)`\n * - `limit(50)`\n * - `descending(\"_createdDate\")`\n *\n * The functions that are chained to `queryContacts()` are applied in the order they are called. For example, if you apply `ascending('info.company')` and then `descending('info.name.last')`, the results are sorted first by the company name, and then, if there are multiple results with the same company, the items are sorted by last name.\n */\nexport function queryContacts(payload: object): RequestOptionsFactory<any> {\n function __queryContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/query',\n data: payload,\n host,\n }),\n data: 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.lastActivity.activityDate' },\n { path: 'contacts.lastActivity.date' },\n { path: 'contacts.picture.urlExpirationDate' },\n { path: 'contacts.info.picture.image.urlExpirationDate' },\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 {\n path: 'contacts.info.addresses.items.address.geocode.latitude',\n },\n {\n path: 'contacts.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryContacts;\n}\n\n/**\n * Lists facets from the site’s contact list.\n * Facets include labels and subscription statuses.\n */\nexport function listFacets(payload: object): RequestOptionsFactory<any> {\n function __listFacets({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.ListFacets',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/facets',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listFacets;\n}\n\n/**\n * Retrieves facets from the site’s contact list by filter.\n * Facets include labels and subscription statuses.\n */\nexport function queryFacets(payload: object): RequestOptionsFactory<any> {\n function __queryFacets({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryFacets',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/facets/query',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __queryFacets;\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, call Query Contacts with the intended filter options.\n *\n * When this method is called, a bulk job is started and the job ID is returned.\n * The job might not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\n *\n * The following errors might occur during the bulk processing and will appear in the bulk job:\n * - `CANNOT_DELETE_SITE_MEMBERS` - Contact is a site member and can't be deleted. Member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION` - Contact has a valid billing subscription and can't be deleted.\n * - `CANNOT_DELETE_MEMBER_OWNER_OR_CONTRIBUTOR` - Member is a Wix user and can't be deleted. This can happen only if the request indicated to delete the member.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION` - Member was deleted, but contact was not. This can happen only if the request indicated to delete the member.\n * - `FAILED_DELETE_CONTACT` - Contact could not be deleted.\n */\nexport function bulkDeleteContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkDeleteContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/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 * Updates the specified properties for multiple contacts.\n * Fields that are included in fieldMask.paths are updated,\n * while all other fields stay the same.\n *\n * All contacts that meet the specified `filter` and `search` criteria are updated.\n * To perform a dry run, call Query Contacts with the intended filter options.\n *\n * When this method is used, a bulk job is started and the job ID is returned.\n * The job may not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\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: 'fieldMask' }],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'info.addresses.items.address.geocode.latitude' },\n { path: 'info.addresses.items.address.geocode.longitude' },\n ],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'info.picture.image.urlExpirationDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkUpdateContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/bulk/contacts/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __bulkUpdateContacts;\n}\n\n/**\n * Adds and removes labels from multiple contacts.\n *\n * Labels are added to and removed from all contacts that meet the specified\n * `filter` and `search` criteria.\n * The request should specify a `filter` value, a `search` value, or both.\n * To perform a dry run, call Query Contacts with the intended filter options.\n *\n * When this method is used, a bulk job is started and the job ID is returned.\n * The job might not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\n */\nexport function bulkLabelAndUnlabelContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkLabelAndUnlabelContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkLabelAndUnlabelContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/bulk/contacts/add-remove-labels',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkLabelAndUnlabelContacts;\n}\n\n/**\n * Retrieves a contact.\n *\n * #### Getting Merged Contacts\n *\n * When a source contact is merged\n * with a target contact, the source contact is deleted.\n * When calling Get Contact for a merged contact,\n * you can use the source or target contact ID.\n * In both bases, the target contact is returned.\n *\n * This is supported only when calling Get Contact on merged contacts.\n * Previously deleted source contact IDs can't be used for any other method.\n */\nexport function getContact(payload: object): RequestOptionsFactory<any> {\n function __getContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.GetContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{id}',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getContact;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,wDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,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A,UACR,gBAAgB;AAAA,UAChB,mBAAmB;AAAA,QACrB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AA8DA,eAAsBC,YACpB,KACA,SA0BA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD,IAAI;AAAA,IACJ,QAAQ,SAAS;AAAA,IACjB,WAAW,SAAS;AAAA,EACtB,CAAC;AAED,QAAM,UAAyC,WAAW,OAAO;AAEjE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO;AAAA,MACLrC,gBAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO;AAAA,YACL,EAAE,MAAM,kBAAkB;AAAA,YAC1B,EAAE,MAAM,6BAA6B;AAAA,YACrC,EAAE,MAAM,uCAAuC;AAAA,UACjD;AAAA,QACF;AAAA,QACA;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,uCAAuC,CAAC;AAAA,QAC1D;AAAA,MACF,CAAC;AAAA,IACH,GAAG;AAAA,EACL,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,IAAI;AAAA,UACJ,QAAQ;AAAA,UACR,WAAW;AAAA,QACb;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO,SAAS;AAAA,IACnB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","transformPaths","ContactSourceType","ContactActivityType","EmailTag","PhoneTag","AddressTag","SubdivisionType","ImageProvider","SubscriptionStatus","EmailDeliverabilityStatus","PhoneDeliverabilityStatus","MemberStatus","PrivacyStatus","Role","SortOrder","ContactFieldSet","ContactsFacetType","Action","UpsertContactResponseAction","GetContactResponseType","SubmitOperation","Mode","WebhookIdentityType","createContact","updateContact","mergeContacts","previewMergeContacts","deleteContact","labelContact","unlabelContact","listContacts","queryContacts","listFacets","queryFacets","bulkDeleteContacts","bulkUpdateContacts","bulkLabelAndUnlabelContacts","getContact"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/contacts-v4-contact-contacts.universal.ts","../../../src/contacts-v4-contact-contacts.http.ts"],"sourcesContent":["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 NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixContactsV4Contact from './contacts-v4-contact-contacts.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';\n\nexport interface Contact {\n /**\n * Contact ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the contact is updated.\n * To prevent conflicting changes,\n * the existing `revision` must be specified when updating a contact.\n * @readonly\n */\n revision?: number;\n /**\n * Details about the contact's source.\n * @readonly\n */\n source?: ContactSource;\n /**\n * Date and time the contact was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the contact was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Details about the contact's last action in the site.\n * @readonly\n */\n lastActivity?: ContactActivity;\n /**\n * Contact's primary phone and email.\n * @readonly\n */\n primaryInfo?: PrimaryContactInfo;\n /** Contact's details. */\n info?: ContactInfo;\n /**\n * Contact's primary email details.\n * @readonly\n */\n primaryEmail?: PrimaryEmail;\n /**\n * Contact's primary phone details.\n * @readonly\n */\n primaryPhone?: PrimaryPhone;\n}\n\nexport interface ContactSource {\n /**\n * Source type.\n * @readonly\n */\n sourceType?: ContactSourceTypeWithLiterals;\n /**\n * App ID, if the contact was created by an app.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n}\n\nexport enum ContactSourceType {\n OTHER = 'OTHER',\n ADMIN = 'ADMIN',\n WIX_APP = 'WIX_APP',\n IMPORT = 'IMPORT',\n THIRD_PARTY = 'THIRD_PARTY',\n WIX_BOOKINGS = 'WIX_BOOKINGS',\n WIX_CHAT = 'WIX_CHAT',\n WIX_EMAIL_MARKETING = 'WIX_EMAIL_MARKETING',\n WIX_EVENTS = 'WIX_EVENTS',\n WIX_FORMS = 'WIX_FORMS',\n WIX_GROUPS = 'WIX_GROUPS',\n WIX_HOTELS = 'WIX_HOTELS',\n WIX_MARKET_PLACE = 'WIX_MARKET_PLACE',\n WIX_MUSIC = 'WIX_MUSIC',\n WIX_RESTAURANTS = 'WIX_RESTAURANTS',\n WIX_SITE_MEMBERS = 'WIX_SITE_MEMBERS',\n WIX_STORES = 'WIX_STORES',\n WIX_CODE = 'WIX_CODE',\n HOPP = 'HOPP',\n}\n\n/** @enumType */\nexport type ContactSourceTypeWithLiterals =\n | ContactSourceType\n | 'OTHER'\n | 'ADMIN'\n | 'WIX_APP'\n | 'IMPORT'\n | 'THIRD_PARTY'\n | 'WIX_BOOKINGS'\n | 'WIX_CHAT'\n | 'WIX_EMAIL_MARKETING'\n | 'WIX_EVENTS'\n | 'WIX_FORMS'\n | 'WIX_GROUPS'\n | 'WIX_HOTELS'\n | 'WIX_MARKET_PLACE'\n | 'WIX_MUSIC'\n | 'WIX_RESTAURANTS'\n | 'WIX_SITE_MEMBERS'\n | 'WIX_STORES'\n | 'WIX_CODE'\n | 'HOPP';\n\nexport interface ContactActivity {\n /** Date and time of the last action. */\n activityDate?: Date | null;\n /** Contact's last action in the site. */\n activityType?: ContactActivityTypeWithLiterals;\n}\n\nexport enum ContactActivityType {\n /** Visited the site. */\n GENERAL = 'GENERAL',\n /** Became a new contact. */\n CONTACT_CREATED = 'CONTACT_CREATED',\n /** Logged in. */\n MEMBER_LOGIN = 'MEMBER_LOGIN',\n /** Requested a site membership. */\n MEMBER_REGISTER = 'MEMBER_REGISTER',\n /** Was approved, blocked, or unblocked. */\n MEMBER_STATUS_CHANGED = 'MEMBER_STATUS_CHANGED',\n /** Submitted a form. */\n FORM_SUBMITTED = 'FORM_SUBMITTED',\n /** Started a chat. */\n INBOX_FORM_SUBMITTED = 'INBOX_FORM_SUBMITTED',\n /** Paid a payment request. */\n INBOX_PAYMENT_REQUEST_PAID = 'INBOX_PAYMENT_REQUEST_PAID',\n /** Received a message from the site. */\n INBOX_MESSAGE_TO_CUSTOMER = 'INBOX_MESSAGE_TO_CUSTOMER',\n /** Sent a new message to the site. */\n INBOX_MESSAGE_FROM_CUSTOMER = 'INBOX_MESSAGE_FROM_CUSTOMER',\n /** Subscribed to a site newsletter through a form. */\n NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED = 'NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED',\n /** Unsubscribed from a site newsletter. */\n NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE = 'NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE',\n /** Made a purchase. */\n ECOM_PURCHASE = 'ECOM_PURCHASE',\n /** Abandoned a shopping cart. */\n ECOM_CART_ABANDON = 'ECOM_CART_ABANDON',\n /** Checked out shopping cart and submitted buyer info (but didn’t complete the purchase yet). */\n ECOM_CHECKOUT_BUYER = 'ECOM_CHECKOUT_BUYER',\n /** Booked an appointment. */\n BOOKINGS_APPOINTMENT = 'BOOKINGS_APPOINTMENT',\n /** Made a Wix Hotels reservation. */\n HOTELS_RESERVATION = 'HOTELS_RESERVATION',\n /** Paid for a Wix Hotels reservation. */\n HOTELS_PURCHASE = 'HOTELS_PURCHASE',\n /** Confirmed a Wix Hotels reservation. */\n HOTELS_CONFIRMATION = 'HOTELS_CONFIRMATION',\n /** Canceled a Wix Hotels reservation. */\n HOTELS_CANCEL = 'HOTELS_CANCEL',\n /** Purchased a video. */\n VIDEO_PURCHASE = 'VIDEO_PURCHASE',\n /** Rented a video. */\n VIDEO_RENT = 'VIDEO_RENT',\n /** Made a purchase with a pay button. */\n CASHIER_BUTTON_PURCHASE = 'CASHIER_BUTTON_PURCHASE',\n /** Became a new Wix Marketplace lead. */\n ARENA_NEW_LEAD = 'ARENA_NEW_LEAD',\n /** RSVP'd to an event. */\n EVENTS_RSVP = 'EVENTS_RSVP',\n /** Paid an invoice. */\n INVOICE_PAY = 'INVOICE_PAY',\n /** An invoice is now overdue. */\n INVOICE_OVERDUE = 'INVOICE_OVERDUE',\n /** Accepted a price quote. */\n PRICE_QUOTE_ACCEPT = 'PRICE_QUOTE_ACCEPT',\n /** A price quote has expired. */\n PRICE_QUOTE_EXPIRE = 'PRICE_QUOTE_EXPIRE',\n /** Ordered food with Wix Restaurants. */\n RESTAURANTS_ORDER = 'RESTAURANTS_ORDER',\n /** Made a Wix Restaurants reservation. */\n RESTAURANTS_RESERVATION = 'RESTAURANTS_RESERVATION',\n /** Opened an email from the site. */\n SHOUTOUT_OPEN = 'SHOUTOUT_OPEN',\n /** Clicked a link in an email from the site. */\n SHOUTOUT_CLICK = 'SHOUTOUT_CLICK',\n /** Merged with another contact. */\n CONTACT_MERGED = 'CONTACT_MERGED',\n /** Subscribed to a site newsletter. */\n NEWSLETTER_SUBSCRIPTION_SUBSCRIBE = 'NEWSLETTER_SUBSCRIPTION_SUBSCRIBE',\n /** Subscription status to site newsletters is pending confirmation. */\n NEWSLETTER_SUBSCRIPTION_PENDING = 'NEWSLETTER_SUBSCRIPTION_PENDING',\n /** Subscription status to site newsletters is not set. */\n NEWSLETTER_SUBSCRIPTION_NOT_SET = 'NEWSLETTER_SUBSCRIPTION_NOT_SET',\n /** Subscribed to phone notifications. */\n PHONE_SUBSCRIPTION_SUBSCRIBE = 'PHONE_SUBSCRIPTION_SUBSCRIBE',\n /** Subscription to phone notificatons is pending confirmation. */\n PHONE_SUBSCRIPTION_PENDING = 'PHONE_SUBSCRIPTION_PENDING',\n /** Subscription to phone notificatons is not set. */\n PHONE_SUBSCRIPTION_NOT_SET = 'PHONE_SUBSCRIPTION_NOT_SET',\n /** Subscribed to phone notifications. */\n PHONE_SUBSCRIPTION_UNSUBSCRIBE = 'PHONE_SUBSCRIPTION_UNSUBSCRIBE',\n}\n\n/** @enumType */\nexport type ContactActivityTypeWithLiterals =\n | ContactActivityType\n | 'GENERAL'\n | 'CONTACT_CREATED'\n | 'MEMBER_LOGIN'\n | 'MEMBER_REGISTER'\n | 'MEMBER_STATUS_CHANGED'\n | 'FORM_SUBMITTED'\n | 'INBOX_FORM_SUBMITTED'\n | 'INBOX_PAYMENT_REQUEST_PAID'\n | 'INBOX_MESSAGE_TO_CUSTOMER'\n | 'INBOX_MESSAGE_FROM_CUSTOMER'\n | 'NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED'\n | 'NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE'\n | 'ECOM_PURCHASE'\n | 'ECOM_CART_ABANDON'\n | 'ECOM_CHECKOUT_BUYER'\n | 'BOOKINGS_APPOINTMENT'\n | 'HOTELS_RESERVATION'\n | 'HOTELS_PURCHASE'\n | 'HOTELS_CONFIRMATION'\n | 'HOTELS_CANCEL'\n | 'VIDEO_PURCHASE'\n | 'VIDEO_RENT'\n | 'CASHIER_BUTTON_PURCHASE'\n | 'ARENA_NEW_LEAD'\n | 'EVENTS_RSVP'\n | 'INVOICE_PAY'\n | 'INVOICE_OVERDUE'\n | 'PRICE_QUOTE_ACCEPT'\n | 'PRICE_QUOTE_EXPIRE'\n | 'RESTAURANTS_ORDER'\n | 'RESTAURANTS_RESERVATION'\n | 'SHOUTOUT_OPEN'\n | 'SHOUTOUT_CLICK'\n | 'CONTACT_MERGED'\n | 'NEWSLETTER_SUBSCRIPTION_SUBSCRIBE'\n | 'NEWSLETTER_SUBSCRIPTION_PENDING'\n | 'NEWSLETTER_SUBSCRIPTION_NOT_SET'\n | 'PHONE_SUBSCRIPTION_SUBSCRIBE'\n | 'PHONE_SUBSCRIPTION_PENDING'\n | 'PHONE_SUBSCRIPTION_NOT_SET'\n | 'PHONE_SUBSCRIPTION_UNSUBSCRIBE';\n\nexport interface ActivityIcon {\n /**\n * Icon name\n * @maxLength 50\n */\n name?: string | null;\n /**\n * Icon url\n * @format WEB_URL\n */\n url?: string | null;\n}\n\nexport interface PrimaryContactInfo {\n /**\n * Primary email address.\n *\n * This property reflects the email address in `info.emails`\n * where `primary` is `true`.\n * @format EMAIL\n * @readonly\n */\n email?: string | null;\n /**\n * Primary phone number.\n *\n * This property reflects the phone number in `info.phones`\n * where `primary` is `true`.\n * @readonly\n */\n phone?: string | null;\n}\n\nexport interface ContactInfo {\n /** Contact's first and last name. */\n name?: ContactName;\n /** Contact's email addresses. */\n emails?: ContactEmailsWrapper;\n /** Contact's phone numbers. */\n phones?: ContactPhonesWrapper;\n /** Contact's street addresses. */\n addresses?: ContactAddressesWrapper;\n /**\n * Contact's company name.\n * @maxLength 1000\n */\n company?: string | null;\n /**\n * Contact's job title.\n * @maxLength 1000\n */\n jobTitle?: 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 * 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 * List of contact's labels.\n *\n * Labels are used to organize contacts. Labels can be\n * added and removed using Label Contact and Unlabel Contact, respectively.\n *\n * To view or manage contact labels, use the Labels API.\n */\n labelKeys?: LabelsWrapper;\n /**\n * Additional custom fields.\n *\n * Empty fields are not returned.\n */\n extendedFields?: ExtendedFieldsWrapper;\n /** Contact's profile picture. */\n picture?: ContactPicture;\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 ContactEmailsWrapper {\n /**\n * List of up to 50 email addresses.\n * @maxSize 50\n */\n items?: ContactEmail[];\n}\n\nexport interface ContactEmail {\n /**\n * Email ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Email type.\n *\n * `UNTAGGED` is shown as \"Other\" in the Contact List.\n */\n tag?: EmailTagWithLiterals;\n /**\n * Email address.\n * @minLength 1\n * @maxLength 320\n */\n email?: string;\n /**\n * Indicates whether this is the contact's primary email address.\n * When changing `primary` to `true` for an email,\n * the contact's other emails become `false`.\n * Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email.\n */\n primary?: boolean | null;\n}\n\nexport enum EmailTag {\n UNTAGGED = 'UNTAGGED',\n MAIN = 'MAIN',\n HOME = 'HOME',\n WORK = 'WORK',\n}\n\n/** @enumType */\nexport type EmailTagWithLiterals =\n | EmailTag\n | 'UNTAGGED'\n | 'MAIN'\n | 'HOME'\n | 'WORK';\n\nexport interface ContactPhonesWrapper {\n /**\n * List of up to 50 phone numbers.\n * @maxSize 50\n */\n items?: ContactPhone[];\n}\n\nexport interface ContactPhone {\n /**\n * Phone ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Phone type.\n *\n * `UNTAGGED` is shown as \"Other\" in the Contact List.\n */\n tag?: PhoneTagWithLiterals;\n /**\n * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Phone number.\n * @minLength 1\n * @maxLength 50\n */\n phone?: string;\n /**\n * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\n * phone number.\n * Automatically generated using `phone` and `countryCode`, pending both values are valid.\n * @readonly\n */\n e164Phone?: string | null;\n /**\n * Indicates whether this is the contact's primary phone number.\n * When changing `primary` to `true` for a phone,\n * the contact's `primary` field for other phones becomes `false`.\n * Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone.\n */\n primary?: boolean | null;\n}\n\nexport enum PhoneTag {\n UNTAGGED = 'UNTAGGED',\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 | 'UNTAGGED'\n | 'MAIN'\n | 'HOME'\n | 'MOBILE'\n | 'WORK'\n | 'FAX';\n\nexport interface ContactAddressesWrapper {\n /**\n * List of up to 50 addresses.\n * @maxSize 50\n */\n items?: ContactAddress[];\n}\n\nexport interface ContactAddress {\n /**\n * Street address ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Address type.\n * `UNTAGGED` is shown as \"Other\" in the Contact List.\n */\n tag?: AddressTagWithLiterals;\n /** Street address. */\n address?: Address;\n}\n\nexport enum AddressTag {\n UNTAGGED = 'UNTAGGED',\n HOME = 'HOME',\n WORK = 'WORK',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type AddressTagWithLiterals =\n | AddressTag\n | 'UNTAGGED'\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 * Code for a subdivision (such as state, prefecture, or province) in an\n * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.\n * @maxLength 100\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 1000\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\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 1000\n */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address's latitude. */\n latitude?: number | null;\n /** Address's longitude. */\n longitude?: number | null;\n}\n\nexport interface Subdivision {\n /** subdivision short code */\n code?: string;\n /** Full subdivision name. */\n name?: string;\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\nexport interface AssigneesWrapper {\n /**\n * List of site contributor user IDs.\n * @format GUID\n * @maxSize 50\n */\n items?: string[];\n}\n\nexport interface LabelsWrapper {\n /**\n * List of contact label keys.\n *\n * Contact labels help categorize contacts. Label keys must exist to be added to the contact.\n * Contact labels can be created or retrieved with Find or Create Label or List Labels.\n * @maxSize 2000\n */\n items?: string[];\n}\n\nexport interface ExtendedFieldsWrapper {\n /**\n * Contact's extended fields,\n * where each key is the field key,\n * and each value is the field's value for the contact.\n *\n * To view and manage extended fields, use the Extended Fields API.\n */\n items?: Record<string, any>;\n}\n\nexport interface LocationsWrapper {\n /**\n * List of location ids.\n * @format GUID\n * @maxSize 50\n */\n items?: string[];\n}\n\n/** TEST contact picture description */\nexport interface ContactPicture {\n /**\n * Image.\n * This can contain an image URL or a Wix Media image ID.\n */\n image?: string;\n}\n\nexport enum ImageProvider {\n UNKNOWN = 'UNKNOWN',\n /** Image stored outside Wix */\n EXTERNAL = 'EXTERNAL',\n /** Stored in wix media platform, Must be uploaded by using `GeneratePictureUploadUrl` */\n WIX_MEDIA = 'WIX_MEDIA',\n}\n\n/** @enumType */\nexport type ImageProviderWithLiterals =\n | ImageProvider\n | 'UNKNOWN'\n | 'EXTERNAL'\n | 'WIX_MEDIA';\n\nexport interface SegmentsWrapper {\n /**\n * List of Contact segment IDs\n * @maxSize 60\n * @format GUID\n */\n items?: string[];\n}\n\nexport interface PrimaryEmail {\n /**\n * Primary email address.\n *\n * This field reflects the email address in `info.emails`\n * where `primary` is `true`.\n * @format EMAIL\n * @readonly\n */\n email?: string | null;\n /**\n * Indicates the recipient's opt-in or opt-out status for marketing emails.\n *\n * Default: `NOT_SET`\n * @readonly\n */\n subscriptionStatus?: SubscriptionStatusWithLiterals;\n /**\n * Indicates last reported status of sent emails.\n *\n * Default: `NOT_SET`\n * @readonly\n */\n deliverabilityStatus?: EmailDeliverabilityStatusWithLiterals;\n}\n\nexport enum SubscriptionStatus {\n /** No status exists. */\n NO_SUBSCRIPTION_STATUS = 'NO_SUBSCRIPTION_STATUS',\n /** No status specified. */\n NOT_SET = 'NOT_SET',\n /** Subscription confirmation was requested, but recipient hasn't confirmed yet. */\n PENDING = 'PENDING',\n /** Recipient has opted in to marketing emails or SMS messages. */\n SUBSCRIBED = 'SUBSCRIBED',\n /** Recipient has opted out of marketing emails or SMS messages. */\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 /** No status reported. */\n NOT_SET = 'NOT_SET',\n /** Emails are being successfully delivered. */\n VALID = 'VALID',\n /** The last email to the recipient bounced or was rejected. */\n BOUNCED = 'BOUNCED',\n /** Recipient registered a spam complaint with their email provider. */\n SPAM_COMPLAINT = 'SPAM_COMPLAINT',\n /** Multiple emails have been delivered without any kind of engagement from the recipient. */\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 PrimaryPhone {\n /**\n * Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\n * Automatically generated using `phone` and `countryCode` when both values are valid.\n * @readonly\n */\n e164Phone?: string | null;\n /**\n * Formatted phone. Automatically generated using `phone` and `countryCode`.\n * @readonly\n */\n formattedPhone?: string | null;\n /**\n * Indicates the recipient's opt-in or opt-out status for SMS messages.\n *\n * Default:\n * - `NOT_SET` when the phone is a valid E164 phone.\n * - `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone.\n * @readonly\n */\n subscriptionStatus?: SubscriptionStatusWithLiterals;\n /**\n * Primary phone number.\n *\n * This field reflects the phone number in `info.phones`\n * where `primary` is `true`.\n * @readonly\n */\n phone?: string | null;\n}\n\nexport enum PhoneDeliverabilityStatus {\n /** No status exists. */\n NO_PHONE_DELIVERABILITY_STATUS = 'NO_PHONE_DELIVERABILITY_STATUS',\n /** No status reported. */\n NOT_SET = 'NOT_SET',\n}\n\n/** @enumType */\nexport type PhoneDeliverabilityStatusWithLiterals =\n | PhoneDeliverabilityStatus\n | 'NO_PHONE_DELIVERABILITY_STATUS'\n | 'NOT_SET';\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 * - `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 * - `BLOCKED': Member is blocked 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 DELETED = 'DELETED',\n BLOCKED = 'BLOCKED',\n OFFLINE = 'OFFLINE',\n}\n\n/** @enumType */\nexport type MemberStatusWithLiterals =\n | MemberStatus\n | 'PENDING'\n | 'ACTIVE'\n | 'DELETED'\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 UNSPECIFIED_ROLE = 'UNSPECIFIED_ROLE',\n OWNER = 'OWNER',\n CONTRIBUTOR = 'CONTRIBUTOR',\n}\n\n/** @enumType */\nexport type RoleWithLiterals =\n | Role\n | 'UNSPECIFIED_ROLE'\n | 'OWNER'\n | 'CONTRIBUTOR';\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 ContactSubmitted {\n /** Pass through data, submitted with the contact */\n passThroughData?: string | null;\n /** Submitted activity */\n activity?: ContactActivity;\n /** Submitted Contact (after processing) */\n contact?: Contact;\n}\n\nexport interface ContactChanged {\n /** The Contact before the changes */\n previousContact?: Contact;\n /** The Contact after the changes */\n currentContact?: Contact;\n}\n\nexport interface ContactEmailSubscriptionUpdated {\n /** The updated contact ID. */\n contactId?: string;\n /** The revision of the contact. */\n revision?: number;\n /** The primary email of the contact with the updated subscription and deliverability status. */\n primaryEmail?: PrimaryEmail;\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 /** The updated contact ID. */\n contactId?: string;\n /** The revision of the contact. */\n revision?: number;\n /** The primary phone of the contact with the updated subscription status. */\n primaryPhone?: PrimaryPhone;\n /** Date and time the contact was updated with the SMS subscription status. */\n _updatedDate?: Date | null;\n}\n\n/**\n * This message is an internal message used by this app and it is used to trigger\n * the update of the subscription status of the contact asynchronously.\n * It is published after a contact is created/updated/merged.\n */\nexport interface ContactPrimaryInfoUpdated {\n /** The updated contact ID. */\n contactId?: string;\n /** Indication whether the primary email was updated. */\n primaryEmailUpdated?: boolean;\n /** Indication whether primary phone was updated. */\n primaryPhoneUpdated?: boolean;\n /** previous primary email subscription status */\n previousPrimaryEmailSubscriptionStatus?: PrimarySubscriptionStatus;\n /** previous primary phone subscription status */\n previousPrimaryPhoneSubscriptionStatus?: PrimarySubscriptionStatus;\n}\n\nexport interface PrimarySubscriptionStatus {\n /** subscription status */\n subscriptionStatus?: SubscriptionStatusWithLiterals;\n}\n\n/**\n * This message is an internal message used by this app and it is used to trigger\n * the update of the contact's last activity is done asynchronously.\n */\nexport interface LastActivityUpdate {\n /**\n * The contact ID.\n * @format GUID\n */\n contactId?: string;\n /** Activity date. */\n activityDate?: Date | null;\n /**\n * Activity translation key.\n * @maxLength 100\n */\n activityTranslationKey?: string;\n /**\n * Activity icon.\n * @maxLength 100\n */\n icon?: string | null;\n}\n\n/** Contact creation options. */\nexport interface CreateContactRequest {\n /** Contact info. */\n info: ContactInfo;\n /**\n * Controls whether the call will succeed\n * if the new contact information contains an email or a phone number already used by another contact.\n *\n * If set to `true`,\n * the call will succeed even if an email address or phone number is used by another contact.\n * If set to `false`,\n * the call will fail if the given email address is used by another contact or,\n * if the email address is not given and the given phone number is used by another contact.\n *\n * Default: `false`\n */\n allowDuplicates?: boolean;\n}\n\n/** Contact. */\nexport interface CreateContactResponse {\n /** Contact. */\n contact?: Contact;\n}\n\nexport interface DuplicateContactExists {\n /** @format GUID */\n duplicateContactId?: string | null;\n /** @format EMAIL */\n duplicateEmail?: string | null;\n /** @format PHONE */\n duplicatePhone?: string | null;\n}\n\nexport interface UpdateContactRequest {\n /**\n * ID of the contact to update.\n * @format GUID\n */\n contactId: string;\n /**\n * Revision number.\n * When updating, include the existing `revision`\n * to prevent conflicting updates.\n */\n revision: number | null;\n /**\n * Controls whether the call will succeed\n * if the new contact information contains an email or a phone number already used by another contact.\n *\n * If set to `true`,\n * the call will succeed even if an email address or phone number is used by another contact.\n * If set to `false`,\n * the call will fail if the given email address is used by another contact or,\n * if the email address is not given and the given phone number is used by another contact.\n *\n * Default: `false`\n */\n allowDuplicates?: boolean;\n /** Contact info. */\n info: ContactInfo;\n}\n\n/** Updated contact. */\nexport interface UpdateContactResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface MergeContactsRequest {\n /**\n * Target contact ID.\n * @format GUID\n */\n targetContactId: string;\n /**\n * Target contact revision number, which increments by 1 each time the contact is updated.\n * To prevent conflicting changes,\n * the target contact's current `revision` must be specified.\n */\n targetContactRevision: number | null;\n /**\n * IDs of up to 5 contacts to merge into the target contact.\n * When you merge 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 */\n sourceContactIds?: string[];\n}\n\nexport interface MergeContactsResponse {\n /** Updated target contact. */\n contact?: Contact;\n}\n\nexport interface ContactMerged {\n /** ID of the contact the source contacts were merged into. */\n targetContactId?: string;\n /** IDs of contacts that were merged into the target contact. */\n sourceContactIds?: string[];\n /** Updated target contact. */\n targetContact?: Contact;\n}\n\nexport interface PreviewMergeContactsRequest {\n /**\n * Target contact ID.\n * @format GUID\n */\n targetContactId: string;\n /**\n * IDs of up to 5 contacts to merge into the target contact.\n * When you merge 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 */\n sourceContactIds?: string[];\n}\n\nexport interface PreviewMergeContactsResponse {\n /** Preview of the 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\nexport interface DeleteContactResponse {}\n\nexport interface LabelContactRequest {\n /**\n * ID of the contact to add labels to.\n * @format GUID\n */\n contactId: string;\n /**\n * List of label keys to add to the contact.\n *\n * Label keys must exist to be added to the contact.\n * Use the Labels API to create or retrieve labels.\n * @minSize 1\n * @maxSize 100\n */\n labelKeys: string[];\n}\n\n/** Updated contact. */\nexport interface LabelContactResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface UnlabelContactRequest {\n /**\n * ID of the contact to remove labels from.\n * @format GUID\n */\n contactId: string;\n /**\n * List of label keys to remove from the contact.\n * @minSize 1\n * @maxSize 100\n */\n labelKeys: string[];\n}\n\n/** Updated contact. */\nexport interface UnlabelContactResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface LabelAndUnlabelContactRequest {\n /**\n * Contact ID.\n * @format GUID\n */\n contactId?: string;\n /**\n * List of label keys to add to the contact.\n *\n * Label keys must exist to be added to the contact.\n * Contact labels can be created or retrieved with\n * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)\n * or\n * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).\n * @minSize 1\n * @maxSize 100\n */\n labelKeysToAdd?: string[];\n /**\n * List of label keys to remove from the contact.\n * @minSize 1\n * @maxSize 100\n */\n labelKeysToRemove?: string[];\n}\n\nexport interface LabelAndUnlabelContactResponse {\n /** Updated contact. */\n contact?: Contact;\n}\n\nexport interface ListContactsRequest {\n /** [Sort order](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter). */\n sort?: Sorting;\n /** [Pagination](https://dev.wix.com/api/rest/getting-started/pagination), defaults to offset = 0 and limit = 50 (max limit 1,000). */\n paging?: Paging;\n /**\n * List of projected fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n * `id` and `revision` are always returned.\n *\n * Supported properties:\n * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n * `info.labelKeys`, `info.locations`, `info.extendedFields`\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /** @maxSize 10 */\n fieldsets?: ContactFieldSetWithLiterals[];\n}\n\nexport interface Sorting {\n /**\n * Field to sort by.\n *\n * Supported properties:\n * `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,\n * `info.jobTitle`, `info.birthdate`\n * @maxLength 100\n */\n fieldName?: string;\n /**\n * Sort order.\n * Use `ASC` for ascending order or `DESC` for descending order.\n *\n * Defaults to `ASC`.\n */\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 Paging {\n /**\n * Number of items to return. Learn more about pagination in [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging).\n *\n * Default: `50`. <br>\n * Maximum: `1000`.\n * @max 1000\n */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport enum ContactFieldSet {\n /** name, primaryEmail, primaryPhone */\n BASIC = 'BASIC',\n /** name, phones, emails, addresses */\n COMMUNICATION_DETAILS = 'COMMUNICATION_DETAILS',\n /** name, primaryInfo(email, phone), extendedFields */\n EXTENDED = 'EXTENDED',\n /** Full contact object */\n FULL = 'FULL',\n}\n\n/** @enumType */\nexport type ContactFieldSetWithLiterals =\n | ContactFieldSet\n | 'BASIC'\n | 'COMMUNICATION_DETAILS'\n | 'EXTENDED'\n | 'FULL';\n\n/** List of contacts. */\nexport interface ListContactsResponse {\n /** List of contacts. */\n contacts?: Contact[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n /** The number of items returned in this response. */\n count?: number | null;\n /** The offset which was requested. */\n offset?: number | null;\n /** The total number of items that match the query. */\n total?: number | null;\n /** A flag that indicates the server failed to calculate 'total' field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface QueryContactsRequest {\n /**\n * @internal\n * @internal\n * @maxLength 100\n */\n search?: string | null;\n /** Query options. */\n query?: Query;\n}\n\nexport interface Query {\n /**\n * Filter object.\n * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)\n * for more information.\n *\n * For a detailed list of supported filters, see\n * [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sorting options.\n * See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)\n * for more information.\n *\n * Max: 1 sort object\n * @maxSize 1\n */\n sort?: Sorting[];\n /** Pagination options. */\n paging?: Paging;\n /**\n * List of projected fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n * `id` and `revision` are always returned.\n *\n * Supported properties:\n * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n * `info.labelKeys`, `info.locations`, `info.extendedFields`\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /**\n * Predefined sets of fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n *\n * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.\n * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.\n * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.\n * - `FULL`: Returns all fields.\n *\n * Default: If `fields` is omitted from the request, `FULL`.\n * @maxSize 10\n */\n fieldsets?: ContactFieldSetWithLiterals[];\n}\n\n/** List of contacts. */\nexport interface QueryContactsResponse {\n /** List of contacts. */\n contacts?: Contact[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface ListFacetsRequest {\n /** Pagination options. */\n paging?: Paging;\n /**\n * Language for localization.\n * @format LANGUAGE\n */\n language?: string | null;\n}\n\nexport interface ListFacetsResponse {\n /** List of facets. */\n facets?: ContactsFacet[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface ContactsFacet {\n /** Type of facet. */\n facetType?: ContactsFacetTypeWithLiterals;\n /**\n * Scope for facet keys.\n * When a facet key exists in a namespace,\n * each key is unique within that namespace.\n *\n * Currently, facets not created by Wix are in the `custom` namespace.\n */\n namespace?: string | null;\n /** Human-readable display name. */\n namespaceDisplayName?: string | null;\n /** Facet key, automatically generated. */\n facetKey?: string | null;\n /** Human-readable name. Shown in the Wix UI. */\n facetDisplayName?: string | null;\n /** Number of contacts the facet applies to. */\n count?: number | null;\n /** Filter used to query contacts of this facet. */\n queryFilter?: Record<string, any> | null;\n}\n\nexport enum ContactsFacetType {\n UNKNOWN = 'UNKNOWN',\n ALL_CONTACTS = 'ALL_CONTACTS',\n NOT_LABELED = 'NOT_LABELED',\n LABEL = 'LABEL',\n SUBSCRIPTION_STATUS = 'SUBSCRIPTION_STATUS',\n MEMBERSHIP_STATUS = 'MEMBERSHIP_STATUS',\n}\n\n/** @enumType */\nexport type ContactsFacetTypeWithLiterals =\n | ContactsFacetType\n | 'UNKNOWN'\n | 'ALL_CONTACTS'\n | 'NOT_LABELED'\n | 'LABEL'\n | 'SUBSCRIPTION_STATUS'\n | 'MEMBERSHIP_STATUS';\n\nexport interface QueryFacetsRequest {\n /** Pagination options. */\n paging?: Paging;\n /**\n * Language for localization.\n * @format LANGUAGE\n */\n language?: string | null;\n /**\n * Filterable fields:\n * - `'info.extendedFields.emailSubscriptions.effectiveEmail'` (`$exists`).\n * - `'info.extendedFields.emailSubscriptions.subscriptionStatus'` (`$eq`, `$ne`, `$in`, `$nin`).\n * - `'info.extendedFields.emailSubscriptions.deliverabilityStatus'` (`$eq`, `$ne`, `$in`, `$nin`).\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface QueryFacetsResponse {\n /** List of facets. */\n facets?: ContactsFacet[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface BulkDeleteContactsRequest {\n /**\n * Filter object.\n *\n * Possible filters:\n * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.\n *\n * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a detailed list of supported filters for contact properties, extended fields, and custom fields.\n *\n *\n * Example:\n * `{ \"filter\": { \"info.name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n *\n * Searchable fields:\n *\n * - `info.name.first`\n * - `info.name.last`\n * - `info.emails.email`\n * - `info.phones.phone`\n * @maxLength 100\n */\n search?: string | null;\n}\n\nexport interface BulkDeleteContactsResponse {\n /**\n * Bulk job ID.\n * The job's status can be retrieved with Get Bulk Job.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkUpdateContactsRequest {\n /**\n * Filter object.\n *\n * Possible filters:\n * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.\n *\n * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a detailed list of supported filters for contact properties, extended fields, and custom fields.\n *\n *\n * Example:\n * `{ \"filter\": { \"info.name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n *\n * Searchable fields:\n *\n * - `info.name.first`\n * - `info.name.last`\n * - `info.emails.email`\n * - `info.phones.phone`\n * @maxLength 100\n */\n search?: string | null;\n /** Contact info. */\n info?: ContactInfo;\n}\n\nexport interface BulkUpdateContactsResponse {\n /**\n * Bulk job ID.\n * The job's status can be retrieved with Get Bulk Job.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkLabelAndUnlabelContactsRequest {\n /**\n * Filter options.\n * Labels will be removed from contacts that meet the `filter` and `search` criteria.\n *\n * See\n * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a list of supported filters and fields.\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n * Labels will be removed from contacts that meet the `filter` and `search` criteria.\n *\n * See\n * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a list of searchable fields.\n * @maxLength 100\n */\n search?: string | null;\n /**\n * List of label keys to add to the contacts.\n *\n * Label keys must exist to be added to the contact.\n * Contact labels can be created or retrieved with\n * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)\n * or\n * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels)\n * @maxSize 100\n */\n labelKeysToAdd?: string[];\n /**\n * List of label keys to remove from the contacts.\n * @maxSize 100\n */\n labelKeysToRemove?: string[];\n}\n\nexport interface BulkLabelAndUnlabelContactsResponse {\n /**\n * Bulk job ID.\n * The job's status can be retrieved with Get Bulk Job.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkUpsertContactsRequest {\n /**\n * @minSize 1\n * @maxSize 100\n */\n info?: ContactInfo[];\n returnFullEntity?: boolean;\n}\n\nexport interface BulkUpsertContactsResponse {\n results?: Item[];\n metadata?: BulkUpsertContactsResponseMetadata;\n}\n\nexport enum Action {\n UNKNOWN = 'UNKNOWN',\n UPDATED = 'UPDATED',\n CREATED = 'CREATED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals = Action | 'UNKNOWN' | 'UPDATED' | 'CREATED';\n\nexport interface Error {\n /** Error code. */\n code?: string;\n /** Error details. */\n message?: string | null;\n}\n\nexport interface Metadata {\n _id?: string | null;\n originalIndex?: number;\n action?: ActionWithLiterals;\n success?: boolean;\n error?: Error;\n}\n\nexport interface Item {\n contact?: Contact;\n metadata?: Metadata;\n}\n\nexport interface BulkUpsertContactsResponseMetadata {\n totalSuccess?: number;\n totalFailure?: number;\n totalCreated?: number;\n totalUpdated?: number;\n}\n\nexport interface UpsertContactRequest {\n info?: ContactInfo;\n}\n\nexport interface UpsertContactResponse {\n /** Upserted contact. */\n contact?: Contact;\n action?: UpsertContactResponseActionWithLiterals;\n}\n\nexport enum UpsertContactResponseAction {\n UNKNOWN = 'UNKNOWN',\n UPDATED = 'UPDATED',\n CREATED = 'CREATED',\n}\n\n/** @enumType */\nexport type UpsertContactResponseActionWithLiterals =\n | UpsertContactResponseAction\n | 'UNKNOWN'\n | 'UPDATED'\n | 'CREATED';\n\nexport interface GeneratePictureUploadUrlRequest {\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:\n * `image/png`, `image/jpeg`.\n * Defaults to `image/png`.\n */\n mimeType?: string | null;\n}\n\nexport interface GeneratePictureUploadUrlResponse {\n /**\n * URL to upload the image\n * @format WEB_URL\n */\n uploadUrl?: string;\n}\n\nexport interface GetContactRequest {\n /**\n * ID of the contact to retrieve.\n * @format GUID\n */\n _id: string;\n /**\n * List of projected fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n * `id` and `revision` are always returned.\n *\n * Supported properties:\n * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n * `info.labelKeys`, `info.locations`, `info.extendedFields`\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /**\n * Predefined sets of fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n *\n * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.\n * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.\n * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.\n * - `FULL`: Returns all fields.\n *\n * Default: If `fields` is omitted from the request, `FULL`.\n * @maxSize 10\n */\n fieldsets?: ContactFieldSetWithLiterals[];\n}\n\n/** The requested contact. */\nexport interface GetContactResponse {\n /** The requested contact. */\n contact?: Contact;\n /** Contact response type. */\n responseType?: GetContactResponseTypeWithLiterals;\n}\n\nexport enum GetContactResponseType {\n /** The specified contact was returned. */\n REGULAR = 'REGULAR',\n /** Not used. */\n IMPLICIT = 'IMPLICIT',\n /** The specified contact was previously merged with another contact and the new contact was returned. */\n MERGED = 'MERGED',\n}\n\n/** @enumType */\nexport type GetContactResponseTypeWithLiterals =\n | GetContactResponseType\n | 'REGULAR'\n | 'IMPLICIT'\n | 'MERGED';\n\nexport interface SyncSubmitContactRequest {\n contactInfo?: ContactInfo;\n activity?: ContactActivity;\n passThroughData?: string | null;\n /** @format GUID */\n contactId?: string;\n submitOperation?: SubmitOperationWithLiterals;\n /** Need to resolve source in allocator, because of server sign */\n sourceType?: ContactSourceTypeWithLiterals;\n sourceId?: string | null;\n hideFromContactList?: boolean;\n}\n\nexport enum SubmitOperation {\n UNKNOWN = 'UNKNOWN',\n CREATE = 'CREATE',\n UPDATE = 'UPDATE',\n}\n\n/** @enumType */\nexport type SubmitOperationWithLiterals =\n | SubmitOperation\n | 'UNKNOWN'\n | 'CREATE'\n | 'UPDATE';\n\nexport interface SyncSubmitContactResponse {}\n\nexport interface CountContactsRequest {}\n\nexport interface CountContactsResponse {\n count?: number;\n}\n\nexport interface SearchContactsRequest {\n /** Search object. Encapsulates filter, sorting, paging and other details */\n search?: Search;\n}\n\nexport interface Search extends SearchPagingMethodOneOf {\n /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */\n cursorPaging?: CursorPaging;\n /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */\n filter?: Record<string, any> | null;\n /** Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}] */\n sort?: Sorting[];\n /**\n * List of projected fields to return.\n *\n * If used in the request,\n * all the fields contained in `fields` and `fieldsets` are returned.\n * If left blank, `fieldsets` is used to determine which fields to return.\n *\n * For a list of valid projected fields, see\n * [Valid Contact Projection Fields](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_valid-contact-projection-fields).\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /**\n * Predefined sets of fields to return.\n *\n * Defaults to `FULL`.\n * Ignored if left empty when `fields` is used in the request.\n *\n * For more information,\n * see [Contact Fieldsets](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_contact-fieldsets).\n * @maxSize 10\n */\n fieldsets?: string[];\n /** free text to match in searchable fields */\n search?: SearchDetails;\n}\n\n/** @oneof */\nexport interface SearchPagingMethodOneOf {\n /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */\n cursorPaging?: CursorPaging;\n}\n\nexport interface SearchDetails {\n /** boolean search mode. Default is `OR` */\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 - server will search in own default fieldsDefault searchable fields:\n *\n * - `info.name.first`\n * - `info.name.last`\n * - `info.emails.email`\n * - `info.phones.phone`\n * @maxLength 100\n * @maxSize 100\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 */\n OR = 'OR',\n /** all */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\nexport interface CursorPaging {\n /**\n * The number of contacts to load (default = 50, max = 1000)\n * @max 1000\n */\n limit?: number | null;\n /** Cursor returned in last query response. Should not be provided on first page request */\n cursor?: string | null;\n}\n\nexport interface SearchContactsResponse {\n /** List of contacts. */\n contacts?: Contact[];\n /** Details on the paged set of results returned. */\n cursorPagingMetadata?: CursorPagingMetadata;\n}\n\n/** This is the preferred message for cursor-paging enabled services */\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\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\nexport interface Cursors {\n /** Cursor pointing to next result page */\n next?: string | null;\n /** Cursor pointing to previous result page */\n prev?: string | null;\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 1000\n */\n contactIds?: string[];\n /**\n * List of existing segment ids\n * @format GUID\n * @maxSize 100\n */\n existsSegmentIds?: 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 ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\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 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 ContactAddedToSegment {\n /** Id of the segment to which the contact was added */\n segmentId?: string;\n /** The contact that was added */\n contact?: Contact;\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 1000\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 ContactRemovedFromSegment {\n /** Id of the segment from which the contact was removed */\n segmentId?: string;\n /** The contact that was removed */\n contact?: Contact;\n}\n\nexport interface ListContactIdsBySegmentRequest {\n /**\n * Segment id\n * @format GUID\n */\n segmentId?: string;\n /** Cursor paging. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface ListContactIdsBySegmentResponse {\n /**\n * List of contact IDs\n * @format GUID\n * @maxSize 1000\n */\n contactIds?: string[];\n /** Paging metadata */\n cursorPagingMetadata?: CursorPagingMetadata;\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}\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/** @docsIgnore */\nexport type CreateContactApplicationErrors =\n | {\n code?: 'DUPLICATE_CONTACT_EXISTS';\n description?: string;\n data?: DuplicateContactExists;\n }\n | {\n code?: 'INSUFFICIENT_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACT_ID_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MULTIPLE_PRIMARY_INFO';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_EXTENDED_FIELD_VALUE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateContactApplicationErrors =\n | {\n code?: 'DUPLICATE_CONTACT_EXISTS';\n description?: string;\n data?: DuplicateContactExists;\n }\n | {\n code?: 'CONTACT_ALREADY_CHANGED';\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?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INSUFFICIENT_UPDATE_CONTACT_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MULTIPLE_PRIMARY_INFO';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_EXTENDED_FIELD_VALUE';\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/** @docsIgnore */\nexport type MergeContactsApplicationErrors =\n | {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'FAILED_PRECONDITION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ILLEGAL_MERGE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type PreviewMergeContactsApplicationErrors =\n | {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'FAILED_PRECONDITION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ILLEGAL_MERGE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeleteContactApplicationErrors =\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_MEMBER_OWNER_OR_CONTRIBUTOR';\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 LabelContactApplicationErrors = {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type UnlabelContactApplicationErrors = {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ListContactsApplicationErrors =\n | {\n code?: 'UNSUPPORTED_SORT_FIELD';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ILLEGAL_LIMIT';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type QueryContactsApplicationErrors =\n | {\n code?: 'UNSUPPORTED_SORT_FIELD';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ILLEGAL_LIMIT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MALFORMED_FILTER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER_FIELD_UNKNOWN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER_OPERATOR';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER_VALUE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER_VALUE_TYPE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type BulkDeleteContactsApplicationErrors = {\n code?: 'NEITHER_FILTER_NOR_SEARCH';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkLabelAndUnlabelContactsApplicationErrors = {\n code?: 'NEITHER_FILTER_NOR_SEARCH';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type GetContactApplicationErrors = {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\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}\n\nexport interface EventMetadata extends BaseEventMetadata {\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\nexport interface ContactCreatedEnvelope {\n entity: Contact;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a contact is created.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Read Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionId CONTACTS.VIEW\n * @webhook\n * @eventType wix.contacts.v4.contact_created\n * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4\n * @slug created\n */\nexport declare function onContactCreated(\n handler: (event: ContactCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ContactDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a contact is deleted.\n *\n * If a contact is deleted as part of a merge, the `originatedFrom` property is sent as `merge`.\n * Otherwise, `originatedFrom` isn't returned.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Read Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionId CONTACTS.VIEW\n * @webhook\n * @eventType wix.contacts.v4.contact_deleted\n * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4\n * @slug deleted\n */\nexport declare function onContactDeleted(\n handler: (event: ContactDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ContactMergedEnvelope {\n data: ContactMerged;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when one or more source contacts are merged into a target contact.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Read Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionId CONTACTS.VIEW\n * @webhook\n * @eventType wix.contacts.v4.contact_merged\n * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4\n * @slug merged\n */\nexport declare function onContactMerged(\n handler: (event: ContactMergedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ContactUpdatedEnvelope {\n entity: Contact;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a contact is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Read Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Contacts\n * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionId CONTACTS.VIEW\n * @webhook\n * @eventType wix.contacts.v4.contact_updated\n * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4\n * @slug updated\n */\nexport declare function onContactUpdated(\n handler: (event: ContactUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a new contact.\n *\n * The `info` object must include at least one of the following:\n * - Name\n * - Phone number\n * - Email address\n *\n * By default, if the call contains an email already in use by another contact,\n * the new contact won't be created. To override this behavior, set `allowDuplicates` to `true`.\n * @param info - Contact info.\n * @public\n * @requiredField info\n * @param options - Create contact options.\n * @permissionId CONTACTS.MODIFY\n * @applicableIdentity APP\n * @returns Contact.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.CreateContact\n */\nexport async function createContact(\n info: ContactInfo,\n options?: CreateContactOptions\n): Promise<\n NonNullablePaths<\n CreateContactResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\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 info: info,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'info.addresses.items.address' }],\n },\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [{ path: 'info.picture.image' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV4Contact.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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n info: '$[0]',\n allowDuplicates: '$[1].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['info', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateContactOptions {\n /**\n * Controls whether the call will succeed\n * if the new contact information contains an email or a phone number already used by another contact.\n *\n * If set to `true`,\n * the call will succeed even if an email address or phone number is used by another contact.\n * If set to `false`,\n * the call will fail if the given email address is used by another contact or,\n * if the email address is not given and the given phone number is used by another contact.\n *\n * Default: `false`\n */\n allowDuplicates?: boolean;\n}\n\n/**\n * Updates a contact.\n *\n * Each time the contact is updated,\n * `revision` increments by 1.\n * The existing `revision` must be included when updating the contact.\n * This ensures you're working with the latest contact information,\n * and it prevents unintended overwrites.\n *\n * You can't call Update Contact to update the `primaryEmail` of a contact who is also a member.\n * Instead, use the Members API to update the member's login email, which will also update the contact's primary email.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers. Make sure to specify the contact ID when calling Update Contact.\n * @param contactId - ID of the contact to update.\n * @param info - Contact info.\n * @param revision - Revision number.\n * When updating, include the existing `revision`\n * to prevent conflicting updates.\n * @public\n * @requiredField contactId\n * @requiredField info\n * @requiredField revision\n * @param options - Contact update options.\n * @permissionId CONTACTS.MODIFY\n * @permissionId CONTACTS.MODIFY_MEMBERSHIP_STATUS\n * @permissionId CONTACTS.MODIFY_MEMBER_PRIMARY_EMAIL_PERMISSION\n * @applicableIdentity APP\n * @returns Updated contact.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.UpdateContact\n */\nexport async function updateContact(\n contactId: string,\n info: ContactInfo,\n revision: number,\n options?: UpdateContactOptions\n): Promise<\n NonNullablePaths<\n UpdateContactResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\n > & {\n __applicationErrorsType?: UpdateContactApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[4] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n info: info,\n revision: revision,\n allowDuplicates: options?.allowDuplicates,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'info.addresses.items.address' }],\n },\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [{ path: 'info.picture.image' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV4Contact.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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n info: '$[1]',\n revision: '$[2]',\n allowDuplicates: '$[3].allowDuplicates',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'info', 'revision', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateContactOptions {\n /**\n * Controls whether the call will succeed\n * if the new contact information contains an email or a phone number already used by another contact.\n *\n * If set to `true`,\n * the call will succeed even if an email address or phone number is used by another contact.\n * If set to `false`,\n * the call will fail if the given email address is used by another contact or,\n * if the email address is not given and the given phone number is used by another contact.\n *\n * Default: `false`\n */\n allowDuplicates?: boolean;\n}\n\n/**\n * Merges source contacts into a target contact.\n *\n * Merging contacts has the following effects on the target contact:\n *\n * - No target contact data is overwritten or deleted.\n * - Arrays (emails, phone numbers, addresses, and labels) from the source contacts are added to the target contact's arrays.\n * - If you merge more than one source contact, the 1st source contact specified is added first, then the 2nd, and so on.\n * - If there is duplicate information between the target contact and the source contact, the information isn't duplicated in the target contact's arrays.\n *\n * <blockquote class=\"important\">\n *\n * __Important:__\n * Merges cannot be undone.\n * In REST, call Preview Merge Contacts to test before merging.\n *\n * </blockquote>\n *\n * When you merge contacts, source contacts are typically deleted.\n * However, if a source contact is a site member or a Wix user,\n * the merge will fail because site members and Wix users can't be deleted.\n * This means that site members and Wix users can only be specified as target contacts in a merge.\n *\n * After merging, calling Get Contact with a deleted source contact ID returns the target contact ID.\n * Specifying a deleted source contact ID is not supported on any other method.\n *\n * When contacts are merged:\n *\n * - The Contact Merged event is triggered.\n * - The Contact Updated event is triggered for the target contact. `originatedFrom` is set to `merge`.\n * - The Contact Deleted event is triggered for each source contact. `originatedFrom` is set to `merge`.\n * @param targetContactId - Target contact ID.\n * @param targetContactRevision - Target contact revision number, which increments by 1 each time the contact is updated.\n * To prevent conflicting changes,\n * the target contact's current `revision` must be specified.\n * @public\n * @requiredField targetContactId\n * @requiredField targetContactRevision\n * @param options - Merge contacts options.\n * @permissionId CONTACTS.MERGE\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.MergeContacts\n */\nexport async function mergeContacts(\n targetContactId: string,\n targetContactRevision: number,\n options?: MergeContactsOptions\n): Promise<\n NonNullablePaths<\n MergeContactsResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\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 = renameKeysFromSDKRequestToRESTRequest({\n targetContactId: targetContactId,\n targetContactRevision: targetContactRevision,\n sourceContactIds: options?.sourceContactIds,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.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 sourceContactIds: '$[2].sourceContactIds',\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 /**\n * IDs of up to 5 contacts to merge into the target contact.\n * When you merge 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 */\n sourceContactIds?: string[];\n}\n\n/**\n * Previews merging source contacts into a target contact.\n *\n * This method performs a dry run without deleting or updating any contacts.\n * A preview of the updated target contact is returned,\n * but no data is changed in the contact list.\n *\n * To perform the actual merge, use Merge Contacts.\n * @param targetContactId - Target contact ID.\n * @public\n * @requiredField targetContactId\n * @param options - Preview merge contacts options.\n * @permissionId CONTACTS.MERGE\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.PreviewMergeContacts\n */\nexport async function previewMergeContacts(\n targetContactId: string,\n options?: PreviewMergeContactsOptions\n): Promise<\n NonNullablePaths<\n PreviewMergeContactsResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\n > & {\n __applicationErrorsType?: PreviewMergeContactsApplicationErrors;\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 targetContactId: targetContactId,\n sourceContactIds: options?.sourceContactIds,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.previewMergeContacts(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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n targetContactId: '$[0]',\n sourceContactIds: '$[1].sourceContactIds',\n },\n singleArgumentUnchanged: false,\n },\n ['targetContactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PreviewMergeContactsOptions {\n /**\n * IDs of up to 5 contacts to merge into the target contact.\n * When you merge 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 */\n sourceContactIds?: string[];\n}\n\n/**\n * Deletes a contact.\n *\n * Deleting a contact permanently removes it from the contact list.\n * If a contact is also a site member or Wix user, or has a valid billing subscription,\n * the contact can't be deleted. The related site member or Wix user must first be deleted\n * and any valid billing subscriptions must be canceled, before the contact can be deleted.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Delete Contact.\n * @param contactId - ID of the contact to delete.\n * @public\n * @requiredField contactId\n * @permissionId CONTACTS.MODIFY\n * @permissionId MEMBERS.MEMBER_DELETE\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.DeleteContact\n */\nexport async function deleteContact(contactId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteContactApplicationErrors;\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 = ambassadorWixContactsV4Contact.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: { contactId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['contactId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Adds labels to a contact.\n *\n * Use the Labels API to create or retrieve labels.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Label Contact.\n * @param contactId - ID of the contact to add labels to.\n * @param labelKeys - List of label keys to add to the contact.\n *\n * Label keys must exist to be added to the contact.\n * Use the Labels API to create or retrieve labels.\n * @public\n * @requiredField contactId\n * @requiredField labelKeys\n * @permissionId CONTACTS.MODIFY\n * @applicableIdentity APP\n * @returns Updated contact.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.LabelContact\n */\nexport async function labelContact(\n contactId: string,\n labelKeys: string[]\n): Promise<\n NonNullablePaths<\n LabelContactResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\n > & {\n __applicationErrorsType?: LabelContactApplicationErrors;\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 labelKeys: labelKeys,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.labelContact(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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]', labelKeys: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'labelKeys']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes labels from a contact.\n *\n * If a label is no longer needed\n * and you want to remove it from all contacts,\n * you can delete by calling Delete Label from the Labels API.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Unlabel Contact.\n * @param contactId - ID of the contact to remove labels from.\n * @param labelKeys - List of label keys to remove from the contact.\n * @public\n * @requiredField contactId\n * @requiredField labelKeys\n * @permissionId CONTACTS.MODIFY\n * @applicableIdentity APP\n * @returns Updated contact.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.UnlabelContact\n */\nexport async function unlabelContact(\n contactId: string,\n labelKeys: string[]\n): Promise<\n NonNullablePaths<\n UnlabelContactResponse,\n | `contact._id`\n | `contact.revision`\n | `contact.source.sourceType`\n | `contact.lastActivity.activityType`\n | `contact.info.emails.items`\n | `contact.info.emails.items.${number}.tag`\n | `contact.info.emails.items.${number}.email`\n | `contact.info.phones.items`\n | `contact.info.phones.items.${number}.tag`\n | `contact.info.phones.items.${number}.phone`\n | `contact.info.addresses.items`\n | `contact.info.addresses.items.${number}.tag`\n | `contact.info.addresses.items.${number}.address.streetAddress.number`\n | `contact.info.addresses.items.${number}.address.streetAddress.name`\n | `contact.info.labelKeys.items`\n | `contact.primaryEmail.subscriptionStatus`\n | `contact.primaryEmail.deliverabilityStatus`\n | `contact.primaryPhone.subscriptionStatus`,\n 9\n > & {\n __applicationErrorsType?: UnlabelContactApplicationErrors;\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 labelKeys: labelKeys,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.unlabelContact(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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { contactId: '$[0]', labelKeys: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'labelKeys']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 1,000 contacts per request.\n * @public\n * @param options - Object containing list of options for retrieving contacts.\n * @permissionId CONTACTS.VIEW\n * @applicableIdentity APP\n * @returns List of contacts.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.ListContacts\n */\nexport async function listContacts(options?: ListContactsOptions): Promise<\n NonNullablePaths<\n ListContactsResponse,\n | `contacts`\n | `contacts.${number}._id`\n | `contacts.${number}.revision`\n | `contacts.${number}.source.sourceType`\n | `contacts.${number}.lastActivity.activityType`\n | `contacts.${number}.primaryEmail.subscriptionStatus`\n | `contacts.${number}.primaryEmail.deliverabilityStatus`\n | `contacts.${number}.primaryPhone.subscriptionStatus`,\n 5\n > & {\n __applicationErrorsType?: ListContactsApplicationErrors;\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 sort: options?.sort,\n paging: options?.paging,\n fields: options?.fields,\n fieldsets: options?.fieldsets,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.listContacts(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.picture' },\n { path: 'contacts.info.picture.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.info.addresses.items.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sort: '$[0].sort',\n paging: '$[0].paging',\n fields: '$[0].fields',\n fieldsets: '$[0].fieldsets',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListContactsOptions {\n /** [Sort order](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter). */\n sort?: Sorting;\n /** [Pagination](https://dev.wix.com/api/rest/getting-started/pagination), defaults to offset = 0 and limit = 50 (max limit 1,000). */\n paging?: Paging;\n /**\n * List of projected fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n * `id` and `revision` are always returned.\n *\n * Supported properties:\n * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n * `info.labelKeys`, `info.locations`, `info.extendedFields`\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /** @maxSize 10 */\n fieldsets?: ContactFieldSetWithLiterals[];\n}\n\n/**\n * Creates a query to retrieve a list of contacts.\n *\n * The `queryContacts()` function builds a query to retrieve a list of contacts and returns a `ContactsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `ContactsQueryBuilder` functions onto the query. `ContactsQueryBuilder` functions enable you to sort, filter, and control the results `queryContacts()` returns.\n *\n * `queryContacts()` runs with these `ContactsQueryBuilder` defaults, which you can override:\n *\n * - `skip(0)`\n * - `limit(50)`\n * - `descending(\"_createdDate\")`\n *\n * The functions that are chained to `queryContacts()` are applied in the order they are called. For example, if you apply `ascending('info.company')` and then `descending('info.name.last')`, the results are sorted first by the company name, and then, if there are multiple results with the same company, the items are sorted by last name.\n * @public\n * @param options - Query contact options.\n * @permissionId CONTACTS.VIEW\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts\n */\nexport function queryContacts(\n options?: QueryContactsOptions\n): ContactsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Contact,\n 'OFFSET',\n QueryContactsRequest,\n QueryContactsResponse\n >({\n func: async (payload: QueryContactsRequest) => {\n const reqOpts = ambassadorWixContactsV4Contact.queryContacts({\n ...payload,\n ...(options ?? {}),\n });\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, options] as [\n QueryContactsRequest['query'],\n QueryContactsOptions\n ];\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.picture' },\n { path: 'contacts.info.picture.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.info.addresses.items.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: 'OFFSET',\n transformationPaths: {},\n });\n}\n\nexport interface QueryContactsOptions {\n /**\n * @internal\n * @maxLength 100\n */\n search?: string | null | undefined;\n}\n\ninterface QueryOffsetResult {\n currentPage: number | undefined;\n totalPages: number | undefined;\n totalCount: number | undefined;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ContactsQueryResult extends QueryOffsetResult {\n items: Contact[];\n query: ContactsQueryBuilder;\n next: () => Promise<ContactsQueryResult>;\n prev: () => Promise<ContactsQueryResult>;\n}\n\nexport interface ContactsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'primaryInfo.email'\n | 'primaryInfo.phone'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.birthdate'\n | 'info.locale',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'primaryInfo.email'\n | 'primaryInfo.phone'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.birthdate'\n | 'info.locale',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'info.birthdate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'info.birthdate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'info.birthdate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | '_createdDate'\n | '_updatedDate'\n | 'lastActivity.activityDate'\n | 'info.birthdate',\n value: any\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName:\n | 'primaryInfo.email'\n | 'primaryInfo.phone'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle',\n value: string\n ) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (propertyName: string, value: any[]) => ContactsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasAll: (propertyName: string, value: any[]) => ContactsQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | 'primaryInfo.email'\n | 'primaryInfo.phone'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.locale',\n value: any\n ) => ContactsQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | 'primaryInfo.email'\n | 'primaryInfo.phone'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.locale',\n value: boolean\n ) => ContactsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | '_createdDate'\n | 'lastActivity.activityDate'\n | 'primaryInfo.email'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.birthdate'\n >\n ) => ContactsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | '_createdDate'\n | 'lastActivity.activityDate'\n | 'primaryInfo.email'\n | 'info.name.first'\n | 'info.name.last'\n | 'info.company'\n | 'info.jobTitle'\n | 'info.birthdate'\n >\n ) => ContactsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => ContactsQueryBuilder;\n /** @param skip - Number of items to skip in the query results before returning the results. */\n skip: (skip: number) => ContactsQueryBuilder;\n find: () => Promise<ContactsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts\n * @requiredField query\n * @returns List of contacts.\n */\nexport async function typedQueryContacts(\n query: ContactQuery,\n options?: QueryContactsOptions\n): Promise<\n NonNullablePaths<\n QueryContactsResponse,\n | `contacts`\n | `contacts.${number}._id`\n | `contacts.${number}.revision`\n | `contacts.${number}.source.sourceType`\n | `contacts.${number}.lastActivity.activityType`\n | `contacts.${number}.primaryEmail.subscriptionStatus`\n | `contacts.${number}.primaryEmail.deliverabilityStatus`\n | `contacts.${number}.primaryPhone.subscriptionStatus`,\n 5\n > & {\n __applicationErrorsType?: QueryContactsApplicationErrors;\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 query: query,\n ...options,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.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.picture' },\n { path: 'contacts.info.picture.image' },\n { path: 'contacts.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contacts.info.addresses.items.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', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ContactQuerySpec extends QuerySpec {\n paging: 'offset';\n wql: [\n {\n fields: ['_id', 'info.locale'];\n operators: ['$eq', '$exists', '$in', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['_createdDate', 'info.birthdate', 'lastActivity.activityDate'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'BOTH';\n },\n {\n fields: ['_updatedDate'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'NONE';\n },\n {\n fields: [\n 'info.company',\n 'info.jobTitle',\n 'info.name.first',\n 'info.name.last',\n 'primaryInfo.email'\n ];\n operators: ['$begins', '$eq', '$exists', '$in', '$ne'];\n sort: 'BOTH';\n },\n {\n fields: ['primaryInfo.phone'];\n operators: ['$begins', '$eq', '$exists', '$in', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['info.labelKeys'];\n operators: ['$hasAll', '$hasSome'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Contact,\n ContactQuerySpec\n>;\nexport type ContactQuery = {\n /** \n Filter object.\n See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)\n for more information.\n\n For a detailed list of supported filters, see\n [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sorting options.\n See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)\n for more information.\n\n Max: 1 sort object \n @maxSize: 1 \n */\n sort?: {\n /** \n Field to sort by.\n\n Supported properties:\n `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,\n `info.jobTitle`, `info.birthdate` \n @maxLength: 100 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order.\n Use `ASC` for ascending order or `DESC` for descending order.\n\n Defaults to `ASC`. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n /** \n Pagination options. \n */\n paging?: {\n /** \n Number of items to return. Learn more about pagination in [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging).\n\n Default: `50`. <br>\n Maximum: `1000`. \n @max: 1000 \n */\n limit?: NonNullable<CommonQueryWithEntityContext['paging']>['limit'] | null;\n /** \n Number of items to skip in the current sort order. \n */\n offset?:\n | NonNullable<CommonQueryWithEntityContext['paging']>['offset']\n | null;\n };\n};\n\n/**\n * Lists facets from the site’s contact list.\n * Facets include labels and subscription statuses.\n * @public\n * @param options - List facets options.\n * @permissionId CONTACTS.VIEW\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.ListFacets\n */\nexport async function listFacets(\n options?: ListFacetsOptions\n): Promise<\n NonNullablePaths<\n ListFacetsResponse,\n `facets` | `facets.${number}.facetType`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paging: options?.paging,\n language: options?.language,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.listFacets(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 paging: '$[0].paging',\n language: '$[0].language',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListFacetsOptions {\n /** Pagination options. */\n paging?: Paging;\n /**\n * Language for localization.\n * @format LANGUAGE\n */\n language?: string | null;\n}\n\n/**\n * Retrieves facets from the site’s contact list by filter.\n * Facets include labels and subscription statuses.\n * @public\n * @param options - Query facets options.\n * @permissionId CONTACTS.VIEW\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryFacets\n */\nexport async function queryFacets(\n options?: QueryFacetsOptions\n): Promise<\n NonNullablePaths<\n QueryFacetsResponse,\n `facets` | `facets.${number}.facetType`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paging: options?.paging,\n language: options?.language,\n filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.queryFacets(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 paging: '$[0].paging',\n language: '$[0].language',\n filter: '$[0].filter',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QueryFacetsOptions {\n /** Pagination options. */\n paging?: Paging;\n /**\n * Language for localization.\n * @format LANGUAGE\n */\n language?: string | null;\n /**\n * Filterable fields:\n * - `'info.extendedFields.emailSubscriptions.effectiveEmail'` (`$exists`).\n * - `'info.extendedFields.emailSubscriptions.subscriptionStatus'` (`$eq`, `$ne`, `$in`, `$nin`).\n * - `'info.extendedFields.emailSubscriptions.deliverabilityStatus'` (`$eq`, `$ne`, `$in`, `$nin`).\n */\n filter?: Record<string, any> | 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, call Query Contacts with the intended filter options.\n *\n * When this method is called, a bulk job is started and the job ID is returned.\n * The job might not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\n *\n * The following errors might occur during the bulk processing and will appear in the bulk job:\n * - `CANNOT_DELETE_SITE_MEMBERS` - Contact is a site member and can't be deleted. Member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION` - Contact has a valid billing subscription and can't be deleted.\n * - `CANNOT_DELETE_MEMBER_OWNER_OR_CONTRIBUTOR` - Member is a Wix user and can't be deleted. This can happen only if the request indicated to delete the member.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION` - Member was deleted, but contact was not. This can happen only if the request indicated to delete the member.\n * - `FAILED_DELETE_CONTACT` - Contact could not be deleted.\n * @public\n * @param options - Bulk delete contacts options.\n * @permissionId CONTACTS.MODIFY\n * @permissionId MEMBERS.MEMBER_DELETE\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkDeleteContacts\n */\nexport async function bulkDeleteContacts(\n options?: BulkDeleteContactsOptions\n): Promise<\n NonNullablePaths<BulkDeleteContactsResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkDeleteContactsApplicationErrors;\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 filter: options?.filter,\n search: options?.search,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.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 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 BulkDeleteContactsOptions {\n /**\n * Filter object.\n *\n * Possible filters:\n * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.\n *\n * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a detailed list of supported filters for contact properties, extended fields, and custom fields.\n *\n *\n * Example:\n * `{ \"filter\": { \"info.name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n *\n * Searchable fields:\n *\n * - `info.name.first`\n * - `info.name.last`\n * - `info.emails.email`\n * - `info.phones.phone`\n * @maxLength 100\n */\n search?: string | null;\n}\n\n/**\n * Updates the specified properties for multiple contacts.\n * Fields that are included in fieldMask.paths are updated,\n * while all other fields stay the same.\n *\n * All contacts that meet the specified `filter` and `search` criteria are updated.\n * To perform a dry run, call Query Contacts with the intended filter options.\n *\n * When this method is used, a bulk job is started and the job ID is returned.\n * The job may not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\n * @public\n * @param options - Bulk update contacts options.\n * @permissionId CONTACTS.MODIFY\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkUpdateContacts\n */\nexport async function bulkUpdateContacts(\n options?: BulkUpdateContactsOptions\n): Promise<NonNullablePaths<BulkUpdateContactsResponse, `jobId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n search: options?.search,\n info: options?.info,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'info.addresses.items.address' }],\n },\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [{ path: 'info.picture.image' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixContactsV4Contact.bulkUpdateContacts(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 info: '$[0].info',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateContactsOptions {\n /**\n * Filter object.\n *\n * Possible filters:\n * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.\n *\n * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a detailed list of supported filters for contact properties, extended fields, and custom fields.\n *\n *\n * Example:\n * `{ \"filter\": { \"info.name.last\": \"Smith\" } }`\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n *\n * Searchable fields:\n *\n * - `info.name.first`\n * - `info.name.last`\n * - `info.emails.email`\n * - `info.phones.phone`\n * @maxLength 100\n */\n search?: string | null;\n /** Contact info. */\n info?: ContactInfo;\n}\n\n/**\n * Adds and removes labels from multiple contacts.\n *\n * Labels are added to and removed from all contacts that meet the specified\n * `filter` and `search` criteria.\n * The request should specify a `filter` value, a `search` value, or both.\n * To perform a dry run, call Query Contacts with the intended filter options.\n *\n * When this method is used, a bulk job is started and the job ID is returned.\n * The job might not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\n * @public\n * @param options - Bulk label and unlabel contacts options.\n * @permissionId CONTACTS.MODIFY\n * @applicableIdentity APP\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkLabelAndUnlabelContacts\n */\nexport async function bulkLabelAndUnlabelContacts(\n options?: BulkLabelAndUnlabelContactsOptions\n): Promise<\n NonNullablePaths<BulkLabelAndUnlabelContactsResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkLabelAndUnlabelContactsApplicationErrors;\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 filter: options?.filter,\n search: options?.search,\n labelKeysToAdd: options?.labelKeysToAdd,\n labelKeysToRemove: options?.labelKeysToRemove,\n });\n\n const reqOpts =\n ambassadorWixContactsV4Contact.bulkLabelAndUnlabelContacts(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 labelKeysToAdd: '$[0].labelKeysToAdd',\n labelKeysToRemove: '$[0].labelKeysToRemove',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkLabelAndUnlabelContactsOptions {\n /**\n * Filter options.\n * Labels will be removed from contacts that meet the `filter` and `search` criteria.\n *\n * See\n * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a list of supported filters and fields.\n */\n filter?: Record<string, any> | null;\n /**\n * Plain text search for an exact match, up to 100 characters.\n * Labels will be removed from contacts that meet the `filter` and `search` criteria.\n *\n * See\n * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\n * for a list of searchable fields.\n * @maxLength 100\n */\n search?: string | null;\n /**\n * List of label keys to add to the contacts.\n *\n * Label keys must exist to be added to the contact.\n * Contact labels can be created or retrieved with\n * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)\n * or\n * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels)\n * @maxSize 100\n */\n labelKeysToAdd?: string[];\n /**\n * List of label keys to remove from the contacts.\n * @maxSize 100\n */\n labelKeysToRemove?: string[];\n}\n\n/**\n * Retrieves a contact.\n *\n * #### Getting Merged Contacts\n *\n * When a source contact is merged\n * with a target contact, the source contact is deleted.\n * When calling Get Contact for a merged contact,\n * you can use the source or target contact ID.\n * In both bases, the target contact is returned.\n *\n * This is supported only when calling Get Contact on merged contacts.\n * Previously deleted source contact IDs can't be used for any other method.\n * @param _id - ID of the contact to retrieve.\n * @public\n * @requiredField _id\n * @param options - Get contact options.\n * @permissionId CONTACTS.VIEW\n * @applicableIdentity APP\n * @returns The requested contact.\n * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.GetContact\n */\nexport async function getContact(\n _id: string,\n options?: GetContactOptions\n): Promise<\n NonNullablePaths<\n Contact,\n | `_id`\n | `revision`\n | `source.sourceType`\n | `lastActivity.activityType`\n | `info.emails.items`\n | `info.emails.items.${number}.tag`\n | `info.emails.items.${number}.email`\n | `info.phones.items`\n | `info.phones.items.${number}.tag`\n | `info.phones.items.${number}.phone`\n | `info.addresses.items`\n | `info.addresses.items.${number}.tag`\n | `info.addresses.items.${number}.address.streetAddress.number`\n | `info.addresses.items.${number}.address.streetAddress.name`\n | `info.labelKeys.items`\n | `primaryEmail.subscriptionStatus`\n | `primaryEmail.deliverabilityStatus`\n | `primaryPhone.subscriptionStatus`,\n 8\n > & {\n __applicationErrorsType?: GetContactApplicationErrors;\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 id: _id,\n fields: options?.fields,\n fieldsets: options?.fieldsets,\n });\n\n const reqOpts = ambassadorWixContactsV4Contact.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.picture' },\n { path: 'contact.info.picture.image' },\n { path: 'contact.memberInfo.profileInfo.photo' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'contact.info.addresses.items.address' }],\n },\n ])\n )?.contact!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n fields: '$[1].fields',\n fieldsets: '$[1].fieldsets',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetContactOptions {\n /**\n * List of projected fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n * `id` and `revision` are always returned.\n *\n * Supported properties:\n * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n * `info.labelKeys`, `info.locations`, `info.extendedFields`\n * @maxLength 100\n * @maxSize 100\n */\n fields?: string[];\n /**\n * Predefined sets of fields to return.\n * If both `fields` and `fieldsets` are sent in the request,\n * the union of both lists is returned.\n *\n * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.\n * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.\n * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.\n * - `FULL`: Returns all fields.\n *\n * Default: If `fields` is omitted from the request, `FULL`.\n * @maxSize 10\n */\n fieldsets?: ContactFieldSetWithLiterals[];\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 resolveComWixpressContactsCoreApiV4ContactsServiceV4Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n {\n srcPath: '/_api/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n {\n srcPath: '/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n {\n srcPath: '/_api/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n ],\n 'manage.nownia.com': [\n {\n srcPath: '/_api/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n {\n srcPath: '/_api/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n ],\n _: [\n {\n srcPath: '/_api/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n {\n srcPath: '/_api/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/contacts/v4/bulk',\n destPath: '/v4/bulk',\n },\n {\n srcPath: '/_api/contacts/v4/contacts',\n destPath: '/v4/contacts',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_crm_contacts';\n\n/**\n * Creates a new contact.\n *\n * The `info` object must include at least one of the following:\n * - Name\n * - Phone number\n * - Email address\n *\n * By default, if the call contains an email already in use by another contact,\n * the new contact won't be created. To override this behavior, set `allowDuplicates` to `true`.\n */\nexport function createContact(payload: object): RequestOptionsFactory<any> {\n function __createContact({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'info.addresses.items.address.geocode.latitude' },\n { path: 'info.addresses.items.address.geocode.longitude' },\n ],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'info.picture.image.urlExpirationDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.CreateContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createContact;\n}\n\n/**\n * Updates a contact.\n *\n * Each time the contact is updated,\n * `revision` increments by 1.\n * The existing `revision` must be included when updating the contact.\n * This ensures you're working with the latest contact information,\n * and it prevents unintended overwrites.\n *\n * You can't call Update Contact to update the `primaryEmail` of a contact who is also a member.\n * Instead, use the Members API to update the member's login email, which will also update the contact's primary email.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers. Make sure to specify the contact ID when calling Update Contact.\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: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'info.addresses.items.address.geocode.latitude' },\n { path: 'info.addresses.items.address.geocode.longitude' },\n ],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'info.picture.image.urlExpirationDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.UpdateContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{contactId}',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateContact;\n}\n\n/**\n * Merges source contacts into a target contact.\n *\n * Merging contacts has the following effects on the target contact:\n *\n * - No target contact data is overwritten or deleted.\n * - Arrays (emails, phone numbers, addresses, and labels) from the source contacts are added to the target contact's arrays.\n * - If you merge more than one source contact, the 1st source contact specified is added first, then the 2nd, and so on.\n * - If there is duplicate information between the target contact and the source contact, the information isn't duplicated in the target contact's arrays.\n *\n * <blockquote class=\"important\">\n *\n * __Important:__\n * Merges cannot be undone.\n * In REST, call Preview Merge Contacts to test before merging.\n *\n * </blockquote>\n *\n * When you merge contacts, source contacts are typically deleted.\n * However, if a source contact is a site member or a Wix user,\n * the merge will fail because site members and Wix users can't be deleted.\n * This means that site members and Wix users can only be specified as target contacts in a merge.\n *\n * After merging, calling Get Contact with a deleted source contact ID returns the target contact ID.\n * Specifying a deleted source contact ID is not supported on any other method.\n *\n * When contacts are merged:\n *\n * - The Contact Merged event is triggered.\n * - The Contact Updated event is triggered for the target contact. `originatedFrom` is set to `merge`.\n * - The Contact Deleted event is triggered for each source contact. `originatedFrom` is set to `merge`.\n */\nexport function mergeContacts(payload: object): RequestOptionsFactory<any> {\n function __mergeContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.MergeContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{targetContactId}/merge',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __mergeContacts;\n}\n\n/**\n * Previews merging source contacts into a target contact.\n *\n * This method performs a dry run without deleting or updating any contacts.\n * A preview of the updated target contact is returned,\n * but no data is changed in the contact list.\n *\n * To perform the actual merge, use Merge Contacts.\n */\nexport function previewMergeContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __previewMergeContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.PreviewMergeContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{targetContactId}/preview-merge',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __previewMergeContacts;\n}\n\n/**\n * Deletes a contact.\n *\n * Deleting a contact permanently removes it from the contact list.\n * If a contact is also a site member or Wix user, or has a valid billing subscription,\n * the contact can't be deleted. The related site member or Wix user must first be deleted\n * and any valid billing subscriptions must be canceled, before the contact can be deleted.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Delete Contact.\n */\nexport function deleteContact(payload: object): RequestOptionsFactory<any> {\n function __deleteContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.DeleteContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/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 * Adds labels to a contact.\n *\n * Use the Labels API to create or retrieve labels.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Label Contact.\n */\nexport function labelContact(payload: object): RequestOptionsFactory<any> {\n function __labelContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.LabelContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{contactId}/labels',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __labelContact;\n}\n\n/**\n * Removes labels from a contact.\n *\n * If a label is no longer needed\n * and you want to remove it from all contacts,\n * you can delete by calling Delete Label from the Labels API.\n *\n * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.\n * Make sure to specify the contact ID when calling Unlabel Contact.\n */\nexport function unlabelContact(payload: object): RequestOptionsFactory<any> {\n function __unlabelContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.UnlabelContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{contactId}/labels',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __unlabelContact;\n}\n\n/** Retrieves a list of up to 1,000 contacts per request. */\nexport function listContacts(payload: object): RequestOptionsFactory<any> {\n function __listContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.ListContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts',\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.lastActivity.activityDate' },\n { path: 'contacts.lastActivity.date' },\n { path: 'contacts.picture.urlExpirationDate' },\n { path: 'contacts.info.picture.image.urlExpirationDate' },\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 {\n path: 'contacts.info.addresses.items.address.geocode.latitude',\n },\n {\n path: 'contacts.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listContacts;\n}\n\n/**\n * Creates a query to retrieve a list of contacts.\n *\n * The `queryContacts()` function builds a query to retrieve a list of contacts and returns a `ContactsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `ContactsQueryBuilder` functions onto the query. `ContactsQueryBuilder` functions enable you to sort, filter, and control the results `queryContacts()` returns.\n *\n * `queryContacts()` runs with these `ContactsQueryBuilder` defaults, which you can override:\n *\n * - `skip(0)`\n * - `limit(50)`\n * - `descending(\"_createdDate\")`\n *\n * The functions that are chained to `queryContacts()` are applied in the order they are called. For example, if you apply `ascending('info.company')` and then `descending('info.name.last')`, the results are sorted first by the company name, and then, if there are multiple results with the same company, the items are sorted by last name.\n */\nexport function queryContacts(payload: object): RequestOptionsFactory<any> {\n function __queryContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/query',\n data: payload,\n host,\n }),\n data: 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.lastActivity.activityDate' },\n { path: 'contacts.lastActivity.date' },\n { path: 'contacts.picture.urlExpirationDate' },\n { path: 'contacts.info.picture.image.urlExpirationDate' },\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 {\n path: 'contacts.info.addresses.items.address.geocode.latitude',\n },\n {\n path: 'contacts.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryContacts;\n}\n\n/**\n * Lists facets from the site’s contact list.\n * Facets include labels and subscription statuses.\n */\nexport function listFacets(payload: object): RequestOptionsFactory<any> {\n function __listFacets({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.ListFacets',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/facets',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listFacets;\n}\n\n/**\n * Retrieves facets from the site’s contact list by filter.\n * Facets include labels and subscription statuses.\n */\nexport function queryFacets(payload: object): RequestOptionsFactory<any> {\n function __queryFacets({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryFacets',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/facets/query',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __queryFacets;\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, call Query Contacts with the intended filter options.\n *\n * When this method is called, a bulk job is started and the job ID is returned.\n * The job might not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\n *\n * The following errors might occur during the bulk processing and will appear in the bulk job:\n * - `CANNOT_DELETE_SITE_MEMBERS` - Contact is a site member and can't be deleted. Member must be deleted first.\n * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION` - Contact has a valid billing subscription and can't be deleted.\n * - `CANNOT_DELETE_MEMBER_OWNER_OR_CONTRIBUTOR` - Member is a Wix user and can't be deleted. This can happen only if the request indicated to delete the member.\n * - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION` - Member was deleted, but contact was not. This can happen only if the request indicated to delete the member.\n * - `FAILED_DELETE_CONTACT` - Contact could not be deleted.\n */\nexport function bulkDeleteContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkDeleteContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/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 * Updates the specified properties for multiple contacts.\n * Fields that are included in fieldMask.paths are updated,\n * while all other fields stay the same.\n *\n * All contacts that meet the specified `filter` and `search` criteria are updated.\n * To perform a dry run, call Query Contacts with the intended filter options.\n *\n * When this method is used, a bulk job is started and the job ID is returned.\n * The job may not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\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: 'fieldMask' }],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'info.addresses.items.address.geocode.latitude' },\n { path: 'info.addresses.items.address.geocode.longitude' },\n ],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'info.picture.image.urlExpirationDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkUpdateContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/bulk/contacts/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __bulkUpdateContacts;\n}\n\n/**\n * Adds and removes labels from multiple contacts.\n *\n * Labels are added to and removed from all contacts that meet the specified\n * `filter` and `search` criteria.\n * The request should specify a `filter` value, a `search` value, or both.\n * To perform a dry run, call Query Contacts with the intended filter options.\n *\n * When this method is used, a bulk job is started and the job ID is returned.\n * The job might not complete right away, depending on its size.\n * The job's status can be retrieved with Get Bulk Job.\n */\nexport function bulkLabelAndUnlabelContacts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkLabelAndUnlabelContacts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkLabelAndUnlabelContacts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/bulk/contacts/add-remove-labels',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkLabelAndUnlabelContacts;\n}\n\n/**\n * Retrieves a contact.\n *\n * #### Getting Merged Contacts\n *\n * When a source contact is merged\n * with a target contact, the source contact is deleted.\n * When calling Get Contact for a merged contact,\n * you can use the source or target contact ID.\n * In both bases, the target contact is returned.\n *\n * This is supported only when calling Get Contact on merged contacts.\n * Previously deleted source contact IDs can't be used for any other method.\n */\nexport function getContact(payload: object): RequestOptionsFactory<any> {\n function __getContact({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.contacts.v4.contact',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.GetContact',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({\n protoPath: '/v4/contacts/{id}',\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.lastActivity.activityDate' },\n { path: 'contact.lastActivity.date' },\n { path: 'contact.picture.urlExpirationDate' },\n { path: 'contact.info.picture.image.urlExpirationDate' },\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.info.addresses.items.address.geocode.latitude' },\n {\n path: 'contact.info.addresses.items.address.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getContact;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,wDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AA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","AddressTag","SubdivisionType","ImageProvider","SubscriptionStatus","EmailDeliverabilityStatus","PhoneDeliverabilityStatus","MemberStatus","PrivacyStatus","Role","SortOrder","ContactFieldSet","ContactsFacetType","Action","UpsertContactResponseAction","GetContactResponseType","SubmitOperation","Mode","WebhookIdentityType","createContact","updateContact","mergeContacts","previewMergeContacts","deleteContact","labelContact","unlabelContact","listContacts","queryContacts","listFacets","queryFacets","bulkDeleteContacts","bulkUpdateContacts","bulkLabelAndUnlabelContacts","getContact"]}
|