import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query as Query$1, NonNullablePaths } from '@wix/sdk-types'; interface Contact { /** * Contact ID. * @format GUID * @readonly */ _id?: string; /** * Revision number, which increments by 1 each time the contact is updated. * To prevent conflicting changes, * the existing `revision` must be specified when updating a contact. * @readonly */ revision?: number; /** * Details about the contact's source. * @readonly */ source?: ContactSource; /** * Date and time the contact was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the contact was last updated. * @readonly */ _updatedDate?: Date | null; /** * Details about the contact's last action in the site. * @readonly */ lastActivity?: ContactActivity; /** * Contact's primary phone and email. * @readonly */ primaryInfo?: PrimaryContactInfo; /** Contact's details. */ info?: ContactInfo; /** * Contact's primary email details. * @readonly */ primaryEmail?: PrimaryEmail; /** * Contact's primary phone details. * @readonly */ primaryPhone?: PrimaryPhone; } interface ContactSource { /** * Source type. * @readonly */ sourceType?: ContactSourceTypeWithLiterals; /** * App ID, if the contact was created by an app. * @format GUID * @readonly */ appId?: string | null; } declare enum ContactSourceType { OTHER = "OTHER", ADMIN = "ADMIN", WIX_APP = "WIX_APP", IMPORT = "IMPORT", THIRD_PARTY = "THIRD_PARTY", WIX_BOOKINGS = "WIX_BOOKINGS", WIX_CHAT = "WIX_CHAT", WIX_EMAIL_MARKETING = "WIX_EMAIL_MARKETING", WIX_EVENTS = "WIX_EVENTS", WIX_FORMS = "WIX_FORMS", WIX_GROUPS = "WIX_GROUPS", WIX_HOTELS = "WIX_HOTELS", WIX_MARKET_PLACE = "WIX_MARKET_PLACE", WIX_MUSIC = "WIX_MUSIC", WIX_RESTAURANTS = "WIX_RESTAURANTS", WIX_SITE_MEMBERS = "WIX_SITE_MEMBERS", WIX_STORES = "WIX_STORES", WIX_CODE = "WIX_CODE", HOPP = "HOPP" } /** @enumType */ type ContactSourceTypeWithLiterals = ContactSourceType | 'OTHER' | 'ADMIN' | 'WIX_APP' | 'IMPORT' | 'THIRD_PARTY' | 'WIX_BOOKINGS' | 'WIX_CHAT' | 'WIX_EMAIL_MARKETING' | 'WIX_EVENTS' | 'WIX_FORMS' | 'WIX_GROUPS' | 'WIX_HOTELS' | 'WIX_MARKET_PLACE' | 'WIX_MUSIC' | 'WIX_RESTAURANTS' | 'WIX_SITE_MEMBERS' | 'WIX_STORES' | 'WIX_CODE' | 'HOPP'; interface ContactActivity { /** Date and time of the last action. */ activityDate?: Date | null; /** Contact's last action in the site. */ activityType?: ContactActivityTypeWithLiterals; } declare enum ContactActivityType { /** Visited the site. */ GENERAL = "GENERAL", /** Became a new contact. */ CONTACT_CREATED = "CONTACT_CREATED", /** Logged in. */ MEMBER_LOGIN = "MEMBER_LOGIN", /** Requested a site membership. */ MEMBER_REGISTER = "MEMBER_REGISTER", /** Was approved, blocked, or unblocked. */ MEMBER_STATUS_CHANGED = "MEMBER_STATUS_CHANGED", /** Submitted a form. */ FORM_SUBMITTED = "FORM_SUBMITTED", /** Started a chat. */ INBOX_FORM_SUBMITTED = "INBOX_FORM_SUBMITTED", /** Paid a payment request. */ INBOX_PAYMENT_REQUEST_PAID = "INBOX_PAYMENT_REQUEST_PAID", /** Received a message from the site. */ INBOX_MESSAGE_TO_CUSTOMER = "INBOX_MESSAGE_TO_CUSTOMER", /** Sent a new message to the site. */ INBOX_MESSAGE_FROM_CUSTOMER = "INBOX_MESSAGE_FROM_CUSTOMER", /** Subscribed to a site newsletter through a form. */ NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED = "NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED", /** Unsubscribed from a site newsletter. */ NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE", /** Made a purchase. */ ECOM_PURCHASE = "ECOM_PURCHASE", /** Abandoned a shopping cart. */ ECOM_CART_ABANDON = "ECOM_CART_ABANDON", /** Checked out shopping cart and submitted buyer info (but didn’t complete the purchase yet). */ ECOM_CHECKOUT_BUYER = "ECOM_CHECKOUT_BUYER", /** Booked an appointment. */ BOOKINGS_APPOINTMENT = "BOOKINGS_APPOINTMENT", /** Made a Wix Hotels reservation. */ HOTELS_RESERVATION = "HOTELS_RESERVATION", /** Paid for a Wix Hotels reservation. */ HOTELS_PURCHASE = "HOTELS_PURCHASE", /** Confirmed a Wix Hotels reservation. */ HOTELS_CONFIRMATION = "HOTELS_CONFIRMATION", /** Canceled a Wix Hotels reservation. */ HOTELS_CANCEL = "HOTELS_CANCEL", /** Purchased a video. */ VIDEO_PURCHASE = "VIDEO_PURCHASE", /** Rented a video. */ VIDEO_RENT = "VIDEO_RENT", /** Made a purchase with a pay button. */ CASHIER_BUTTON_PURCHASE = "CASHIER_BUTTON_PURCHASE", /** Became a new Wix Marketplace lead. */ ARENA_NEW_LEAD = "ARENA_NEW_LEAD", /** RSVP'd to an event. */ EVENTS_RSVP = "EVENTS_RSVP", /** Paid an invoice. */ INVOICE_PAY = "INVOICE_PAY", /** An invoice is now overdue. */ INVOICE_OVERDUE = "INVOICE_OVERDUE", /** Accepted a price quote. */ PRICE_QUOTE_ACCEPT = "PRICE_QUOTE_ACCEPT", /** A price quote has expired. */ PRICE_QUOTE_EXPIRE = "PRICE_QUOTE_EXPIRE", /** Ordered food with Wix Restaurants. */ RESTAURANTS_ORDER = "RESTAURANTS_ORDER", /** Made a Wix Restaurants reservation. */ RESTAURANTS_RESERVATION = "RESTAURANTS_RESERVATION", /** Opened an email from the site. */ SHOUTOUT_OPEN = "SHOUTOUT_OPEN", /** Clicked a link in an email from the site. */ SHOUTOUT_CLICK = "SHOUTOUT_CLICK", /** Merged with another contact. */ CONTACT_MERGED = "CONTACT_MERGED", /** Subscribed to a site newsletter. */ NEWSLETTER_SUBSCRIPTION_SUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_SUBSCRIBE", /** Subscription status to site newsletters is pending confirmation. */ NEWSLETTER_SUBSCRIPTION_PENDING = "NEWSLETTER_SUBSCRIPTION_PENDING", /** Subscription status to site newsletters is not set. */ NEWSLETTER_SUBSCRIPTION_NOT_SET = "NEWSLETTER_SUBSCRIPTION_NOT_SET", /** Subscribed to phone notifications. */ PHONE_SUBSCRIPTION_SUBSCRIBE = "PHONE_SUBSCRIPTION_SUBSCRIBE", /** Subscription to phone notificatons is pending confirmation. */ PHONE_SUBSCRIPTION_PENDING = "PHONE_SUBSCRIPTION_PENDING", /** Subscription to phone notificatons is not set. */ PHONE_SUBSCRIPTION_NOT_SET = "PHONE_SUBSCRIPTION_NOT_SET", /** Subscribed to phone notifications. */ PHONE_SUBSCRIPTION_UNSUBSCRIBE = "PHONE_SUBSCRIPTION_UNSUBSCRIBE" } /** @enumType */ type ContactActivityTypeWithLiterals = ContactActivityType | 'GENERAL' | 'CONTACT_CREATED' | 'MEMBER_LOGIN' | 'MEMBER_REGISTER' | 'MEMBER_STATUS_CHANGED' | 'FORM_SUBMITTED' | 'INBOX_FORM_SUBMITTED' | 'INBOX_PAYMENT_REQUEST_PAID' | 'INBOX_MESSAGE_TO_CUSTOMER' | 'INBOX_MESSAGE_FROM_CUSTOMER' | 'NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED' | 'NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE' | 'ECOM_PURCHASE' | 'ECOM_CART_ABANDON' | 'ECOM_CHECKOUT_BUYER' | 'BOOKINGS_APPOINTMENT' | 'HOTELS_RESERVATION' | 'HOTELS_PURCHASE' | 'HOTELS_CONFIRMATION' | 'HOTELS_CANCEL' | 'VIDEO_PURCHASE' | 'VIDEO_RENT' | 'CASHIER_BUTTON_PURCHASE' | 'ARENA_NEW_LEAD' | 'EVENTS_RSVP' | 'INVOICE_PAY' | 'INVOICE_OVERDUE' | 'PRICE_QUOTE_ACCEPT' | 'PRICE_QUOTE_EXPIRE' | 'RESTAURANTS_ORDER' | 'RESTAURANTS_RESERVATION' | 'SHOUTOUT_OPEN' | 'SHOUTOUT_CLICK' | 'CONTACT_MERGED' | 'NEWSLETTER_SUBSCRIPTION_SUBSCRIBE' | 'NEWSLETTER_SUBSCRIPTION_PENDING' | 'NEWSLETTER_SUBSCRIPTION_NOT_SET' | 'PHONE_SUBSCRIPTION_SUBSCRIBE' | 'PHONE_SUBSCRIPTION_PENDING' | 'PHONE_SUBSCRIPTION_NOT_SET' | 'PHONE_SUBSCRIPTION_UNSUBSCRIBE'; interface ActivityIcon { /** * Icon name * @maxLength 50 */ name?: string | null; /** * Icon url * @format WEB_URL */ url?: string | null; } interface PrimaryContactInfo { /** * Primary email address. * * This property reflects the email address in `info.emails` * where `primary` is `true`. * @format EMAIL * @readonly */ email?: string | null; /** * Primary phone number. * * This property reflects the phone number in `info.phones` * where `primary` is `true`. * @readonly */ phone?: string | null; } interface ContactInfo { /** Contact's first and last name. */ name?: ContactName; /** Contact's email addresses. */ emails?: ContactEmailsWrapper; /** Contact's phone numbers. */ phones?: ContactPhonesWrapper; /** Contact's street addresses. */ addresses?: ContactAddressesWrapper; /** * Contact's company name. * @maxLength 1000 */ company?: string | null; /** * Contact's job title. * @maxLength 1000 */ jobTitle?: string | null; /** * Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`. * @format LOCAL_DATE */ birthdate?: string | null; /** * Locale in * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. * Typically, this is a lowercase 2-letter language code, * followed by a hyphen, followed by an uppercase 2-letter country code. * For example, `en-US` for U.S. English, and `de-DE` for Germany German. * @format LANGUAGE_TAG */ locale?: string | null; /** * List of contact's labels. * * Labels are used to organize contacts. Labels can be * added and removed using Label Contact and Unlabel Contact, respectively. * * To view or manage contact labels, use the Labels API. */ labelKeys?: LabelsWrapper; /** * Additional custom fields. * * Empty fields are not returned. */ extendedFields?: ExtendedFieldsWrapper; /** Contact's profile picture. */ picture?: ContactPicture; } interface ContactName { /** * Contact's first name. * @maxLength 1000 */ first?: string | null; /** * Contact's last name. * @maxLength 1000 */ last?: string | null; } interface ContactEmailsWrapper { /** * List of up to 50 email addresses. * @maxSize 50 */ items?: ContactEmail[]; } interface ContactEmail { /** * Email ID. * @format GUID * @readonly */ _id?: string | null; /** * Email type. * * `UNTAGGED` is shown as "Other" in the Contact List. */ tag?: EmailTagWithLiterals; /** * Email address. * @minLength 1 * @maxLength 320 */ email?: string; /** * Indicates whether this is the contact's primary email address. * When changing `primary` to `true` for an email, * the contact's other emails become `false`. * Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email. */ primary?: boolean | null; } declare enum EmailTag { UNTAGGED = "UNTAGGED", MAIN = "MAIN", HOME = "HOME", WORK = "WORK" } /** @enumType */ type EmailTagWithLiterals = EmailTag | 'UNTAGGED' | 'MAIN' | 'HOME' | 'WORK'; interface ContactPhonesWrapper { /** * List of up to 50 phone numbers. * @maxSize 50 */ items?: ContactPhone[]; } interface ContactPhone { /** * Phone ID. * @format GUID * @readonly */ _id?: string | null; /** * Phone type. * * `UNTAGGED` is shown as "Other" in the Contact List. */ tag?: PhoneTagWithLiterals; /** * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. * @format COUNTRY */ countryCode?: string | null; /** * Phone number. * @minLength 1 * @maxLength 50 */ phone?: string; /** * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/) * phone number. * Automatically generated using `phone` and `countryCode`, pending both values are valid. * @readonly */ e164Phone?: string | null; /** * Indicates whether this is the contact's primary phone number. * When changing `primary` to `true` for a phone, * the contact's `primary` field for other phones becomes `false`. * Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone. */ primary?: boolean | null; } declare enum PhoneTag { UNTAGGED = "UNTAGGED", MAIN = "MAIN", HOME = "HOME", MOBILE = "MOBILE", WORK = "WORK", FAX = "FAX" } /** @enumType */ type PhoneTagWithLiterals = PhoneTag | 'UNTAGGED' | 'MAIN' | 'HOME' | 'MOBILE' | 'WORK' | 'FAX'; interface ContactAddressesWrapper { /** * List of up to 50 addresses. * @maxSize 50 */ items?: ContactAddress[]; } interface ContactAddress { /** * Street address ID. * @format GUID * @readonly */ _id?: string | null; /** * Address type. * `UNTAGGED` is shown as "Other" in the Contact List. */ tag?: AddressTagWithLiterals; /** Street address. */ address?: Address; } declare enum AddressTag { UNTAGGED = "UNTAGGED", HOME = "HOME", WORK = "WORK", BILLING = "BILLING", SHIPPING = "SHIPPING" } /** @enumType */ type AddressTagWithLiterals = AddressTag | 'UNTAGGED' | 'HOME' | 'WORK' | 'BILLING' | 'SHIPPING'; /** Physical address */ interface Address extends AddressStreetOneOf { /** Street address object, with number and name in separate fields. */ streetAddress?: StreetAddress; /** * Main address line, usually street and number, as free text. * @maxLength 1000 */ addressLine1?: string | null; /** * 2-letter country code in an * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * @format COUNTRY */ country?: string | null; /** * Code for a subdivision (such as state, prefecture, or province) in an * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. * @maxLength 100 */ subdivision?: string | null; /** * City name. * @maxLength 1000 */ city?: string | null; /** * Postal or zip code. * @maxLength 100 */ postalCode?: string | null; /** * Free text providing more detailed address information, * such as apartment, suite, or floor. * @maxLength 1000 */ addressLine2?: string | null; } /** @oneof */ interface AddressStreetOneOf { /** Street address object, with number and name in separate fields. */ streetAddress?: StreetAddress; /** * Main address line, usually street and number, as free text. * @maxLength 1000 */ addressLine?: string | null; } interface StreetAddress { /** * Street number. * @maxLength 100 */ number?: string; /** * Street name. * @maxLength 1000 */ name?: string; } interface AddressLocation { /** Address's latitude. */ latitude?: number | null; /** Address's longitude. */ longitude?: number | null; } interface Subdivision { /** subdivision short code */ code?: string; /** Full subdivision name. */ name?: string; } declare enum SubdivisionType { UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE", /** State */ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1", /** County */ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2", /** City/town */ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3", /** Neighborhood/quarter */ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4", /** Street/block */ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5", /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */ COUNTRY = "COUNTRY" } /** @enumType */ type SubdivisionTypeWithLiterals = SubdivisionType | 'UNKNOWN_SUBDIVISION_TYPE' | 'ADMINISTRATIVE_AREA_LEVEL_1' | 'ADMINISTRATIVE_AREA_LEVEL_2' | 'ADMINISTRATIVE_AREA_LEVEL_3' | 'ADMINISTRATIVE_AREA_LEVEL_4' | 'ADMINISTRATIVE_AREA_LEVEL_5' | 'COUNTRY'; interface AssigneesWrapper { /** * List of site contributor user IDs. * @format GUID * @maxSize 50 */ items?: string[]; } interface LabelsWrapper { /** * List of contact label keys. * * Contact labels help categorize contacts. Label keys must exist to be added to the contact. * Contact labels can be created or retrieved with Find or Create Label or List Labels. * @maxSize 2000 */ items?: string[]; } interface ExtendedFieldsWrapper { /** * Contact's extended fields, * where each key is the field key, * and each value is the field's value for the contact. * * To view and manage extended fields, use the Extended Fields API. */ items?: Record; } interface LocationsWrapper { /** * List of location ids. * @format GUID * @maxSize 50 */ items?: string[]; } /** TEST contact picture description */ interface ContactPicture { /** * Image. * This can contain an image URL or a Wix Media image ID. */ image?: string; } declare enum ImageProvider { UNKNOWN = "UNKNOWN", /** Image stored outside Wix */ EXTERNAL = "EXTERNAL", /** Stored in wix media platform, Must be uploaded by using `GeneratePictureUploadUrl` */ WIX_MEDIA = "WIX_MEDIA" } /** @enumType */ type ImageProviderWithLiterals = ImageProvider | 'UNKNOWN' | 'EXTERNAL' | 'WIX_MEDIA'; interface SegmentsWrapper { /** * List of Contact segment IDs * @maxSize 60 * @format GUID */ items?: string[]; } interface PrimaryEmail { /** * Primary email address. * * This field reflects the email address in `info.emails` * where `primary` is `true`. * @format EMAIL * @readonly */ email?: string | null; /** * Indicates the recipient's opt-in or opt-out status for marketing emails. * * Default: `NOT_SET` * @readonly */ subscriptionStatus?: SubscriptionStatusWithLiterals; /** * Indicates last reported status of sent emails. * * Default: `NOT_SET` * @readonly */ deliverabilityStatus?: EmailDeliverabilityStatusWithLiterals; } declare enum SubscriptionStatus { /** No status exists. */ NO_SUBSCRIPTION_STATUS = "NO_SUBSCRIPTION_STATUS", /** No status specified. */ NOT_SET = "NOT_SET", /** Subscription confirmation was requested, but recipient hasn't confirmed yet. */ PENDING = "PENDING", /** Recipient has opted in to marketing emails or SMS messages. */ SUBSCRIBED = "SUBSCRIBED", /** Recipient has opted out of marketing emails or SMS messages. */ UNSUBSCRIBED = "UNSUBSCRIBED" } /** @enumType */ type SubscriptionStatusWithLiterals = SubscriptionStatus | 'NO_SUBSCRIPTION_STATUS' | 'NOT_SET' | 'PENDING' | 'SUBSCRIBED' | 'UNSUBSCRIBED'; declare enum EmailDeliverabilityStatus { /** No status reported. */ NOT_SET = "NOT_SET", /** Emails are being successfully delivered. */ VALID = "VALID", /** The last email to the recipient bounced or was rejected. */ BOUNCED = "BOUNCED", /** Recipient registered a spam complaint with their email provider. */ SPAM_COMPLAINT = "SPAM_COMPLAINT", /** Multiple emails have been delivered without any kind of engagement from the recipient. */ INACTIVE = "INACTIVE" } /** @enumType */ type EmailDeliverabilityStatusWithLiterals = EmailDeliverabilityStatus | 'NOT_SET' | 'VALID' | 'BOUNCED' | 'SPAM_COMPLAINT' | 'INACTIVE'; interface PrimaryPhone { /** * Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * @format COUNTRY */ countryCode?: string | null; /** * Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format. * Automatically generated using `phone` and `countryCode` when both values are valid. * @readonly */ e164Phone?: string | null; /** * Formatted phone. Automatically generated using `phone` and `countryCode`. * @readonly */ formattedPhone?: string | null; /** * Indicates the recipient's opt-in or opt-out status for SMS messages. * * Default: * - `NOT_SET` when the phone is a valid E164 phone. * - `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone. * @readonly */ subscriptionStatus?: SubscriptionStatusWithLiterals; /** * Primary phone number. * * This field reflects the phone number in `info.phones` * where `primary` is `true`. * @readonly */ phone?: string | null; } declare enum PhoneDeliverabilityStatus { /** No status exists. */ NO_PHONE_DELIVERABILITY_STATUS = "NO_PHONE_DELIVERABILITY_STATUS", /** No status reported. */ NOT_SET = "NOT_SET" } /** @enumType */ type PhoneDeliverabilityStatusWithLiterals = PhoneDeliverabilityStatus | 'NO_PHONE_DELIVERABILITY_STATUS' | 'NOT_SET'; interface MemberInfo { /** * Member ID * @format GUID */ memberId?: string | null; /** Signup date */ signupDate?: Date | null; /** * Login email * @format EMAIL */ email?: string | null; /** Indicate whether the email is verified */ emailVerified?: boolean | null; /** Indicates whether the member is required to verify their email */ emailVerificationRequired?: boolean | null; /** * Member status. * - `PENDING`: Member created and is waiting for approval by site owner. * - `ACTIVE`: Member can log in to the site. * - `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. * - `BLOCKED': Member is blocked and cannot log in to the site. */ status?: MemberStatusWithLiterals; /** Profile info */ profileInfo?: ProfileInfo; /** User info */ userInfo?: UserInfo; /** Session info */ sessionInfo?: SessionInfo; /** Group info */ groupInfo?: GroupInfo; } declare enum MemberStatus { PENDING = "PENDING", ACTIVE = "ACTIVE", DELETED = "DELETED", BLOCKED = "BLOCKED", OFFLINE = "OFFLINE" } /** @enumType */ type MemberStatusWithLiterals = MemberStatus | 'PENDING' | 'ACTIVE' | 'DELETED' | 'BLOCKED' | 'OFFLINE'; interface ProfileInfo { /** * Nickname * @maxLength 255 */ nickname?: string | null; /** Privacy status */ privacyStatus?: PrivacyStatusWithLiterals; /** Indicate whether the member is reported */ reported?: boolean | null; /** Indicate whether the member is muted */ muted?: boolean | null; /** Profile photo */ photo?: string; } declare enum PrivacyStatus { PRIVATE = "PRIVATE", PUBLIC = "PUBLIC" } /** @enumType */ type PrivacyStatusWithLiterals = PrivacyStatus | 'PRIVATE' | 'PUBLIC'; interface UserInfo { /** * User ID * @format GUID */ userId?: string; /** The user's role on the website */ role?: RoleWithLiterals; } declare enum Role { UNSPECIFIED_ROLE = "UNSPECIFIED_ROLE", OWNER = "OWNER", CONTRIBUTOR = "CONTRIBUTOR" } /** @enumType */ type RoleWithLiterals = Role | 'UNSPECIFIED_ROLE' | 'OWNER' | 'CONTRIBUTOR'; interface SessionInfo { /** Last time the member logged in to the website */ lastWebLogin?: Date | null; /** Last time the member logged in to one of the mobile apps */ lastMobileLogin?: Date | null; /** * List of mobile apps that the member has ever logged in to * @maxSize 50 * @maxLength 50 */ mobileAppNames?: string[]; } interface GroupInfo { /** * Group IDs * @format GUID * @maxSize 1000 */ groupIds?: string[]; } interface ContactSubmitted { /** Pass through data, submitted with the contact */ passThroughData?: string | null; /** Submitted activity */ activity?: ContactActivity; /** Submitted Contact (after processing) */ contact?: Contact; } interface ContactChanged { /** The Contact before the changes */ previousContact?: Contact; /** The Contact after the changes */ currentContact?: Contact; } interface ContactEmailSubscriptionUpdated { /** The updated contact ID. */ contactId?: string; /** The revision of the contact. */ revision?: number; /** The primary email of the contact with the updated subscription and deliverability status. */ primaryEmail?: PrimaryEmail; /** Date and time the contact was updated with the email subscription or deliverability status. */ _updatedDate?: Date | null; } interface ContactPhoneSubscriptionUpdated { /** The updated contact ID. */ contactId?: string; /** The revision of the contact. */ revision?: number; /** The primary phone of the contact with the updated subscription status. */ primaryPhone?: PrimaryPhone; /** Date and time the contact was updated with the SMS subscription status. */ _updatedDate?: Date | null; } /** * This message is an internal message used by this app and it is used to trigger * the update of the subscription status of the contact asynchronously. * It is published after a contact is created/updated/merged. */ interface ContactPrimaryInfoUpdated { /** The updated contact ID. */ contactId?: string; /** Indication whether the primary email was updated. */ primaryEmailUpdated?: boolean; /** Indication whether primary phone was updated. */ primaryPhoneUpdated?: boolean; /** previous primary email subscription status */ previousPrimaryEmailSubscriptionStatus?: PrimarySubscriptionStatus; /** previous primary phone subscription status */ previousPrimaryPhoneSubscriptionStatus?: PrimarySubscriptionStatus; } interface PrimarySubscriptionStatus { /** subscription status */ subscriptionStatus?: SubscriptionStatusWithLiterals; } /** * This message is an internal message used by this app and it is used to trigger * the update of the contact's last activity is done asynchronously. */ interface LastActivityUpdate { /** * The contact ID. * @format GUID */ contactId?: string; /** Activity date. */ activityDate?: Date | null; /** * Activity translation key. * @maxLength 100 */ activityTranslationKey?: string; /** * Activity icon. * @maxLength 100 */ icon?: string | null; } /** Contact creation options. */ interface CreateContactRequest { /** Contact info. */ info: ContactInfo; /** * Controls whether the call will succeed * if the new contact information contains an email or a phone number already used by another contact. * * If set to `true`, * the call will succeed even if an email address or phone number is used by another contact. * If set to `false`, * the call will fail if the given email address is used by another contact or, * if the email address is not given and the given phone number is used by another contact. * * Default: `false` */ allowDuplicates?: boolean; } /** Contact. */ interface CreateContactResponse { /** Contact. */ contact?: Contact; } interface DuplicateContactExists { /** @format GUID */ duplicateContactId?: string | null; /** @format EMAIL */ duplicateEmail?: string | null; /** @format PHONE */ duplicatePhone?: string | null; } interface UpdateContactRequest { /** * ID of the contact to update. * @format GUID */ contactId: string; /** * Revision number. * When updating, include the existing `revision` * to prevent conflicting updates. */ revision: number | null; /** * Controls whether the call will succeed * if the new contact information contains an email or a phone number already used by another contact. * * If set to `true`, * the call will succeed even if an email address or phone number is used by another contact. * If set to `false`, * the call will fail if the given email address is used by another contact or, * if the email address is not given and the given phone number is used by another contact. * * Default: `false` */ allowDuplicates?: boolean; /** Contact info. */ info: ContactInfo; } /** Updated contact. */ interface UpdateContactResponse { /** Updated contact. */ contact?: Contact; } interface MergeContactsRequest { /** * Target contact ID. * @format GUID */ targetContactId: string; /** * Target contact revision number, which increments by 1 each time the contact is updated. * To prevent conflicting changes, * the target contact's current `revision` must be specified. */ targetContactRevision: number | null; /** * IDs of up to 5 contacts to merge into the target contact. * When you merge more than one source contact, * the first source is given precedence, then the second, and so on. * @minSize 1 * @maxSize 5 */ sourceContactIds?: string[]; } interface MergeContactsResponse { /** Updated target contact. */ contact?: Contact; } interface ContactMerged { /** ID of the contact the source contacts were merged into. */ targetContactId?: string; /** IDs of contacts that were merged into the target contact. */ sourceContactIds?: string[]; /** Updated target contact. */ targetContact?: Contact; } interface PreviewMergeContactsRequest { /** * Target contact ID. * @format GUID */ targetContactId: string; /** * IDs of up to 5 contacts to merge into the target contact. * When you merge more than one source contact, * the first source is given precedence, then the second, and so on. * @minSize 1 * @maxSize 5 */ sourceContactIds?: string[]; } interface PreviewMergeContactsResponse { /** Preview of the updated target contact. */ contact?: Contact; } interface DeleteContactRequest { /** * ID of the contact to delete. * @format GUID */ contactId: string; } interface DeleteContactResponse { } interface LabelContactRequest { /** * ID of the contact to add labels to. * @format GUID */ contactId: string; /** * List of label keys to add to the contact. * * Label keys must exist to be added to the contact. * Use the Labels API to create or retrieve labels. * @minSize 1 * @maxSize 100 */ labelKeys: string[]; } /** Updated contact. */ interface LabelContactResponse { /** Updated contact. */ contact?: Contact; } interface UnlabelContactRequest { /** * ID of the contact to remove labels from. * @format GUID */ contactId: string; /** * List of label keys to remove from the contact. * @minSize 1 * @maxSize 100 */ labelKeys: string[]; } /** Updated contact. */ interface UnlabelContactResponse { /** Updated contact. */ contact?: Contact; } interface LabelAndUnlabelContactRequest { /** * Contact ID. * @format GUID */ contactId?: string; /** * List of label keys to add to the contact. * * Label keys must exist to be added to the contact. * Contact labels can be created or retrieved with * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label) * or * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels). * @minSize 1 * @maxSize 100 */ labelKeysToAdd?: string[]; /** * List of label keys to remove from the contact. * @minSize 1 * @maxSize 100 */ labelKeysToRemove?: string[]; } interface LabelAndUnlabelContactResponse { /** Updated contact. */ contact?: Contact; } interface ListContactsRequest { /** [Sort order](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter). */ sort?: Sorting; /** [Pagination](https://dev.wix.com/api/rest/getting-started/pagination), defaults to offset = 0 and limit = 50 (max limit 1,000). */ paging?: Paging; /** * List of projected fields to return. * If both `fields` and `fieldsets` are sent in the request, * the union of both lists is returned. * `id` and `revision` are always returned. * * Supported properties: * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`, * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`, * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`, * `info.labelKeys`, `info.locations`, `info.extendedFields` * @maxLength 100 * @maxSize 100 */ fields?: string[]; /** @maxSize 10 */ fieldsets?: ContactFieldSetWithLiterals[]; } interface Sorting { /** * Field to sort by. * * Supported properties: * `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`, * `info.jobTitle`, `info.birthdate` * @maxLength 100 */ fieldName?: string; /** * Sort order. * Use `ASC` for ascending order or `DESC` for descending order. * * Defaults to `ASC`. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface Paging { /** * 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). * * Default: `50`.
* Maximum: `1000`. * @max 1000 */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } declare enum ContactFieldSet { /** name, primaryEmail, primaryPhone */ BASIC = "BASIC", /** name, phones, emails, addresses */ COMMUNICATION_DETAILS = "COMMUNICATION_DETAILS", /** name, primaryInfo(email, phone), extendedFields */ EXTENDED = "EXTENDED", /** Full contact object */ FULL = "FULL" } /** @enumType */ type ContactFieldSetWithLiterals = ContactFieldSet | 'BASIC' | 'COMMUNICATION_DETAILS' | 'EXTENDED' | 'FULL'; /** List of contacts. */ interface ListContactsResponse { /** List of contacts. */ contacts?: Contact[]; /** Details on the paged set of results returned. */ pagingMetadata?: PagingMetadata; } interface PagingMetadata { /** The number of items returned in this response. */ count?: number | null; /** The offset which was requested. */ offset?: number | null; /** The total number of items that match the query. */ total?: number | null; /** A flag that indicates the server failed to calculate 'total' field. */ tooManyToCount?: boolean | null; } interface QueryContactsRequest { /** Query options. */ query?: Query; } interface Query { /** * Filter object. * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) * for more information. * * For a detailed list of supported filters, see * [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters). */ filter?: Record | null; /** * Sorting options. * See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination) * for more information. * * Max: 1 sort object * @maxSize 1 */ sort?: Sorting[]; /** Pagination options. */ paging?: Paging; /** * List of projected fields to return. * If both `fields` and `fieldsets` are sent in the request, * the union of both lists is returned. * `id` and `revision` are always returned. * * Supported properties: * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`, * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`, * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`, * `info.labelKeys`, `info.locations`, `info.extendedFields` * @maxLength 100 * @maxSize 100 */ fields?: string[]; /** * Predefined sets of fields to return. * If both `fields` and `fieldsets` are sent in the request, * the union of both lists is returned. * * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`. * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`. * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`. * - `FULL`: Returns all fields. * * Default: If `fields` is omitted from the request, `FULL`. * @maxSize 10 */ fieldsets?: ContactFieldSetWithLiterals[]; } /** List of contacts. */ interface QueryContactsResponse { /** List of contacts. */ contacts?: Contact[]; /** Details on the paged set of results returned. */ pagingMetadata?: PagingMetadata; } interface ListFacetsRequest { /** Pagination options. */ paging?: Paging; /** * Language for localization. * @format LANGUAGE */ language?: string | null; } interface ListFacetsResponse { /** List of facets. */ facets?: ContactsFacet[]; /** Details on the paged set of results returned. */ pagingMetadata?: PagingMetadata; } interface ContactsFacet { /** Type of facet. */ facetType?: ContactsFacetTypeWithLiterals; /** * Scope for facet keys. * When a facet key exists in a namespace, * each key is unique within that namespace. * * Currently, facets not created by Wix are in the `custom` namespace. */ namespace?: string | null; /** Human-readable display name. */ namespaceDisplayName?: string | null; /** Facet key, automatically generated. */ facetKey?: string | null; /** Human-readable name. Shown in the Wix UI. */ facetDisplayName?: string | null; /** Number of contacts the facet applies to. */ count?: number | null; /** Filter used to query contacts of this facet. */ queryFilter?: Record | null; } declare enum ContactsFacetType { UNKNOWN = "UNKNOWN", ALL_CONTACTS = "ALL_CONTACTS", NOT_LABELED = "NOT_LABELED", LABEL = "LABEL", SUBSCRIPTION_STATUS = "SUBSCRIPTION_STATUS", MEMBERSHIP_STATUS = "MEMBERSHIP_STATUS" } /** @enumType */ type ContactsFacetTypeWithLiterals = ContactsFacetType | 'UNKNOWN' | 'ALL_CONTACTS' | 'NOT_LABELED' | 'LABEL' | 'SUBSCRIPTION_STATUS' | 'MEMBERSHIP_STATUS'; interface QueryFacetsRequest { /** Pagination options. */ paging?: Paging; /** * Language for localization. * @format LANGUAGE */ language?: string | null; /** * Filterable fields: * - `'info.extendedFields.emailSubscriptions.effectiveEmail'` (`$exists`). * - `'info.extendedFields.emailSubscriptions.subscriptionStatus'` (`$eq`, `$ne`, `$in`, `$nin`). * - `'info.extendedFields.emailSubscriptions.deliverabilityStatus'` (`$eq`, `$ne`, `$in`, `$nin`). */ filter?: Record | null; } interface QueryFacetsResponse { /** List of facets. */ facets?: ContactsFacet[]; /** Details on the paged set of results returned. */ pagingMetadata?: PagingMetadata; } interface BulkDeleteContactsRequest { /** * Filter object. * * Possible filters: * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`. * * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search) * for a detailed list of supported filters for contact properties, extended fields, and custom fields. * * * Example: * `{ "filter": { "info.name.last": "Smith" } }` */ filter?: Record | null; /** * Plain text search for an exact match, up to 100 characters. * * Searchable fields: * * - `info.name.first` * - `info.name.last` * - `info.emails.email` * - `info.phones.phone` * @maxLength 100 */ search?: string | null; } interface BulkDeleteContactsResponse { /** * Bulk job ID. * The job's status can be retrieved with Get Bulk Job. * @format GUID */ jobId?: string; } interface BulkUpdateContactsRequest { /** * Filter object. * * Possible filters: * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`. * * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search) * for a detailed list of supported filters for contact properties, extended fields, and custom fields. * * * Example: * `{ "filter": { "info.name.last": "Smith" } }` */ filter?: Record | null; /** * Plain text search for an exact match, up to 100 characters. * * Searchable fields: * * - `info.name.first` * - `info.name.last` * - `info.emails.email` * - `info.phones.phone` * @maxLength 100 */ search?: string | null; /** Contact info. */ info?: ContactInfo; } interface BulkUpdateContactsResponse { /** * Bulk job ID. * The job's status can be retrieved with Get Bulk Job. * @format GUID */ jobId?: string; } interface BulkLabelAndUnlabelContactsRequest { /** * Filter options. * Labels will be removed from contacts that meet the `filter` and `search` criteria. * * See * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search) * for a list of supported filters and fields. */ filter?: Record | null; /** * Plain text search for an exact match, up to 100 characters. * Labels will be removed from contacts that meet the `filter` and `search` criteria. * * See * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search) * for a list of searchable fields. * @maxLength 100 */ search?: string | null; /** * List of label keys to add to the contacts. * * Label keys must exist to be added to the contact. * Contact labels can be created or retrieved with * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label) * or * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels) * @maxSize 100 */ labelKeysToAdd?: string[]; /** * List of label keys to remove from the contacts. * @maxSize 100 */ labelKeysToRemove?: string[]; } interface BulkLabelAndUnlabelContactsResponse { /** * Bulk job ID. * The job's status can be retrieved with Get Bulk Job. * @format GUID */ jobId?: string; } interface BulkUpsertContactsRequest { /** * @minSize 1 * @maxSize 100 */ info?: ContactInfo[]; returnFullEntity?: boolean; } interface BulkUpsertContactsResponse { results?: Item[]; metadata?: BulkUpsertContactsResponseMetadata; } declare enum Action { UNKNOWN = "UNKNOWN", UPDATED = "UPDATED", CREATED = "CREATED" } /** @enumType */ type ActionWithLiterals = Action | 'UNKNOWN' | 'UPDATED' | 'CREATED'; interface Error { /** Error code. */ code?: string; /** Error details. */ message?: string | null; } interface Metadata { _id?: string | null; originalIndex?: number; action?: ActionWithLiterals; success?: boolean; error?: Error; } interface Item { contact?: Contact; metadata?: Metadata; } interface BulkUpsertContactsResponseMetadata { totalSuccess?: number; totalFailure?: number; totalCreated?: number; totalUpdated?: number; } interface UpsertContactRequest { info?: ContactInfo; } interface UpsertContactResponse { /** Upserted contact. */ contact?: Contact; action?: UpsertContactResponseActionWithLiterals; } declare enum UpsertContactResponseAction { UNKNOWN = "UNKNOWN", UPDATED = "UPDATED", CREATED = "CREATED" } /** @enumType */ type UpsertContactResponseActionWithLiterals = UpsertContactResponseAction | 'UNKNOWN' | 'UPDATED' | 'CREATED'; interface GeneratePictureUploadUrlRequest { /** * ID of the contact whose picture is being updated. * @format GUID */ contactId?: string; /** * Mime Type. Must be one of: * `image/png`, `image/jpeg`. * Defaults to `image/png`. */ mimeType?: string | null; } interface GeneratePictureUploadUrlResponse { /** * URL to upload the image * @format WEB_URL */ uploadUrl?: string; } interface GetContactRequest { /** * ID of the contact to retrieve. * @format GUID */ _id: string; /** * List of projected fields to return. * If both `fields` and `fieldsets` are sent in the request, * the union of both lists is returned. * `id` and `revision` are always returned. * * Supported properties: * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`, * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`, * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`, * `info.labelKeys`, `info.locations`, `info.extendedFields` * @maxLength 100 * @maxSize 100 */ fields?: string[]; /** * Predefined sets of fields to return. * If both `fields` and `fieldsets` are sent in the request, * the union of both lists is returned. * * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`. * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`. * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`. * - `FULL`: Returns all fields. * * Default: If `fields` is omitted from the request, `FULL`. * @maxSize 10 */ fieldsets?: ContactFieldSetWithLiterals[]; } /** The requested contact. */ interface GetContactResponse { /** The requested contact. */ contact?: Contact; /** Contact response type. */ responseType?: GetContactResponseTypeWithLiterals; } declare enum GetContactResponseType { /** The specified contact was returned. */ REGULAR = "REGULAR", /** Not used. */ IMPLICIT = "IMPLICIT", /** The specified contact was previously merged with another contact and the new contact was returned. */ MERGED = "MERGED" } /** @enumType */ type GetContactResponseTypeWithLiterals = GetContactResponseType | 'REGULAR' | 'IMPLICIT' | 'MERGED'; interface SyncSubmitContactRequest { contactInfo?: ContactInfo; activity?: ContactActivity; passThroughData?: string | null; /** @format GUID */ contactId?: string; submitOperation?: SubmitOperationWithLiterals; /** Need to resolve source in allocator, because of server sign */ sourceType?: ContactSourceTypeWithLiterals; sourceId?: string | null; hideFromContactList?: boolean; } declare enum SubmitOperation { UNKNOWN = "UNKNOWN", CREATE = "CREATE", UPDATE = "UPDATE" } /** @enumType */ type SubmitOperationWithLiterals = SubmitOperation | 'UNKNOWN' | 'CREATE' | 'UPDATE'; interface SyncSubmitContactResponse { } interface CountContactsRequest { } interface CountContactsResponse { count?: number; } interface SearchContactsRequest { /** Search object. Encapsulates filter, sorting, paging and other details */ search?: Search; } interface Search extends SearchPagingMethodOneOf { /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */ cursorPaging?: CursorPaging; /** 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) */ filter?: Record | null; /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */ sort?: Sorting[]; /** * List of projected fields to return. * * If used in the request, * all the fields contained in `fields` and `fieldsets` are returned. * If left blank, `fieldsets` is used to determine which fields to return. * * For a list of valid projected fields, see * [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). * @maxLength 100 * @maxSize 100 */ fields?: string[]; /** * Predefined sets of fields to return. * * Defaults to `FULL`. * Ignored if left empty when `fields` is used in the request. * * For more information, * see [Contact Fieldsets](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_contact-fieldsets). * @maxSize 10 */ fieldsets?: string[]; /** free text to match in searchable fields */ search?: SearchDetails; } /** @oneof */ interface SearchPagingMethodOneOf { /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */ cursorPaging?: CursorPaging; } interface SearchDetails { /** boolean search mode. Default is `OR` */ mode?: ModeWithLiterals; /** * search term or expression * @maxLength 100 */ expression?: string | null; /** * fields to search in. if empty - server will search in own default fieldsDefault searchable fields: * * - `info.name.first` * - `info.name.last` * - `info.emails.email` * - `info.phones.phone` * @maxLength 100 * @maxSize 100 */ fields?: string[]; /** flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */ fuzzy?: boolean; } declare enum Mode { /** any */ OR = "OR", /** all */ AND = "AND" } /** @enumType */ type ModeWithLiterals = Mode | 'OR' | 'AND'; interface CursorPaging { /** * The number of contacts to load (default = 50, max = 1000) * @max 1000 */ limit?: number | null; /** Cursor returned in last query response. Should not be provided on first page request */ cursor?: string | null; } interface SearchContactsResponse { /** List of contacts. */ contacts?: Contact[]; /** Details on the paged set of results returned. */ cursorPagingMetadata?: CursorPagingMetadata; } /** This is the preferred message for cursor-paging enabled services */ interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** Cursor pointing to next result page */ next?: string | null; /** Cursor pointing to previous result page */ prev?: string | null; } interface BulkAddSegmentToContactsRequest { /** * Segment id * @format GUID */ segmentId?: string; /** * List of Contact ids * @format GUID * @minSize 1 * @maxSize 1000 */ contactIds?: string[]; /** * List of existing segment ids * @format GUID * @maxSize 100 */ existsSegmentIds?: string[]; } interface BulkAddSegmentToContactsResponse { /** List of action results */ results?: ItemMetadata[]; /** Metadata on the bulk action */ bulkActionMetadata?: BulkActionMetadata; } interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface ContactAddedToSegment { /** Id of the segment to which the contact was added */ segmentId?: string; /** The contact that was added */ contact?: Contact; } interface BulkRemoveSegmentFromContactsRequest { /** * Segment id * @format GUID */ segmentId?: string; /** * List of Contact ids * @format GUID * @minSize 1 * @maxSize 1000 */ contactIds?: string[]; } interface BulkRemoveSegmentFromContactsResponse { /** List of action results */ results?: ItemMetadata[]; /** Metadata on the bulk action */ bulkActionMetadata?: BulkActionMetadata; } interface ContactRemovedFromSegment { /** Id of the segment from which the contact was removed */ segmentId?: string; /** The contact that was removed */ contact?: Contact; } interface ListContactIdsBySegmentRequest { /** * Segment id * @format GUID */ segmentId?: string; /** Cursor paging. */ cursorPaging?: CursorPaging; } interface ListContactIdsBySegmentResponse { /** * List of contact IDs * @format GUID * @maxSize 1000 */ contactIds?: string[]; /** Paging metadata */ cursorPagingMetadata?: CursorPagingMetadata; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type CreateContactApplicationErrors = { code?: 'DUPLICATE_CONTACT_EXISTS'; description?: string; data?: DuplicateContactExists; } | { code?: 'INSUFFICIENT_CONTACT_DATA'; description?: string; data?: Record; } | { code?: 'CONTACT_ID_ALREADY_EXISTS'; description?: string; data?: Record; } | { code?: 'CANNOT_HAVE_MULTIPLE_PRIMARY_INFO'; description?: string; data?: Record; } | { code?: 'INVALID_EXTENDED_FIELD_VALUE'; description?: string; data?: Record; }; /** @docsIgnore */ type UpdateContactApplicationErrors = { code?: 'DUPLICATE_CONTACT_EXISTS'; description?: string; data?: DuplicateContactExists; } | { code?: 'CONTACT_ALREADY_CHANGED'; description?: string; data?: Record; } | { code?: 'INSUFFICIENT_CONTACT_DATA'; description?: string; data?: Record; } | { code?: 'CONTACT_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'INSUFFICIENT_UPDATE_CONTACT_DATA'; description?: string; data?: Record; } | { code?: 'CANNOT_HAVE_MULTIPLE_PRIMARY_INFO'; description?: string; data?: Record; } | { code?: 'INVALID_EXTENDED_FIELD_VALUE'; description?: string; data?: Record; } | { code?: 'CANNOT_UPDATE_MEMBER_EMAIL'; description?: string; data?: Record; }; /** @docsIgnore */ type MergeContactsApplicationErrors = { code?: 'CONTACT_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'FAILED_PRECONDITION'; description?: string; data?: Record; } | { code?: 'ILLEGAL_MERGE'; description?: string; data?: Record; }; /** @docsIgnore */ type PreviewMergeContactsApplicationErrors = { code?: 'CONTACT_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'FAILED_PRECONDITION'; description?: string; data?: Record; } | { code?: 'ILLEGAL_MERGE'; description?: string; data?: Record; }; /** @docsIgnore */ type DeleteContactApplicationErrors = { code?: 'CANNOT_DELETE_MEMBER'; description?: string; data?: Record; } | { code?: 'CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION'; description?: string; data?: Record; } | { code?: 'CANNOT_DELETE_MEMBER_OWNER_OR_CONTRIBUTOR'; description?: string; data?: Record; } | { code?: 'FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION'; description?: string; data?: Record; }; /** @docsIgnore */ type LabelContactApplicationErrors = { code?: 'CONTACT_NOT_FOUND'; description?: string; data?: Record; }; /** @docsIgnore */ type UnlabelContactApplicationErrors = { code?: 'CONTACT_NOT_FOUND'; description?: string; data?: Record; }; /** @docsIgnore */ type ListContactsApplicationErrors = { code?: 'UNSUPPORTED_SORT_FIELD'; description?: string; data?: Record; } | { code?: 'ILLEGAL_LIMIT'; description?: string; data?: Record; }; /** @docsIgnore */ type QueryContactsApplicationErrors = { code?: 'UNSUPPORTED_SORT_FIELD'; description?: string; data?: Record; } | { code?: 'ILLEGAL_LIMIT'; description?: string; data?: Record; } | { code?: 'MALFORMED_FILTER'; description?: string; data?: Record; } | { code?: 'UNSUPPORTED_FILTER'; description?: string; data?: Record; } | { code?: 'UNSUPPORTED_FILTER_FIELD_UNKNOWN'; description?: string; data?: Record; } | { code?: 'UNSUPPORTED_FILTER_OPERATOR'; description?: string; data?: Record; } | { code?: 'UNSUPPORTED_FILTER_VALUE'; description?: string; data?: Record; } | { code?: 'UNSUPPORTED_FILTER_VALUE_TYPE'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkDeleteContactsApplicationErrors = { code?: 'NEITHER_FILTER_NOR_SEARCH'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkLabelAndUnlabelContactsApplicationErrors = { code?: 'NEITHER_FILTER_NOR_SEARCH'; description?: string; data?: Record; }; /** @docsIgnore */ type GetContactApplicationErrors = { code?: 'CONTACT_NOT_FOUND'; description?: string; data?: Record; }; interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface ContactCreatedEnvelope { entity: Contact; metadata: EventMetadata; } /** * Triggered when a contact is created. * @permissionScope Manage_Wix_Rentals_App_Forms_submissions * @permissionScopeId SCOPE.RENTALS.MANAGE * @permissionScope Read Contacts (PII) * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS_LIMITED * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Manage Events * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS * @permissionScope Manage Online Programs * @permissionScopeId SCOPE.CHALLENGES.MANAGE * @permissionScope Read Contacts * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS * @permissionScope Read Members and Contacts - all read permissions * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage Contacts * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS * @permissionScope Set Up Automations * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS * @permissionScope Manage Members and Contacts - all permissions * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS * @permissionId CONTACTS.VIEW * @webhook * @eventType wix.contacts.v4.contact_created * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4 * @slug created */ declare function onContactCreated(handler: (event: ContactCreatedEnvelope) => void | Promise): void; interface ContactDeletedEnvelope { metadata: EventMetadata; } /** * Triggered when a contact is deleted. * * If a contact is deleted as part of a merge, the `originatedFrom` property is sent as `merge`. * Otherwise, `originatedFrom` isn't returned. * @permissionScope Manage_Wix_Rentals_App_Forms_submissions * @permissionScopeId SCOPE.RENTALS.MANAGE * @permissionScope Read Contacts (PII) * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS_LIMITED * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Manage Events * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS * @permissionScope Manage Online Programs * @permissionScopeId SCOPE.CHALLENGES.MANAGE * @permissionScope Read Contacts * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS * @permissionScope Read Members and Contacts - all read permissions * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage Contacts * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS * @permissionScope Set Up Automations * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS * @permissionScope Manage Members and Contacts - all permissions * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS * @permissionId CONTACTS.VIEW * @webhook * @eventType wix.contacts.v4.contact_deleted * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4 * @slug deleted */ declare function onContactDeleted(handler: (event: ContactDeletedEnvelope) => void | Promise): void; interface ContactMergedEnvelope { data: ContactMerged; metadata: EventMetadata; } /** * Triggered when one or more source contacts are merged into a target contact. * @permissionScope Manage_Wix_Rentals_App_Forms_submissions * @permissionScopeId SCOPE.RENTALS.MANAGE * @permissionScope Read Contacts (PII) * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS_LIMITED * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Manage Events * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS * @permissionScope Manage Online Programs * @permissionScopeId SCOPE.CHALLENGES.MANAGE * @permissionScope Read Contacts * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS * @permissionScope Read Members and Contacts - all read permissions * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage Contacts * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS * @permissionScope Set Up Automations * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS * @permissionScope Manage Members and Contacts - all permissions * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS * @permissionId CONTACTS.VIEW * @webhook * @eventType wix.contacts.v4.contact_merged * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4 * @slug merged */ declare function onContactMerged(handler: (event: ContactMergedEnvelope) => void | Promise): void; interface ContactUpdatedEnvelope { entity: Contact; metadata: EventMetadata; /** @hidden */ modifiedFields: Record; } /** * Triggered when a contact is updated. * @permissionScope Manage_Wix_Rentals_App_Forms_submissions * @permissionScopeId SCOPE.RENTALS.MANAGE * @permissionScope Read Contacts (PII) * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS_LIMITED * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Manage Events * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS * @permissionScope Manage Online Programs * @permissionScopeId SCOPE.CHALLENGES.MANAGE * @permissionScope Read Contacts * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS * @permissionScope Read Members and Contacts - all read permissions * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage Contacts * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS * @permissionScope Set Up Automations * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS * @permissionScope Manage Members and Contacts - all permissions * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS * @permissionId CONTACTS.VIEW * @webhook * @eventType wix.contacts.v4.contact_updated * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4 * @slug updated */ declare function onContactUpdated(handler: (event: ContactUpdatedEnvelope) => void | Promise): void; /** * Creates a new contact. * * The `info` object must include at least one of the following: * - Name * - Phone number * - Email address * * By default, if the call contains an email already in use by another contact, * the new contact won't be created. To override this behavior, set `allowDuplicates` to `true`. * @param info - Contact info. * @public * @requiredField info * @param options - Create contact options. * @permissionId CONTACTS.MODIFY * @applicableIdentity APP * @returns Contact. * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.CreateContact */ declare function createContact(info: ContactInfo, options?: CreateContactOptions): Promise & { __applicationErrorsType?: CreateContactApplicationErrors; }>; interface CreateContactOptions { /** * Controls whether the call will succeed * if the new contact information contains an email or a phone number already used by another contact. * * If set to `true`, * the call will succeed even if an email address or phone number is used by another contact. * If set to `false`, * the call will fail if the given email address is used by another contact or, * if the email address is not given and the given phone number is used by another contact. * * Default: `false` */ allowDuplicates?: boolean; } /** * Updates a contact. * * Each time the contact is updated, * `revision` increments by 1. * The existing `revision` must be included when updating the contact. * This ensures you're working with the latest contact information, * and it prevents unintended overwrites. * * You can't call Update Contact to update the `primaryEmail` of a contact who is also a member. * Instead, use the Members API to update the member's login email, which will also update the contact's primary email. * * 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. * @param contactId - ID of the contact to update. * @param info - Contact info. * @param revision - Revision number. * When updating, include the existing `revision` * to prevent conflicting updates. * @public * @requiredField contactId * @requiredField info * @requiredField revision * @param options - Contact update options. * @permissionId CONTACTS.MODIFY * @permissionId CONTACTS.MODIFY_MEMBERSHIP_STATUS * @permissionId CONTACTS.MODIFY_MEMBER_PRIMARY_EMAIL_PERMISSION * @applicableIdentity APP * @returns Updated contact. * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.UpdateContact */ declare function updateContact(contactId: string, info: ContactInfo, revision: number, options?: UpdateContactOptions): Promise & { __applicationErrorsType?: UpdateContactApplicationErrors; }>; interface UpdateContactOptions { /** * Controls whether the call will succeed * if the new contact information contains an email or a phone number already used by another contact. * * If set to `true`, * the call will succeed even if an email address or phone number is used by another contact. * If set to `false`, * the call will fail if the given email address is used by another contact or, * if the email address is not given and the given phone number is used by another contact. * * Default: `false` */ allowDuplicates?: boolean; } /** * Merges source contacts into a target contact. * * Merging contacts has the following effects on the target contact: * * - No target contact data is overwritten or deleted. * - Arrays (emails, phone numbers, addresses, and labels) from the source contacts are added to the target contact's arrays. * - If you merge more than one source contact, the 1st source contact specified is added first, then the 2nd, and so on. * - If there is duplicate information between the target contact and the source contact, the information isn't duplicated in the target contact's arrays. * *
* * __Important:__ * Merges cannot be undone. * In REST, call Preview Merge Contacts to test before merging. * *
* * When you merge contacts, source contacts are typically deleted. * However, if a source contact is a site member or a Wix user, * the merge will fail because site members and Wix users can't be deleted. * This means that site members and Wix users can only be specified as target contacts in a merge. * * After merging, calling Get Contact with a deleted source contact ID returns the target contact ID. * Specifying a deleted source contact ID is not supported on any other method. * * When contacts are merged: * * - The Contact Merged event is triggered. * - The Contact Updated event is triggered for the target contact. `originatedFrom` is set to `merge`. * - The Contact Deleted event is triggered for each source contact. `originatedFrom` is set to `merge`. * @param targetContactId - Target contact ID. * @param targetContactRevision - Target contact revision number, which increments by 1 each time the contact is updated. * To prevent conflicting changes, * the target contact's current `revision` must be specified. * @public * @requiredField targetContactId * @requiredField targetContactRevision * @param options - Merge contacts options. * @permissionId CONTACTS.MERGE * @applicableIdentity APP * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.MergeContacts */ declare function mergeContacts(targetContactId: string, targetContactRevision: number, options?: MergeContactsOptions): Promise & { __applicationErrorsType?: MergeContactsApplicationErrors; }>; interface MergeContactsOptions { /** * IDs of up to 5 contacts to merge into the target contact. * When you merge more than one source contact, * the first source is given precedence, then the second, and so on. * @minSize 1 * @maxSize 5 */ sourceContactIds?: string[]; } /** * Previews merging source contacts into a target contact. * * This method performs a dry run without deleting or updating any contacts. * A preview of the updated target contact is returned, * but no data is changed in the contact list. * * To perform the actual merge, use Merge Contacts. * @param targetContactId - Target contact ID. * @public * @requiredField targetContactId * @param options - Preview merge contacts options. * @permissionId CONTACTS.MERGE * @applicableIdentity APP * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.PreviewMergeContacts */ declare function previewMergeContacts(targetContactId: string, options?: PreviewMergeContactsOptions): Promise & { __applicationErrorsType?: PreviewMergeContactsApplicationErrors; }>; interface PreviewMergeContactsOptions { /** * IDs of up to 5 contacts to merge into the target contact. * When you merge more than one source contact, * the first source is given precedence, then the second, and so on. * @minSize 1 * @maxSize 5 */ sourceContactIds?: string[]; } /** * Deletes a contact. * * Deleting a contact permanently removes it from the contact list. * If a contact is also a site member or Wix user, or has a valid billing subscription, * the contact can't be deleted. The related site member or Wix user must first be deleted * and any valid billing subscriptions must be canceled, before the contact can be deleted. * * 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 Delete Contact. * @param contactId - ID of the contact to delete. * @public * @requiredField contactId * @permissionId CONTACTS.MODIFY * @permissionId MEMBERS.MEMBER_DELETE * @applicableIdentity APP * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.DeleteContact */ declare function deleteContact(contactId: string): Promise; /** * Adds labels to a contact. * * Use the Labels API to create or retrieve labels. * * 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 Label Contact. * @param contactId - ID of the contact to add labels to. * @param labelKeys - List of label keys to add to the contact. * * Label keys must exist to be added to the contact. * Use the Labels API to create or retrieve labels. * @public * @requiredField contactId * @requiredField labelKeys * @permissionId CONTACTS.MODIFY * @applicableIdentity APP * @returns Updated contact. * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.LabelContact */ declare function labelContact(contactId: string, labelKeys: string[]): Promise & { __applicationErrorsType?: LabelContactApplicationErrors; }>; /** * Removes labels from a contact. * * If a label is no longer needed * and you want to remove it from all contacts, * you can delete by calling Delete Label from the Labels API. * * 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 Unlabel Contact. * @param contactId - ID of the contact to remove labels from. * @param labelKeys - List of label keys to remove from the contact. * @public * @requiredField contactId * @requiredField labelKeys * @permissionId CONTACTS.MODIFY * @applicableIdentity APP * @returns Updated contact. * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.UnlabelContact */ declare function unlabelContact(contactId: string, labelKeys: string[]): Promise & { __applicationErrorsType?: UnlabelContactApplicationErrors; }>; /** * Retrieves a list of up to 1,000 contacts per request. * @public * @param options - Object containing list of options for retrieving contacts. * @permissionId CONTACTS.VIEW * @applicableIdentity APP * @returns List of contacts. * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.ListContacts */ declare function listContacts(options?: ListContactsOptions): Promise & { __applicationErrorsType?: ListContactsApplicationErrors; }>; interface ListContactsOptions { /** [Sort order](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter). */ sort?: Sorting; /** [Pagination](https://dev.wix.com/api/rest/getting-started/pagination), defaults to offset = 0 and limit = 50 (max limit 1,000). */ paging?: Paging; /** * List of projected fields to return. * If both `fields` and `fieldsets` are sent in the request, * the union of both lists is returned. * `id` and `revision` are always returned. * * Supported properties: * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`, * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`, * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`, * `info.labelKeys`, `info.locations`, `info.extendedFields` * @maxLength 100 * @maxSize 100 */ fields?: string[]; /** @maxSize 10 */ fieldsets?: ContactFieldSetWithLiterals[]; } /** * Creates a query to retrieve a list of contacts. * * The `queryContacts()` function builds a query to retrieve a list of contacts and returns a `ContactsQueryBuilder` object. * * The returned object contains the query definition, which is typically used to run the query using the `find()` function. * * 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. * * `queryContacts()` runs with these `ContactsQueryBuilder` defaults, which you can override: * * - `skip(0)` * - `limit(50)` * - `descending("_createdDate")` * * 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. * @public * @param options - Query contact options. * @permissionId CONTACTS.VIEW * @applicableIdentity APP * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts */ declare function queryContacts(options?: QueryContactsOptions): ContactsQueryBuilder; interface QueryContactsOptions { } interface QueryOffsetResult { currentPage: number | undefined; totalPages: number | undefined; totalCount: number | undefined; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface ContactsQueryResult extends QueryOffsetResult { items: Contact[]; query: ContactsQueryBuilder; next: () => Promise; prev: () => Promise; } interface ContactsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'lastActivity.activityDate' | 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.birthdate' | 'info.locale', value: any) => ContactsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'lastActivity.activityDate' | 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.birthdate' | 'info.locale', value: any) => ContactsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate' | 'info.birthdate', value: any) => ContactsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate' | 'info.birthdate', value: any) => ContactsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate' | 'info.birthdate', value: any) => ContactsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate' | 'info.birthdate', value: any) => ContactsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. */ startsWith: (propertyName: 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle', value: string) => ContactsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasSome: (propertyName: string, value: any[]) => ContactsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasAll: (propertyName: string, value: any[]) => ContactsQueryBuilder; in: (propertyName: '_id' | 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.locale', value: any) => ContactsQueryBuilder; exists: (propertyName: '_id' | 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.locale', value: boolean) => ContactsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'_createdDate' | 'lastActivity.activityDate' | 'primaryInfo.email' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.birthdate'>) => ContactsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'_createdDate' | 'lastActivity.activityDate' | 'primaryInfo.email' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.birthdate'>) => ContactsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => ContactsQueryBuilder; /** @param skip - Number of items to skip in the query results before returning the results. */ skip: (skip: number) => ContactsQueryBuilder; find: () => Promise; } /** * @hidden * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts * @requiredField query * @returns List of contacts. */ declare function typedQueryContacts(query: ContactQuery, options?: QueryContactsOptions): Promise & { __applicationErrorsType?: QueryContactsApplicationErrors; }>; interface ContactQuerySpec extends QuerySpec { paging: 'offset'; wql: [ { fields: ['_id', 'info.locale']; operators: ['$eq', '$exists', '$in', '$ne']; sort: 'NONE'; }, { fields: ['_createdDate', 'info.birthdate', 'lastActivity.activityDate']; operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne']; sort: 'BOTH'; }, { fields: ['_updatedDate']; operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne']; sort: 'NONE'; }, { fields: [ 'info.company', 'info.jobTitle', 'info.name.first', 'info.name.last', 'primaryInfo.email' ]; operators: ['$eq', '$exists', '$in', '$ne', '$startsWith']; sort: 'BOTH'; }, { fields: ['primaryInfo.phone']; operators: ['$eq', '$exists', '$in', '$ne', '$startsWith']; sort: 'NONE'; }, { fields: ['info.labelKeys']; operators: ['$hasAll', '$hasSome']; sort: 'NONE'; } ]; } type CommonQueryWithEntityContext = Query$1; type ContactQuery = { /** Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information. For a detailed list of supported filters, see [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters). */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sorting options. See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination) for more information. Max: 1 sort object @maxSize: 1 */ sort?: { /** Field to sort by. Supported properties: `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`, `info.jobTitle`, `info.birthdate` @maxLength: 100 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. Use `ASC` for ascending order or `DESC` for descending order. Defaults to `ASC`. */ order?: NonNullable[number]['order']; }[]; /** Pagination options. */ paging?: { /** 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). Default: `50`.
Maximum: `1000`. @max: 1000 */ limit?: NonNullable['limit'] | null; /** Number of items to skip in the current sort order. */ offset?: NonNullable['offset'] | null; }; }; declare const utils: { query: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; }; /** * Lists facets from the site’s contact list. * Facets include labels and subscription statuses. * @public * @param options - List facets options. * @permissionId CONTACTS.VIEW * @applicableIdentity APP * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.ListFacets */ declare function listFacets(options?: ListFacetsOptions): Promise>; interface ListFacetsOptions { /** Pagination options. */ paging?: Paging; /** * Language for localization. * @format LANGUAGE */ language?: string | null; } /** * Retrieves facets from the site’s contact list by filter. * Facets include labels and subscription statuses. * @public * @param options - Query facets options. * @permissionId CONTACTS.VIEW * @applicableIdentity APP * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryFacets */ declare function queryFacets(options?: QueryFacetsOptions): Promise>; interface QueryFacetsOptions { /** Pagination options. */ paging?: Paging; /** * Language for localization. * @format LANGUAGE */ language?: string | null; /** * Filterable fields: * - `'info.extendedFields.emailSubscriptions.effectiveEmail'` (`$exists`). * - `'info.extendedFields.emailSubscriptions.subscriptionStatus'` (`$eq`, `$ne`, `$in`, `$nin`). * - `'info.extendedFields.emailSubscriptions.deliverabilityStatus'` (`$eq`, `$ne`, `$in`, `$nin`). */ filter?: Record | null; } /** * Deletes multiple contacts. * * All contacts that meet the specified `filter` and `search` criteria are deleted. * The request should contain a `filter` value or a `search` value, or both. * To perform a dry run, call Query Contacts with the intended filter options. * * When this method is called, a bulk job is started and the job ID is returned. * The job might not complete right away, depending on its size. * The job's status can be retrieved with Get Bulk Job. * * The following errors might occur during the bulk processing and will appear in the bulk job: * - `CANNOT_DELETE_SITE_MEMBERS` - Contact is a site member and can't be deleted. Member must be deleted first. * - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION` - Contact has a valid billing subscription and can't be deleted. * - `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. * - `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. * - `FAILED_DELETE_CONTACT` - Contact could not be deleted. * @public * @param options - Bulk delete contacts options. * @permissionId CONTACTS.MODIFY * @permissionId MEMBERS.MEMBER_DELETE * @applicableIdentity APP * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkDeleteContacts */ declare function bulkDeleteContacts(options?: BulkDeleteContactsOptions): Promise & { __applicationErrorsType?: BulkDeleteContactsApplicationErrors; }>; interface BulkDeleteContactsOptions { /** * Filter object. * * Possible filters: * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`. * * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search) * for a detailed list of supported filters for contact properties, extended fields, and custom fields. * * * Example: * `{ "filter": { "info.name.last": "Smith" } }` */ filter?: Record | null; /** * Plain text search for an exact match, up to 100 characters. * * Searchable fields: * * - `info.name.first` * - `info.name.last` * - `info.emails.email` * - `info.phones.phone` * @maxLength 100 */ search?: string | null; } /** * Updates the specified properties for multiple contacts. * Fields that are included in fieldMask.paths are updated, * while all other fields stay the same. * * All contacts that meet the specified `filter` and `search` criteria are updated. * To perform a dry run, call Query Contacts with the intended filter options. * * When this method is used, a bulk job is started and the job ID is returned. * The job may not complete right away, depending on its size. * The job's status can be retrieved with Get Bulk Job. * @public * @param options - Bulk update contacts options. * @permissionId CONTACTS.MODIFY * @applicableIdentity APP * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkUpdateContacts */ declare function bulkUpdateContacts(options?: BulkUpdateContactsOptions): Promise>; interface BulkUpdateContactsOptions { /** * Filter object. * * Possible filters: * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`. * * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search) * for a detailed list of supported filters for contact properties, extended fields, and custom fields. * * * Example: * `{ "filter": { "info.name.last": "Smith" } }` */ filter?: Record | null; /** * Plain text search for an exact match, up to 100 characters. * * Searchable fields: * * - `info.name.first` * - `info.name.last` * - `info.emails.email` * - `info.phones.phone` * @maxLength 100 */ search?: string | null; /** Contact info. */ info?: ContactInfo; } /** * Adds and removes labels from multiple contacts. * * Labels are added to and removed from all contacts that meet the specified * `filter` and `search` criteria. * The request should specify a `filter` value, a `search` value, or both. * To perform a dry run, call Query Contacts with the intended filter options. * * When this method is used, a bulk job is started and the job ID is returned. * The job might not complete right away, depending on its size. * The job's status can be retrieved with Get Bulk Job. * @public * @param options - Bulk label and unlabel contacts options. * @permissionId CONTACTS.MODIFY * @applicableIdentity APP * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.BulkLabelAndUnlabelContacts */ declare function bulkLabelAndUnlabelContacts(options?: BulkLabelAndUnlabelContactsOptions): Promise & { __applicationErrorsType?: BulkLabelAndUnlabelContactsApplicationErrors; }>; interface BulkLabelAndUnlabelContactsOptions { /** * Filter options. * Labels will be removed from contacts that meet the `filter` and `search` criteria. * * See * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search) * for a list of supported filters and fields. */ filter?: Record | null; /** * Plain text search for an exact match, up to 100 characters. * Labels will be removed from contacts that meet the `filter` and `search` criteria. * * See * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search) * for a list of searchable fields. * @maxLength 100 */ search?: string | null; /** * List of label keys to add to the contacts. * * Label keys must exist to be added to the contact. * Contact labels can be created or retrieved with * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label) * or * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels) * @maxSize 100 */ labelKeysToAdd?: string[]; /** * List of label keys to remove from the contacts. * @maxSize 100 */ labelKeysToRemove?: string[]; } /** * Retrieves a contact. * * #### Getting Merged Contacts * * When a source contact is merged * with a target contact, the source contact is deleted. * When calling Get Contact for a merged contact, * you can use the source or target contact ID. * In both bases, the target contact is returned. * * This is supported only when calling Get Contact on merged contacts. * Previously deleted source contact IDs can't be used for any other method. * @param _id - ID of the contact to retrieve. * @public * @requiredField _id * @param options - Get contact options. * @permissionId CONTACTS.VIEW * @applicableIdentity APP * @returns The requested contact. * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.GetContact */ declare function getContact(_id: string, options?: GetContactOptions): Promise & { __applicationErrorsType?: GetContactApplicationErrors; }>; interface GetContactOptions { /** * List of projected fields to return. * If both `fields` and `fieldsets` are sent in the request, * the union of both lists is returned. * `id` and `revision` are always returned. * * Supported properties: * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`, * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`, * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`, * `info.labelKeys`, `info.locations`, `info.extendedFields` * @maxLength 100 * @maxSize 100 */ fields?: string[]; /** * Predefined sets of fields to return. * If both `fields` and `fieldsets` are sent in the request, * the union of both lists is returned. * * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`. * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`. * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`. * - `FULL`: Returns all fields. * * Default: If `fields` is omitted from the request, `FULL`. * @maxSize 10 */ fieldsets?: ContactFieldSetWithLiterals[]; } export { type AccountInfo, type AccountInfoMetadata, Action, type ActionEvent, type ActionWithLiterals, type ActivityIcon, type Address, type AddressLocation, type AddressStreetOneOf, AddressTag, type AddressTagWithLiterals, type ApplicationError, type AssigneesWrapper, type BaseEventMetadata, type BulkActionMetadata, type BulkAddSegmentToContactsRequest, type BulkAddSegmentToContactsResponse, type BulkDeleteContactsApplicationErrors, type BulkDeleteContactsOptions, type BulkDeleteContactsRequest, type BulkDeleteContactsResponse, type BulkLabelAndUnlabelContactsApplicationErrors, type BulkLabelAndUnlabelContactsOptions, type BulkLabelAndUnlabelContactsRequest, type BulkLabelAndUnlabelContactsResponse, type BulkRemoveSegmentFromContactsRequest, type BulkRemoveSegmentFromContactsResponse, type BulkUpdateContactsOptions, type BulkUpdateContactsRequest, type BulkUpdateContactsResponse, type BulkUpsertContactsRequest, type BulkUpsertContactsResponse, type BulkUpsertContactsResponseMetadata, type CommonQueryWithEntityContext, type Contact, type ContactActivity, ContactActivityType, type ContactActivityTypeWithLiterals, type ContactAddedToSegment, type ContactAddress, type ContactAddressesWrapper, type ContactChanged, type ContactCreatedEnvelope, type ContactDeletedEnvelope, type ContactEmail, type ContactEmailSubscriptionUpdated, type ContactEmailsWrapper, ContactFieldSet, type ContactFieldSetWithLiterals, type ContactInfo, type ContactMerged, type ContactMergedEnvelope, type ContactName, type ContactPhone, type ContactPhoneSubscriptionUpdated, type ContactPhonesWrapper, type ContactPicture, type ContactPrimaryInfoUpdated, type ContactQuery, type ContactQuerySpec, type ContactRemovedFromSegment, type ContactSource, ContactSourceType, type ContactSourceTypeWithLiterals, type ContactSubmitted, type ContactUpdatedEnvelope, type ContactsFacet, ContactsFacetType, type ContactsFacetTypeWithLiterals, type ContactsQueryBuilder, type ContactsQueryResult, type CountContactsRequest, type CountContactsResponse, type CreateContactApplicationErrors, type CreateContactOptions, type CreateContactRequest, type CreateContactResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteContactApplicationErrors, type DeleteContactRequest, type DeleteContactResponse, type DomainEvent, type DomainEventBodyOneOf, type DuplicateContactExists, EmailDeliverabilityStatus, type EmailDeliverabilityStatusWithLiterals, EmailTag, type EmailTagWithLiterals, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type Error, type EventMetadata, type ExtendedFieldsWrapper, type GeneratePictureUploadUrlRequest, type GeneratePictureUploadUrlResponse, type GetContactApplicationErrors, type GetContactOptions, type GetContactRequest, type GetContactResponse, GetContactResponseType, type GetContactResponseTypeWithLiterals, type GroupInfo, type IdentificationData, type IdentificationDataIdOneOf, ImageProvider, type ImageProviderWithLiterals, type Item, type ItemMetadata, type LabelAndUnlabelContactRequest, type LabelAndUnlabelContactResponse, type LabelContactApplicationErrors, type LabelContactRequest, type LabelContactResponse, type LabelsWrapper, type LastActivityUpdate, type ListContactIdsBySegmentRequest, type ListContactIdsBySegmentResponse, type ListContactsApplicationErrors, type ListContactsOptions, type ListContactsRequest, type ListContactsResponse, type ListFacetsOptions, type ListFacetsRequest, type ListFacetsResponse, type LocationsWrapper, type MemberInfo, MemberStatus, type MemberStatusWithLiterals, type MergeContactsApplicationErrors, type MergeContactsOptions, type MergeContactsRequest, type MergeContactsResponse, type MessageEnvelope, type Metadata, Mode, type ModeWithLiterals, type Paging, type PagingMetadata, PhoneDeliverabilityStatus, type PhoneDeliverabilityStatusWithLiterals, PhoneTag, type PhoneTagWithLiterals, type PreviewMergeContactsApplicationErrors, type PreviewMergeContactsOptions, type PreviewMergeContactsRequest, type PreviewMergeContactsResponse, type PrimaryContactInfo, type PrimaryEmail, type PrimaryPhone, type PrimarySubscriptionStatus, PrivacyStatus, type PrivacyStatusWithLiterals, type ProfileInfo, type Query, type QueryContactsApplicationErrors, type QueryContactsOptions, type QueryContactsRequest, type QueryContactsResponse, type QueryFacetsOptions, type QueryFacetsRequest, type QueryFacetsResponse, type RestoreInfo, Role, type RoleWithLiterals, type Search, type SearchContactsRequest, type SearchContactsResponse, type SearchDetails, type SearchPagingMethodOneOf, type SegmentsWrapper, type SessionInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type StreetAddress, type Subdivision, SubdivisionType, type SubdivisionTypeWithLiterals, SubmitOperation, type SubmitOperationWithLiterals, SubscriptionStatus, type SubscriptionStatusWithLiterals, type SyncSubmitContactRequest, type SyncSubmitContactResponse, type UnlabelContactApplicationErrors, type UnlabelContactRequest, type UnlabelContactResponse, type UpdateContactApplicationErrors, type UpdateContactOptions, type UpdateContactRequest, type UpdateContactResponse, type UpsertContactRequest, type UpsertContactResponse, UpsertContactResponseAction, type UpsertContactResponseActionWithLiterals, type UserInfo, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkDeleteContacts, bulkLabelAndUnlabelContacts, bulkUpdateContacts, createContact, deleteContact, getContact, labelContact, listContacts, listFacets, mergeContacts, onContactCreated, onContactDeleted, onContactMerged, onContactUpdated, previewMergeContacts, queryContacts, queryFacets, typedQueryContacts, unlabelContact, updateContact, utils };