import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types'; import { ContactInfo, CreateContactOptions, CreateContactResponse, CreateContactApplicationErrors, UpdateContactOptions, UpdateContactResponse, UpdateContactApplicationErrors, MergeContactsOptions, MergeContactsResponse, MergeContactsApplicationErrors, PreviewMergeContactsOptions, PreviewMergeContactsResponse, PreviewMergeContactsApplicationErrors, DeleteContactApplicationErrors, LabelContactResponse, LabelContactApplicationErrors, UnlabelContactResponse, UnlabelContactApplicationErrors, ListContactsOptions, ListContactsResponse, ListContactsApplicationErrors, ListFacetsOptions, ListFacetsResponse, QueryFacetsOptions, QueryFacetsResponse, BulkDeleteContactsOptions, BulkDeleteContactsResponse, BulkDeleteContactsApplicationErrors, BulkUpdateContactsOptions, BulkUpdateContactsResponse, BulkLabelAndUnlabelContactsOptions, BulkLabelAndUnlabelContactsResponse, BulkLabelAndUnlabelContactsApplicationErrors, GetContactOptions, Contact, GetContactApplicationErrors, ContactCreatedEnvelope, ContactDeletedEnvelope, ContactMergedEnvelope, ContactUpdatedEnvelope, ContactQuery, QueryContactsOptions, typedQueryContacts, ContactsQueryBuilder } from './index.typings.js'; export { AccountInfo, AccountInfoMetadata, Action, ActionEvent, ActionWithLiterals, ActivityIcon, Address, AddressLocation, AddressStreetOneOf, AddressTag, AddressTagWithLiterals, ApplicationError, AssigneesWrapper, BaseEventMetadata, BulkActionMetadata, BulkAddSegmentToContactsRequest, BulkAddSegmentToContactsResponse, BulkDeleteContactsRequest, BulkLabelAndUnlabelContactsRequest, BulkRemoveSegmentFromContactsRequest, BulkRemoveSegmentFromContactsResponse, BulkUpdateContactsRequest, BulkUpsertContactsRequest, BulkUpsertContactsResponse, BulkUpsertContactsResponseMetadata, CommonQueryWithEntityContext, ContactActivity, ContactActivityType, ContactActivityTypeWithLiterals, ContactAddedToSegment, ContactAddress, ContactAddressesWrapper, ContactChanged, ContactEmail, ContactEmailSubscriptionUpdated, ContactEmailsWrapper, ContactFieldSet, ContactFieldSetWithLiterals, ContactMerged, ContactName, ContactPhone, ContactPhoneSubscriptionUpdated, ContactPhonesWrapper, ContactPicture, ContactPrimaryInfoUpdated, ContactQuerySpec, ContactRemovedFromSegment, ContactSource, ContactSourceType, ContactSourceTypeWithLiterals, ContactSubmitted, ContactsFacet, ContactsFacetType, ContactsFacetTypeWithLiterals, ContactsQueryResult, CountContactsRequest, CountContactsResponse, CreateContactRequest, CursorPaging, CursorPagingMetadata, Cursors, DeleteContactRequest, DeleteContactResponse, DomainEvent, DomainEventBodyOneOf, DuplicateContactExists, EmailDeliverabilityStatus, EmailDeliverabilityStatusWithLiterals, EmailTag, EmailTagWithLiterals, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Error, EventMetadata, ExtendedFieldsWrapper, GeneratePictureUploadUrlRequest, GeneratePictureUploadUrlResponse, GetContactRequest, GetContactResponse, GetContactResponseType, GetContactResponseTypeWithLiterals, GroupInfo, IdentificationData, IdentificationDataIdOneOf, ImageProvider, ImageProviderWithLiterals, Item, ItemMetadata, LabelAndUnlabelContactRequest, LabelAndUnlabelContactResponse, LabelContactRequest, LabelsWrapper, LastActivityUpdate, ListContactIdsBySegmentRequest, ListContactIdsBySegmentResponse, ListContactsRequest, ListFacetsRequest, LocationsWrapper, MemberInfo, MemberStatus, MemberStatusWithLiterals, MergeContactsRequest, MessageEnvelope, Metadata, Mode, ModeWithLiterals, Paging, PagingMetadata, PhoneDeliverabilityStatus, PhoneDeliverabilityStatusWithLiterals, PhoneTag, PhoneTagWithLiterals, PreviewMergeContactsRequest, PrimaryContactInfo, PrimaryEmail, PrimaryPhone, PrimarySubscriptionStatus, PrivacyStatus, PrivacyStatusWithLiterals, ProfileInfo, Query, QueryContactsApplicationErrors, QueryContactsRequest, QueryContactsResponse, QueryFacetsRequest, RestoreInfo, Role, RoleWithLiterals, Search, SearchContactsRequest, SearchContactsResponse, SearchDetails, SearchPagingMethodOneOf, SegmentsWrapper, SessionInfo, SortOrder, SortOrderWithLiterals, Sorting, StreetAddress, Subdivision, SubdivisionType, SubdivisionTypeWithLiterals, SubmitOperation, SubmitOperationWithLiterals, SubscriptionStatus, SubscriptionStatusWithLiterals, SyncSubmitContactRequest, SyncSubmitContactResponse, UnlabelContactRequest, UpdateContactRequest, UpsertContactRequest, UpsertContactResponse, UpsertContactResponseAction, UpsertContactResponseActionWithLiterals, UserInfo, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js'; declare function createContact$1(httpClient: HttpClient): CreateContactSignature; interface CreateContactSignature { /** * 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 - Contact info. * @param - Create contact options. * @returns Contact. */ (info: ContactInfo, options?: CreateContactOptions): Promise & { __applicationErrorsType?: CreateContactApplicationErrors; }>; } declare function updateContact$1(httpClient: HttpClient): UpdateContactSignature; interface UpdateContactSignature { /** * 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 - ID of the contact to update. * @param - Contact info. * @param - Revision number. * When updating, include the existing `revision` * to prevent conflicting updates. * @param - Contact update options. * @returns Updated contact. */ (contactId: string, info: ContactInfo, revision: number, options?: UpdateContactOptions): Promise & { __applicationErrorsType?: UpdateContactApplicationErrors; }>; } declare function mergeContacts$1(httpClient: HttpClient): MergeContactsSignature; interface MergeContactsSignature { /** * 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 - Target contact ID. * @param - 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. * @param - Merge contacts options. */ (targetContactId: string, targetContactRevision: number, options?: MergeContactsOptions): Promise & { __applicationErrorsType?: MergeContactsApplicationErrors; }>; } declare function previewMergeContacts$1(httpClient: HttpClient): PreviewMergeContactsSignature; interface PreviewMergeContactsSignature { /** * 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 - Target contact ID. * @param - Preview merge contacts options. */ (targetContactId: string, options?: PreviewMergeContactsOptions): Promise & { __applicationErrorsType?: PreviewMergeContactsApplicationErrors; }>; } declare function deleteContact$1(httpClient: HttpClient): DeleteContactSignature; interface DeleteContactSignature { /** * 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 - ID of the contact to delete. */ (contactId: string): Promise; } declare function labelContact$1(httpClient: HttpClient): LabelContactSignature; interface LabelContactSignature { /** * 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 - ID of the contact to add labels to. * @param - 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. * @returns Updated contact. */ (contactId: string, labelKeys: string[]): Promise & { __applicationErrorsType?: LabelContactApplicationErrors; }>; } declare function unlabelContact$1(httpClient: HttpClient): UnlabelContactSignature; interface UnlabelContactSignature { /** * 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 - ID of the contact to remove labels from. * @param - List of label keys to remove from the contact. * @returns Updated contact. */ (contactId: string, labelKeys: string[]): Promise & { __applicationErrorsType?: UnlabelContactApplicationErrors; }>; } declare function listContacts$1(httpClient: HttpClient): ListContactsSignature; interface ListContactsSignature { /** * Retrieves a list of up to 1,000 contacts per request. * @param - Object containing list of options for retrieving contacts. * @returns List of contacts. */ (options?: ListContactsOptions): Promise & { __applicationErrorsType?: ListContactsApplicationErrors; }>; } declare function listFacets$1(httpClient: HttpClient): ListFacetsSignature; interface ListFacetsSignature { /** * Lists facets from the site’s contact list. * Facets include labels and subscription statuses. * @param - List facets options. */ (options?: ListFacetsOptions): Promise>; } declare function queryFacets$1(httpClient: HttpClient): QueryFacetsSignature; interface QueryFacetsSignature { /** * Retrieves facets from the site’s contact list by filter. * Facets include labels and subscription statuses. * @param - Query facets options. */ (options?: QueryFacetsOptions): Promise>; } declare function bulkDeleteContacts$1(httpClient: HttpClient): BulkDeleteContactsSignature; interface BulkDeleteContactsSignature { /** * 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. * @param - Bulk delete contacts options. */ (options?: BulkDeleteContactsOptions): Promise & { __applicationErrorsType?: BulkDeleteContactsApplicationErrors; }>; } declare function bulkUpdateContacts$1(httpClient: HttpClient): BulkUpdateContactsSignature; interface BulkUpdateContactsSignature { /** * 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. * @param - Bulk update contacts options. */ (options?: BulkUpdateContactsOptions): Promise>; } declare function bulkLabelAndUnlabelContacts$1(httpClient: HttpClient): BulkLabelAndUnlabelContactsSignature; interface BulkLabelAndUnlabelContactsSignature { /** * 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. * @param - Bulk label and unlabel contacts options. */ (options?: BulkLabelAndUnlabelContactsOptions): Promise & { __applicationErrorsType?: BulkLabelAndUnlabelContactsApplicationErrors; }>; } declare function getContact$1(httpClient: HttpClient): GetContactSignature; interface GetContactSignature { /** * 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 of the contact to retrieve. * @param - Get contact options. * @returns The requested contact. */ (_id: string, options?: GetContactOptions): Promise & { __applicationErrorsType?: GetContactApplicationErrors; }>; } declare const onContactCreated$1: EventDefinition; declare const onContactDeleted$1: EventDefinition; declare const onContactMerged$1: EventDefinition; declare const onContactUpdated$1: EventDefinition; declare function customQueryContacts(httpClient: HttpClient): { (query: ContactQuery, options?: QueryContactsOptions): ReturnType; (options?: QueryContactsOptions): ContactsQueryBuilder; }; declare const createContact: MaybeContext & typeof createContact$1>; declare const updateContact: MaybeContext & typeof updateContact$1>; declare const mergeContacts: MaybeContext & typeof mergeContacts$1>; declare const previewMergeContacts: MaybeContext & typeof previewMergeContacts$1>; declare const deleteContact: MaybeContext & typeof deleteContact$1>; declare const labelContact: MaybeContext & typeof labelContact$1>; declare const unlabelContact: MaybeContext & typeof unlabelContact$1>; declare const listContacts: MaybeContext & typeof listContacts$1>; declare const listFacets: MaybeContext & typeof listFacets$1>; declare const queryFacets: MaybeContext & typeof queryFacets$1>; declare const bulkDeleteContacts: MaybeContext & typeof bulkDeleteContacts$1>; declare const bulkUpdateContacts: MaybeContext & typeof bulkUpdateContacts$1>; declare const bulkLabelAndUnlabelContacts: MaybeContext & typeof bulkLabelAndUnlabelContacts$1>; declare const getContact: MaybeContext & typeof getContact$1>; declare const queryContacts: MaybeContext & typeof customQueryContacts>; /** * Triggered when a contact is created. */ declare const onContactCreated: BuildEventDefinition & typeof onContactCreated$1; /** * 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. */ declare const onContactDeleted: BuildEventDefinition & typeof onContactDeleted$1; /** * Triggered when one or more source contacts are merged into a target contact. */ declare const onContactMerged: BuildEventDefinition & typeof onContactMerged$1; /** * Triggered when a contact is updated. */ declare const onContactUpdated: BuildEventDefinition & typeof onContactUpdated$1; export { BulkDeleteContactsApplicationErrors, BulkDeleteContactsOptions, BulkDeleteContactsResponse, BulkLabelAndUnlabelContactsApplicationErrors, BulkLabelAndUnlabelContactsOptions, BulkLabelAndUnlabelContactsResponse, BulkUpdateContactsOptions, BulkUpdateContactsResponse, Contact, ContactCreatedEnvelope, ContactDeletedEnvelope, ContactInfo, ContactMergedEnvelope, ContactQuery, ContactUpdatedEnvelope, ContactsQueryBuilder, CreateContactApplicationErrors, CreateContactOptions, CreateContactResponse, DeleteContactApplicationErrors, GetContactApplicationErrors, GetContactOptions, LabelContactApplicationErrors, LabelContactResponse, ListContactsApplicationErrors, ListContactsOptions, ListContactsResponse, ListFacetsOptions, ListFacetsResponse, MergeContactsApplicationErrors, MergeContactsOptions, MergeContactsResponse, PreviewMergeContactsApplicationErrors, PreviewMergeContactsOptions, PreviewMergeContactsResponse, QueryContactsOptions, QueryFacetsOptions, QueryFacetsResponse, UnlabelContactApplicationErrors, UnlabelContactResponse, UpdateContactApplicationErrors, UpdateContactOptions, UpdateContactResponse, bulkDeleteContacts, bulkLabelAndUnlabelContacts, bulkUpdateContacts, createContact, deleteContact, getContact, labelContact, listContacts, listFacets, mergeContacts, onContactCreated, onContactDeleted, onContactMerged, onContactUpdated, previewMergeContacts, queryContacts, queryFacets, unlabelContact, updateContact };