import { EventDefinition, HttpClient } from '@wix/sdk-types'; import { Contact, ContactCreatedEnvelope, ContactDeletedEnvelope, ContactInfo, ContactMergedEnvelope, ContactNonNullableFields, ContactUpdatedEnvelope, ContactsQueryBuilder, CreateContactOptions, CreateContactResponse, CreateContactResponseNonNullableFields, GetContactOptions, LabelContactResponse, LabelContactResponseNonNullableFields, MergeContactsOptions, MergeContactsResponse, MergeContactsResponseNonNullableFields, QueryContactsOptions, UnlabelContactResponse, UnlabelContactResponseNonNullableFields, UpdateContactOptions, UpdateContactResponse, UpdateContactResponseNonNullableFields } from './contacts-v4-contact-contacts.universal.js'; export declare const __metadata: { PACKAGE_NAME: string; }; export declare function createContact(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 | undefined): Promise; } export declare function updateContact(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 specifiy 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 | null, options?: UpdateContactOptions | undefined): Promise; } export declare function mergeContacts(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 | null, options?: MergeContactsOptions | undefined): Promise; } export declare function deleteContact(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; } export declare function labelContact(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; } export declare function unlabelContact(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; } export declare function queryContacts(httpClient: HttpClient): QueryContactsSignature; interface QueryContactsSignature { /** * 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. * @param - Query contact options. */ (options?: QueryContactsOptions | undefined): ContactsQueryBuilder; } export declare function getContact(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 | undefined): Promise; } export declare const onContactCreated: EventDefinition; export declare const onContactDeleted: EventDefinition; export declare const onContactMerged: EventDefinition; export declare const onContactUpdated: EventDefinition; export { Action, ActionEvent, ActivityIcon, Address, AddressLocation, AddressStreetOneOf, AddressTag, ApplicationError, AssigneesWrapper, BaseEventMetadata, BulkActionMetadata, BulkAddSegmentToContactsRequest, BulkAddSegmentToContactsResponse, BulkDeleteContactsRequest, BulkDeleteContactsResponse, BulkLabelAndUnlabelContactsRequest, BulkLabelAndUnlabelContactsResponse, BulkRemoveSegmentFromContactsRequest, BulkRemoveSegmentFromContactsResponse, BulkUpdateContactsRequest, BulkUpdateContactsResponse, BulkUpsertContactsRequest, BulkUpsertContactsResponse, BulkUpsertContactsResponseMetadata, Contact, ContactActivity, ContactActivityType, ContactAddedToSegment, ContactAddress, ContactAddressesWrapper, ContactChanged, ContactCreatedEnvelope, ContactDeletedEnvelope, ContactEmail, ContactEmailSubscriptionUpdated, ContactEmailsWrapper, ContactFieldSet, ContactInfo, ContactMerged, ContactMergedEnvelope, ContactName, ContactNonNullableFields, ContactPhone, ContactPhoneSubscriptionUpdated, ContactPhonesWrapper, ContactPicture, ContactPrimaryInfoUpdated, ContactRemovedFromSegment, ContactSource, ContactSourceType, ContactSubmitted, ContactUpdatedEnvelope, ContactsFacet, ContactsFacetType, ContactsQueryBuilder, ContactsQueryResult, CountContactsRequest, CountContactsResponse, CreateContactOptions, CreateContactRequest, CreateContactResponse, CreateContactResponseNonNullableFields, CursorPaging, CursorPagingMetadata, Cursors, DeleteContactRequest, DeleteContactResponse, DomainEvent, DomainEventBodyOneOf, DuplicateContactExists, EmailDeliverabilityStatus, EmailTag, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Error, EventMetadata, ExtendedFieldsWrapper, GeneratePictureUploadUrlRequest, GeneratePictureUploadUrlResponse, GetContactOptions, GetContactRequest, GetContactResponse, GetContactResponseNonNullableFields, GetContactResponseType, GroupInfo, IdentificationData, IdentificationDataIdOneOf, ImageProvider, Item, ItemMetadata, LabelAndUnlabelContactRequest, LabelAndUnlabelContactResponse, LabelContactRequest, LabelContactResponse, LabelContactResponseNonNullableFields, LabelsWrapper, LastActivityUpdate, ListContactIdsBySegmentRequest, ListContactIdsBySegmentResponse, ListContactsRequest, ListContactsResponse, ListFacetsRequest, ListFacetsResponse, LocationsWrapper, MemberInfo, MemberStatus, MergeContactsOptions, MergeContactsRequest, MergeContactsResponse, MergeContactsResponseNonNullableFields, MessageEnvelope, Metadata, Mode, Paging, PagingMetadata, PhoneDeliverabilityStatus, PhoneTag, PreviewMergeContactsRequest, PreviewMergeContactsResponse, PrimaryContactInfo, PrimaryEmail, PrimaryPhone, PrimarySubscriptionStatus, PrivacyStatus, ProfileInfo, Query, QueryContactsOptions, QueryContactsRequest, QueryContactsResponse, QueryContactsResponseNonNullableFields, QueryFacetsRequest, QueryFacetsResponse, RestoreInfo, Role, Search, SearchContactsRequest, SearchContactsResponse, SearchDetails, SearchPagingMethodOneOf, SegmentsWrapper, SessionInfo, SortOrder, Sorting, StreetAddress, Subdivision, SubdivisionType, SubmitOperation, SubscriptionStatus, SyncSubmitContactRequest, SyncSubmitContactResponse, UnlabelContactRequest, UnlabelContactResponse, UnlabelContactResponseNonNullableFields, UpdateContactOptions, UpdateContactRequest, UpdateContactResponse, UpdateContactResponseNonNullableFields, UpsertContactRequest, UpsertContactResponse, UpsertContactResponseAction, UserInfo, WebhookIdentityType, } from './contacts-v4-contact-contacts.universal.js';