Socket
Socket
Sign inDemoInstall

@wix/contacts

Package Overview
Dependencies
Maintainers
17
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wix/contacts - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

190

build/cjs/src/contacts-v4-contact.http.d.ts

@@ -6,16 +6,45 @@ import { RequestOptionsFactory } from '@wix/sdk-types';

*
* The request body must include a name, a phone number, or an email address.
* If all 3 of these parameters are missing,
* the contact won't be created.
* **Description**
*
* By default,
* if the creation request contains an email already in use by another contact,
* the new contact won't be created.
* To override this behavior, set `allowDuplicates` to `true`.
* The `createContact()` function returns a Promise
* that resolves to the new contact when it is created.
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.createContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/createcontact#migration-instructions).
*
* The `contactInfo` parameter object must include a name, phone number, or email address.
* If all 3 of these parameters are missing,
* the contact won't be created.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can create contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
* 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` in the `options` object to `true`.
*/
export declare function createContact(payload: CreateContactRequest): RequestOptionsFactory<CreateContactResponse>;
/**
* Updates a contact.
* Updates a contact's properties.
*
* Each time the contact is updated,
* **Description**
*
* The `updateContact()` function returns a Promise that resolves
* when the specified contact's information is updated.
*
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.updateContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/updatecontact#migration-instructions).
*
* Each time the contact is updated,
* `revision` increments by 1.

@@ -25,2 +54,8 @@ * The existing `revision` must be included when updating the contact.

* and it prevents unintended overwrites.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can update contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -75,10 +110,25 @@ export declare function updateContact(payload: UpdateContactRequest): RequestOptionsFactory<UpdateContactResponse>;

/**
* Deletes a contact.
* Deletes a contact who is not a site member or contributor.
*
* Deleting a contact permanently removes them from the Contact List.
* **Description**
*
* If a contact is also a site member or site contributor, or has a valid billing subscriptions,
* the contact cannot be deleted.
* The related site member or site contributor must first be deleted and any valid billing subscriptions must be canceled,
* before the contact can also be deleted.
* The `deleteContact()` function returns a Promise
* that resolves when the specified contact is deleted.
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.deleteContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/deletecontact#migration-instructions).
*
* Deleting a contact permanently removes them from your Contact List.
*
* If the contact is also a site member,
* the member must be deleted first,
* and then the contact can be deleted.
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can delete contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -89,4 +139,14 @@ export declare function deleteContact(payload: DeleteContactRequest): RequestOptionsFactory<DeleteContactResponse>;

*
* - **To create new labels:** Use [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label).
* - **To find labels:** Use [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label), [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label), or [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
* **Description**
*
* The `labelContact()` function returns a Promise
* that resolves when the specified labels are added to the contact.
* - **To create new labels:** Use [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel).
* - **To find labels:** Use [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel), [`getLabel()`](wix-crm-backend/contacts/getlabel), or [`queryLabels()`](wix-crm-backend/contacts/queryLabels).
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can label contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -97,7 +157,17 @@ export declare function labelContact(payload: LabelContactRequest): RequestOptionsFactory<LabelContactResponse>;

*
* If a label is no longer needed
* and you want to remove it from all contacts,
* you can delete it with
* [Delete Label](https://dev.wix.com/api/rest/contacts/labels/delete-label)
* (in the Labels API).
* **Description**
*
* The `unlabelContact()` function returns a Promise
* that resolves when the specified labels are removed from the contact.
*
* If a label is no longer needed
* and you want to remove it from all contacts,
* you can delete it with
* [`deleteLabel()`](wix-crm-backend/contacts/deletelabel).
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can unlabel contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -108,12 +178,46 @@ export declare function unlabelContact(payload: UnlabelContactRequest): RequestOptionsFactory<UnlabelContactResponse>;

/**
* Retrieves a list of contacts, given the provided [paging](https://dev.wix.com/api/rest/getting-started/pagination), [filtering, and sorting](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching).
* Up to 1,000 contacts can be returned per request.
* Creates a query to retrieve a list of contacts.
*
* For a detailed list of supported operations, see
* filtering and sorting for
* [contact properties](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#contact-properties-filtering-sorting-and-searching),
* [extended fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#extended-fields-filtering-sorting-and-searching),
* and [custom fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#custom-fields-filtering-sorting-and-searching).
* To learn how to query contacts, see
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
* **Description**
*
* The `queryContacts()` function builds a query to retrieve a list of contacts
* and returns a
* [`ContactsQueryBuilder`](wix-crm-backend/contacts/contactsquerybuilder)
* object.
*
* The returned object contains the query definition,
* which is typically used to run the query using the
* [`find()`](wix-crm-backend/contacts/contactsquerybuilder/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)`](wix-crm-backend/contacts/contactsquerybuilder/skip)
* - [`limit(50)`](wix-crm-backend/contacts/contactsquerybuilder/limit)
* - [`descending("_createdDate")`](wix-crm-backend/contacts/contactsquerybuilder/descending)
*
* 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.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can query contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`
* > in the [`find()`](wix-crm-backend/contacts/contactsquerybuilder/find) function.
*
* For property support for filters and sorting, see
* [Query contacts: Supported filters, sorting, and search](wix-crm-backend/contacts/sort-and-filter#query-contacts-supported-filters,-sorting,-and-search).
*
*/

@@ -185,14 +289,28 @@ export declare function queryContacts(payload: QueryContactsRequest): RequestOptionsFactory<QueryContactsResponse>;

*
* **Description**
*
* The `getContact()` function returns a Promise
* that resolves when the contact is found.
* #### 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,
* When calling `getContact()` for a merged contact,
* you can use the source or target contact ID.
* In both bases, the target contact is returned.
* In both cases, the target contact is returned.
*
* This is supported only when calling Get Contact,
* This is supported only when calling `getContact()`,
* and only for merged contacts.
* Deleted source contact IDs are not supported on any other endpoint.
* Deleted source contact IDs are not supported on any other function.
* > **Notes:**
* >
* > - This function replaces the deprecated
* > `wixCrmBackend.getContactById()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/getcontactbyid#migration-instructions).
* > - Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can retrieve contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/
export declare function getContact(payload: GetContactRequest): RequestOptionsFactory<GetContactResponse>;

