@wix/crm 1.0.79 → 1.0.81
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/context.d.ts +5 -0
- package/build/cjs/context.js +32 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +7 -3
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +7 -3
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -1
- package/build/cjs/meta.js +7 -3
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.context.d.ts +9 -0
- package/build/cjs/src/contacts-v4-contact.context.js +82 -0
- package/build/cjs/src/contacts-v4-contact.context.js.map +1 -0
- package/build/cjs/src/contacts-v4-contact.http.d.ts +20 -94
- package/build/cjs/src/contacts-v4-contact.http.js +211 -249
- package/build/cjs/src/contacts-v4-contact.http.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.meta.d.ts +1 -1
- package/build/cjs/src/contacts-v4-contact.meta.js +5 -1
- package/build/cjs/src/contacts-v4-contact.meta.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.public.d.ts +6 -6
- package/build/cjs/src/contacts-v4-contact.public.js +5 -2
- package/build/cjs/src/contacts-v4-contact.public.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.types.d.ts +265 -5
- package/build/cjs/src/contacts-v4-contact.types.js +40 -19
- package/build/cjs/src/contacts-v4-contact.types.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.universal.d.ts +221 -155
- package/build/cjs/src/contacts-v4-contact.universal.js +140 -168
- package/build/cjs/src/contacts-v4-contact.universal.js.map +1 -1
- package/build/cjs/src/contacts-v4-extended-field.context.d.ts +7 -0
- package/build/cjs/src/contacts-v4-extended-field.context.js +60 -0
- package/build/cjs/src/contacts-v4-extended-field.context.js.map +1 -0
- package/build/cjs/src/contacts-v4-extended-field.http.d.ts +7 -14
- package/build/cjs/src/contacts-v4-extended-field.http.js +60 -70
- package/build/cjs/src/contacts-v4-extended-field.http.js.map +1 -1
- package/build/cjs/src/contacts-v4-extended-field.meta.d.ts +1 -1
- package/build/cjs/src/contacts-v4-extended-field.meta.js +5 -1
- package/build/cjs/src/contacts-v4-extended-field.meta.js.map +1 -1
- package/build/cjs/src/contacts-v4-extended-field.public.d.ts +1 -1
- package/build/cjs/src/contacts-v4-extended-field.types.d.ts +68 -1
- package/build/cjs/src/contacts-v4-extended-field.types.js +3 -3
- package/build/cjs/src/contacts-v4-extended-field.types.js.map +1 -1
- package/build/cjs/src/contacts-v4-extended-field.universal.d.ts +104 -30
- package/build/cjs/src/contacts-v4-extended-field.universal.js +58 -51
- package/build/cjs/src/contacts-v4-extended-field.universal.js.map +1 -1
- package/build/cjs/src/contacts-v4-label.context.d.ts +7 -0
- package/build/cjs/src/contacts-v4-label.context.js +60 -0
- package/build/cjs/src/contacts-v4-label.context.js.map +1 -0
- package/build/cjs/src/contacts-v4-label.http.d.ts +13 -14
- package/build/cjs/src/contacts-v4-label.http.js +66 -72
- package/build/cjs/src/contacts-v4-label.http.js.map +1 -1
- package/build/cjs/src/contacts-v4-label.meta.d.ts +1 -1
- package/build/cjs/src/contacts-v4-label.meta.js +5 -1
- package/build/cjs/src/contacts-v4-label.meta.js.map +1 -1
- package/build/cjs/src/contacts-v4-label.public.d.ts +5 -5
- package/build/cjs/src/contacts-v4-label.types.d.ts +76 -9
- package/build/cjs/src/contacts-v4-label.types.js +2 -2
- package/build/cjs/src/contacts-v4-label.types.js.map +1 -1
- package/build/cjs/src/contacts-v4-label.universal.d.ts +113 -40
- package/build/cjs/src/contacts-v4-label.universal.js +72 -62
- package/build/cjs/src/contacts-v4-label.universal.js.map +1 -1
- package/build/cjs/src/contacts-v4-submit-contact.context.d.ts +3 -0
- package/build/cjs/src/contacts-v4-submit-contact.context.js +16 -0
- package/build/cjs/src/contacts-v4-submit-contact.context.js.map +1 -0
- package/build/cjs/src/contacts-v4-submit-contact.http.js +20 -34
- package/build/cjs/src/contacts-v4-submit-contact.http.js.map +1 -1
- package/build/cjs/src/contacts-v4-submit-contact.meta.d.ts +1 -1
- package/build/cjs/src/contacts-v4-submit-contact.meta.js +5 -1
- package/build/cjs/src/contacts-v4-submit-contact.meta.js.map +1 -1
- package/build/cjs/src/contacts-v4-submit-contact.public.d.ts +2 -2
- package/build/cjs/src/contacts-v4-submit-contact.types.d.ts +8 -3
- package/build/cjs/src/contacts-v4-submit-contact.types.js +9 -9
- package/build/cjs/src/contacts-v4-submit-contact.types.js.map +1 -1
- package/build/cjs/src/contacts-v4-submit-contact.universal.d.ts +8 -9
- package/build/cjs/src/contacts-v4-submit-contact.universal.js +25 -28
- package/build/cjs/src/contacts-v4-submit-contact.universal.js.map +1 -1
- package/build/cjs/src/crm-tasks-v2-task.context.d.ts +9 -0
- package/build/cjs/src/crm-tasks-v2-task.context.js +82 -0
- package/build/cjs/src/crm-tasks-v2-task.context.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task.http.d.ts +60 -0
- package/build/cjs/src/crm-tasks-v2-task.http.js +268 -0
- package/build/cjs/src/crm-tasks-v2-task.http.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task.meta.d.ts +27 -0
- package/build/cjs/src/crm-tasks-v2-task.meta.js +161 -0
- package/build/cjs/src/crm-tasks-v2-task.meta.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task.public.d.ts +29 -0
- package/build/cjs/src/crm-tasks-v2-task.public.js +53 -0
- package/build/cjs/src/crm-tasks-v2-task.public.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task.types.d.ts +430 -0
- package/build/cjs/src/crm-tasks-v2-task.types.js +29 -0
- package/build/cjs/src/crm-tasks-v2-task.types.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task.universal.d.ts +665 -0
- package/build/cjs/src/crm-tasks-v2-task.universal.js +515 -0
- package/build/cjs/src/crm-tasks-v2-task.universal.js.map +1 -0
- package/build/cjs/src/ping-notifications-v3-notification.public.d.ts +1 -1
- package/build/cjs/src/ping-notifications-v3-notification.types.js +1 -1
- package/build/cjs/src/ping-notifications-v3-notification.types.js.map +1 -1
- package/build/cjs/src/ping-notifications-v3-notification.universal.js +6 -2
- package/build/cjs/src/ping-notifications-v3-notification.universal.js.map +1 -1
- package/build/es/context.d.ts +5 -0
- package/build/es/context.js +6 -0
- package/build/es/context.js.map +1 -0
- package/build/es/index.d.ts +1 -1
- package/build/es/index.js +1 -1
- package/build/es/index.js.map +1 -1
- package/build/es/index.typings.d.ts +1 -1
- package/build/es/index.typings.js +1 -1
- package/build/es/index.typings.js.map +1 -1
- package/build/es/meta.d.ts +1 -1
- package/build/es/meta.js +1 -1
- package/build/es/meta.js.map +1 -1
- package/build/es/src/contacts-v4-contact.context.d.ts +9 -0
- package/build/es/src/contacts-v4-contact.context.js +72 -0
- package/build/es/src/contacts-v4-contact.context.js.map +1 -0
- package/build/es/src/contacts-v4-contact.http.d.ts +20 -94
- package/build/es/src/contacts-v4-contact.http.js +211 -249
- package/build/es/src/contacts-v4-contact.http.js.map +1 -1
- package/build/es/src/contacts-v4-contact.meta.d.ts +1 -1
- package/build/es/src/contacts-v4-contact.public.d.ts +6 -6
- package/build/es/src/contacts-v4-contact.public.js +2 -2
- package/build/es/src/contacts-v4-contact.public.js.map +1 -1
- package/build/es/src/contacts-v4-contact.types.d.ts +265 -5
- package/build/es/src/contacts-v4-contact.types.js +21 -0
- package/build/es/src/contacts-v4-contact.types.js.map +1 -1
- package/build/es/src/contacts-v4-contact.universal.d.ts +221 -155
- package/build/es/src/contacts-v4-contact.universal.js +117 -149
- package/build/es/src/contacts-v4-contact.universal.js.map +1 -1
- package/build/es/src/contacts-v4-extended-field.context.d.ts +7 -0
- package/build/es/src/contacts-v4-extended-field.context.js +52 -0
- package/build/es/src/contacts-v4-extended-field.context.js.map +1 -0
- package/build/es/src/contacts-v4-extended-field.http.d.ts +7 -14
- package/build/es/src/contacts-v4-extended-field.http.js +60 -70
- package/build/es/src/contacts-v4-extended-field.http.js.map +1 -1
- package/build/es/src/contacts-v4-extended-field.meta.d.ts +1 -1
- package/build/es/src/contacts-v4-extended-field.public.d.ts +1 -1
- package/build/es/src/contacts-v4-extended-field.types.d.ts +68 -1
- package/build/es/src/contacts-v4-extended-field.universal.d.ts +104 -30
- package/build/es/src/contacts-v4-extended-field.universal.js +49 -46
- package/build/es/src/contacts-v4-extended-field.universal.js.map +1 -1
- package/build/es/src/contacts-v4-label.context.d.ts +7 -0
- package/build/es/src/contacts-v4-label.context.js +52 -0
- package/build/es/src/contacts-v4-label.context.js.map +1 -0
- package/build/es/src/contacts-v4-label.http.d.ts +13 -14
- package/build/es/src/contacts-v4-label.http.js +66 -72
- package/build/es/src/contacts-v4-label.http.js.map +1 -1
- package/build/es/src/contacts-v4-label.meta.d.ts +1 -1
- package/build/es/src/contacts-v4-label.public.d.ts +5 -5
- package/build/es/src/contacts-v4-label.types.d.ts +76 -9
- package/build/es/src/contacts-v4-label.universal.d.ts +113 -40
- package/build/es/src/contacts-v4-label.universal.js +64 -58
- package/build/es/src/contacts-v4-label.universal.js.map +1 -1
- package/build/es/src/contacts-v4-submit-contact.context.d.ts +3 -0
- package/build/es/src/contacts-v4-submit-contact.context.js +12 -0
- package/build/es/src/contacts-v4-submit-contact.context.js.map +1 -0
- package/build/es/src/contacts-v4-submit-contact.http.js +20 -34
- package/build/es/src/contacts-v4-submit-contact.http.js.map +1 -1
- package/build/es/src/contacts-v4-submit-contact.meta.d.ts +1 -1
- package/build/es/src/contacts-v4-submit-contact.public.d.ts +2 -2
- package/build/es/src/contacts-v4-submit-contact.types.d.ts +8 -3
- package/build/es/src/contacts-v4-submit-contact.types.js.map +1 -1
- package/build/es/src/contacts-v4-submit-contact.universal.d.ts +8 -9
- package/build/es/src/contacts-v4-submit-contact.universal.js +11 -18
- package/build/es/src/contacts-v4-submit-contact.universal.js.map +1 -1
- package/build/es/src/crm-tasks-v2-task.context.d.ts +9 -0
- package/build/es/src/crm-tasks-v2-task.context.js +72 -0
- package/build/es/src/crm-tasks-v2-task.context.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task.http.d.ts +60 -0
- package/build/es/src/crm-tasks-v2-task.http.js +258 -0
- package/build/es/src/crm-tasks-v2-task.http.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task.meta.d.ts +27 -0
- package/build/es/src/crm-tasks-v2-task.meta.js +128 -0
- package/build/es/src/crm-tasks-v2-task.meta.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task.public.d.ts +29 -0
- package/build/es/src/crm-tasks-v2-task.public.js +39 -0
- package/build/es/src/crm-tasks-v2-task.public.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task.types.d.ts +430 -0
- package/build/es/src/crm-tasks-v2-task.types.js +26 -0
- package/build/es/src/crm-tasks-v2-task.types.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task.universal.d.ts +665 -0
- package/build/es/src/crm-tasks-v2-task.universal.js +482 -0
- package/build/es/src/crm-tasks-v2-task.universal.js.map +1 -0
- package/build/es/src/ping-notifications-v3-notification.public.d.ts +1 -1
- package/build/es/src/ping-notifications-v3-notification.universal.js.map +1 -1
- package/context/package.json +6 -0
- package/package.json +12 -6
- package/build/cjs/src/crm-tasks-v1-task.http.d.ts +0 -43
- package/build/cjs/src/crm-tasks-v1-task.http.js +0 -215
- package/build/cjs/src/crm-tasks-v1-task.http.js.map +0 -1
- package/build/cjs/src/crm-tasks-v1-task.meta.d.ts +0 -25
- package/build/cjs/src/crm-tasks-v1-task.meta.js +0 -119
- package/build/cjs/src/crm-tasks-v1-task.meta.js.map +0 -1
- package/build/cjs/src/crm-tasks-v1-task.public.d.ts +0 -12
- package/build/cjs/src/crm-tasks-v1-task.public.js +0 -40
- package/build/cjs/src/crm-tasks-v1-task.public.js.map +0 -1
- package/build/cjs/src/crm-tasks-v1-task.types.d.ts +0 -269
- package/build/cjs/src/crm-tasks-v1-task.types.js +0 -21
- package/build/cjs/src/crm-tasks-v1-task.types.js.map +0 -1
- package/build/cjs/src/crm-tasks-v1-task.universal.d.ts +0 -350
- package/build/cjs/src/crm-tasks-v1-task.universal.js +0 -361
- package/build/cjs/src/crm-tasks-v1-task.universal.js.map +0 -1
- package/build/es/src/crm-tasks-v1-task.http.d.ts +0 -43
- package/build/es/src/crm-tasks-v1-task.http.js +0 -207
- package/build/es/src/crm-tasks-v1-task.http.js.map +0 -1
- package/build/es/src/crm-tasks-v1-task.meta.d.ts +0 -25
- package/build/es/src/crm-tasks-v1-task.meta.js +0 -92
- package/build/es/src/crm-tasks-v1-task.meta.js.map +0 -1
- package/build/es/src/crm-tasks-v1-task.public.d.ts +0 -12
- package/build/es/src/crm-tasks-v1-task.public.js +0 -29
- package/build/es/src/crm-tasks-v1-task.public.js.map +0 -1
- package/build/es/src/crm-tasks-v1-task.types.d.ts +0 -269
- package/build/es/src/crm-tasks-v1-task.types.js +0 -18
- package/build/es/src/crm-tasks-v1-task.types.js.map +0 -1
- package/build/es/src/crm-tasks-v1-task.universal.d.ts +0 -350
- package/build/es/src/crm-tasks-v1-task.universal.js +0 -334
- package/build/es/src/crm-tasks-v1-task.universal.js.map +0 -1
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export declare const __debug: {
|
|
2
|
-
verboseLogging: {
|
|
3
|
-
on: () => boolean;
|
|
4
|
-
off: () => boolean;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
1
|
export interface Contact {
|
|
8
2
|
/**
|
|
9
3
|
* Contact ID.
|
|
@@ -193,6 +187,12 @@ export declare enum ContactActivityType {
|
|
|
193
187
|
/** "contact/phone-subscription-unsubscribe" */
|
|
194
188
|
PHONE_SUBSCRIPTION_UNSUBSCRIBE = "PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
195
189
|
}
|
|
190
|
+
export interface ActivityIcon {
|
|
191
|
+
/** Icon name */
|
|
192
|
+
name?: string | null;
|
|
193
|
+
/** Icon url */
|
|
194
|
+
url?: string | null;
|
|
195
|
+
}
|
|
196
196
|
export interface PrimaryContactInfo {
|
|
197
197
|
/**
|
|
198
198
|
* Primary email address.
|
|
@@ -237,16 +237,12 @@ export interface ContactInfo {
|
|
|
237
237
|
*/
|
|
238
238
|
locale?: string | null;
|
|
239
239
|
/**
|
|
240
|
-
* List of
|
|
241
|
-
* [Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list)
|
|
242
|
-
* help categorize contacts.
|
|
240
|
+
* List of label keys applied to the contact.
|
|
243
241
|
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
* or
|
|
249
|
-
* [`queryLabels()`](wix-crm-v2/labels/queryLabels).
|
|
242
|
+
* Label keys must exist to be added to the contact.
|
|
243
|
+
* Contact labels can be created with the
|
|
244
|
+
* `findOrCreateLabel()` function. You can use the
|
|
245
|
+
* `queryLabels()` function to view the currently existing labels.
|
|
250
246
|
*
|
|
251
247
|
*/
|
|
252
248
|
labelKeys?: LabelsWrapper;
|
|
@@ -281,12 +277,7 @@ export interface ContactEmail {
|
|
|
281
277
|
*
|
|
282
278
|
* `"UNTAGGED"` is shown as "Other" in the Contact List.
|
|
283
279
|
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* - `"UNTAGGED"`
|
|
287
|
-
* - `"MAIN"`
|
|
288
|
-
* - `"HOME"`
|
|
289
|
-
* - `"WORK"`
|
|
280
|
+
* Supported values: `"UNTAGGED"`, `"MAIN"`, `"HOME"`, `"WORK"`.
|
|
290
281
|
*/
|
|
291
282
|
tag?: EmailTag;
|
|
292
283
|
/** Email address. */
|
|
@@ -320,14 +311,7 @@ export interface ContactPhone {
|
|
|
320
311
|
*
|
|
321
312
|
* `"UNTAGGED"` is shown as "Other" in the Contact List.
|
|
322
313
|
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
* - `"UNTAGGED"`
|
|
326
|
-
* - `"MAIN"`
|
|
327
|
-
* - `"HOME"`
|
|
328
|
-
* - `"MOBILE"`
|
|
329
|
-
* - `"WORK"`
|
|
330
|
-
* - `"FAX"`
|
|
314
|
+
* Supported values: `"UNTAGGED"`, `"MAIN"`, `"HOME"`,`"MOBILE"`, `"WORK"`, `"FAX"`.
|
|
331
315
|
*/
|
|
332
316
|
tag?: PhoneTag;
|
|
333
317
|
/** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */
|
|
@@ -337,15 +321,14 @@ export interface ContactPhone {
|
|
|
337
321
|
/**
|
|
338
322
|
* [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
|
|
339
323
|
* phone number.
|
|
340
|
-
* Automatically generated using `phone` and `countryCode`,
|
|
341
|
-
* as long as both of those values are valid.
|
|
324
|
+
* Automatically generated using `phone` and `countryCode`, pending both values are valid.
|
|
342
325
|
* @readonly
|
|
343
326
|
*/
|
|
344
327
|
e164Phone?: string | null;
|
|
345
328
|
/**
|
|
346
329
|
* Whether this is the contact's primary phone number.
|
|
347
330
|
* When changing `primary` to `true` for a phone,
|
|
348
|
-
* the contact's other phones
|
|
331
|
+
* the contact's `primary` field for other phones becomes `false`.
|
|
349
332
|
* It also affects the subscription status to SMS messages that are decided based on the primary phone.
|
|
350
333
|
*/
|
|
351
334
|
primary?: boolean | null;
|
|
@@ -369,17 +352,11 @@ export interface ContactAddress {
|
|
|
369
352
|
*/
|
|
370
353
|
_id?: string | null;
|
|
371
354
|
/**
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
* `"UNTAGGED"` is shown as "Other" in the Contact List.
|
|
355
|
+
* Address type.
|
|
375
356
|
*
|
|
376
|
-
*
|
|
357
|
+
* `"UNTAGGED"` is shown as "Other" in the Contact List.
|
|
377
358
|
*
|
|
378
|
-
*
|
|
379
|
-
* - `"HOME"`
|
|
380
|
-
* - `"WORK"`
|
|
381
|
-
* - `"BILLING"`
|
|
382
|
-
* - `"SHIPPING"`
|
|
359
|
+
* Supported values: `"UNTAGGED"`, `"HOME"`, `"WORK"`, `"BILLING"`, `"SHIPPING"`.
|
|
383
360
|
*/
|
|
384
361
|
tag?: AddressTag;
|
|
385
362
|
/** Street address. */
|
|
@@ -601,6 +578,78 @@ export declare enum PhoneDeliverabilityStatus {
|
|
|
601
578
|
NO_PHONE_DELIVERABILITY_STATUS = "NO_PHONE_DELIVERABILITY_STATUS",
|
|
602
579
|
NOT_SET = "NOT_SET"
|
|
603
580
|
}
|
|
581
|
+
export interface MemberInfo {
|
|
582
|
+
/** Member ID. For more details see [here](https://github.com/wix-private/identity/blob/master/iam/memberid/proto/wix/iam/member/v1/member_id_service.proto) */
|
|
583
|
+
memberId?: string | null;
|
|
584
|
+
/** Identity info. For more details see [here](https://github.com/wix-private/identity/blob/master/iam/identity/identity-service/proto/wix/iam/identity/v1/identity.proto) */
|
|
585
|
+
identityInfo?: IdentityInfo;
|
|
586
|
+
/** Profile info. For more details see [here](https://github.com/wix-private/app-market/blob/master/members/members-profiles-api/proto/com/wixpress/members/profiles/profile.proto) */
|
|
587
|
+
profileInfo?: ProfileInfo;
|
|
588
|
+
/** User info. For more details see [here](https://dev.wix.com/docs/rest/internal-only/identity/user-member-connection-v1/user-member-connection-object) */
|
|
589
|
+
userInfo?: UserInfo;
|
|
590
|
+
/** Session info. For more details see [here](https://github.com/wix-private/identity/blob/master/iam/session/session-management/proto/wix/iam/session/v1/session.proto) */
|
|
591
|
+
sessionInfo?: SessionInfo;
|
|
592
|
+
/** Group info. For more details see [here](https://github.com/wix-private/crm/blob/master/members-groups/api/src/main/proto/com/wixpress/members/groups/Groups.proto) */
|
|
593
|
+
groupInfo?: GroupInfo;
|
|
594
|
+
}
|
|
595
|
+
export interface IdentityInfo {
|
|
596
|
+
/** Signup date */
|
|
597
|
+
signupDate?: Date;
|
|
598
|
+
/** Login email */
|
|
599
|
+
email?: string | null;
|
|
600
|
+
/** Indicate whether the email is verified */
|
|
601
|
+
emailVerified?: boolean | null;
|
|
602
|
+
/** Indicates that the member is required to verify their email */
|
|
603
|
+
emailVerificationRequired?: boolean | null;
|
|
604
|
+
/** Identity status */
|
|
605
|
+
status?: IdentityStatus;
|
|
606
|
+
}
|
|
607
|
+
export declare enum IdentityStatus {
|
|
608
|
+
UNKNOWN_IDENTITY_STATUS = "UNKNOWN_IDENTITY_STATUS",
|
|
609
|
+
PENDING_ADMIN_APPROVAL = "PENDING_ADMIN_APPROVAL",
|
|
610
|
+
ACTIVE = "ACTIVE",
|
|
611
|
+
DELETED = "DELETED",
|
|
612
|
+
BLOCKED = "BLOCKED",
|
|
613
|
+
OFFLINE = "OFFLINE"
|
|
614
|
+
}
|
|
615
|
+
export interface ProfileInfo {
|
|
616
|
+
/** Nickname */
|
|
617
|
+
nickname?: string | null;
|
|
618
|
+
/** Privacy status */
|
|
619
|
+
privacyStatus?: PrivacyStatus;
|
|
620
|
+
/** Indicate whether the member is reported */
|
|
621
|
+
reported?: boolean | null;
|
|
622
|
+
/** Indicate whether the member is muted */
|
|
623
|
+
muted?: boolean | null;
|
|
624
|
+
}
|
|
625
|
+
export declare enum PrivacyStatus {
|
|
626
|
+
UNKNOWN_PRIVACY_STATUS = "UNKNOWN_PRIVACY_STATUS",
|
|
627
|
+
PRIVATE = "PRIVATE",
|
|
628
|
+
PUBLIC = "PUBLIC"
|
|
629
|
+
}
|
|
630
|
+
export interface UserInfo {
|
|
631
|
+
/** User ID */
|
|
632
|
+
userId?: string;
|
|
633
|
+
/** User role */
|
|
634
|
+
role?: Role;
|
|
635
|
+
}
|
|
636
|
+
export declare enum Role {
|
|
637
|
+
UNSPECIFIED_ROLE = "UNSPECIFIED_ROLE",
|
|
638
|
+
OWNER = "OWNER",
|
|
639
|
+
CONTRIBUTOR = "CONTRIBUTOR"
|
|
640
|
+
}
|
|
641
|
+
export interface SessionInfo {
|
|
642
|
+
/** Last web login */
|
|
643
|
+
lastWebLogin?: Date;
|
|
644
|
+
/** Last mobile login */
|
|
645
|
+
lastMobileLogin?: Date;
|
|
646
|
+
/** List of mobile apps that the member has ever logged in to */
|
|
647
|
+
mobileAppNames?: string[];
|
|
648
|
+
}
|
|
649
|
+
export interface GroupInfo {
|
|
650
|
+
/** Group IDs */
|
|
651
|
+
groupIds?: string[];
|
|
652
|
+
}
|
|
604
653
|
export interface ContactSubmitted {
|
|
605
654
|
/** Pass through data, submitted with the contact */
|
|
606
655
|
passThroughData?: string | null;
|
|
@@ -647,6 +696,14 @@ export interface ContactPrimaryInfoUpdated {
|
|
|
647
696
|
primaryEmailUpdated?: boolean;
|
|
648
697
|
/** Indication whether primary phone was updated. */
|
|
649
698
|
primaryPhoneUpdated?: boolean;
|
|
699
|
+
/** previous primary email subscription status */
|
|
700
|
+
previousPrimaryEmailSubscriptionStatus?: PrimarySubscriptionStatus;
|
|
701
|
+
/** previous primary phone subscription status */
|
|
702
|
+
previousPrimaryPhoneSubscriptionStatus?: PrimarySubscriptionStatus;
|
|
703
|
+
}
|
|
704
|
+
export interface PrimarySubscriptionStatus {
|
|
705
|
+
/** subscription status */
|
|
706
|
+
subscriptionStatus?: SubscriptionStatus;
|
|
650
707
|
}
|
|
651
708
|
/** Contact creation options. */
|
|
652
709
|
export interface CreateContactRequest {
|
|
@@ -662,7 +719,7 @@ export interface CreateContactRequest {
|
|
|
662
719
|
* the call will fail if the given email address is used by another contact or,
|
|
663
720
|
* if the email address is not given and the given phone number is used by another contact.
|
|
664
721
|
*
|
|
665
|
-
*
|
|
722
|
+
* Default: `false`
|
|
666
723
|
*/
|
|
667
724
|
allowDuplicates?: boolean;
|
|
668
725
|
}
|
|
@@ -695,7 +752,7 @@ export interface UpdateContactRequest {
|
|
|
695
752
|
* the call will fail if the given email address is used by another contact or,
|
|
696
753
|
* if the email address is not given and the given phone number is used by another contact.
|
|
697
754
|
*
|
|
698
|
-
*
|
|
755
|
+
* Default: `false`
|
|
699
756
|
*/
|
|
700
757
|
allowDuplicates?: boolean;
|
|
701
758
|
/** Contact info. */
|
|
@@ -761,10 +818,10 @@ export interface LabelContactRequest {
|
|
|
761
818
|
* List of label keys to add to the contact.
|
|
762
819
|
*
|
|
763
820
|
* Label keys must exist to be added to the contact.
|
|
764
|
-
*
|
|
765
|
-
*
|
|
766
|
-
*
|
|
767
|
-
*
|
|
821
|
+
* Contact labels can be created with the
|
|
822
|
+
* `findOrCreateLabel()` function. You can use the
|
|
823
|
+
* `queryLabels()` function to view the currently existing labels.
|
|
824
|
+
*
|
|
768
825
|
*/
|
|
769
826
|
labelKeys: string[];
|
|
770
827
|
}
|
|
@@ -788,16 +845,20 @@ export interface LabelAndUnlabelContactRequest {
|
|
|
788
845
|
/** Contact ID. */
|
|
789
846
|
contactId?: string;
|
|
790
847
|
/**
|
|
791
|
-
* List of label keys
|
|
848
|
+
* List of label keys applied to the contact.
|
|
792
849
|
*
|
|
793
850
|
* Label keys must exist to be added to the contact.
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
* [`queryLabels()`](wix-crm-v2/labels/queryLabels).
|
|
851
|
+
* Contact labels can be created with the
|
|
852
|
+
* `findOrCreateLabel()` function. You can use the
|
|
853
|
+
* `queryLabels()` function to view the currently existing labels.
|
|
798
854
|
*/
|
|
799
855
|
labelKeysToAdd?: string[];
|
|
800
|
-
/**
|
|
856
|
+
/**
|
|
857
|
+
* List of label keys to remove from the contact.
|
|
858
|
+
*
|
|
859
|
+
* You can use the `queryLabels()` function to view the currently existing labels.
|
|
860
|
+
*
|
|
861
|
+
*/
|
|
801
862
|
labelKeysToRemove?: string[];
|
|
802
863
|
}
|
|
803
864
|
export interface LabelAndUnlabelContactResponse {
|
|
@@ -1419,6 +1480,73 @@ export interface ContactRemovedFromSegment {
|
|
|
1419
1480
|
/** The contact that was removed */
|
|
1420
1481
|
contact?: Contact;
|
|
1421
1482
|
}
|
|
1483
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
1484
|
+
createdEvent?: EntityCreatedEvent;
|
|
1485
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1486
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1487
|
+
actionEvent?: ActionEvent;
|
|
1488
|
+
/**
|
|
1489
|
+
* Unique event ID.
|
|
1490
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1491
|
+
*/
|
|
1492
|
+
_id?: string;
|
|
1493
|
+
/**
|
|
1494
|
+
* Assumes actions are also always typed to an entity_type
|
|
1495
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1496
|
+
*/
|
|
1497
|
+
entityFqdn?: string;
|
|
1498
|
+
/**
|
|
1499
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1500
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1501
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1502
|
+
*/
|
|
1503
|
+
slug?: string;
|
|
1504
|
+
/** ID of the entity associated with the event. */
|
|
1505
|
+
entityId?: string;
|
|
1506
|
+
/** Event timestamp. */
|
|
1507
|
+
eventTime?: Date;
|
|
1508
|
+
/**
|
|
1509
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1510
|
+
* (for example, GDPR).
|
|
1511
|
+
*/
|
|
1512
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1513
|
+
/** If present, indicates the action that triggered the event. */
|
|
1514
|
+
originatedFrom?: string | null;
|
|
1515
|
+
/**
|
|
1516
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1517
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1518
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1519
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1520
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1521
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1522
|
+
*/
|
|
1523
|
+
entityEventSequence?: string | null;
|
|
1524
|
+
}
|
|
1525
|
+
/** @oneof */
|
|
1526
|
+
export interface DomainEventBodyOneOf {
|
|
1527
|
+
createdEvent?: EntityCreatedEvent;
|
|
1528
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1529
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1530
|
+
actionEvent?: ActionEvent;
|
|
1531
|
+
}
|
|
1532
|
+
export interface EntityCreatedEvent {
|
|
1533
|
+
entityAsJson?: string;
|
|
1534
|
+
}
|
|
1535
|
+
export interface EntityUpdatedEvent {
|
|
1536
|
+
/**
|
|
1537
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1538
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1539
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1540
|
+
*/
|
|
1541
|
+
currentEntityAsJson?: string;
|
|
1542
|
+
}
|
|
1543
|
+
export interface EntityDeletedEvent {
|
|
1544
|
+
/** Entity that was deleted */
|
|
1545
|
+
deletedEntityAsJson?: string | null;
|
|
1546
|
+
}
|
|
1547
|
+
export interface ActionEvent {
|
|
1548
|
+
bodyAsJson?: string;
|
|
1549
|
+
}
|
|
1422
1550
|
export interface CreateContactResponseNonNullableFields {
|
|
1423
1551
|
contact?: {
|
|
1424
1552
|
_id: string;
|
|
@@ -1653,25 +1781,17 @@ export interface GetContactResponseNonNullableFields {
|
|
|
1653
1781
|
* If all 3 of these parameters are missing,
|
|
1654
1782
|
* the contact won't be created.
|
|
1655
1783
|
*
|
|
1656
|
-
*
|
|
1657
|
-
*
|
|
1658
|
-
* > Only visitors with
|
|
1659
|
-
* > **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)
|
|
1660
|
-
* > can create contacts.
|
|
1661
|
-
* > You can override the permissions by setting the `suppressAuth` option to `true`.
|
|
1662
|
-
* -->
|
|
1663
|
-
* By default,
|
|
1664
|
-
* if the call contains an email already in use by another contact,
|
|
1665
|
-
* the new contact won't be created.
|
|
1666
|
-
* To override this behavior,
|
|
1667
|
-
* set `allowDuplicates` in the `options` object to `true`.
|
|
1784
|
+
* 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`.
|
|
1785
|
+
*
|
|
1668
1786
|
* @param info - Contact info.
|
|
1669
1787
|
* @public
|
|
1670
1788
|
* @documentationMaturity preview
|
|
1671
1789
|
* @requiredField info
|
|
1672
1790
|
* @param options - Create contact options.
|
|
1673
1791
|
* @permissionScope Manage Contacts
|
|
1792
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1674
1793
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1794
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1675
1795
|
* @applicableIdentity APP
|
|
1676
1796
|
* @returns Contact.
|
|
1677
1797
|
*/
|
|
@@ -1687,7 +1807,7 @@ export interface CreateContactOptions {
|
|
|
1687
1807
|
* the call will fail if the given email address is used by another contact or,
|
|
1688
1808
|
* if the email address is not given and the given phone number is used by another contact.
|
|
1689
1809
|
*
|
|
1690
|
-
*
|
|
1810
|
+
* Default: `false`
|
|
1691
1811
|
*/
|
|
1692
1812
|
allowDuplicates?: boolean;
|
|
1693
1813
|
}
|
|
@@ -1697,40 +1817,28 @@ export interface CreateContactOptions {
|
|
|
1697
1817
|
* The `updateContact()` function returns a Promise that resolves
|
|
1698
1818
|
* when the specified contact's information is updated.
|
|
1699
1819
|
*
|
|
1700
|
-
*
|
|
1701
|
-
* `revision` increments by 1.
|
|
1702
|
-
* The existing `revision` must be included when updating the contact.
|
|
1703
|
-
* This ensures you're working with the latest contact information,
|
|
1704
|
-
* and it prevents unintended overwrites.
|
|
1820
|
+
* Each time the contact is updated, `revision` increments by 1. The existing `revision` must be included when updating the contact. This ensures you're working with the latest contact information, and prevents unintended overwrites.
|
|
1705
1821
|
*
|
|
1706
|
-
* <!--
|
|
1707
|
-
* > **Note:**
|
|
1708
|
-
* > Only visitors with
|
|
1709
|
-
* > **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)
|
|
1710
|
-
* > can update contacts.
|
|
1711
|
-
* > You can override the permissions by setting the `suppressAuth` option to `true`.
|
|
1712
|
-
* -->
|
|
1713
1822
|
* @param contactId - ID of the contact to update.
|
|
1714
1823
|
* @param info - Contact info.
|
|
1824
|
+
* @param revision - Revision number.
|
|
1825
|
+
* When updating, include the existing `revision`
|
|
1826
|
+
* to prevent conflicting updates.
|
|
1715
1827
|
* @public
|
|
1716
1828
|
* @documentationMaturity preview
|
|
1717
1829
|
* @requiredField contactId
|
|
1718
1830
|
* @requiredField info
|
|
1719
|
-
* @requiredField
|
|
1831
|
+
* @requiredField revision
|
|
1720
1832
|
* @param options - Contact update options.
|
|
1721
1833
|
* @permissionScope Manage Contacts
|
|
1834
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1722
1835
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1836
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1723
1837
|
* @applicableIdentity APP
|
|
1724
1838
|
* @returns Updated contact.
|
|
1725
1839
|
*/
|
|
1726
|
-
export declare function updateContact(contactId: string, info: ContactInfo, options?: UpdateContactOptions): Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
1840
|
+
export declare function updateContact(contactId: string, info: ContactInfo, revision: number | null, options?: UpdateContactOptions): Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
1727
1841
|
export interface UpdateContactOptions {
|
|
1728
|
-
/**
|
|
1729
|
-
* Revision number.
|
|
1730
|
-
* When updating, include the existing `revision`
|
|
1731
|
-
* to prevent conflicting updates.
|
|
1732
|
-
*/
|
|
1733
|
-
revision: number | null;
|
|
1734
1842
|
/**
|
|
1735
1843
|
* Controls whether the call will succeed if the new contact information contains an email already used by another contact.
|
|
1736
1844
|
*
|
|
@@ -1746,36 +1854,16 @@ export interface UpdateContactOptions {
|
|
|
1746
1854
|
* Merging contacts has these effects on the target contact:
|
|
1747
1855
|
*
|
|
1748
1856
|
* - No target contact data is overwritten or deleted.
|
|
1749
|
-
* - Arrays (emails, phones, addresses, and labels) are merged from the source contacts.
|
|
1857
|
+
* - Arrays (emails, phones, addresses, and labels) are merged from the source contacts into the target contact.
|
|
1750
1858
|
* - If merging more than one source contact, the 1st source is given precedence, then the 2nd, and so on.
|
|
1751
1859
|
*
|
|
1752
|
-
* <blockquote class="important">
|
|
1753
|
-
*
|
|
1754
|
-
* __Important:__
|
|
1755
|
-
* Merges cannot be undone.
|
|
1756
|
-
* Use [Preview Merge Contacts](#preview-merge-contacts)
|
|
1757
|
-
* to test before merging.
|
|
1758
|
-
*
|
|
1759
|
-
* </blockquote>
|
|
1760
|
-
*
|
|
1761
1860
|
* Source contacts are deleted when merging.
|
|
1762
|
-
* However, if a source contact is a site member or
|
|
1763
|
-
* the
|
|
1764
|
-
* Site members and
|
|
1765
|
-
*
|
|
1766
|
-
* After merging,
|
|
1767
|
-
* if you call [Get Contact](#get-contact) with a deleted source contact ID,
|
|
1768
|
-
* the target contact ID is returned.
|
|
1769
|
-
* This is supported when calling Get Contact only.
|
|
1770
|
-
* Deleted source contact IDs are not supported on any other endpoint.
|
|
1861
|
+
* However, if a source contact is a site member or collaborator,
|
|
1862
|
+
* the `mergeContacts()` function fails because site collaborators and members can't be deleted.
|
|
1863
|
+
* Site members and collaborators can only be target contacts.
|
|
1771
1864
|
*
|
|
1772
|
-
*
|
|
1865
|
+
* After merging, if you call the `getContact()` function with a deleted source contact ID, the target contact ID is returned. This is only supported when calling `getContact()`. Previously deleted source contact IDs can't be passed in any other function.
|
|
1773
1866
|
*
|
|
1774
|
-
* - Contact Merged is triggered.
|
|
1775
|
-
* - Contact Updated is triggered for the target contact. `originatedFrom` is set to `merge`.
|
|
1776
|
-
* - Contact Deleted is triggered for each source contact. `originatedFrom` is set to `merge`.
|
|
1777
|
-
*
|
|
1778
|
-
* This function is not a universal function and runs only on the backend.
|
|
1779
1867
|
* @param targetContactId - Target contact ID.
|
|
1780
1868
|
* @param targetContactRevision - Target contact revision number, which increments by 1 each time the contact is updated.
|
|
1781
1869
|
* To prevent conflicting changes,
|
|
@@ -1786,7 +1874,9 @@ export interface UpdateContactOptions {
|
|
|
1786
1874
|
* @requiredField targetContactRevision
|
|
1787
1875
|
* @param options - Merge contacts options.
|
|
1788
1876
|
* @permissionScope Manage Contacts
|
|
1877
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1789
1878
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1879
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1790
1880
|
* @applicableIdentity APP
|
|
1791
1881
|
*/
|
|
1792
1882
|
export declare function mergeContacts(targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions): Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
@@ -1810,19 +1900,14 @@ export interface MergeContactsOptions {
|
|
|
1810
1900
|
* the member must be deleted first,
|
|
1811
1901
|
* and then the contact can be deleted.
|
|
1812
1902
|
*
|
|
1813
|
-
* <!--
|
|
1814
|
-
* > **Note:**
|
|
1815
|
-
* > Only visitors with
|
|
1816
|
-
* > **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)
|
|
1817
|
-
* > can delete contacts.
|
|
1818
|
-
* > You can override the permissions by setting the `suppressAuth` option to `true`.
|
|
1819
|
-
* -->
|
|
1820
1903
|
* @param contactId - ID of the contact to delete.
|
|
1821
1904
|
* @public
|
|
1822
1905
|
* @documentationMaturity preview
|
|
1823
1906
|
* @requiredField contactId
|
|
1824
1907
|
* @permissionScope Manage Contacts
|
|
1908
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1825
1909
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1910
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1826
1911
|
* @applicableIdentity APP
|
|
1827
1912
|
*/
|
|
1828
1913
|
export declare function deleteContact(contactId: string): Promise<void>;
|
|
@@ -1832,30 +1917,24 @@ export declare function deleteContact(contactId: string): Promise<void>;
|
|
|
1832
1917
|
*
|
|
1833
1918
|
* The `labelContact()` function returns a Promise
|
|
1834
1919
|
* that resolves when the specified labels are added to the contact.
|
|
1835
|
-
* - **To create new labels:** Use
|
|
1836
|
-
* - **To find labels:** Use
|
|
1920
|
+
* - **To create new labels:** Use `findOrCreateLabel()`.
|
|
1921
|
+
* - **To find labels:** Use `findOrCreateLabel()`, `getLabel()`, or `queryLabels()`.
|
|
1837
1922
|
*
|
|
1838
|
-
* <!--
|
|
1839
|
-
* > **Note:**
|
|
1840
|
-
* > Only visitors with
|
|
1841
|
-
* > **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)
|
|
1842
|
-
* > can label contacts.
|
|
1843
|
-
* > You can override the permissions by setting the `suppressAuth` option to `true`.
|
|
1844
|
-
* -->
|
|
1845
1923
|
* @param contactId - ID of the contact to add labels to.
|
|
1846
1924
|
* @param labelKeys - List of label keys to add to the contact.
|
|
1847
1925
|
*
|
|
1848
1926
|
* Label keys must exist to be added to the contact.
|
|
1849
|
-
*
|
|
1850
|
-
*
|
|
1851
|
-
*
|
|
1852
|
-
* [`queryLabels()`](wix-crm-v2/labels/queryLabels).
|
|
1927
|
+
* Contact labels can be created with the
|
|
1928
|
+
* `findOrCreateLabel()` function. You can use the
|
|
1929
|
+
* `queryLabels()` function to view the currently existing labels.
|
|
1853
1930
|
* @public
|
|
1854
1931
|
* @documentationMaturity preview
|
|
1855
1932
|
* @requiredField contactId
|
|
1856
1933
|
* @requiredField labelKeys
|
|
1857
1934
|
* @permissionScope Manage Contacts
|
|
1935
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1858
1936
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1937
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1859
1938
|
* @applicableIdentity APP
|
|
1860
1939
|
* @returns Updated contact.
|
|
1861
1940
|
*/
|
|
@@ -1866,18 +1945,8 @@ export declare function labelContact(contactId: string, labelKeys: string[]): Pr
|
|
|
1866
1945
|
* The `unlabelContact()` function returns a Promise
|
|
1867
1946
|
* that resolves when the specified labels are removed from the contact.
|
|
1868
1947
|
*
|
|
1869
|
-
*
|
|
1870
|
-
* and you want to remove it from all contacts,
|
|
1871
|
-
* you can delete it with Labels
|
|
1872
|
-
* `deleteLabel()`.
|
|
1948
|
+
* If a label is no longer needed and you want to remove it from all contacts, you can remove it with the Labels `deleteLabel()` function.
|
|
1873
1949
|
*
|
|
1874
|
-
* <!--
|
|
1875
|
-
* > **Note:**
|
|
1876
|
-
* > Only visitors with
|
|
1877
|
-
* > **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)
|
|
1878
|
-
* > can unlabel contacts.
|
|
1879
|
-
* > You can override the permissions by setting the `suppressAuth` option to `true`.
|
|
1880
|
-
* -->
|
|
1881
1950
|
* @param contactId - ID of the contact to remove labels from.
|
|
1882
1951
|
* @param labelKeys - List of label keys to remove from the contact.
|
|
1883
1952
|
* @public
|
|
@@ -1885,7 +1954,9 @@ export declare function labelContact(contactId: string, labelKeys: string[]): Pr
|
|
|
1885
1954
|
* @requiredField contactId
|
|
1886
1955
|
* @requiredField labelKeys
|
|
1887
1956
|
* @permissionScope Manage Contacts
|
|
1957
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1888
1958
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1959
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1889
1960
|
* @applicableIdentity APP
|
|
1890
1961
|
* @returns Updated contact.
|
|
1891
1962
|
*/
|
|
@@ -1896,31 +1967,26 @@ export declare function unlabelContact(contactId: string, labelKeys: string[]):
|
|
|
1896
1967
|
*
|
|
1897
1968
|
* The `getContact()` function returns a Promise
|
|
1898
1969
|
* that resolves when the contact is found.
|
|
1970
|
+
*
|
|
1899
1971
|
* #### Getting Merged Contacts
|
|
1900
|
-
* When a source contact is merged
|
|
1901
|
-
*
|
|
1902
|
-
* When calling `getContact()` for a merged contact,
|
|
1903
|
-
* you can use the source or target contact ID.
|
|
1904
|
-
* In both cases, the target contact is returned.
|
|
1972
|
+
* When a source contact is merged into a target contact, the source contact is deleted. When calling `getContact()` for a merged contact,
|
|
1973
|
+
* you can use the source or target contact ID. In both cases, the target contact is returned.
|
|
1905
1974
|
*
|
|
1906
|
-
* This is supported only when calling `getContact()
|
|
1907
|
-
* and only for merged contacts.
|
|
1908
|
-
* Deleted source contact IDs are not supported on any other function.
|
|
1975
|
+
* This is supported only when calling `getContact()`on merged contacts. Previously deleted source contact IDs can't be passed to any other function.
|
|
1909
1976
|
*
|
|
1910
|
-
* <!-- > - Only visitors with
|
|
1911
|
-
* > **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)
|
|
1912
|
-
* > can retrieve contacts.
|
|
1913
|
-
* > You can override the permissions by setting the `suppressAuth` option to `true`.
|
|
1914
|
-
* -->
|
|
1915
1977
|
* @param _id - ID of the contact to retrieve.
|
|
1916
1978
|
* @public
|
|
1917
1979
|
* @documentationMaturity preview
|
|
1918
1980
|
* @requiredField _id
|
|
1919
1981
|
* @param options - Get contact options.
|
|
1920
1982
|
* @permissionScope Read Contacts
|
|
1983
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
|
|
1921
1984
|
* @permissionScope Read Members and Contacts - all read permissions
|
|
1985
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
|
|
1922
1986
|
* @permissionScope Manage Contacts
|
|
1987
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1923
1988
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1989
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1924
1990
|
* @applicableIdentity APP
|
|
1925
1991
|
* @returns The requested contact.
|
|
1926
1992
|
*/
|