@wix/crm 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/src/contacts-v4-contact.http.d.ts +59 -35
- package/build/cjs/src/contacts-v4-contact.http.js +93 -35
- package/build/cjs/src/contacts-v4-contact.http.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.public.d.ts +3 -2
- package/build/cjs/src/contacts-v4-contact.public.js +7 -1
- package/build/cjs/src/contacts-v4-contact.public.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.universal.d.ts +84 -41
- package/build/cjs/src/contacts-v4-contact.universal.js +123 -42
- package/build/cjs/src/contacts-v4-contact.universal.js.map +1 -1
- package/build/cjs/src/contacts-v4-extended-field.universal.d.ts +5 -5
- package/build/cjs/src/contacts-v4-extended-field.universal.js +5 -5
- package/build/cjs/src/contacts-v4-label.universal.d.ts +4 -4
- package/build/cjs/src/contacts-v4-label.universal.js +4 -4
- package/build/es/src/contacts-v4-contact.http.d.ts +59 -35
- package/build/es/src/contacts-v4-contact.http.js +91 -34
- package/build/es/src/contacts-v4-contact.http.js.map +1 -1
- package/build/es/src/contacts-v4-contact.public.d.ts +3 -2
- package/build/es/src/contacts-v4-contact.public.js +6 -1
- package/build/es/src/contacts-v4-contact.public.js.map +1 -1
- package/build/es/src/contacts-v4-contact.universal.d.ts +84 -41
- package/build/es/src/contacts-v4-contact.universal.js +121 -41
- package/build/es/src/contacts-v4-contact.universal.js.map +1 -1
- package/build/es/src/contacts-v4-extended-field.universal.d.ts +5 -5
- package/build/es/src/contacts-v4-extended-field.universal.js +5 -5
- package/build/es/src/contacts-v4-label.universal.d.ts +4 -4
- package/build/es/src/contacts-v4-label.universal.js +4 -4
- package/package.json +2 -2
|
@@ -274,7 +274,7 @@ export interface QueryLabelsResponse {
|
|
|
274
274
|
* [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
|
|
275
275
|
* [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
|
|
276
276
|
*
|
|
277
|
-
* This function is not a universal function and runs only on the backend
|
|
277
|
+
* This function is not a universal function and runs only on the backend.
|
|
278
278
|
* @param displayName - Display name to retrieve or create.
|
|
279
279
|
*
|
|
280
280
|
* If an existing label is an exact match
|
|
@@ -294,7 +294,7 @@ export interface FindOrCreateLabelOptions {
|
|
|
294
294
|
/**
|
|
295
295
|
* Updates a label's specified properties.
|
|
296
296
|
*
|
|
297
|
-
* This function is not a universal function and runs only on the backend
|
|
297
|
+
* This function is not a universal function and runs only on the backend.
|
|
298
298
|
* @param key - Label key.
|
|
299
299
|
*
|
|
300
300
|
* `key` is generated when the label is created
|
|
@@ -350,7 +350,7 @@ export interface RenameLabelOptions {
|
|
|
350
350
|
/**
|
|
351
351
|
* Deletes a label from the site and removes it from contacts it applies to.
|
|
352
352
|
*
|
|
353
|
-
* This function is not a universal function and runs only on the backend
|
|
353
|
+
* This function is not a universal function and runs only on the backend.
|
|
354
354
|
* @param key - Label key to delete.
|
|
355
355
|
* @public
|
|
356
356
|
* @documentationMaturity preview
|
|
@@ -363,7 +363,7 @@ export declare function deleteLabel(key: string): Promise<void>;
|
|
|
363
363
|
* For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
|
|
364
364
|
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
365
365
|
*
|
|
366
|
-
* This function is not a universal function and runs only on the backend
|
|
366
|
+
* This function is not a universal function and runs only on the backend.
|
|
367
367
|
* @public
|
|
368
368
|
* @documentationMaturity preview
|
|
369
369
|
*/
|
|
@@ -86,7 +86,7 @@ const _updateLabelResponse = {};
|
|
|
86
86
|
* [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
|
|
87
87
|
* [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
|
|
88
88
|
*
|
|
89
|
-
* This function is not a universal function and runs only on the backend
|
|
89
|
+
* This function is not a universal function and runs only on the backend.
|
|
90
90
|
* @param displayName - Display name to retrieve or create.
|
|
91
91
|
*
|
|
92
92
|
* If an existing label is an exact match
|
|
@@ -149,7 +149,7 @@ exports.findOrCreateLabel = findOrCreateLabel;
|
|
|
149
149
|
/**
|
|
150
150
|
* Updates a label's specified properties.
|
|
151
151
|
*
|
|
152
|
-
* This function is not a universal function and runs only on the backend
|
|
152
|
+
* This function is not a universal function and runs only on the backend.
|
|
153
153
|
* @param key - Label key.
|
|
154
154
|
*
|
|
155
155
|
* `key` is generated when the label is created
|
|
@@ -211,7 +211,7 @@ exports.renameLabel = renameLabel;
|
|
|
211
211
|
/**
|
|
212
212
|
* Deletes a label from the site and removes it from contacts it applies to.
|
|
213
213
|
*
|
|
214
|
-
* This function is not a universal function and runs only on the backend
|
|
214
|
+
* This function is not a universal function and runs only on the backend.
|
|
215
215
|
* @param key - Label key to delete.
|
|
216
216
|
* @public
|
|
217
217
|
* @documentationMaturity preview
|
|
@@ -267,7 +267,7 @@ exports.deleteLabel = deleteLabel;
|
|
|
267
267
|
* For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
|
|
268
268
|
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
269
269
|
*
|
|
270
|
-
* This function is not a universal function and runs only on the backend
|
|
270
|
+
* This function is not a universal function and runs only on the backend.
|
|
271
271
|
* @public
|
|
272
272
|
* @documentationMaturity preview
|
|
273
273
|
*/
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
import { CreateContactRequest, CreateContactResponse, DeleteContactRequest, DeleteContactResponse, GetContactRequest, GetContactResponse, LabelContactRequest, LabelContactResponse, MergeContactsRequest, MergeContactsResponse, UnlabelContactRequest, UnlabelContactResponse, UpdateContactRequest, UpdateContactResponse } from './contacts-v4-contact.types';
|
|
2
|
+
import { CreateContactRequest, CreateContactResponse, DeleteContactRequest, DeleteContactResponse, GetContactRequest, GetContactResponse, LabelContactRequest, LabelContactResponse, MergeContactsRequest, MergeContactsResponse, QueryContactsRequest, QueryContactsResponse, UnlabelContactRequest, UnlabelContactResponse, UpdateContactRequest, UpdateContactResponse } from './contacts-v4-contact.types';
|
|
3
3
|
/**
|
|
4
4
|
* Creates a new contact.
|
|
5
5
|
*
|
|
6
6
|
*
|
|
7
7
|
* The `createContact()` function returns a Promise
|
|
8
8
|
* that resolves to the new contact when it is created.
|
|
9
|
-
* > **Note:**
|
|
10
|
-
* > This function replaces the deprecated
|
|
11
|
-
* > `wixCrmBackend.createContact()`.
|
|
12
|
-
* > The deprecated function will continue to work, but it will not receive updates.
|
|
13
|
-
* > To keep any existing code compatible with future changes, see the
|
|
14
|
-
* > [migration instructions](wix-crm-backend/createcontact#migration-instructions).
|
|
15
9
|
*
|
|
16
|
-
* The `
|
|
10
|
+
* The `info` parameter object must include a name, phone number, or email address.
|
|
17
11
|
* If all 3 of these parameters are missing,
|
|
18
12
|
* the contact won't be created.
|
|
19
13
|
*
|
|
@@ -37,13 +31,6 @@ export declare function createContact(payload: CreateContactRequest): RequestOpt
|
|
|
37
31
|
* The `updateContact()` function returns a Promise that resolves
|
|
38
32
|
* when the specified contact's information is updated.
|
|
39
33
|
*
|
|
40
|
-
* > **Note:**
|
|
41
|
-
* > This function replaces the deprecated
|
|
42
|
-
* > `wixCrmBackend.updateContact()`.
|
|
43
|
-
* > The deprecated function will continue to work, but it will not receive updates.
|
|
44
|
-
* > To keep any existing code compatible with future changes, see the
|
|
45
|
-
* > [migration instructions](wix-crm-backend/updatecontact#migration-instructions).
|
|
46
|
-
*
|
|
47
34
|
* Each time the contact is updated,
|
|
48
35
|
* `revision` increments by 1.
|
|
49
36
|
* The existing `revision` must be included when updating the contact.
|
|
@@ -90,9 +77,11 @@ export declare function updateContact(payload: UpdateContactRequest): RequestOpt
|
|
|
90
77
|
*
|
|
91
78
|
* Merging contacts triggers these webhooks:
|
|
92
79
|
*
|
|
93
|
-
* -
|
|
94
|
-
* -
|
|
95
|
-
* -
|
|
80
|
+
* - Contact Merged is triggered.
|
|
81
|
+
* - Contact Updated is triggered for the target contact. `originatedFrom` is set to `merge`.
|
|
82
|
+
* - Contact Deleted is triggered for each source contact. `originatedFrom` is set to `merge`.
|
|
83
|
+
*
|
|
84
|
+
* This function is not a universal function and runs only on the backend.
|
|
96
85
|
*/
|
|
97
86
|
export declare function mergeContacts(payload: MergeContactsRequest): RequestOptionsFactory<MergeContactsResponse>;
|
|
98
87
|
/**
|
|
@@ -100,12 +89,6 @@ export declare function mergeContacts(payload: MergeContactsRequest): RequestOpt
|
|
|
100
89
|
*
|
|
101
90
|
* The `deleteContact()` function returns a Promise
|
|
102
91
|
* that resolves when the specified contact is deleted.
|
|
103
|
-
* > **Note:**
|
|
104
|
-
* > This function replaces the deprecated
|
|
105
|
-
* > `wixCrmBackend.deleteContact()`.
|
|
106
|
-
* > The deprecated function will continue to work, but it will not receive updates.
|
|
107
|
-
* > To keep any existing code compatible with future changes, see the
|
|
108
|
-
* > [migration instructions](wix-crm-backend/deletecontact#migration-instructions).
|
|
109
92
|
*
|
|
110
93
|
* Deleting a contact permanently removes them from your Contact List.
|
|
111
94
|
*
|
|
@@ -128,8 +111,8 @@ export declare function deleteContact(payload: DeleteContactRequest): RequestOpt
|
|
|
128
111
|
*
|
|
129
112
|
* The `labelContact()` function returns a Promise
|
|
130
113
|
* that resolves when the specified labels are added to the contact.
|
|
131
|
-
* - **To create new labels:** Use [`findOrCreateLabel()`](
|
|
132
|
-
* - **To find labels:** Use [`findOrCreateLabel()`](
|
|
114
|
+
* - **To create new labels:** Use [`findOrCreateLabel()`](#contacts/findorcreatelabel).
|
|
115
|
+
* - **To find labels:** Use [`findOrCreateLabel()`](#contacts/findorcreatelabel), [`getLabel()`](#contacts/getlabel), or [`queryLabels()`](#contacts/queryLabels).
|
|
133
116
|
*
|
|
134
117
|
* <!--
|
|
135
118
|
* > **Note:**
|
|
@@ -148,8 +131,8 @@ export declare function labelContact(payload: LabelContactRequest): RequestOptio
|
|
|
148
131
|
*
|
|
149
132
|
* If a label is no longer needed
|
|
150
133
|
* and you want to remove it from all contacts,
|
|
151
|
-
* you can delete it with
|
|
152
|
-
*
|
|
134
|
+
* you can delete it with Labels
|
|
135
|
+
* `deleteLabel()`.
|
|
153
136
|
*
|
|
154
137
|
* <!--
|
|
155
138
|
* > **Note:**
|
|
@@ -160,6 +143,53 @@ export declare function labelContact(payload: LabelContactRequest): RequestOptio
|
|
|
160
143
|
* -->
|
|
161
144
|
*/
|
|
162
145
|
export declare function unlabelContact(payload: UnlabelContactRequest): RequestOptionsFactory<UnlabelContactResponse>;
|
|
146
|
+
/**
|
|
147
|
+
* Creates a query to retrieve a list of contacts.
|
|
148
|
+
*
|
|
149
|
+
* The `queryContacts()` function builds a query to retrieve a list of contacts
|
|
150
|
+
* and returns a
|
|
151
|
+
* [`ContactsQueryBuilder`](wix-crm-backend/contacts/contactsquerybuilder)
|
|
152
|
+
* object.
|
|
153
|
+
*
|
|
154
|
+
* The returned object contains the query definition,
|
|
155
|
+
* which is typically used to run the query using the
|
|
156
|
+
* [`find()`](wix-crm-backend/contacts/contactsquerybuilder/find)
|
|
157
|
+
* function.
|
|
158
|
+
*
|
|
159
|
+
* You can refine the query
|
|
160
|
+
* by chaining `ContactsQueryBuilder` functions onto the query.
|
|
161
|
+
* `ContactsQueryBuilder` functions enable you to sort, filter,
|
|
162
|
+
* and control the results `queryContacts()` returns.
|
|
163
|
+
*
|
|
164
|
+
* `queryContacts()` runs with these `ContactsQueryBuilder` defaults,
|
|
165
|
+
* which you can override:
|
|
166
|
+
*
|
|
167
|
+
* - [`skip(0)`](wix-crm-backend/contacts/contactsquerybuilder/skip)
|
|
168
|
+
* - [`limit(50)`](wix-crm-backend/contacts/contactsquerybuilder/limit)
|
|
169
|
+
* - [`descending("_createdDate")`](wix-crm-backend/contacts/contactsquerybuilder/descending)
|
|
170
|
+
*
|
|
171
|
+
* The functions that are chained to `queryContacts()`
|
|
172
|
+
* are applied in the order they are called.
|
|
173
|
+
* For example, if you apply `ascending('info.company')`
|
|
174
|
+
* and then `descending('info.name.last')`,
|
|
175
|
+
* the results are sorted first by the company name, and then,
|
|
176
|
+
* if there are multiple results with the same company,
|
|
177
|
+
* the items are sorted by last name.
|
|
178
|
+
*
|
|
179
|
+
* <!--
|
|
180
|
+
* > **Note:**
|
|
181
|
+
* > Only visitors with
|
|
182
|
+
* > **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)
|
|
183
|
+
* > can query contacts.
|
|
184
|
+
* > You can override the permissions by setting the `suppressAuth` option to `true`
|
|
185
|
+
* > in the [`find()`](wix-crm-backend/contacts/contactsquerybuilder/find) function.
|
|
186
|
+
* -->
|
|
187
|
+
*
|
|
188
|
+
* For property support for filters and sorting, see
|
|
189
|
+
* [Query contacts: Supported filters, sorting, and search](wix-crm-backend/contacts/sort-and-filter#query-contacts-supported-filters,-sorting,-and-search).
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
export declare function queryContacts(payload: QueryContactsRequest): RequestOptionsFactory<QueryContactsResponse>;
|
|
163
193
|
/**
|
|
164
194
|
* Retrieves a contact.
|
|
165
195
|
*
|
|
@@ -176,13 +206,7 @@ export declare function unlabelContact(payload: UnlabelContactRequest): RequestO
|
|
|
176
206
|
* This is supported only when calling `getContact()`,
|
|
177
207
|
* and only for merged contacts.
|
|
178
208
|
* Deleted source contact IDs are not supported on any other function.
|
|
179
|
-
*
|
|
180
|
-
* >
|
|
181
|
-
* > - This function replaces the deprecated
|
|
182
|
-
* > `wixCrmBackend.getContactById()`.
|
|
183
|
-
* > The deprecated function will continue to work, but it will not receive updates.
|
|
184
|
-
* > To keep any existing code compatible with future changes, see the
|
|
185
|
-
* > [migration instructions](wix-crm-backend/getcontactbyid#migration-instructions).
|
|
209
|
+
*
|
|
186
210
|
* <!-- > - Only visitors with
|
|
187
211
|
* > **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)
|
|
188
212
|
* > can retrieve contacts.
|
|
@@ -32,6 +32,8 @@ const _labelContactRequest = {};
|
|
|
32
32
|
const _labelContactResponse = { contact: '_contact' };
|
|
33
33
|
const _mergeContactsRequest = {};
|
|
34
34
|
const _mergeContactsResponse = { contact: '_contact' };
|
|
35
|
+
const _queryContactsRequest = {};
|
|
36
|
+
const _queryContactsResponse = { contacts: '_contact' };
|
|
35
37
|
const _unlabelContactRequest = {};
|
|
36
38
|
const _unlabelContactResponse = { contact: '_contact' };
|
|
37
39
|
const _updateContactRequest = {
|
|
@@ -102,14 +104,8 @@ function resolveComWixpressContactsCoreApiV4ContactsServiceV4Url(opts) {
|
|
|
102
104
|
*
|
|
103
105
|
* The `createContact()` function returns a Promise
|
|
104
106
|
* that resolves to the new contact when it is created.
|
|
105
|
-
* > **Note:**
|
|
106
|
-
* > This function replaces the deprecated
|
|
107
|
-
* > `wixCrmBackend.createContact()`.
|
|
108
|
-
* > The deprecated function will continue to work, but it will not receive updates.
|
|
109
|
-
* > To keep any existing code compatible with future changes, see the
|
|
110
|
-
* > [migration instructions](wix-crm-backend/createcontact#migration-instructions).
|
|
111
107
|
*
|
|
112
|
-
* The `
|
|
108
|
+
* The `info` parameter object must include a name, phone number, or email address.
|
|
113
109
|
* If all 3 of these parameters are missing,
|
|
114
110
|
* the contact won't be created.
|
|
115
111
|
*
|
|
@@ -172,13 +168,6 @@ export function createContact(payload) {
|
|
|
172
168
|
* The `updateContact()` function returns a Promise that resolves
|
|
173
169
|
* when the specified contact's information is updated.
|
|
174
170
|
*
|
|
175
|
-
* > **Note:**
|
|
176
|
-
* > This function replaces the deprecated
|
|
177
|
-
* > `wixCrmBackend.updateContact()`.
|
|
178
|
-
* > The deprecated function will continue to work, but it will not receive updates.
|
|
179
|
-
* > To keep any existing code compatible with future changes, see the
|
|
180
|
-
* > [migration instructions](wix-crm-backend/updatecontact#migration-instructions).
|
|
181
|
-
*
|
|
182
171
|
* Each time the contact is updated,
|
|
183
172
|
* `revision` increments by 1.
|
|
184
173
|
* The existing `revision` must be included when updating the contact.
|
|
@@ -264,9 +253,11 @@ export function updateContact(payload) {
|
|
|
264
253
|
*
|
|
265
254
|
* Merging contacts triggers these webhooks:
|
|
266
255
|
*
|
|
267
|
-
* -
|
|
268
|
-
* -
|
|
269
|
-
* -
|
|
256
|
+
* - Contact Merged is triggered.
|
|
257
|
+
* - Contact Updated is triggered for the target contact. `originatedFrom` is set to `merge`.
|
|
258
|
+
* - Contact Deleted is triggered for each source contact. `originatedFrom` is set to `merge`.
|
|
259
|
+
*
|
|
260
|
+
* This function is not a universal function and runs only on the backend.
|
|
270
261
|
*/
|
|
271
262
|
export function mergeContacts(payload) {
|
|
272
263
|
const { toJSON: toReq, fromJSON: fromReq } = serializer(_mergeContactsRequest, {});
|
|
@@ -305,12 +296,6 @@ export function mergeContacts(payload) {
|
|
|
305
296
|
*
|
|
306
297
|
* The `deleteContact()` function returns a Promise
|
|
307
298
|
* that resolves when the specified contact is deleted.
|
|
308
|
-
* > **Note:**
|
|
309
|
-
* > This function replaces the deprecated
|
|
310
|
-
* > `wixCrmBackend.deleteContact()`.
|
|
311
|
-
* > The deprecated function will continue to work, but it will not receive updates.
|
|
312
|
-
* > To keep any existing code compatible with future changes, see the
|
|
313
|
-
* > [migration instructions](wix-crm-backend/deletecontact#migration-instructions).
|
|
314
299
|
*
|
|
315
300
|
* Deleting a contact permanently removes them from your Contact List.
|
|
316
301
|
*
|
|
@@ -354,8 +339,8 @@ export function deleteContact(payload) {
|
|
|
354
339
|
*
|
|
355
340
|
* The `labelContact()` function returns a Promise
|
|
356
341
|
* that resolves when the specified labels are added to the contact.
|
|
357
|
-
* - **To create new labels:** Use [`findOrCreateLabel()`](
|
|
358
|
-
* - **To find labels:** Use [`findOrCreateLabel()`](
|
|
342
|
+
* - **To create new labels:** Use [`findOrCreateLabel()`](#contacts/findorcreatelabel).
|
|
343
|
+
* - **To find labels:** Use [`findOrCreateLabel()`](#contacts/findorcreatelabel), [`getLabel()`](#contacts/getlabel), or [`queryLabels()`](#contacts/queryLabels).
|
|
359
344
|
*
|
|
360
345
|
* <!--
|
|
361
346
|
* > **Note:**
|
|
@@ -405,8 +390,8 @@ export function labelContact(payload) {
|
|
|
405
390
|
*
|
|
406
391
|
* If a label is no longer needed
|
|
407
392
|
* and you want to remove it from all contacts,
|
|
408
|
-
* you can delete it with
|
|
409
|
-
*
|
|
393
|
+
* you can delete it with Labels
|
|
394
|
+
* `deleteLabel()`.
|
|
410
395
|
*
|
|
411
396
|
* <!--
|
|
412
397
|
* > **Note:**
|
|
@@ -448,6 +433,84 @@ export function unlabelContact(payload) {
|
|
|
448
433
|
__unlabelContact.fromReq = fromReq;
|
|
449
434
|
return __unlabelContact;
|
|
450
435
|
}
|
|
436
|
+
/**
|
|
437
|
+
* Creates a query to retrieve a list of contacts.
|
|
438
|
+
*
|
|
439
|
+
* The `queryContacts()` function builds a query to retrieve a list of contacts
|
|
440
|
+
* and returns a
|
|
441
|
+
* [`ContactsQueryBuilder`](wix-crm-backend/contacts/contactsquerybuilder)
|
|
442
|
+
* object.
|
|
443
|
+
*
|
|
444
|
+
* The returned object contains the query definition,
|
|
445
|
+
* which is typically used to run the query using the
|
|
446
|
+
* [`find()`](wix-crm-backend/contacts/contactsquerybuilder/find)
|
|
447
|
+
* function.
|
|
448
|
+
*
|
|
449
|
+
* You can refine the query
|
|
450
|
+
* by chaining `ContactsQueryBuilder` functions onto the query.
|
|
451
|
+
* `ContactsQueryBuilder` functions enable you to sort, filter,
|
|
452
|
+
* and control the results `queryContacts()` returns.
|
|
453
|
+
*
|
|
454
|
+
* `queryContacts()` runs with these `ContactsQueryBuilder` defaults,
|
|
455
|
+
* which you can override:
|
|
456
|
+
*
|
|
457
|
+
* - [`skip(0)`](wix-crm-backend/contacts/contactsquerybuilder/skip)
|
|
458
|
+
* - [`limit(50)`](wix-crm-backend/contacts/contactsquerybuilder/limit)
|
|
459
|
+
* - [`descending("_createdDate")`](wix-crm-backend/contacts/contactsquerybuilder/descending)
|
|
460
|
+
*
|
|
461
|
+
* The functions that are chained to `queryContacts()`
|
|
462
|
+
* are applied in the order they are called.
|
|
463
|
+
* For example, if you apply `ascending('info.company')`
|
|
464
|
+
* and then `descending('info.name.last')`,
|
|
465
|
+
* the results are sorted first by the company name, and then,
|
|
466
|
+
* if there are multiple results with the same company,
|
|
467
|
+
* the items are sorted by last name.
|
|
468
|
+
*
|
|
469
|
+
* <!--
|
|
470
|
+
* > **Note:**
|
|
471
|
+
* > Only visitors with
|
|
472
|
+
* > **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)
|
|
473
|
+
* > can query contacts.
|
|
474
|
+
* > You can override the permissions by setting the `suppressAuth` option to `true`
|
|
475
|
+
* > in the [`find()`](wix-crm-backend/contacts/contactsquerybuilder/find) function.
|
|
476
|
+
* -->
|
|
477
|
+
*
|
|
478
|
+
* For property support for filters and sorting, see
|
|
479
|
+
* [Query contacts: Supported filters, sorting, and search](wix-crm-backend/contacts/sort-and-filter#query-contacts-supported-filters,-sorting,-and-search).
|
|
480
|
+
*
|
|
481
|
+
*/
|
|
482
|
+
export function queryContacts(payload) {
|
|
483
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_queryContactsRequest, {});
|
|
484
|
+
const { fromJSON: fromRes } = serializer(_queryContactsResponse, {
|
|
485
|
+
_address,
|
|
486
|
+
_addressLocation,
|
|
487
|
+
_contact,
|
|
488
|
+
_contactActivity,
|
|
489
|
+
_contactAddress,
|
|
490
|
+
_contactAddressesWrapper,
|
|
491
|
+
_contactInfo,
|
|
492
|
+
_contactPicture,
|
|
493
|
+
_image,
|
|
494
|
+
});
|
|
495
|
+
function __queryContacts({ host }) {
|
|
496
|
+
const serializedData = toReq(payload);
|
|
497
|
+
const metadata = {
|
|
498
|
+
entityFqdn: 'wix.contacts.v4.contact',
|
|
499
|
+
method: 'POST',
|
|
500
|
+
methodFqn: 'com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts',
|
|
501
|
+
url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({
|
|
502
|
+
protoPath: '/v4/contacts/query',
|
|
503
|
+
data: serializedData,
|
|
504
|
+
host,
|
|
505
|
+
}),
|
|
506
|
+
data: serializedData,
|
|
507
|
+
transformResponse: fromRes,
|
|
508
|
+
};
|
|
509
|
+
return metadata;
|
|
510
|
+
}
|
|
511
|
+
__queryContacts.fromReq = fromReq;
|
|
512
|
+
return __queryContacts;
|
|
513
|
+
}
|
|
451
514
|
/**
|
|
452
515
|
* Retrieves a contact.
|
|
453
516
|
*
|
|
@@ -464,13 +527,7 @@ export function unlabelContact(payload) {
|
|
|
464
527
|
* This is supported only when calling `getContact()`,
|
|
465
528
|
* and only for merged contacts.
|
|
466
529
|
* Deleted source contact IDs are not supported on any other function.
|
|
467
|
-
*
|
|
468
|
-
* >
|
|
469
|
-
* > - This function replaces the deprecated
|
|
470
|
-
* > `wixCrmBackend.getContactById()`.
|
|
471
|
-
* > The deprecated function will continue to work, but it will not receive updates.
|
|
472
|
-
* > To keep any existing code compatible with future changes, see the
|
|
473
|
-
* > [migration instructions](wix-crm-backend/getcontactbyid#migration-instructions).
|
|
530
|
+
*
|
|
474
531
|
* <!-- > - Only visitors with
|
|
475
532
|
* > **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)
|
|
476
533
|
* > can retrieve contacts.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts-v4-contact.http.js","sourceRoot":"","sources":["../../../src/contacts-v4-contact.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"contacts-v4-contact.http.js","sourceRoot":"","sources":["../../../src/contacts-v4-contact.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAsBhD,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACjD,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,6BAA6B;CACzC,CAAC;AACF,MAAM,QAAQ,GAAG;IACf,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;IACxC,YAAY,EAAE,kBAAkB;IAChC,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,cAAc;CACrB,CAAC;AACF,MAAM,gBAAgB,GAAG,EAAE,YAAY,EAAE,2BAA2B,EAAE,CAAC;AACvE,MAAM,eAAe,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AAChD,MAAM,wBAAwB,GAAG,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;AAC9D,MAAM,YAAY,GAAG;IACnB,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,iBAAiB;CA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e;QACf,wBAAwB;QACxB,YAAY;QACZ,eAAe;QACf,MAAM;KACP,CAAC,CAAC;IAEH,SAAS,YAAY,CAAC,EAAE,IAAI,EAAO;QACjC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,yBAAyB;YACrC,MAAM,EAAE,KAAY;YACpB,SAAS,EACP,gEAAgE;YAClE,GAAG,EAAE,uDAAuD,CAAC;gBAC3D,SAAS,EAAE,mBAAmB;gBAC9B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,MAAM,EAAE,iBAAiB,CAAC,cAAc,CAAC;YACzC,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IAE/B,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { ContactInfo, UpdateContactOptions, CreateContactOptions, GetContactOptions, MergeContactsOptions } from './contacts-v4-contact.universal';
|
|
2
|
+
import { ContactInfo, UpdateContactOptions, CreateContactOptions, GetContactOptions, MergeContactsOptions, QueryContactsOptions } from './contacts-v4-contact.universal';
|
|
3
3
|
export declare const __metadata: {
|
|
4
4
|
PACKAGE_NAME: string;
|
|
5
5
|
};
|
|
@@ -9,6 +9,7 @@ export declare function mergeContacts(httpClient: HttpClient): (targetContactId:
|
|
|
9
9
|
export declare function deleteContact(httpClient: HttpClient): (contactId: string) => Promise<void>;
|
|
10
10
|
export declare function labelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<import("./contacts-v4-contact.universal").LabelContactResponse>;
|
|
11
11
|
export declare function unlabelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<import("./contacts-v4-contact.universal").UnlabelContactResponse>;
|
|
12
|
+
export declare function queryContacts(httpClient: HttpClient): (options?: QueryContactsOptions | undefined) => Promise<import("./contacts-v4-contact.universal").QueryContactsResponse>;
|
|
12
13
|
export declare function getContact(httpClient: HttpClient): (_id: string, options?: GetContactOptions | undefined) => Promise<import("./contacts-v4-contact.universal").Contact>;
|
|
13
14
|
export { ContactSourceType, ContactActivityType, EmailTag, PhoneTag, AddressTag, SubdivisionType, ImageProvider, SortOrder, ContactFieldSet, ContactsFacetType, Action, UpsertContactResponseAction, GetContactResponseType, SubmitOperation, Mode, } from './contacts-v4-contact.universal';
|
|
14
|
-
export { Contact, ContactSource, ContactActivity, PrimaryContactInfo, ContactInfo, ContactName, ContactEmailsWrapper, ContactEmail, ContactPhonesWrapper, ContactPhone, ContactAddressesWrapper, ContactAddress, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, AssigneesWrapper, LabelsWrapper, ExtendedFieldsWrapper, LocationsWrapper, ContactPicture, SegmentsWrapper, EstimateFilterSizeRequest, EstimateFilterSizeResponse, EstimateAudienceSizeRequest, EstimateAudienceSizeResponse, ContactSubmitted, ContactChanged, CreateContactRequest, CreateContactResponse, DuplicateContactExists, UpdateContactRequest, UpdateContactResponse, MergeContactsRequest, MergeContactsResponse, ContactMerged, PreviewMergeContactsRequest, PreviewMergeContactsResponse, DeleteContactRequest, DeleteContactResponse, LabelContactRequest, LabelContactResponse, UnlabelContactRequest, UnlabelContactResponse, LabelAndUnlabelContactRequest, LabelAndUnlabelContactResponse, ListContactsRequest, Sorting, Paging, ListContactsResponse, PagingMetadata, QueryContactsRequest, Query, QueryContactsResponse, ListFacetsRequest, ListFacetsResponse, ContactsFacet, QueryFacetsRequest, QueryFacetsResponse, BulkDeleteContactsRequest, BulkDeleteContactsResponse, BulkUpdateContactsRequest, BulkUpdateContactsResponse, BulkLabelAndUnlabelContactsRequest, BulkLabelAndUnlabelContactsResponse, BulkUpsertContactsRequest, BulkUpsertContactsResponse, Error, Metadata, Item, BulkUpsertContactsResponseMetadata, UpsertContactRequest, UpsertContactResponse, GeneratePictureUploadUrlRequest, GeneratePictureUploadUrlResponse, GetContactRequest, GetContactResponse, SyncSubmitContactRequest, SyncSubmitContactResponse, CountContactsRequest, CountContactsResponse, SearchContactsRequest, Search, SearchPagingMethodOneOf, SearchDetails, CursorPaging, SearchContactsResponse, PagingMetadataV2, Cursors, BulkAddSegmentToContactsRequest, BulkAddSegmentToContactsResponse, ItemMetadata, ApplicationError, BulkActionMetadata, ContactAddedToSegment, BulkRemoveSegmentFromContactsRequest, BulkRemoveSegmentFromContactsResponse, ContactRemovedFromSegment, CreateContactOptions, UpdateContactOptions, MergeContactsOptions, GetContactOptions, } from './contacts-v4-contact.universal';
|
|
15
|
+
export { Contact, ContactSource, ContactActivity, PrimaryContactInfo, ContactInfo, ContactName, ContactEmailsWrapper, ContactEmail, ContactPhonesWrapper, ContactPhone, ContactAddressesWrapper, ContactAddress, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, AssigneesWrapper, LabelsWrapper, ExtendedFieldsWrapper, LocationsWrapper, ContactPicture, SegmentsWrapper, EstimateFilterSizeRequest, EstimateFilterSizeResponse, EstimateAudienceSizeRequest, EstimateAudienceSizeResponse, ContactSubmitted, ContactChanged, CreateContactRequest, CreateContactResponse, DuplicateContactExists, UpdateContactRequest, UpdateContactResponse, MergeContactsRequest, MergeContactsResponse, ContactMerged, PreviewMergeContactsRequest, PreviewMergeContactsResponse, DeleteContactRequest, DeleteContactResponse, LabelContactRequest, LabelContactResponse, UnlabelContactRequest, UnlabelContactResponse, LabelAndUnlabelContactRequest, LabelAndUnlabelContactResponse, ListContactsRequest, Sorting, Paging, ListContactsResponse, PagingMetadata, QueryContactsRequest, Query, QueryContactsResponse, ListFacetsRequest, ListFacetsResponse, ContactsFacet, QueryFacetsRequest, QueryFacetsResponse, BulkDeleteContactsRequest, BulkDeleteContactsResponse, BulkUpdateContactsRequest, BulkUpdateContactsResponse, BulkLabelAndUnlabelContactsRequest, BulkLabelAndUnlabelContactsResponse, BulkUpsertContactsRequest, BulkUpsertContactsResponse, Error, Metadata, Item, BulkUpsertContactsResponseMetadata, UpsertContactRequest, UpsertContactResponse, GeneratePictureUploadUrlRequest, GeneratePictureUploadUrlResponse, GetContactRequest, GetContactResponse, SyncSubmitContactRequest, SyncSubmitContactResponse, CountContactsRequest, CountContactsResponse, SearchContactsRequest, Search, SearchPagingMethodOneOf, SearchDetails, CursorPaging, SearchContactsResponse, PagingMetadataV2, Cursors, BulkAddSegmentToContactsRequest, BulkAddSegmentToContactsResponse, ItemMetadata, ApplicationError, BulkActionMetadata, ContactAddedToSegment, BulkRemoveSegmentFromContactsRequest, BulkRemoveSegmentFromContactsResponse, ContactRemovedFromSegment, CreateContactOptions, UpdateContactOptions, MergeContactsOptions, QueryContactsOptions, GetContactOptions, } from './contacts-v4-contact.universal';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContact as universalCreateContact, updateContact as universalUpdateContact, mergeContacts as universalMergeContacts, deleteContact as universalDeleteContact, labelContact as universalLabelContact, unlabelContact as universalUnlabelContact, getContact as universalGetContact, } from './contacts-v4-contact.universal';
|
|
1
|
+
import { createContact as universalCreateContact, updateContact as universalUpdateContact, mergeContacts as universalMergeContacts, deleteContact as universalDeleteContact, labelContact as universalLabelContact, unlabelContact as universalUnlabelContact, queryContacts as universalQueryContacts, getContact as universalGetContact, } from './contacts-v4-contact.universal';
|
|
2
2
|
export const __metadata = { PACKAGE_NAME: '@wix/crm' };
|
|
3
3
|
export function createContact(httpClient) {
|
|
4
4
|
return (info, options) => universalCreateContact(info, options,
|
|
@@ -30,6 +30,11 @@ export function unlabelContact(httpClient) {
|
|
|
30
30
|
// @ts-ignore
|
|
31
31
|
{ httpClient });
|
|
32
32
|
}
|
|
33
|
+
export function queryContacts(httpClient) {
|
|
34
|
+
return (options) => universalQueryContacts(options,
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
{ httpClient });
|
|
37
|
+
}
|
|
33
38
|
export function getContact(httpClient) {
|
|
34
39
|
return (_id, options) => universalGetContact(_id, options,
|
|
35
40
|
// @ts-ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts-v4-contact.public.js","sourceRoot":"","sources":["../../../src/contacts-v4-contact.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,IAAI,sBAAsB,EACvC,aAAa,IAAI,sBAAsB,EACvC,aAAa,IAAI,sBAAsB,EACvC,aAAa,IAAI,sBAAsB,EACvC,YAAY,IAAI,qBAAqB,EACrC,cAAc,IAAI,uBAAuB,EACzC,UAAU,IAAI,mBAAmB,
|
|
1
|
+
{"version":3,"file":"contacts-v4-contact.public.js","sourceRoot":"","sources":["../../../src/contacts-v4-contact.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,IAAI,sBAAsB,EACvC,aAAa,IAAI,sBAAsB,EACvC,aAAa,IAAI,sBAAsB,EACvC,aAAa,IAAI,sBAAsB,EACvC,YAAY,IAAI,qBAAqB,EACrC,cAAc,IAAI,uBAAuB,EACzC,aAAa,IAAI,sBAAsB,EACvC,UAAU,IAAI,mBAAmB,GAOlC,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AAEvD,MAAM,UAAU,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,IAAiB,EAAE,OAA8B,EAAE,EAAE,CAC3D,sBAAsB,CACpB,IAAI,EACJ,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,UAAsB;IAClD,OAAO,CACL,SAAiB,EACjB,IAAiB,EACjB,OAA6B,EAC7B,EAAE,CACF,sBAAsB,CACpB,SAAS,EACT,IAAI,EACJ,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,UAAsB;IAClD,OAAO,CACL,eAAuB,EACvB,qB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