@@ -124,10 +124,27 @@ "use strict";

*
* The request body must include a name, a phone number, or an email address.
* If all 3 of these parameters are missing,
* the contact won't be created.
* **Description**
*
* By default,
* if the creation request contains an email already in use by another contact,
* the new contact won't be created.
* To override this behavior, set `allowDuplicates` to `true`.
* The `createContact()` function returns a Promise
* that resolves to the new contact when it is created.
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.createContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/createcontact#migration-instructions).
*
* The `contactInfo` parameter object must include a name, phone number, or email address.
* If all 3 of these parameters are missing,
* the contact won't be created.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can create contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
* 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` in the `options` object to `true`.
*/

@@ -174,5 +191,17 @@ function createContact(payload) {

/**
* Updates a contact.
* Updates a contact's properties.
*
* Each time the contact is updated,
* **Description**
*
* The `updateContact()` function returns a Promise that resolves
* when the specified contact's information is updated.
*
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.updateContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/updatecontact#migration-instructions).
*
* Each time the contact is updated,
* `revision` increments by 1.

@@ -182,2 +211,8 @@ * The existing `revision` must be included when updating the contact.

* and it prevents unintended overwrites.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can update contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -330,10 +365,25 @@ function updateContact(payload) {

/**
* Deletes a contact.
* Deletes a contact who is not a site member or contributor.
*
* Deleting a contact permanently removes them from the Contact List.
* **Description**
*
* If a contact is also a site member or site contributor, or has a valid billing subscriptions,
* the contact cannot be deleted.
* The related site member or site contributor must first be deleted and any valid billing subscriptions must be canceled,
* before the contact can also be deleted.
* The `deleteContact()` function returns a Promise
* that resolves when the specified contact is deleted.
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.deleteContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/deletecontact#migration-instructions).
*
* Deleting a contact permanently removes them from your Contact List.
*
* If the contact is also a site member,
* the member must be deleted first,
* and then the contact can be deleted.
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can delete contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -364,4 +414,14 @@ function deleteContact(payload) {

*
* - **To create new labels:** Use [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label).
* - **To find labels:** Use [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label), [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label), or [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
* **Description**
*
* The `labelContact()` function returns a Promise
* that resolves when the specified labels are added to the contact.
* - **To create new labels:** Use [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel).
* - **To find labels:** Use [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel), [`getLabel()`](wix-crm-backend/contacts/getlabel), or [`queryLabels()`](wix-crm-backend/contacts/queryLabels).
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can label contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -402,7 +462,17 @@ function labelContact(payload) {

*
* If a label is no longer needed
* and you want to remove it from all contacts,
* you can delete it with
* [Delete Label](https://dev.wix.com/api/rest/contacts/labels/delete-label)
* (in the Labels API).
* **Description**
*
* The `unlabelContact()` function returns a Promise
* that resolves when the specified labels are removed from the contact.
*
* If a label is no longer needed
* and you want to remove it from all contacts,
* you can delete it with
* [`deleteLabel()`](wix-crm-backend/contacts/deletelabel).
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can unlabel contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -473,12 +543,46 @@ function unlabelContact(payload) {

/**
* Retrieves a list of contacts, given the provided [paging](https://dev.wix.com/api/rest/getting-started/pagination), [filtering, and sorting](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching).
* Up to 1,000 contacts can be returned per request.
* Creates a query to retrieve a list of contacts.
*
* For a detailed list of supported operations, see
* filtering and sorting for
* [contact properties](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#contact-properties-filtering-sorting-and-searching),
* [extended fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#extended-fields-filtering-sorting-and-searching),
* and [custom fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#custom-fields-filtering-sorting-and-searching).
* To learn how to query contacts, see
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
* **Description**
*
* The `queryContacts()` function builds a query to retrieve a list of contacts
* and returns a
* [`ContactsQueryBuilder`](wix-crm-backend/contacts/contactsquerybuilder)
* object.
*
* The returned object contains the query definition,
* which is typically used to run the query using the
* [`find()`](wix-crm-backend/contacts/contactsquerybuilder/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)`](wix-crm-backend/contacts/contactsquerybuilder/skip)
* - [`limit(50)`](wix-crm-backend/contacts/contactsquerybuilder/limit)
* - [`descending("_createdDate")`](wix-crm-backend/contacts/contactsquerybuilder/descending)
*
* 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.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can query contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`
* > in the [`find()`](wix-crm-backend/contacts/contactsquerybuilder/find) function.
*
* For property support for filters and sorting, see
* [Query contacts: Supported filters, sorting, and search](wix-crm-backend/contacts/sort-and-filter#query-contacts-supported-filters,-sorting,-and-search).
*
*/

@@ -688,13 +792,27 @@ function queryContacts(payload) {

*
* **Description**
*
* The `getContact()` function returns a Promise
* that resolves when the contact is found.
* #### 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,
* When calling `getContact()` for a merged contact,
* you can use the source or target contact ID.
* In both bases, the target contact is returned.
* In both cases, the target contact is returned.
*
* This is supported only when calling Get Contact,
* This is supported only when calling `getContact()`,
* and only for merged contacts.
* Deleted source contact IDs are not supported on any other endpoint.
* Deleted source contact IDs are not supported on any other function.
* > **Notes:**
* >
* > - This function replaces the deprecated
* > `wixCrmBackend.getContactById()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/getcontactbyid#migration-instructions).
* > - Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can retrieve contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -701,0 +819,0 @@ function getContact(payload) {

@@ -6,16 +6,45 @@ import { RequestOptionsFactory } from '@wix/sdk-types';

*
* The request body must include a name, a phone number, or an email address.
* If all 3 of these parameters are missing,
* the contact won't be created.
* **Description**
*
* By default,
* if the creation request contains an email already in use by another contact,
* the new contact won't be created.
* To override this behavior, set `allowDuplicates` to `true`.
* The `createContact()` function returns a Promise
* that resolves to the new contact when it is created.
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.createContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/createcontact#migration-instructions).
*
* The `contactInfo` parameter object must include a name, phone number, or email address.
* If all 3 of these parameters are missing,
* the contact won't be created.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can create contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
* 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` in the `options` object to `true`.
*/
export declare function createContact(payload: CreateContactRequest): RequestOptionsFactory<CreateContactResponse>;
/**
* Updates a contact.
* Updates a contact's properties.
*
* Each time the contact is updated,
* **Description**
*
* The `updateContact()` function returns a Promise that resolves
* when the specified contact's information is updated.
*
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.updateContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/updatecontact#migration-instructions).
*
* Each time the contact is updated,
* `revision` increments by 1.

@@ -25,2 +54,8 @@ * The existing `revision` must be included when updating the contact.

* and it prevents unintended overwrites.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can update contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -75,10 +110,25 @@ export declare function updateContact(payload: UpdateContactRequest): RequestOptionsFactory<UpdateContactResponse>;

/**
* Deletes a contact.
* Deletes a contact who is not a site member or contributor.
*
* Deleting a contact permanently removes them from the Contact List.
* **Description**
*
* If a contact is also a site member or site contributor, or has a valid billing subscriptions,
* the contact cannot be deleted.
* The related site member or site contributor must first be deleted and any valid billing subscriptions must be canceled,
* before the contact can also be deleted.
* The `deleteContact()` function returns a Promise
* that resolves when the specified contact is deleted.
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.deleteContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/deletecontact#migration-instructions).
*
* Deleting a contact permanently removes them from your Contact List.
*
* If the contact is also a site member,
* the member must be deleted first,
* and then the contact can be deleted.
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can delete contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -89,4 +139,14 @@ export declare function deleteContact(payload: DeleteContactRequest): RequestOptionsFactory<DeleteContactResponse>;

*
* - **To create new labels:** Use [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label).
* - **To find labels:** Use [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label), [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label), or [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
* **Description**
*
* The `labelContact()` function returns a Promise
* that resolves when the specified labels are added to the contact.
* - **To create new labels:** Use [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel).
* - **To find labels:** Use [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel), [`getLabel()`](wix-crm-backend/contacts/getlabel), or [`queryLabels()`](wix-crm-backend/contacts/queryLabels).
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can label contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -97,7 +157,17 @@ export declare function labelContact(payload: LabelContactRequest): RequestOptionsFactory<LabelContactResponse>;

*
* If a label is no longer needed
* and you want to remove it from all contacts,
* you can delete it with
* [Delete Label](https://dev.wix.com/api/rest/contacts/labels/delete-label)
* (in the Labels API).
* **Description**
*
* The `unlabelContact()` function returns a Promise
* that resolves when the specified labels are removed from the contact.
*
* If a label is no longer needed
* and you want to remove it from all contacts,
* you can delete it with
* [`deleteLabel()`](wix-crm-backend/contacts/deletelabel).
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can unlabel contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -108,12 +178,46 @@ export declare function unlabelContact(payload: UnlabelContactRequest): RequestOptionsFactory<UnlabelContactResponse>;

/**
* Retrieves a list of contacts, given the provided [paging](https://dev.wix.com/api/rest/getting-started/pagination), [filtering, and sorting](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching).
* Up to 1,000 contacts can be returned per request.
* Creates a query to retrieve a list of contacts.
*
* For a detailed list of supported operations, see
* filtering and sorting for
* [contact properties](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#contact-properties-filtering-sorting-and-searching),
* [extended fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#extended-fields-filtering-sorting-and-searching),
* and [custom fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#custom-fields-filtering-sorting-and-searching).
* To learn how to query contacts, see
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
* **Description**
*
* The `queryContacts()` function builds a query to retrieve a list of contacts
* and returns a
* [`ContactsQueryBuilder`](wix-crm-backend/contacts/contactsquerybuilder)
* object.
*
* The returned object contains the query definition,
* which is typically used to run the query using the
* [`find()`](wix-crm-backend/contacts/contactsquerybuilder/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)`](wix-crm-backend/contacts/contactsquerybuilder/skip)
* - [`limit(50)`](wix-crm-backend/contacts/contactsquerybuilder/limit)
* - [`descending("_createdDate")`](wix-crm-backend/contacts/contactsquerybuilder/descending)
*
* 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.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can query contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`
* > in the [`find()`](wix-crm-backend/contacts/contactsquerybuilder/find) function.
*
* For property support for filters and sorting, see
* [Query contacts: Supported filters, sorting, and search](wix-crm-backend/contacts/sort-and-filter#query-contacts-supported-filters,-sorting,-and-search).
*
*/

@@ -185,14 +289,28 @@ export declare function queryContacts(payload: QueryContactsRequest): RequestOptionsFactory<QueryContactsResponse>;

*
* **Description**
*
* The `getContact()` function returns a Promise
* that resolves when the contact is found.
* #### 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,
* When calling `getContact()` for a merged contact,
* you can use the source or target contact ID.
* In both bases, the target contact is returned.
* In both cases, the target contact is returned.
*
* This is supported only when calling Get Contact,
* This is supported only when calling `getContact()`,
* and only for merged contacts.
* Deleted source contact IDs are not supported on any other endpoint.
* Deleted source contact IDs are not supported on any other function.
* > **Notes:**
* >
* > - This function replaces the deprecated
* > `wixCrmBackend.getContactById()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/getcontactbyid#migration-instructions).
* > - Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can retrieve contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/
export declare function getContact(payload: GetContactRequest): RequestOptionsFactory<GetContactResponse>;

