@wix/crm 1.0.80 → 1.0.82
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 -0
- package/build/cjs/index.js +7 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +7 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +7 -2
- 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 +7 -6
- package/build/cjs/src/contacts-v4-contact.public.js +10 -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 +234 -155
- package/build/cjs/src/contacts-v4-contact.universal.js +145 -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 +2 -1
- package/build/cjs/src/contacts-v4-extended-field.public.js +5 -1
- package/build/cjs/src/contacts-v4-extended-field.public.js.map +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 +116 -30
- package/build/cjs/src/contacts-v4-extended-field.universal.js +62 -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 +6 -5
- package/build/cjs/src/contacts-v4-label.public.js +5 -1
- package/build/cjs/src/contacts-v4-label.public.js.map +1 -1
- 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 +125 -40
- package/build/cjs/src/contacts-v4-label.universal.js +76 -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 +30 -0
- package/build/cjs/src/crm-tasks-v2-task.public.js +58 -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 +678 -0
- package/build/cjs/src/crm-tasks-v2-task.universal.js +520 -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 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +1 -0
- package/build/es/index.typings.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +1 -0
- 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 +7 -6
- package/build/es/src/contacts-v4-contact.public.js +3 -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 +234 -155
- package/build/es/src/contacts-v4-contact.universal.js +122 -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 +2 -1
- package/build/es/src/contacts-v4-extended-field.public.js +1 -0
- package/build/es/src/contacts-v4-extended-field.public.js.map +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 +116 -30
- package/build/es/src/contacts-v4-extended-field.universal.js +53 -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 +6 -5
- package/build/es/src/contacts-v4-label.public.js +1 -0
- package/build/es/src/contacts-v4-label.public.js.map +1 -1
- package/build/es/src/contacts-v4-label.types.d.ts +76 -9
- package/build/es/src/contacts-v4-label.universal.d.ts +125 -40
- package/build/es/src/contacts-v4-label.universal.js +68 -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 +30 -0
- package/build/es/src/crm-tasks-v2-task.public.js +40 -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 +678 -0
- package/build/es/src/crm-tasks-v2-task.universal.js +487 -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
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
verboseLogging: {
|
|
3
|
-
on: () => boolean;
|
|
4
|
-
off: () => boolean;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
1
|
+
import { EventDefinition } from '@wix/sdk-types';
|
|
7
2
|
export interface Contact {
|
|
8
3
|
/**
|
|
9
4
|
* Contact ID.
|
|
@@ -193,6 +188,12 @@ export declare enum ContactActivityType {
|
|
|
193
188
|
/** "contact/phone-subscription-unsubscribe" */
|
|
194
189
|
PHONE_SUBSCRIPTION_UNSUBSCRIBE = "PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
195
190
|
}
|
|
191
|
+
export interface ActivityIcon {
|
|
192
|
+
/** Icon name */
|
|
193
|
+
name?: string | null;
|
|
194
|
+
/** Icon url */
|
|
195
|
+
url?: string | null;
|
|
196
|
+
}
|
|
196
197
|
export interface PrimaryContactInfo {
|
|
197
198
|
/**
|
|
198
199
|
* Primary email address.
|
|
@@ -237,16 +238,12 @@ export interface ContactInfo {
|
|
|
237
238
|
*/
|
|
238
239
|
locale?: string | null;
|
|
239
240
|
/**
|
|
240
|
-
* List of
|
|
241
|
-
* [Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list)
|
|
242
|
-
* help categorize contacts.
|
|
241
|
+
* List of label keys applied to the contact.
|
|
243
242
|
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
* or
|
|
249
|
-
* [`queryLabels()`](wix-crm-v2/labels/queryLabels).
|
|
243
|
+
* Label keys must exist to be added to the contact.
|
|
244
|
+
* Contact labels can be created with the
|
|
245
|
+
* `findOrCreateLabel()` function. You can use the
|
|
246
|
+
* `queryLabels()` function to view the currently existing labels.
|
|
250
247
|
*
|
|
251
248
|
*/
|
|
252
249
|
labelKeys?: LabelsWrapper;
|
|
@@ -281,12 +278,7 @@ export interface ContactEmail {
|
|
|
281
278
|
*
|
|
282
279
|
* `"UNTAGGED"` is shown as "Other" in the Contact List.
|
|
283
280
|
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* - `"UNTAGGED"`
|
|
287
|
-
* - `"MAIN"`
|
|
288
|
-
* - `"HOME"`
|
|
289
|
-
* - `"WORK"`
|
|
281
|
+
* Supported values: `"UNTAGGED"`, `"MAIN"`, `"HOME"`, `"WORK"`.
|
|
290
282
|
*/
|
|
291
283
|
tag?: EmailTag;
|
|
292
284
|
/** Email address. */
|
|
@@ -320,14 +312,7 @@ export interface ContactPhone {
|
|
|
320
312
|
*
|
|
321
313
|
* `"UNTAGGED"` is shown as "Other" in the Contact List.
|
|
322
314
|
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
* - `"UNTAGGED"`
|
|
326
|
-
* - `"MAIN"`
|
|
327
|
-
* - `"HOME"`
|
|
328
|
-
* - `"MOBILE"`
|
|
329
|
-
* - `"WORK"`
|
|
330
|
-
* - `"FAX"`
|
|
315
|
+
* Supported values: `"UNTAGGED"`, `"MAIN"`, `"HOME"`,`"MOBILE"`, `"WORK"`, `"FAX"`.
|
|
331
316
|
*/
|
|
332
317
|
tag?: PhoneTag;
|
|
333
318
|
/** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */
|
|
@@ -337,15 +322,14 @@ export interface ContactPhone {
|
|
|
337
322
|
/**
|
|
338
323
|
* [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
|
|
339
324
|
* phone number.
|
|
340
|
-
* Automatically generated using `phone` and `countryCode`,
|
|
341
|
-
* as long as both of those values are valid.
|
|
325
|
+
* Automatically generated using `phone` and `countryCode`, pending both values are valid.
|
|
342
326
|
* @readonly
|
|
343
327
|
*/
|
|
344
328
|
e164Phone?: string | null;
|
|
345
329
|
/**
|
|
346
330
|
* Whether this is the contact's primary phone number.
|
|
347
331
|
* When changing `primary` to `true` for a phone,
|
|
348
|
-
* the contact's other phones
|
|
332
|
+
* the contact's `primary` field for other phones becomes `false`.
|
|
349
333
|
* It also affects the subscription status to SMS messages that are decided based on the primary phone.
|
|
350
334
|
*/
|
|
351
335
|
primary?: boolean | null;
|
|
@@ -369,17 +353,11 @@ export interface ContactAddress {
|
|
|
369
353
|
*/
|
|
370
354
|
_id?: string | null;
|
|
371
355
|
/**
|
|
372
|
-
*
|
|
356
|
+
* Address type.
|
|
373
357
|
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
* One of:
|
|
358
|
+
* `"UNTAGGED"` is shown as "Other" in the Contact List.
|
|
377
359
|
*
|
|
378
|
-
*
|
|
379
|
-
* - `"HOME"`
|
|
380
|
-
* - `"WORK"`
|
|
381
|
-
* - `"BILLING"`
|
|
382
|
-
* - `"SHIPPING"`
|
|
360
|
+
* Supported values: `"UNTAGGED"`, `"HOME"`, `"WORK"`, `"BILLING"`, `"SHIPPING"`.
|
|
383
361
|
*/
|
|
384
362
|
tag?: AddressTag;
|
|
385
363
|
/** Street address. */
|
|
@@ -601,6 +579,78 @@ export declare enum PhoneDeliverabilityStatus {
|
|
|
601
579
|
NO_PHONE_DELIVERABILITY_STATUS = "NO_PHONE_DELIVERABILITY_STATUS",
|
|
602
580
|
NOT_SET = "NOT_SET"
|
|
603
581
|
}
|
|
582
|
+
export interface MemberInfo {
|
|
583
|
+
/** 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) */
|
|
584
|
+
memberId?: string | null;
|
|
585
|
+
/** 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) */
|
|
586
|
+
identityInfo?: IdentityInfo;
|
|
587
|
+
/** 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) */
|
|
588
|
+
profileInfo?: ProfileInfo;
|
|
589
|
+
/** User info. For more details see [here](https://dev.wix.com/docs/rest/internal-only/identity/user-member-connection-v1/user-member-connection-object) */
|
|
590
|
+
userInfo?: UserInfo;
|
|
591
|
+
/** 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) */
|
|
592
|
+
sessionInfo?: SessionInfo;
|
|
593
|
+
/** 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) */
|
|
594
|
+
groupInfo?: GroupInfo;
|
|
595
|
+
}
|
|
596
|
+
export interface IdentityInfo {
|
|
597
|
+
/** Signup date */
|
|
598
|
+
signupDate?: Date;
|
|
599
|
+
/** Login email */
|
|
600
|
+
email?: string | null;
|
|
601
|
+
/** Indicate whether the email is verified */
|
|
602
|
+
emailVerified?: boolean | null;
|
|
603
|
+
/** Indicates that the member is required to verify their email */
|
|
604
|
+
emailVerificationRequired?: boolean | null;
|
|
605
|
+
/** Identity status */
|
|
606
|
+
status?: IdentityStatus;
|
|
607
|
+
}
|
|
608
|
+
export declare enum IdentityStatus {
|
|
609
|
+
UNKNOWN_IDENTITY_STATUS = "UNKNOWN_IDENTITY_STATUS",
|
|
610
|
+
PENDING_ADMIN_APPROVAL = "PENDING_ADMIN_APPROVAL",
|
|
611
|
+
ACTIVE = "ACTIVE",
|
|
612
|
+
DELETED = "DELETED",
|
|
613
|
+
BLOCKED = "BLOCKED",
|
|
614
|
+
OFFLINE = "OFFLINE"
|
|
615
|
+
}
|
|
616
|
+
export interface ProfileInfo {
|
|
617
|
+
/** Nickname */
|
|
618
|
+
nickname?: string | null;
|
|
619
|
+
/** Privacy status */
|
|
620
|
+
privacyStatus?: PrivacyStatus;
|
|
621
|
+
/** Indicate whether the member is reported */
|
|
622
|
+
reported?: boolean | null;
|
|
623
|
+
/** Indicate whether the member is muted */
|
|
624
|
+
muted?: boolean | null;
|
|
625
|
+
}
|
|
626
|
+
export declare enum PrivacyStatus {
|
|
627
|
+
UNKNOWN_PRIVACY_STATUS = "UNKNOWN_PRIVACY_STATUS",
|
|
628
|
+
PRIVATE = "PRIVATE",
|
|
629
|
+
PUBLIC = "PUBLIC"
|
|
630
|
+
}
|
|
631
|
+
export interface UserInfo {
|
|
632
|
+
/** User ID */
|
|
633
|
+
userId?: string;
|
|
634
|
+
/** User role */
|
|
635
|
+
role?: Role;
|
|
636
|
+
}
|
|
637
|
+
export declare enum Role {
|
|
638
|
+
UNSPECIFIED_ROLE = "UNSPECIFIED_ROLE",
|
|
639
|
+
OWNER = "OWNER",
|
|
640
|
+
CONTRIBUTOR = "CONTRIBUTOR"
|
|
641
|
+
}
|
|
642
|
+
export interface SessionInfo {
|
|
643
|
+
/** Last web login */
|
|
644
|
+
lastWebLogin?: Date;
|
|
645
|
+
/** Last mobile login */
|
|
646
|
+
lastMobileLogin?: Date;
|
|
647
|
+
/** List of mobile apps that the member has ever logged in to */
|
|
648
|
+
mobileAppNames?: string[];
|
|
649
|
+
}
|
|
650
|
+
export interface GroupInfo {
|
|
651
|
+
/** Group IDs */
|
|
652
|
+
groupIds?: string[];
|
|
653
|
+
}
|
|
604
654
|
export interface ContactSubmitted {
|
|
605
655
|
/** Pass through data, submitted with the contact */
|
|
606
656
|
passThroughData?: string | null;
|
|
@@ -647,6 +697,14 @@ export interface ContactPrimaryInfoUpdated {
|
|
|
647
697
|
primaryEmailUpdated?: boolean;
|
|
648
698
|
/** Indication whether primary phone was updated. */
|
|
649
699
|
primaryPhoneUpdated?: boolean;
|
|
700
|
+
/** previous primary email subscription status */
|
|
701
|
+
previousPrimaryEmailSubscriptionStatus?: PrimarySubscriptionStatus;
|
|
702
|
+
/** previous primary phone subscription status */
|
|
703
|
+
previousPrimaryPhoneSubscriptionStatus?: PrimarySubscriptionStatus;
|
|
704
|
+
}
|
|
705
|
+
export interface PrimarySubscriptionStatus {
|
|
706
|
+
/** subscription status */
|
|
707
|
+
subscriptionStatus?: SubscriptionStatus;
|
|
650
708
|
}
|
|
651
709
|
/** Contact creation options. */
|
|
652
710
|
export interface CreateContactRequest {
|
|
@@ -662,7 +720,7 @@ export interface CreateContactRequest {
|
|
|
662
720
|
* the call will fail if the given email address is used by another contact or,
|
|
663
721
|
* if the email address is not given and the given phone number is used by another contact.
|
|
664
722
|
*
|
|
665
|
-
*
|
|
723
|
+
* Default: `false`
|
|
666
724
|
*/
|
|
667
725
|
allowDuplicates?: boolean;
|
|
668
726
|
}
|
|
@@ -695,7 +753,7 @@ export interface UpdateContactRequest {
|
|
|
695
753
|
* the call will fail if the given email address is used by another contact or,
|
|
696
754
|
* if the email address is not given and the given phone number is used by another contact.
|
|
697
755
|
*
|
|
698
|
-
*
|
|
756
|
+
* Default: `false`
|
|
699
757
|
*/
|
|
700
758
|
allowDuplicates?: boolean;
|
|
701
759
|
/** Contact info. */
|
|
@@ -761,10 +819,10 @@ export interface LabelContactRequest {
|
|
|
761
819
|
* List of label keys to add to the contact.
|
|
762
820
|
*
|
|
763
821
|
* Label keys must exist to be added to the contact.
|
|
764
|
-
*
|
|
765
|
-
*
|
|
766
|
-
*
|
|
767
|
-
*
|
|
822
|
+
* Contact labels can be created with the
|
|
823
|
+
* `findOrCreateLabel()` function. You can use the
|
|
824
|
+
* `queryLabels()` function to view the currently existing labels.
|
|
825
|
+
*
|
|
768
826
|
*/
|
|
769
827
|
labelKeys: string[];
|
|
770
828
|
}
|
|
@@ -788,16 +846,20 @@ export interface LabelAndUnlabelContactRequest {
|
|
|
788
846
|
/** Contact ID. */
|
|
789
847
|
contactId?: string;
|
|
790
848
|
/**
|
|
791
|
-
* List of label keys
|
|
849
|
+
* List of label keys applied to the contact.
|
|
792
850
|
*
|
|
793
851
|
* Label keys must exist to be added to the contact.
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
* [`queryLabels()`](wix-crm-v2/labels/queryLabels).
|
|
852
|
+
* Contact labels can be created with the
|
|
853
|
+
* `findOrCreateLabel()` function. You can use the
|
|
854
|
+
* `queryLabels()` function to view the currently existing labels.
|
|
798
855
|
*/
|
|
799
856
|
labelKeysToAdd?: string[];
|
|
800
|
-
/**
|
|
857
|
+
/**
|
|
858
|
+
* List of label keys to remove from the contact.
|
|
859
|
+
*
|
|
860
|
+
* You can use the `queryLabels()` function to view the currently existing labels.
|
|
861
|
+
*
|
|
862
|
+
*/
|
|
801
863
|
labelKeysToRemove?: string[];
|
|
802
864
|
}
|
|
803
865
|
export interface LabelAndUnlabelContactResponse {
|
|
@@ -1419,6 +1481,81 @@ export interface ContactRemovedFromSegment {
|
|
|
1419
1481
|
/** The contact that was removed */
|
|
1420
1482
|
contact?: Contact;
|
|
1421
1483
|
}
|
|
1484
|
+
export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
|
|
1485
|
+
createdEvent?: EntityCreatedEvent<T>;
|
|
1486
|
+
updatedEvent?: EntityUpdatedEvent<T>;
|
|
1487
|
+
deletedEvent?: EntityDeletedEvent<T>;
|
|
1488
|
+
actionEvent?: ActionEvent<T>;
|
|
1489
|
+
/**
|
|
1490
|
+
* Unique event ID.
|
|
1491
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1492
|
+
*/
|
|
1493
|
+
_id?: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* Assumes actions are also always typed to an entity_type
|
|
1496
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1497
|
+
*/
|
|
1498
|
+
entityFqdn?: string;
|
|
1499
|
+
/**
|
|
1500
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1501
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1502
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1503
|
+
*/
|
|
1504
|
+
slug?: string;
|
|
1505
|
+
/** ID of the entity associated with the event. */
|
|
1506
|
+
entityId?: string;
|
|
1507
|
+
/** Event timestamp. */
|
|
1508
|
+
eventTime?: Date;
|
|
1509
|
+
/**
|
|
1510
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1511
|
+
* (for example, GDPR).
|
|
1512
|
+
*/
|
|
1513
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1514
|
+
/** If present, indicates the action that triggered the event. */
|
|
1515
|
+
originatedFrom?: string | null;
|
|
1516
|
+
/**
|
|
1517
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1518
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1519
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1520
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1521
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1522
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1523
|
+
*/
|
|
1524
|
+
entityEventSequence?: string | null;
|
|
1525
|
+
}
|
|
1526
|
+
export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
1527
|
+
}
|
|
1528
|
+
export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
1529
|
+
}
|
|
1530
|
+
export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
|
|
1531
|
+
}
|
|
1532
|
+
export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
|
|
1533
|
+
}
|
|
1534
|
+
/** @oneof */
|
|
1535
|
+
export interface DomainEventBodyOneOf<T> {
|
|
1536
|
+
createdEvent?: EntityCreatedEvent<T>;
|
|
1537
|
+
updatedEvent?: EntityUpdatedEvent<T>;
|
|
1538
|
+
deletedEvent?: EntityDeletedEvent<T>;
|
|
1539
|
+
actionEvent?: ActionEvent<T>;
|
|
1540
|
+
}
|
|
1541
|
+
export interface EntityCreatedEvent<T> {
|
|
1542
|
+
entity?: T;
|
|
1543
|
+
}
|
|
1544
|
+
export interface EntityUpdatedEvent<T> {
|
|
1545
|
+
/**
|
|
1546
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1547
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1548
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1549
|
+
*/
|
|
1550
|
+
currentEntity?: T;
|
|
1551
|
+
}
|
|
1552
|
+
export interface EntityDeletedEvent<T> {
|
|
1553
|
+
/** Entity that was deleted */
|
|
1554
|
+
deletedEntity?: T | null;
|
|
1555
|
+
}
|
|
1556
|
+
export interface ActionEvent<T> {
|
|
1557
|
+
body?: T;
|
|
1558
|
+
}
|
|
1422
1559
|
export interface CreateContactResponseNonNullableFields {
|
|
1423
1560
|
contact?: {
|
|
1424
1561
|
_id: string;
|
|
@@ -1642,6 +1779,10 @@ export interface GetContactResponseNonNullableFields {
|
|
|
1642
1779
|
};
|
|
1643
1780
|
responseType: GetContactResponseType;
|
|
1644
1781
|
}
|
|
1782
|
+
export declare const onContactCreated: EventDefinition<DomainCreatedEvent<Contact>, "wix.contacts.v4.contact_created">;
|
|
1783
|
+
export declare const onContactUpdated: EventDefinition<DomainUpdatedEvent<Contact>, "wix.contacts.v4.contact_updated">;
|
|
1784
|
+
export declare const onContactMerged: EventDefinition<DomainActionEvent<ContactMerged>, "wix.contacts.v4.contact_merged">;
|
|
1785
|
+
export declare const onContactDeleted: EventDefinition<DomainDeletedEvent<Contact>, "wix.contacts.v4.contact_deleted">;
|
|
1645
1786
|
/**
|
|
1646
1787
|
* Creates a new contact.
|
|
1647
1788
|
*
|
|
@@ -1653,25 +1794,17 @@ export interface GetContactResponseNonNullableFields {
|
|
|
1653
1794
|
* If all 3 of these parameters are missing,
|
|
1654
1795
|
* the contact won't be created.
|
|
1655
1796
|
*
|
|
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`.
|
|
1797
|
+
* 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`.
|
|
1798
|
+
*
|
|
1668
1799
|
* @param info - Contact info.
|
|
1669
1800
|
* @public
|
|
1670
1801
|
* @documentationMaturity preview
|
|
1671
1802
|
* @requiredField info
|
|
1672
1803
|
* @param options - Create contact options.
|
|
1673
1804
|
* @permissionScope Manage Contacts
|
|
1805
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1674
1806
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1807
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1675
1808
|
* @applicableIdentity APP
|
|
1676
1809
|
* @returns Contact.
|
|
1677
1810
|
*/
|
|
@@ -1687,7 +1820,7 @@ export interface CreateContactOptions {
|
|
|
1687
1820
|
* the call will fail if the given email address is used by another contact or,
|
|
1688
1821
|
* if the email address is not given and the given phone number is used by another contact.
|
|
1689
1822
|
*
|
|
1690
|
-
*
|
|
1823
|
+
* Default: `false`
|
|
1691
1824
|
*/
|
|
1692
1825
|
allowDuplicates?: boolean;
|
|
1693
1826
|
}
|
|
@@ -1697,40 +1830,28 @@ export interface CreateContactOptions {
|
|
|
1697
1830
|
* The `updateContact()` function returns a Promise that resolves
|
|
1698
1831
|
* when the specified contact's information is updated.
|
|
1699
1832
|
*
|
|
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.
|
|
1833
|
+
* 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
1834
|
*
|
|
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
1835
|
* @param contactId - ID of the contact to update.
|
|
1714
1836
|
* @param info - Contact info.
|
|
1837
|
+
* @param revision - Revision number.
|
|
1838
|
+
* When updating, include the existing `revision`
|
|
1839
|
+
* to prevent conflicting updates.
|
|
1715
1840
|
* @public
|
|
1716
1841
|
* @documentationMaturity preview
|
|
1717
1842
|
* @requiredField contactId
|
|
1718
1843
|
* @requiredField info
|
|
1719
|
-
* @requiredField
|
|
1844
|
+
* @requiredField revision
|
|
1720
1845
|
* @param options - Contact update options.
|
|
1721
1846
|
* @permissionScope Manage Contacts
|
|
1847
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1722
1848
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1849
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1723
1850
|
* @applicableIdentity APP
|
|
1724
1851
|
* @returns Updated contact.
|
|
1725
1852
|
*/
|
|
1726
|
-
export declare function updateContact(contactId: string, info: ContactInfo, options?: UpdateContactOptions): Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
1853
|
+
export declare function updateContact(contactId: string, info: ContactInfo, revision: number | null, options?: UpdateContactOptions): Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
1727
1854
|
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
1855
|
/**
|
|
1735
1856
|
* Controls whether the call will succeed if the new contact information contains an email already used by another contact.
|
|
1736
1857
|
*
|
|
@@ -1746,36 +1867,16 @@ export interface UpdateContactOptions {
|
|
|
1746
1867
|
* Merging contacts has these effects on the target contact:
|
|
1747
1868
|
*
|
|
1748
1869
|
* - No target contact data is overwritten or deleted.
|
|
1749
|
-
* - Arrays (emails, phones, addresses, and labels) are merged from the source contacts.
|
|
1870
|
+
* - Arrays (emails, phones, addresses, and labels) are merged from the source contacts into the target contact.
|
|
1750
1871
|
* - If merging more than one source contact, the 1st source is given precedence, then the 2nd, and so on.
|
|
1751
1872
|
*
|
|
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
1873
|
* 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.
|
|
1874
|
+
* However, if a source contact is a site member or collaborator,
|
|
1875
|
+
* the `mergeContacts()` function fails because site collaborators and members can't be deleted.
|
|
1876
|
+
* Site members and collaborators can only be target contacts.
|
|
1771
1877
|
*
|
|
1772
|
-
*
|
|
1878
|
+
* 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
1879
|
*
|
|
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
1880
|
* @param targetContactId - Target contact ID.
|
|
1780
1881
|
* @param targetContactRevision - Target contact revision number, which increments by 1 each time the contact is updated.
|
|
1781
1882
|
* To prevent conflicting changes,
|
|
@@ -1786,7 +1887,9 @@ export interface UpdateContactOptions {
|
|
|
1786
1887
|
* @requiredField targetContactRevision
|
|
1787
1888
|
* @param options - Merge contacts options.
|
|
1788
1889
|
* @permissionScope Manage Contacts
|
|
1890
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1789
1891
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1892
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1790
1893
|
* @applicableIdentity APP
|
|
1791
1894
|
*/
|
|
1792
1895
|
export declare function mergeContacts(targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions): Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
@@ -1810,19 +1913,14 @@ export interface MergeContactsOptions {
|
|
|
1810
1913
|
* the member must be deleted first,
|
|
1811
1914
|
* and then the contact can be deleted.
|
|
1812
1915
|
*
|
|
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
1916
|
* @param contactId - ID of the contact to delete.
|
|
1821
1917
|
* @public
|
|
1822
1918
|
* @documentationMaturity preview
|
|
1823
1919
|
* @requiredField contactId
|
|
1824
1920
|
* @permissionScope Manage Contacts
|
|
1921
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1825
1922
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1923
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1826
1924
|
* @applicableIdentity APP
|
|
1827
1925
|
*/
|
|
1828
1926
|
export declare function deleteContact(contactId: string): Promise<void>;
|
|
@@ -1832,30 +1930,24 @@ export declare function deleteContact(contactId: string): Promise<void>;
|
|
|
1832
1930
|
*
|
|
1833
1931
|
* The `labelContact()` function returns a Promise
|
|
1834
1932
|
* that resolves when the specified labels are added to the contact.
|
|
1835
|
-
* - **To create new labels:** Use
|
|
1836
|
-
* - **To find labels:** Use
|
|
1933
|
+
* - **To create new labels:** Use `findOrCreateLabel()`.
|
|
1934
|
+
* - **To find labels:** Use `findOrCreateLabel()`, `getLabel()`, or `queryLabels()`.
|
|
1837
1935
|
*
|
|
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
1936
|
* @param contactId - ID of the contact to add labels to.
|
|
1846
1937
|
* @param labelKeys - List of label keys to add to the contact.
|
|
1847
1938
|
*
|
|
1848
1939
|
* Label keys must exist to be added to the contact.
|
|
1849
|
-
*
|
|
1850
|
-
*
|
|
1851
|
-
*
|
|
1852
|
-
* [`queryLabels()`](wix-crm-v2/labels/queryLabels).
|
|
1940
|
+
* Contact labels can be created with the
|
|
1941
|
+
* `findOrCreateLabel()` function. You can use the
|
|
1942
|
+
* `queryLabels()` function to view the currently existing labels.
|
|
1853
1943
|
* @public
|
|
1854
1944
|
* @documentationMaturity preview
|
|
1855
1945
|
* @requiredField contactId
|
|
1856
1946
|
* @requiredField labelKeys
|
|
1857
1947
|
* @permissionScope Manage Contacts
|
|
1948
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1858
1949
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1950
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1859
1951
|
* @applicableIdentity APP
|
|
1860
1952
|
* @returns Updated contact.
|
|
1861
1953
|
*/
|
|
@@ -1866,18 +1958,8 @@ export declare function labelContact(contactId: string, labelKeys: string[]): Pr
|
|
|
1866
1958
|
* The `unlabelContact()` function returns a Promise
|
|
1867
1959
|
* that resolves when the specified labels are removed from the contact.
|
|
1868
1960
|
*
|
|
1869
|
-
*
|
|
1870
|
-
* and you want to remove it from all contacts,
|
|
1871
|
-
* you can delete it with Labels
|
|
1872
|
-
* `deleteLabel()`.
|
|
1961
|
+
* 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
1962
|
*
|
|
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
1963
|
* @param contactId - ID of the contact to remove labels from.
|
|
1882
1964
|
* @param labelKeys - List of label keys to remove from the contact.
|
|
1883
1965
|
* @public
|
|
@@ -1885,7 +1967,9 @@ export declare function labelContact(contactId: string, labelKeys: string[]): Pr
|
|
|
1885
1967
|
* @requiredField contactId
|
|
1886
1968
|
* @requiredField labelKeys
|
|
1887
1969
|
* @permissionScope Manage Contacts
|
|
1970
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1888
1971
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
1972
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1889
1973
|
* @applicableIdentity APP
|
|
1890
1974
|
* @returns Updated contact.
|
|
1891
1975
|
*/
|
|
@@ -1896,31 +1980,26 @@ export declare function unlabelContact(contactId: string, labelKeys: string[]):
|
|
|
1896
1980
|
*
|
|
1897
1981
|
* The `getContact()` function returns a Promise
|
|
1898
1982
|
* that resolves when the contact is found.
|
|
1983
|
+
*
|
|
1899
1984
|
* #### 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.
|
|
1985
|
+
* When a source contact is merged into a target contact, the source contact is deleted. When calling `getContact()` for a merged contact,
|
|
1986
|
+
* you can use the source or target contact ID. In both cases, the target contact is returned.
|
|
1905
1987
|
*
|
|
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.
|
|
1988
|
+
* This is supported only when calling `getContact()`on merged contacts. Previously deleted source contact IDs can't be passed to any other function.
|
|
1909
1989
|
*
|
|
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
1990
|
* @param _id - ID of the contact to retrieve.
|
|
1916
1991
|
* @public
|
|
1917
1992
|
* @documentationMaturity preview
|
|
1918
1993
|
* @requiredField _id
|
|
1919
1994
|
* @param options - Get contact options.
|
|
1920
1995
|
* @permissionScope Read Contacts
|
|
1996
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
|
|
1921
1997
|
* @permissionScope Read Members and Contacts - all read permissions
|
|
1998
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
|
|
1922
1999
|
* @permissionScope Manage Contacts
|
|
2000
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1923
2001
|
* @permissionScope Manage Members and Contacts - all permissions
|
|
2002
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1924
2003
|
* @applicableIdentity APP
|
|
1925
2004
|
* @returns The requested contact.
|
|
1926
2005
|
*/
|