@@ -121,10 +121,27 @@ import { toURLSearchParams } from '@wix/metro-runtime';

*
* The request body must include a name, a phone number, or an email address.
* If all 3 of these parameters are missing,
* the contact won't be created.
* **Description**
*
* By default,
* if the creation request contains an email already in use by another contact,
* the new contact won't be created.
* To override this behavior, set `allowDuplicates` to `true`.
* The `createContact()` function returns a Promise
* that resolves to the new contact when it is created.
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.createContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/createcontact#migration-instructions).
*
* The `contactInfo` parameter object must include a name, phone number, or email address.
* If all 3 of these parameters are missing,
* the contact won't be created.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can create contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
* 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` in the `options` object to `true`.
*/

@@ -170,5 +187,17 @@ export function createContact(payload) {

/**
* Updates a contact.
* Updates a contact's properties.
*
* Each time the contact is updated,
* **Description**
*
* The `updateContact()` function returns a Promise that resolves
* when the specified contact's information is updated.
*
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.updateContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/updatecontact#migration-instructions).
*
* Each time the contact is updated,
* `revision` increments by 1.

@@ -178,2 +207,8 @@ * The existing `revision` must be included when updating the contact.

* and it prevents unintended overwrites.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can update contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -323,10 +358,25 @@ export function updateContact(payload) {

/**
* Deletes a contact.
* Deletes a contact who is not a site member or contributor.
*
* Deleting a contact permanently removes them from the Contact List.
* **Description**
*
* If a contact is also a site member or site contributor, or has a valid billing subscriptions,
* the contact cannot be deleted.
* The related site member or site contributor must first be deleted and any valid billing subscriptions must be canceled,
* before the contact can also be deleted.
* The `deleteContact()` function returns a Promise
* that resolves when the specified contact is deleted.
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.deleteContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/deletecontact#migration-instructions).
*
* Deleting a contact permanently removes them from your Contact List.
*
* If the contact is also a site member,
* the member must be deleted first,
* and then the contact can be deleted.
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can delete contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -356,4 +406,14 @@ export function deleteContact(payload) {

*
* - **To create new labels:** Use [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label).
* - **To find labels:** Use [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label), [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label), or [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
* **Description**
*
* The `labelContact()` function returns a Promise
* that resolves when the specified labels are added to the contact.
* - **To create new labels:** Use [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel).
* - **To find labels:** Use [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel), [`getLabel()`](wix-crm-backend/contacts/getlabel), or [`queryLabels()`](wix-crm-backend/contacts/queryLabels).
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can label contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -393,7 +453,17 @@ export function labelContact(payload) {

*
* If a label is no longer needed
* and you want to remove it from all contacts,
* you can delete it with
* [Delete Label](https://dev.wix.com/api/rest/contacts/labels/delete-label)
* (in the Labels API).
* **Description**
*
* The `unlabelContact()` function returns a Promise
* that resolves when the specified labels are removed from the contact.
*
* If a label is no longer needed
* and you want to remove it from all contacts,
* you can delete it with
* [`deleteLabel()`](wix-crm-backend/contacts/deletelabel).
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can unlabel contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -462,12 +532,46 @@ export function unlabelContact(payload) {

/**
* Retrieves a list of contacts, given the provided [paging](https://dev.wix.com/api/rest/getting-started/pagination), [filtering, and sorting](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching).
* Up to 1,000 contacts can be returned per request.
* Creates a query to retrieve a list of contacts.
*
* For a detailed list of supported operations, see
* filtering and sorting for
* [contact properties](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#contact-properties-filtering-sorting-and-searching),
* [extended fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#extended-fields-filtering-sorting-and-searching),
* and [custom fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#custom-fields-filtering-sorting-and-searching).
* To learn how to query contacts, see
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
* **Description**
*
* The `queryContacts()` function builds a query to retrieve a list of contacts
* and returns a
* [`ContactsQueryBuilder`](wix-crm-backend/contacts/contactsquerybuilder)
* object.
*
* The returned object contains the query definition,
* which is typically used to run the query using the
* [`find()`](wix-crm-backend/contacts/contactsquerybuilder/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)`](wix-crm-backend/contacts/contactsquerybuilder/skip)
* - [`limit(50)`](wix-crm-backend/contacts/contactsquerybuilder/limit)
* - [`descending("_createdDate")`](wix-crm-backend/contacts/contactsquerybuilder/descending)
*
* 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.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can query contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`
* > in the [`find()`](wix-crm-backend/contacts/contactsquerybuilder/find) function.
*
* For property support for filters and sorting, see
* [Query contacts: Supported filters, sorting, and search](wix-crm-backend/contacts/sort-and-filter#query-contacts-supported-filters,-sorting,-and-search).
*
*/

@@ -671,13 +775,27 @@ export function queryContacts(payload) {

*
* **Description**
*
* The `getContact()` function returns a Promise
* that resolves when the contact is found.
* #### 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,
* When calling `getContact()` for a merged contact,
* you can use the source or target contact ID.
* In both bases, the target contact is returned.
* In both cases, the target contact is returned.
*
* This is supported only when calling Get Contact,
* This is supported only when calling `getContact()`,
* and only for merged contacts.
* Deleted source contact IDs are not supported on any other endpoint.
* Deleted source contact IDs are not supported on any other function.
* > **Notes:**
* >
* > - This function replaces the deprecated
* > `wixCrmBackend.getContactById()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/getcontactbyid#migration-instructions).
* > - Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can retrieve contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
*/

@@ -684,0 +802,0 @@ export function getContact(payload) {

@@ -266,10 +266,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

*
* The request body must include a name, a phone number, or an email address.
* If all 3 of these parameters are missing,
* the contact won't be created.
* **Description**
*
* By default,
* if the creation request contains an email already in use by another contact,
* the new contact won't be created.
* To override this behavior, set `allowDuplicates` to `true`.
* The `createContact()` function returns a Promise
* that resolves to the new contact when it is created.
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.createContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/createcontact#migration-instructions).
*
* The `contactInfo` parameter object must include a name, phone number, or email address.
* If all 3 of these parameters are missing,
* the contact won't be created.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can create contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
* 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` in the `options` object to `true`.
* @param info - Contact info.

@@ -279,2 +296,3 @@ * @public

* @requiredField info
* @param options - Create contact options.
* @returns Contact.

@@ -341,5 +359,17 @@ */

/**
* Updates a contact.
* Updates a contact's properties.
*
* Each time the contact is updated,
* **Description**
*
* The `updateContact()` function returns a Promise that resolves
* when the specified contact's information is updated.
*
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.updateContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/updatecontact#migration-instructions).
*
* Each time the contact is updated,
* `revision` increments by 1.

@@ -349,2 +379,8 @@ * The existing `revision` must be included when updating the contact.

* and it prevents unintended overwrites.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can update contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
* @param contactId - ID of the contact to update.

@@ -359,2 +395,3 @@ * @param revision - Revision number.

* @requiredField revision
* @param options - Contact update options.
* @returns Updated contact.

@@ -593,10 +630,25 @@ */

/**
* Deletes a contact.
* Deletes a contact who is not a site member or contributor.
*
* Deleting a contact permanently removes them from the Contact List.
* **Description**
*
* If a contact is also a site member or site contributor, or has a valid billing subscriptions,
* the contact cannot be deleted.
* The related site member or site contributor must first be deleted and any valid billing subscriptions must be canceled,
* before the contact can also be deleted.
* The `deleteContact()` function returns a Promise
* that resolves when the specified contact is deleted.
* > **Note:**
* > This function replaces the deprecated
* > `wixCrmBackend.deleteContact()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/deletecontact#migration-instructions).
*
* Deleting a contact permanently removes them from your Contact List.
*
* If the contact is also a site member,
* the member must be deleted first,
* and then the contact can be deleted.
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can delete contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
* @param contactId - ID of the contact to delete.

@@ -653,4 +705,14 @@ * @public

*
* - **To create new labels:** Use [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label).
* - **To find labels:** Use [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label), [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label), or [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
* **Description**
*
* The `labelContact()` function returns a Promise
* that resolves when the specified labels are added to the contact.
* - **To create new labels:** Use [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel).
* - **To find labels:** Use [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel), [`getLabel()`](wix-crm-backend/contacts/getlabel), or [`queryLabels()`](wix-crm-backend/contacts/queryLabels).
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can label contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
* @param contactId - ID of the contact to add labels to.

@@ -723,7 +785,17 @@ * @param labelKeys - List of label keys to add to the contact.

*
* If a label is no longer needed
* and you want to remove it from all contacts,
* you can delete it with
* [Delete Label](https://dev.wix.com/api/rest/contacts/labels/delete-label)
* (in the Labels API).
* **Description**
*
* The `unlabelContact()` function returns a Promise
* that resolves when the specified labels are removed from the contact.
*
* If a label is no longer needed
* and you want to remove it from all contacts,
* you can delete it with
* [`deleteLabel()`](wix-crm-backend/contacts/deletelabel).
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can unlabel contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
* @param contactId - ID of the contact to remove labels from.

@@ -848,12 +920,46 @@ * @param labelKeys - List of label keys to remove from the contact.

/**
* Retrieves a list of contacts, given the provided [paging](https://dev.wix.com/api/rest/getting-started/pagination), [filtering, and sorting](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching).
* Up to 1,000 contacts can be returned per request.
* Creates a query to retrieve a list of contacts.
*
* For a detailed list of supported operations, see
* filtering and sorting for
* [contact properties](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#contact-properties-filtering-sorting-and-searching),
* [extended fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#extended-fields-filtering-sorting-and-searching),
* and [custom fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#custom-fields-filtering-sorting-and-searching).
* To learn how to query contacts, see
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
* **Description**
*
* The `queryContacts()` function builds a query to retrieve a list of contacts
* and returns a
* [`ContactsQueryBuilder`](wix-crm-backend/contacts/contactsquerybuilder)
* object.
*
* The returned object contains the query definition,
* which is typically used to run the query using the
* [`find()`](wix-crm-backend/contacts/contactsquerybuilder/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)`](wix-crm-backend/contacts/contactsquerybuilder/skip)
* - [`limit(50)`](wix-crm-backend/contacts/contactsquerybuilder/limit)
* - [`descending("_createdDate")`](wix-crm-backend/contacts/contactsquerybuilder/descending)
*
* 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.
*
* > **Note:**
* > Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can query contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`
* > in the [`find()`](wix-crm-backend/contacts/contactsquerybuilder/find) function.
*
* For property support for filters and sorting, see
* [Query contacts: Supported filters, sorting, and search](wix-crm-backend/contacts/sort-and-filter#query-contacts-supported-filters,-sorting,-and-search).
*
* @public

@@ -1220,13 +1326,27 @@ * @documentationMaturity preview

*
* **Description**
*
* The `getContact()` function returns a Promise
* that resolves when the contact is found.
* #### 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,
* When calling `getContact()` for a merged contact,
* you can use the source or target contact ID.
* In both bases, the target contact is returned.
* In both cases, the target contact is returned.
*
* This is supported only when calling Get Contact,
* This is supported only when calling `getContact()`,
* and only for merged contacts.
* Deleted source contact IDs are not supported on any other endpoint.
* Deleted source contact IDs are not supported on any other function.
* > **Notes:**
* >
* > - This function replaces the deprecated
* > `wixCrmBackend.getContactById()`.
* > The deprecated function will continue to work, but it will not receive updates.
* > To keep any existing code compatible with future changes, see the
* > [migration instructions](wix-crm-backend/getcontactbyid#migration-instructions).
* > - Only visitors with
* > **Manage Contacts** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions)
* > can retrieve contacts.
* > You can override the permissions by setting the `suppressAuth` option to `true`.
* @param _id - ID of the contact to retrieve.

@@ -1233,0 +1353,0 @@ * @public

4

package.json
{
"name": "@wix/contacts",
"version": "1.0.15",
"version": "1.0.16",
"publishConfig": {

@@ -36,3 +36,3 @@ "registry": "https://registry.npmjs.org/",

},
"falconPackageHash": "efb7dea4fa8c7338e5eec337d237e4203661d0df8353458566564d96"
"falconPackageHash": "c146476081c57826a6a7aae1f991d83d6bdf7dc4a8f51f9d2a4dde5c"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc