@wix/crm 1.0.84 → 1.0.86
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 -5
- package/build/cjs/context.js +5 -5
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +5 -5
- package/build/cjs/index.js +5 -5
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +5 -5
- package/build/cjs/meta.js +5 -5
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +5 -5
- package/build/es/context.js +5 -5
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +5 -5
- package/build/es/index.js +5 -5
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +5 -5
- package/build/es/meta.js +5 -5
- package/build/es/meta.js.map +1 -1
- package/package.json +15 -9
- package/build/cjs/index.typings.d.ts +0 -5
- package/build/cjs/index.typings.js +0 -32
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.context.d.ts +0 -9
- package/build/cjs/src/contacts-v4-contact.context.js +0 -82
- package/build/cjs/src/contacts-v4-contact.context.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.http.d.ts +0 -95
- package/build/cjs/src/contacts-v4-contact.http.js +0 -485
- package/build/cjs/src/contacts-v4-contact.http.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.meta.d.ts +0 -31
- package/build/cjs/src/contacts-v4-contact.meta.js +0 -161
- package/build/cjs/src/contacts-v4-contact.meta.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.public.d.ts +0 -49
- package/build/cjs/src/contacts-v4-contact.public.js +0 -76
- package/build/cjs/src/contacts-v4-contact.public.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.types.d.ts +0 -2185
- package/build/cjs/src/contacts-v4-contact.types.js +0 -270
- package/build/cjs/src/contacts-v4-contact.types.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.universal.d.ts +0 -2055
- package/build/cjs/src/contacts-v4-contact.universal.js +0 -930
- package/build/cjs/src/contacts-v4-contact.universal.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.context.d.ts +0 -7
- package/build/cjs/src/contacts-v4-extended-field.context.js +0 -60
- package/build/cjs/src/contacts-v4-extended-field.context.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.http.d.ts +0 -53
- package/build/cjs/src/contacts-v4-extended-field.http.js +0 -234
- package/build/cjs/src/contacts-v4-extended-field.http.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.meta.d.ts +0 -23
- package/build/cjs/src/contacts-v4-extended-field.meta.js +0 -123
- package/build/cjs/src/contacts-v4-extended-field.meta.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.public.d.ts +0 -23
- package/build/cjs/src/contacts-v4-extended-field.public.js +0 -44
- package/build/cjs/src/contacts-v4-extended-field.public.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.types.d.ts +0 -357
- package/build/cjs/src/contacts-v4-extended-field.types.js +0 -23
- package/build/cjs/src/contacts-v4-extended-field.types.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.universal.d.ts +0 -623
- package/build/cjs/src/contacts-v4-extended-field.universal.js +0 -434
- package/build/cjs/src/contacts-v4-extended-field.universal.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.context.d.ts +0 -7
- package/build/cjs/src/contacts-v4-label.context.js +0 -60
- package/build/cjs/src/contacts-v4-label.context.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.http.d.ts +0 -54
- package/build/cjs/src/contacts-v4-label.http.js +0 -235
- package/build/cjs/src/contacts-v4-label.http.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.meta.d.ts +0 -23
- package/build/cjs/src/contacts-v4-label.meta.js +0 -123
- package/build/cjs/src/contacts-v4-label.meta.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.public.d.ts +0 -21
- package/build/cjs/src/contacts-v4-label.public.js +0 -43
- package/build/cjs/src/contacts-v4-label.public.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.types.d.ts +0 -349
- package/build/cjs/src/contacts-v4-label.types.js +0 -17
- package/build/cjs/src/contacts-v4-label.types.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.universal.d.ts +0 -627
- package/build/cjs/src/contacts-v4-label.universal.js +0 -428
- package/build/cjs/src/contacts-v4-label.universal.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.context.d.ts +0 -3
- package/build/cjs/src/contacts-v4-submit-contact.context.js +0 -16
- package/build/cjs/src/contacts-v4-submit-contact.context.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.http.d.ts +0 -9
- package/build/cjs/src/contacts-v4-submit-contact.http.js +0 -90
- package/build/cjs/src/contacts-v4-submit-contact.http.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.meta.d.ts +0 -13
- package/build/cjs/src/contacts-v4-submit-contact.meta.js +0 -47
- package/build/cjs/src/contacts-v4-submit-contact.meta.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.public.d.ts +0 -8
- package/build/cjs/src/contacts-v4-submit-contact.public.js +0 -22
- package/build/cjs/src/contacts-v4-submit-contact.public.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.types.d.ts +0 -541
- package/build/cjs/src/contacts-v4-submit-contact.types.js +0 -174
- package/build/cjs/src/contacts-v4-submit-contact.types.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.universal.d.ts +0 -555
- package/build/cjs/src/contacts-v4-submit-contact.universal.js +0 -288
- package/build/cjs/src/contacts-v4-submit-contact.universal.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.context.d.ts +0 -9
- package/build/cjs/src/crm-tasks-v2-task.context.js +0 -82
- package/build/cjs/src/crm-tasks-v2-task.context.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.http.d.ts +0 -60
- package/build/cjs/src/crm-tasks-v2-task.http.js +0 -268
- package/build/cjs/src/crm-tasks-v2-task.http.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.meta.d.ts +0 -27
- package/build/cjs/src/crm-tasks-v2-task.meta.js +0 -161
- package/build/cjs/src/crm-tasks-v2-task.meta.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.public.d.ts +0 -30
- package/build/cjs/src/crm-tasks-v2-task.public.js +0 -58
- package/build/cjs/src/crm-tasks-v2-task.public.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.types.d.ts +0 -430
- package/build/cjs/src/crm-tasks-v2-task.types.js +0 -29
- package/build/cjs/src/crm-tasks-v2-task.types.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.universal.d.ts +0 -678
- package/build/cjs/src/crm-tasks-v2-task.universal.js +0 -520
- package/build/cjs/src/crm-tasks-v2-task.universal.js.map +0 -1
- package/build/cjs/src/ping-notifications-v3-notification.http.d.ts +0 -15
- package/build/cjs/src/ping-notifications-v3-notification.http.js +0 -87
- package/build/cjs/src/ping-notifications-v3-notification.http.js.map +0 -1
- package/build/cjs/src/ping-notifications-v3-notification.public.d.ts +0 -8
- package/build/cjs/src/ping-notifications-v3-notification.public.js +0 -14
- package/build/cjs/src/ping-notifications-v3-notification.public.js.map +0 -1
- package/build/cjs/src/ping-notifications-v3-notification.types.d.ts +0 -113
- package/build/cjs/src/ping-notifications-v3-notification.types.js +0 -15
- package/build/cjs/src/ping-notifications-v3-notification.types.js.map +0 -1
- package/build/cjs/src/ping-notifications-v3-notification.universal.d.ts +0 -146
- package/build/cjs/src/ping-notifications-v3-notification.universal.js +0 -136
- package/build/cjs/src/ping-notifications-v3-notification.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -5
- package/build/es/index.typings.js +0 -6
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/contacts-v4-contact.context.d.ts +0 -9
- package/build/es/src/contacts-v4-contact.context.js +0 -72
- package/build/es/src/contacts-v4-contact.context.js.map +0 -1
- package/build/es/src/contacts-v4-contact.http.d.ts +0 -95
- package/build/es/src/contacts-v4-contact.http.js +0 -475
- package/build/es/src/contacts-v4-contact.http.js.map +0 -1
- package/build/es/src/contacts-v4-contact.meta.d.ts +0 -31
- package/build/es/src/contacts-v4-contact.meta.js +0 -128
- package/build/es/src/contacts-v4-contact.meta.js.map +0 -1
- package/build/es/src/contacts-v4-contact.public.d.ts +0 -49
- package/build/es/src/contacts-v4-contact.public.js +0 -40
- package/build/es/src/contacts-v4-contact.public.js.map +0 -1
- package/build/es/src/contacts-v4-contact.types.d.ts +0 -2185
- package/build/es/src/contacts-v4-contact.types.js +0 -267
- package/build/es/src/contacts-v4-contact.types.js.map +0 -1
- package/build/es/src/contacts-v4-contact.universal.d.ts +0 -2055
- package/build/es/src/contacts-v4-contact.universal.js +0 -897
- package/build/es/src/contacts-v4-contact.universal.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.context.d.ts +0 -7
- package/build/es/src/contacts-v4-extended-field.context.js +0 -52
- package/build/es/src/contacts-v4-extended-field.context.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.http.d.ts +0 -53
- package/build/es/src/contacts-v4-extended-field.http.js +0 -226
- package/build/es/src/contacts-v4-extended-field.http.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.meta.d.ts +0 -23
- package/build/es/src/contacts-v4-extended-field.meta.js +0 -92
- package/build/es/src/contacts-v4-extended-field.meta.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.public.d.ts +0 -23
- package/build/es/src/contacts-v4-extended-field.public.js +0 -30
- package/build/es/src/contacts-v4-extended-field.public.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.types.d.ts +0 -357
- package/build/es/src/contacts-v4-extended-field.types.js +0 -20
- package/build/es/src/contacts-v4-extended-field.types.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.universal.d.ts +0 -623
- package/build/es/src/contacts-v4-extended-field.universal.js +0 -403
- package/build/es/src/contacts-v4-extended-field.universal.js.map +0 -1
- package/build/es/src/contacts-v4-label.context.d.ts +0 -7
- package/build/es/src/contacts-v4-label.context.js +0 -52
- package/build/es/src/contacts-v4-label.context.js.map +0 -1
- package/build/es/src/contacts-v4-label.http.d.ts +0 -54
- package/build/es/src/contacts-v4-label.http.js +0 -227
- package/build/es/src/contacts-v4-label.http.js.map +0 -1
- package/build/es/src/contacts-v4-label.meta.d.ts +0 -23
- package/build/es/src/contacts-v4-label.meta.js +0 -92
- package/build/es/src/contacts-v4-label.meta.js.map +0 -1
- package/build/es/src/contacts-v4-label.public.d.ts +0 -21
- package/build/es/src/contacts-v4-label.public.js +0 -30
- package/build/es/src/contacts-v4-label.public.js.map +0 -1
- package/build/es/src/contacts-v4-label.types.d.ts +0 -349
- package/build/es/src/contacts-v4-label.types.js +0 -14
- package/build/es/src/contacts-v4-label.types.js.map +0 -1
- package/build/es/src/contacts-v4-label.universal.d.ts +0 -627
- package/build/es/src/contacts-v4-label.universal.js +0 -397
- package/build/es/src/contacts-v4-label.universal.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.context.d.ts +0 -3
- package/build/es/src/contacts-v4-submit-contact.context.js +0 -12
- package/build/es/src/contacts-v4-submit-contact.context.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.http.d.ts +0 -9
- package/build/es/src/contacts-v4-submit-contact.http.js +0 -86
- package/build/es/src/contacts-v4-submit-contact.http.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.meta.d.ts +0 -13
- package/build/es/src/contacts-v4-submit-contact.meta.js +0 -20
- package/build/es/src/contacts-v4-submit-contact.meta.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.public.d.ts +0 -8
- package/build/es/src/contacts-v4-submit-contact.public.js +0 -9
- package/build/es/src/contacts-v4-submit-contact.public.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.types.d.ts +0 -541
- package/build/es/src/contacts-v4-submit-contact.types.js +0 -171
- package/build/es/src/contacts-v4-submit-contact.types.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.universal.d.ts +0 -555
- package/build/es/src/contacts-v4-submit-contact.universal.js +0 -261
- package/build/es/src/contacts-v4-submit-contact.universal.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.context.d.ts +0 -9
- package/build/es/src/crm-tasks-v2-task.context.js +0 -72
- package/build/es/src/crm-tasks-v2-task.context.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.http.d.ts +0 -60
- package/build/es/src/crm-tasks-v2-task.http.js +0 -258
- package/build/es/src/crm-tasks-v2-task.http.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.meta.d.ts +0 -27
- package/build/es/src/crm-tasks-v2-task.meta.js +0 -128
- package/build/es/src/crm-tasks-v2-task.meta.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.public.d.ts +0 -30
- package/build/es/src/crm-tasks-v2-task.public.js +0 -40
- package/build/es/src/crm-tasks-v2-task.public.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.types.d.ts +0 -430
- package/build/es/src/crm-tasks-v2-task.types.js +0 -26
- package/build/es/src/crm-tasks-v2-task.types.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.universal.d.ts +0 -678
- package/build/es/src/crm-tasks-v2-task.universal.js +0 -487
- package/build/es/src/crm-tasks-v2-task.universal.js.map +0 -1
- package/build/es/src/ping-notifications-v3-notification.http.d.ts +0 -15
- package/build/es/src/ping-notifications-v3-notification.http.js +0 -83
- package/build/es/src/ping-notifications-v3-notification.http.js.map +0 -1
- package/build/es/src/ping-notifications-v3-notification.public.d.ts +0 -8
- package/build/es/src/ping-notifications-v3-notification.public.js +0 -9
- package/build/es/src/ping-notifications-v3-notification.public.js.map +0 -1
- package/build/es/src/ping-notifications-v3-notification.types.d.ts +0 -113
- package/build/es/src/ping-notifications-v3-notification.types.js +0 -12
- package/build/es/src/ping-notifications-v3-notification.types.js.map +0 -1
- package/build/es/src/ping-notifications-v3-notification.universal.d.ts +0 -146
- package/build/es/src/ping-notifications-v3-notification.universal.js +0 -109
- package/build/es/src/ping-notifications-v3-notification.universal.js.map +0 -1
|
@@ -1,2055 +0,0 @@
|
|
|
1
|
-
import { EventDefinition } from '@wix/sdk-types';
|
|
2
|
-
export interface Contact {
|
|
3
|
-
/**
|
|
4
|
-
* Contact ID.
|
|
5
|
-
* @readonly
|
|
6
|
-
*/
|
|
7
|
-
_id?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Revision number, which increments by 1 each time the contact is updated.
|
|
10
|
-
* To prevent conflicting changes,
|
|
11
|
-
* the existing `revision` must be used when updating a contact.
|
|
12
|
-
* @readonly
|
|
13
|
-
*/
|
|
14
|
-
revision?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Details about the contact's source.
|
|
17
|
-
* @readonly
|
|
18
|
-
*/
|
|
19
|
-
source?: ContactSource;
|
|
20
|
-
/**
|
|
21
|
-
* Date and time the contact was created.
|
|
22
|
-
* @readonly
|
|
23
|
-
*/
|
|
24
|
-
_createdDate?: Date;
|
|
25
|
-
/**
|
|
26
|
-
* Date and time the contact was last updated.
|
|
27
|
-
* @readonly
|
|
28
|
-
*/
|
|
29
|
-
_updatedDate?: Date;
|
|
30
|
-
/**
|
|
31
|
-
* Details about the contact's last action in the site.
|
|
32
|
-
* @readonly
|
|
33
|
-
*/
|
|
34
|
-
lastActivity?: ContactActivity;
|
|
35
|
-
/**
|
|
36
|
-
* Contact's primary phone and email.
|
|
37
|
-
*
|
|
38
|
-
* This property reflects the email address in `contactInfo.emails` where `primary` is `true`.
|
|
39
|
-
* @readonly
|
|
40
|
-
*/
|
|
41
|
-
primaryInfo?: PrimaryContactInfo;
|
|
42
|
-
/** Contact's details. */
|
|
43
|
-
info?: ContactInfo;
|
|
44
|
-
}
|
|
45
|
-
export interface ContactSource {
|
|
46
|
-
/**
|
|
47
|
-
* Some possible values:
|
|
48
|
-
*
|
|
49
|
-
* `"OTHER"`, `"ADMIN"`, `"WIX_APP"`, `"IMPORT"`, `"THIRD_PARTY"`,
|
|
50
|
-
* `"WIX_BOOKINGS"`, `"WIX_CHAT"`, `"WIX_EMAIL_MARKETING"`, `"WIX_EVENTS"`,
|
|
51
|
-
* `"WIX_FORMS"`, `"WIX_GROUPS"`, `"WIX_HOTELS"`, `"WIX_MARKET_PLACE"`,
|
|
52
|
-
* `"WIX_MUSIC"`, `"WIX_RESTAURANTS"`, `"WIX_SITE_MEMBERS"`, `"WIX_STORES"`.
|
|
53
|
-
* @readonly
|
|
54
|
-
*/
|
|
55
|
-
sourceType?: ContactSourceType;
|
|
56
|
-
/**
|
|
57
|
-
* App ID, if the contact was created by an app.
|
|
58
|
-
* @readonly
|
|
59
|
-
*/
|
|
60
|
-
appId?: string | null;
|
|
61
|
-
}
|
|
62
|
-
export declare enum ContactSourceType {
|
|
63
|
-
OTHER = "OTHER",
|
|
64
|
-
ADMIN = "ADMIN",
|
|
65
|
-
WIX_APP = "WIX_APP",
|
|
66
|
-
IMPORT = "IMPORT",
|
|
67
|
-
THIRD_PARTY = "THIRD_PARTY",
|
|
68
|
-
WIX_BOOKINGS = "WIX_BOOKINGS",
|
|
69
|
-
WIX_CHAT = "WIX_CHAT",
|
|
70
|
-
WIX_EMAIL_MARKETING = "WIX_EMAIL_MARKETING",
|
|
71
|
-
WIX_EVENTS = "WIX_EVENTS",
|
|
72
|
-
WIX_FORMS = "WIX_FORMS",
|
|
73
|
-
WIX_GROUPS = "WIX_GROUPS",
|
|
74
|
-
WIX_HOTELS = "WIX_HOTELS",
|
|
75
|
-
WIX_MARKET_PLACE = "WIX_MARKET_PLACE",
|
|
76
|
-
WIX_MUSIC = "WIX_MUSIC",
|
|
77
|
-
WIX_RESTAURANTS = "WIX_RESTAURANTS",
|
|
78
|
-
WIX_SITE_MEMBERS = "WIX_SITE_MEMBERS",
|
|
79
|
-
WIX_STORES = "WIX_STORES",
|
|
80
|
-
WIX_CODE = "WIX_CODE",
|
|
81
|
-
HOPP = "HOPP"
|
|
82
|
-
}
|
|
83
|
-
export interface ContactActivity {
|
|
84
|
-
/** Date and time of the last action. */
|
|
85
|
-
activityDate?: Date;
|
|
86
|
-
/**
|
|
87
|
-
* Contact's last action in the site.
|
|
88
|
-
*
|
|
89
|
-
* Some possible values:
|
|
90
|
-
* `"GENERAL"`, `"CONTACT_CREATED"`, `"MEMBER_LOGIN"`, `"MEMBER_REGISTER"`,
|
|
91
|
-
* `"MEMBER_STATUS_CHANGED"`, `"FORM_SUBMITTED"`, `"INBOX_FORM_SUBMITTED"`,
|
|
92
|
-
* `"INBOX_PAYMENT_REQUEST_PAID"`, `"INBOX_MESSAGE_TO_CUSTOMER"`,
|
|
93
|
-
* `"INBOX_MESSAGE_FROM_CUSTOMER"`, `"NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED"`,
|
|
94
|
-
* `"NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE"`, `"NEWSLETTER_SUBSCRIPTION_SUBSCRIBE"`,
|
|
95
|
-
* `"NEWSLETTER_SUBSCRIPTION_PENDING"`, `"NEWSLETTER_SUBSCRIPTION_NOT_SET"`, `"ECOM_PURCHASE"`,
|
|
96
|
-
* `"ECOM_CART_ABANDON"`, `"ECOM_CHECKOUT_BUYER"`, `"BOOKINGS_APPOINTMENT"`,
|
|
97
|
-
* `"HOTELS_RESERVATION"`, `"HOTELS_PURCHASE"`, `"HOTELS_CONFIRMATION"`,
|
|
98
|
-
* `"HOTELS_CANCEL"`, `"VIDEO_PURCHASE"`, `"VIDEO_RENT"`,
|
|
99
|
-
* `"CASHIER_BUTTON_PURCHASE"`, `"ARENA_NEW_LEAD"`, `"EVENTS_RSVP"`,
|
|
100
|
-
* `"INVOICE_PAY"`, `"INVOICE_OVERDUE"`, `"PRICE_QUOTE_ACCEPT"`,
|
|
101
|
-
* `"PRICE_QUOTE_EXPIRE"`, `"RESTAURANTS_ORDER"`, `"RESTAURANTS_RESERVATION"`,
|
|
102
|
-
* `"SHOUTOUT_OPEN"`, `"SHOUTOUT_CLICK"`, `"CONTACT_MERGED"`,
|
|
103
|
-
* `"PHONE_SUBSCRIPTION_SUBSCRIBE"`, `"PHONE_SUBSCRIPTION_PENDING"`, `"PHONE_SUBSCRIPTION_NOT_SET"`,
|
|
104
|
-
* `"PHONE_SUBSCRIPTION_UNSUBSCRIBE"`.
|
|
105
|
-
*/
|
|
106
|
-
activityType?: ContactActivityType;
|
|
107
|
-
}
|
|
108
|
-
export declare enum ContactActivityType {
|
|
109
|
-
/** Last visit to your site (any unknown activity) */
|
|
110
|
-
GENERAL = "GENERAL",
|
|
111
|
-
/** This cannot be reported, used when contact created, will throw exception */
|
|
112
|
-
CONTACT_CREATED = "CONTACT_CREATED",
|
|
113
|
-
/** "auth/login" */
|
|
114
|
-
MEMBER_LOGIN = "MEMBER_LOGIN",
|
|
115
|
-
/** "auth/register" */
|
|
116
|
-
MEMBER_REGISTER = "MEMBER_REGISTER",
|
|
117
|
-
/** "auth/status-change" */
|
|
118
|
-
MEMBER_STATUS_CHANGED = "MEMBER_STATUS_CHANGED",
|
|
119
|
-
/** "contact/contact-form", (but also "form/contact-form", "form/form") */
|
|
120
|
-
FORM_SUBMITTED = "FORM_SUBMITTED",
|
|
121
|
-
/** "form/lead-capture-form" */
|
|
122
|
-
INBOX_FORM_SUBMITTED = "INBOX_FORM_SUBMITTED",
|
|
123
|
-
/** "chat/payment-request-paid" */
|
|
124
|
-
INBOX_PAYMENT_REQUEST_PAID = "INBOX_PAYMENT_REQUEST_PAID",
|
|
125
|
-
/** "messaging/email" - Direction BUSINESS_TO_CUSTOMER */
|
|
126
|
-
INBOX_MESSAGE_TO_CUSTOMER = "INBOX_MESSAGE_TO_CUSTOMER",
|
|
127
|
-
/** "messaging/email" - Direction CUSTOMER_TO_BUSINESS */
|
|
128
|
-
INBOX_MESSAGE_FROM_CUSTOMER = "INBOX_MESSAGE_FROM_CUSTOMER",
|
|
129
|
-
/** "contact/subscription-form" (but also "form/subscription-form") */
|
|
130
|
-
NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED = "NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED",
|
|
131
|
-
/** "contact/unsubscribe" */
|
|
132
|
-
NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE",
|
|
133
|
-
/** "e_commerce/purchase" */
|
|
134
|
-
ECOM_PURCHASE = "ECOM_PURCHASE",
|
|
135
|
-
/** "e_commerce/cart-abandon" */
|
|
136
|
-
ECOM_CART_ABANDON = "ECOM_CART_ABANDON",
|
|
137
|
-
/** "e_commerce/checkout-buyer" */
|
|
138
|
-
ECOM_CHECKOUT_BUYER = "ECOM_CHECKOUT_BUYER",
|
|
139
|
-
/** "scheduler/appointment" */
|
|
140
|
-
BOOKINGS_APPOINTMENT = "BOOKINGS_APPOINTMENT",
|
|
141
|
-
/** "hotels/reservation" */
|
|
142
|
-
HOTELS_RESERVATION = "HOTELS_RESERVATION",
|
|
143
|
-
/** "hotels/purchase" */
|
|
144
|
-
HOTELS_PURCHASE = "HOTELS_PURCHASE",
|
|
145
|
-
/** "hotels/confirmation" */
|
|
146
|
-
HOTELS_CONFIRMATION = "HOTELS_CONFIRMATION",
|
|
147
|
-
/** "hotels/cancel" */
|
|
148
|
-
HOTELS_CANCEL = "HOTELS_CANCEL",
|
|
149
|
-
/** "video/purchase" */
|
|
150
|
-
VIDEO_PURCHASE = "VIDEO_PURCHASE",
|
|
151
|
-
/** "video/rent" */
|
|
152
|
-
VIDEO_RENT = "VIDEO_RENT",
|
|
153
|
-
/** "cashier/button_purchase" */
|
|
154
|
-
CASHIER_BUTTON_PURCHASE = "CASHIER_BUTTON_PURCHASE",
|
|
155
|
-
/** "arena/new-lead" */
|
|
156
|
-
ARENA_NEW_LEAD = "ARENA_NEW_LEAD",
|
|
157
|
-
/** "events/rsvp" */
|
|
158
|
-
EVENTS_RSVP = "EVENTS_RSVP",
|
|
159
|
-
/** "invoice/pay" */
|
|
160
|
-
INVOICE_PAY = "INVOICE_PAY",
|
|
161
|
-
/** "invoice/overdue" */
|
|
162
|
-
INVOICE_OVERDUE = "INVOICE_OVERDUE",
|
|
163
|
-
/** "price-quote/accept" */
|
|
164
|
-
PRICE_QUOTE_ACCEPT = "PRICE_QUOTE_ACCEPT",
|
|
165
|
-
/** "price-quote/expire" */
|
|
166
|
-
PRICE_QUOTE_EXPIRE = "PRICE_QUOTE_EXPIRE",
|
|
167
|
-
/** "restaurants/order" */
|
|
168
|
-
RESTAURANTS_ORDER = "RESTAURANTS_ORDER",
|
|
169
|
-
/** "restaurants/reservation" */
|
|
170
|
-
RESTAURANTS_RESERVATION = "RESTAURANTS_RESERVATION",
|
|
171
|
-
/** "shoutout/open" */
|
|
172
|
-
SHOUTOUT_OPEN = "SHOUTOUT_OPEN",
|
|
173
|
-
/** "shoutout/click" */
|
|
174
|
-
SHOUTOUT_CLICK = "SHOUTOUT_CLICK",
|
|
175
|
-
CONTACT_MERGED = "CONTACT_MERGED",
|
|
176
|
-
/** "contact/subscribe" */
|
|
177
|
-
NEWSLETTER_SUBSCRIPTION_SUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_SUBSCRIBE",
|
|
178
|
-
/** "contact/subscription-pending" */
|
|
179
|
-
NEWSLETTER_SUBSCRIPTION_PENDING = "NEWSLETTER_SUBSCRIPTION_PENDING",
|
|
180
|
-
/** "contact/subscription-not-set" */
|
|
181
|
-
NEWSLETTER_SUBSCRIPTION_NOT_SET = "NEWSLETTER_SUBSCRIPTION_NOT_SET",
|
|
182
|
-
/** "contact/phone-subscription-subscribe" */
|
|
183
|
-
PHONE_SUBSCRIPTION_SUBSCRIBE = "PHONE_SUBSCRIPTION_SUBSCRIBE",
|
|
184
|
-
/** "contact/phone-subscription-pending" */
|
|
185
|
-
PHONE_SUBSCRIPTION_PENDING = "PHONE_SUBSCRIPTION_PENDING",
|
|
186
|
-
/** "contact/phone-subscription-not-set" */
|
|
187
|
-
PHONE_SUBSCRIPTION_NOT_SET = "PHONE_SUBSCRIPTION_NOT_SET",
|
|
188
|
-
/** "contact/phone-subscription-unsubscribe" */
|
|
189
|
-
PHONE_SUBSCRIPTION_UNSUBSCRIBE = "PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
190
|
-
}
|
|
191
|
-
export interface ActivityIcon {
|
|
192
|
-
/** Icon name */
|
|
193
|
-
name?: string | null;
|
|
194
|
-
/** Icon url */
|
|
195
|
-
url?: string | null;
|
|
196
|
-
}
|
|
197
|
-
export interface PrimaryContactInfo {
|
|
198
|
-
/**
|
|
199
|
-
* Primary email address.
|
|
200
|
-
*
|
|
201
|
-
* This property reflects the email address in `info.emails`
|
|
202
|
-
* where `primary` is `true`.
|
|
203
|
-
* @readonly
|
|
204
|
-
*/
|
|
205
|
-
email?: string | null;
|
|
206
|
-
/**
|
|
207
|
-
* Primary phone number.
|
|
208
|
-
*
|
|
209
|
-
* This property reflects the phone number in `contactInfo.phones` where `primary` is `true`.
|
|
210
|
-
* @readonly
|
|
211
|
-
*/
|
|
212
|
-
phone?: string | null;
|
|
213
|
-
}
|
|
214
|
-
export interface ContactInfo {
|
|
215
|
-
/** Contact's first and last name. */
|
|
216
|
-
name?: ContactName;
|
|
217
|
-
/** Contact's email addresses. */
|
|
218
|
-
emails?: ContactEmailsWrapper;
|
|
219
|
-
/** Contact's phone numbers. */
|
|
220
|
-
phones?: ContactPhonesWrapper;
|
|
221
|
-
/** Contact's street addresses. */
|
|
222
|
-
addresses?: ContactAddressesWrapper;
|
|
223
|
-
/** Contact's company name. */
|
|
224
|
-
company?: string | null;
|
|
225
|
-
/**
|
|
226
|
-
* Contact's job title.
|
|
227
|
-
* Corresponds to the **Position** field in the Dashboard.
|
|
228
|
-
*/
|
|
229
|
-
jobTitle?: string | null;
|
|
230
|
-
/** Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`. */
|
|
231
|
-
birthdate?: string | null;
|
|
232
|
-
/**
|
|
233
|
-
* Locale in
|
|
234
|
-
* [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
235
|
-
* Typically, this is a lowercase 2-letter language code,
|
|
236
|
-
* followed by a hyphen, followed by an uppercase 2-letter country code.
|
|
237
|
-
* For example, `en-US` for U.S. English, and `de-DE` for Germany German.
|
|
238
|
-
*/
|
|
239
|
-
locale?: string | null;
|
|
240
|
-
/**
|
|
241
|
-
* List of label keys applied to the contact.
|
|
242
|
-
*
|
|
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.
|
|
247
|
-
*
|
|
248
|
-
*/
|
|
249
|
-
labelKeys?: LabelsWrapper;
|
|
250
|
-
/**
|
|
251
|
-
* Additional custom fields.
|
|
252
|
-
* This includes fields managed by Wix, by 3rd-party apps, and by the site.
|
|
253
|
-
*
|
|
254
|
-
* Empty fields are not returned.
|
|
255
|
-
*/
|
|
256
|
-
extendedFields?: ExtendedFieldsWrapper;
|
|
257
|
-
/** Contact's profile picture. */
|
|
258
|
-
picture?: ContactPicture;
|
|
259
|
-
}
|
|
260
|
-
export interface ContactName {
|
|
261
|
-
/** Contact's first name. */
|
|
262
|
-
first?: string | null;
|
|
263
|
-
/** Contact's last name. */
|
|
264
|
-
last?: string | null;
|
|
265
|
-
}
|
|
266
|
-
export interface ContactEmailsWrapper {
|
|
267
|
-
/** List of up to 50 email addresses. */
|
|
268
|
-
items?: ContactEmail[];
|
|
269
|
-
}
|
|
270
|
-
export interface ContactEmail {
|
|
271
|
-
/**
|
|
272
|
-
* Email ID.
|
|
273
|
-
* @readonly
|
|
274
|
-
*/
|
|
275
|
-
_id?: string | null;
|
|
276
|
-
/**
|
|
277
|
-
* Email type.
|
|
278
|
-
*
|
|
279
|
-
* `"UNTAGGED"` is shown as "Other" in the Contact List.
|
|
280
|
-
*
|
|
281
|
-
* Supported values: `"UNTAGGED"`, `"MAIN"`, `"HOME"`, `"WORK"`.
|
|
282
|
-
*/
|
|
283
|
-
tag?: EmailTag;
|
|
284
|
-
/** Email address. */
|
|
285
|
-
email?: string;
|
|
286
|
-
/**
|
|
287
|
-
* Indicates whether this is the contact's primary email address.
|
|
288
|
-
* When changing `primary` to `true` for an email,
|
|
289
|
-
* the contact's other emails become `false`.
|
|
290
|
-
* It also affects the subscription status to marketing emails that are decided based on the primary email.
|
|
291
|
-
*/
|
|
292
|
-
primary?: boolean | null;
|
|
293
|
-
}
|
|
294
|
-
export declare enum EmailTag {
|
|
295
|
-
UNTAGGED = "UNTAGGED",
|
|
296
|
-
MAIN = "MAIN",
|
|
297
|
-
HOME = "HOME",
|
|
298
|
-
WORK = "WORK"
|
|
299
|
-
}
|
|
300
|
-
export interface ContactPhonesWrapper {
|
|
301
|
-
/** List of up to 50 phone numbers. */
|
|
302
|
-
items?: ContactPhone[];
|
|
303
|
-
}
|
|
304
|
-
export interface ContactPhone {
|
|
305
|
-
/**
|
|
306
|
-
* Phone ID.
|
|
307
|
-
* @readonly
|
|
308
|
-
*/
|
|
309
|
-
_id?: string | null;
|
|
310
|
-
/**
|
|
311
|
-
* Phone type.
|
|
312
|
-
*
|
|
313
|
-
* `"UNTAGGED"` is shown as "Other" in the Contact List.
|
|
314
|
-
*
|
|
315
|
-
* Supported values: `"UNTAGGED"`, `"MAIN"`, `"HOME"`,`"MOBILE"`, `"WORK"`, `"FAX"`.
|
|
316
|
-
*/
|
|
317
|
-
tag?: PhoneTag;
|
|
318
|
-
/** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */
|
|
319
|
-
countryCode?: string | null;
|
|
320
|
-
/** Phone number. */
|
|
321
|
-
phone?: string;
|
|
322
|
-
/**
|
|
323
|
-
* [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
|
|
324
|
-
* phone number.
|
|
325
|
-
* Automatically generated using `phone` and `countryCode`, pending both values are valid.
|
|
326
|
-
* @readonly
|
|
327
|
-
*/
|
|
328
|
-
e164Phone?: string | null;
|
|
329
|
-
/**
|
|
330
|
-
* Whether this is the contact's primary phone number.
|
|
331
|
-
* When changing `primary` to `true` for a phone,
|
|
332
|
-
* the contact's `primary` field for other phones becomes `false`.
|
|
333
|
-
* It also affects the subscription status to SMS messages that are decided based on the primary phone.
|
|
334
|
-
*/
|
|
335
|
-
primary?: boolean | null;
|
|
336
|
-
}
|
|
337
|
-
export declare enum PhoneTag {
|
|
338
|
-
UNTAGGED = "UNTAGGED",
|
|
339
|
-
MAIN = "MAIN",
|
|
340
|
-
HOME = "HOME",
|
|
341
|
-
MOBILE = "MOBILE",
|
|
342
|
-
WORK = "WORK",
|
|
343
|
-
FAX = "FAX"
|
|
344
|
-
}
|
|
345
|
-
export interface ContactAddressesWrapper {
|
|
346
|
-
/** List of up to 50 addresses. */
|
|
347
|
-
items?: ContactAddress[];
|
|
348
|
-
}
|
|
349
|
-
export interface ContactAddress {
|
|
350
|
-
/**
|
|
351
|
-
* Street address ID.
|
|
352
|
-
* @readonly
|
|
353
|
-
*/
|
|
354
|
-
_id?: string | null;
|
|
355
|
-
/**
|
|
356
|
-
* Address type.
|
|
357
|
-
*
|
|
358
|
-
* `"UNTAGGED"` is shown as "Other" in the Contact List.
|
|
359
|
-
*
|
|
360
|
-
* Supported values: `"UNTAGGED"`, `"HOME"`, `"WORK"`, `"BILLING"`, `"SHIPPING"`.
|
|
361
|
-
*/
|
|
362
|
-
tag?: AddressTag;
|
|
363
|
-
/** Street address. */
|
|
364
|
-
address?: Address;
|
|
365
|
-
}
|
|
366
|
-
export declare enum AddressTag {
|
|
367
|
-
UNTAGGED = "UNTAGGED",
|
|
368
|
-
HOME = "HOME",
|
|
369
|
-
WORK = "WORK",
|
|
370
|
-
BILLING = "BILLING",
|
|
371
|
-
SHIPPING = "SHIPPING"
|
|
372
|
-
}
|
|
373
|
-
/** Physical address */
|
|
374
|
-
export interface Address extends AddressStreetOneOf {
|
|
375
|
-
/** Street address object, with number and name in separate fields. */
|
|
376
|
-
streetAddress?: StreetAddress;
|
|
377
|
-
/** Main address line, usually street and number, as free text. */
|
|
378
|
-
addressLine1?: string | null;
|
|
379
|
-
/**
|
|
380
|
-
* 2-letter country code in an
|
|
381
|
-
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
382
|
-
*/
|
|
383
|
-
country?: string | null;
|
|
384
|
-
/**
|
|
385
|
-
* Code for a subdivision (such as state, prefecture, or province) in an
|
|
386
|
-
* [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
|
|
387
|
-
*/
|
|
388
|
-
subdivision?: string | null;
|
|
389
|
-
/** City name. */
|
|
390
|
-
city?: string | null;
|
|
391
|
-
/** Postal or zip code. */
|
|
392
|
-
postalCode?: string | null;
|
|
393
|
-
/**
|
|
394
|
-
* Free text providing more detailed address information,
|
|
395
|
-
* such as apartment, suite, or floor.
|
|
396
|
-
*/
|
|
397
|
-
addressLine2?: string | null;
|
|
398
|
-
}
|
|
399
|
-
/** @oneof */
|
|
400
|
-
export interface AddressStreetOneOf {
|
|
401
|
-
/** Street address object, with number and name in separate fields. */
|
|
402
|
-
streetAddress?: StreetAddress;
|
|
403
|
-
/** Main address line, usually street and number, as free text. */
|
|
404
|
-
addressLine?: string | null;
|
|
405
|
-
}
|
|
406
|
-
export interface StreetAddress {
|
|
407
|
-
/** Street number. */
|
|
408
|
-
number?: string;
|
|
409
|
-
/** Street name. */
|
|
410
|
-
name?: string;
|
|
411
|
-
}
|
|
412
|
-
export interface AddressLocation {
|
|
413
|
-
/** Address's latitude. */
|
|
414
|
-
latitude?: number | null;
|
|
415
|
-
/** Address's longitude. */
|
|
416
|
-
longitude?: number | null;
|
|
417
|
-
}
|
|
418
|
-
export interface Subdivision {
|
|
419
|
-
/** subdivision short code */
|
|
420
|
-
code?: string;
|
|
421
|
-
/** Full subdivision name. */
|
|
422
|
-
name?: string;
|
|
423
|
-
}
|
|
424
|
-
export declare enum SubdivisionType {
|
|
425
|
-
UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
|
|
426
|
-
/** State */
|
|
427
|
-
ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
|
|
428
|
-
/** County */
|
|
429
|
-
ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
|
|
430
|
-
/** City/town */
|
|
431
|
-
ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
|
|
432
|
-
/** Neighborhood/quarter */
|
|
433
|
-
ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
|
|
434
|
-
/** Street/block */
|
|
435
|
-
ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
|
|
436
|
-
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
437
|
-
COUNTRY = "COUNTRY"
|
|
438
|
-
}
|
|
439
|
-
export interface AssigneesWrapper {
|
|
440
|
-
/** List of site contributor user IDs. */
|
|
441
|
-
items?: string[];
|
|
442
|
-
}
|
|
443
|
-
export interface LabelsWrapper {
|
|
444
|
-
/**
|
|
445
|
-
* List of contact label keys.
|
|
446
|
-
* [Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list)
|
|
447
|
-
* help categorize contacts.
|
|
448
|
-
*
|
|
449
|
-
* Label keys must exist to be added to the contact.
|
|
450
|
-
* Contact labels can be created or retrieved with
|
|
451
|
-
* [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)
|
|
452
|
-
* or
|
|
453
|
-
* [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels)
|
|
454
|
-
*/
|
|
455
|
-
items?: string[];
|
|
456
|
-
}
|
|
457
|
-
export interface ExtendedFieldsWrapper {
|
|
458
|
-
/**
|
|
459
|
-
* Set of key-value pairs.
|
|
460
|
-
*
|
|
461
|
-
* Contact's extended fields which allow you to store additional information about your contacts.
|
|
462
|
-
*
|
|
463
|
-
* To view or create extended fields, use
|
|
464
|
-
* `findOrCreateExtendedField()`,
|
|
465
|
-
* `getExtendedField()`, or
|
|
466
|
-
* `queryExtendedFields()` in the Extended Fields API.
|
|
467
|
-
*/
|
|
468
|
-
items?: Record<string, any>;
|
|
469
|
-
}
|
|
470
|
-
export interface LocationsWrapper {
|
|
471
|
-
/** List of location ids. */
|
|
472
|
-
items?: string[];
|
|
473
|
-
}
|
|
474
|
-
/** TEST contact picture description */
|
|
475
|
-
export interface ContactPicture {
|
|
476
|
-
/**
|
|
477
|
-
* Image.
|
|
478
|
-
* This can contain an image URL or a Wix Media image ID.
|
|
479
|
-
*/
|
|
480
|
-
image?: string;
|
|
481
|
-
}
|
|
482
|
-
export declare enum ImageProvider {
|
|
483
|
-
UNKNOWN = "UNKNOWN",
|
|
484
|
-
/** Image stored outside Wix */
|
|
485
|
-
EXTERNAL = "EXTERNAL",
|
|
486
|
-
/** Stored in wix media platform, Must be uploaded by using `GeneratePictureUploadUrl` */
|
|
487
|
-
WIX_MEDIA = "WIX_MEDIA"
|
|
488
|
-
}
|
|
489
|
-
export interface SegmentsWrapper {
|
|
490
|
-
/** List of Contact segment IDs */
|
|
491
|
-
items?: string[];
|
|
492
|
-
}
|
|
493
|
-
export interface PrimaryEmail {
|
|
494
|
-
/**
|
|
495
|
-
* Primary email address.
|
|
496
|
-
*
|
|
497
|
-
* This property reflects the email address in `info.emails`
|
|
498
|
-
* where `primary` is `true`.
|
|
499
|
-
* @readonly
|
|
500
|
-
*/
|
|
501
|
-
email?: string | null;
|
|
502
|
-
/**
|
|
503
|
-
* Indicates the recipient's opt-in or opt-out status for marketing emails.
|
|
504
|
-
*
|
|
505
|
-
* - `NOT_SET`: No status specified. Default.
|
|
506
|
-
* - `PENDING`: Subscription confirmation was requested,
|
|
507
|
-
* but recipient hasn't confirmed yet.
|
|
508
|
-
* - `SUBSCRIBED`: Recipient has opted in to marketing emails.
|
|
509
|
-
* - `UNSUBSCRIBED`: Recipient has opted out of marketing emails.
|
|
510
|
-
* @readonly
|
|
511
|
-
*/
|
|
512
|
-
subscriptionStatus?: SubscriptionStatus;
|
|
513
|
-
/**
|
|
514
|
-
* Indicates last reported status of sent emails.
|
|
515
|
-
*
|
|
516
|
-
* - `NOT_SET`: No status reported. Default.
|
|
517
|
-
* - `VALID`: Emails are being successfully delivered.
|
|
518
|
-
* - `BOUNCED`: The last email to the recipient bounced or was rejected.
|
|
519
|
-
* - `SPAM_COMPLAINT`: Recipient registered a spam complaint
|
|
520
|
-
* with their email provider.
|
|
521
|
-
* - `INACTIVE`: Multiple emails have been delivered without any kind of engagement from the recipient.
|
|
522
|
-
* @readonly
|
|
523
|
-
*/
|
|
524
|
-
deliverabilityStatus?: EmailDeliverabilityStatus;
|
|
525
|
-
}
|
|
526
|
-
export declare enum SubscriptionStatus {
|
|
527
|
-
NO_SUBSCRIPTION_STATUS = "NO_SUBSCRIPTION_STATUS",
|
|
528
|
-
NOT_SET = "NOT_SET",
|
|
529
|
-
PENDING = "PENDING",
|
|
530
|
-
SUBSCRIBED = "SUBSCRIBED",
|
|
531
|
-
UNSUBSCRIBED = "UNSUBSCRIBED"
|
|
532
|
-
}
|
|
533
|
-
export declare enum EmailDeliverabilityStatus {
|
|
534
|
-
UNKNOWN_EMAIL_DELIVERABILITY_STATUS = "UNKNOWN_EMAIL_DELIVERABILITY_STATUS",
|
|
535
|
-
NOT_SET = "NOT_SET",
|
|
536
|
-
VALID = "VALID",
|
|
537
|
-
BOUNCED = "BOUNCED",
|
|
538
|
-
SPAM_COMPLAINT = "SPAM_COMPLAINT",
|
|
539
|
-
INACTIVE = "INACTIVE"
|
|
540
|
-
}
|
|
541
|
-
export interface PrimaryPhone {
|
|
542
|
-
/** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the primary phone. */
|
|
543
|
-
countryCode?: string | null;
|
|
544
|
-
/**
|
|
545
|
-
* [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
|
|
546
|
-
* phone number.
|
|
547
|
-
* Automatically generated using `phone` and `countryCode`,
|
|
548
|
-
* as long as both of those values are valid.
|
|
549
|
-
* @readonly
|
|
550
|
-
*/
|
|
551
|
-
e164Phone?: string | null;
|
|
552
|
-
/**
|
|
553
|
-
* Formatted phone. Automatically generated using phone and countryCode.
|
|
554
|
-
* @readonly
|
|
555
|
-
*/
|
|
556
|
-
formattedPhone?: string | null;
|
|
557
|
-
/**
|
|
558
|
-
* Indicates the recipient's opt-in or opt-out status for SMS messages.
|
|
559
|
-
*
|
|
560
|
-
* - `NO_SUBSCRIPTION_STATUS`: No status exists. This is the status when the phone is not a valid E164 phone.
|
|
561
|
-
* - `NOT_SET`: No status specified. Default when the phone is a valid E164 phone.
|
|
562
|
-
* - `PENDING`: Subscription confirmation was requested,
|
|
563
|
-
* but recipient hasn't confirmed yet.
|
|
564
|
-
* - `SUBSCRIBED`: Recipient has opted in to SMS messages.
|
|
565
|
-
* - `UNSUBSCRIBED`: Recipient has opted out of SMS messages.
|
|
566
|
-
* @readonly
|
|
567
|
-
*/
|
|
568
|
-
subscriptionStatus?: SubscriptionStatus;
|
|
569
|
-
/**
|
|
570
|
-
* Primary phone number.
|
|
571
|
-
*
|
|
572
|
-
* This property reflects the phone number in `info.phones`
|
|
573
|
-
* where `primary` is `true`.
|
|
574
|
-
* @readonly
|
|
575
|
-
*/
|
|
576
|
-
phone?: string | null;
|
|
577
|
-
}
|
|
578
|
-
export declare enum PhoneDeliverabilityStatus {
|
|
579
|
-
NO_PHONE_DELIVERABILITY_STATUS = "NO_PHONE_DELIVERABILITY_STATUS",
|
|
580
|
-
NOT_SET = "NOT_SET"
|
|
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
|
-
/** Signup date */
|
|
586
|
-
signupDate?: Date;
|
|
587
|
-
/** Login email */
|
|
588
|
-
email?: string | null;
|
|
589
|
-
/** Indicate whether the email is verified */
|
|
590
|
-
emailVerified?: boolean | null;
|
|
591
|
-
/** Indicates that the member is required to verify their email */
|
|
592
|
-
emailVerificationRequired?: boolean | null;
|
|
593
|
-
/** Member status */
|
|
594
|
-
status?: MemberStatus;
|
|
595
|
-
/** 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) */
|
|
596
|
-
identityInfo?: IdentityInfo;
|
|
597
|
-
/** 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) */
|
|
598
|
-
profileInfo?: ProfileInfo;
|
|
599
|
-
/** User info. For more details see [here](https://dev.wix.com/docs/rest/internal-only/identity/user-member-connection-v1/user-member-connection-object) */
|
|
600
|
-
userInfo?: UserInfo;
|
|
601
|
-
/** 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) */
|
|
602
|
-
sessionInfo?: SessionInfo;
|
|
603
|
-
/** 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) */
|
|
604
|
-
groupInfo?: GroupInfo;
|
|
605
|
-
}
|
|
606
|
-
export declare enum MemberStatus {
|
|
607
|
-
UNKNOWN_MEMBER_STATUS = "UNKNOWN_MEMBER_STATUS",
|
|
608
|
-
/** Pending admin approval */
|
|
609
|
-
PENDING = "PENDING",
|
|
610
|
-
ACTIVE = "ACTIVE",
|
|
611
|
-
DELETED = "DELETED",
|
|
612
|
-
BLOCKED = "BLOCKED",
|
|
613
|
-
OFFLINE = "OFFLINE"
|
|
614
|
-
}
|
|
615
|
-
export interface IdentityInfo {
|
|
616
|
-
/** Signup date */
|
|
617
|
-
signupDate?: Date;
|
|
618
|
-
/** Login email */
|
|
619
|
-
email?: string | null;
|
|
620
|
-
/** Indicate whether the email is verified */
|
|
621
|
-
emailVerified?: boolean | null;
|
|
622
|
-
/** Indicates that the member is required to verify their email */
|
|
623
|
-
emailVerificationRequired?: boolean | null;
|
|
624
|
-
/** Identity status */
|
|
625
|
-
status?: IdentityStatus;
|
|
626
|
-
}
|
|
627
|
-
export declare enum IdentityStatus {
|
|
628
|
-
UNKNOWN_IDENTITY_STATUS = "UNKNOWN_IDENTITY_STATUS",
|
|
629
|
-
PENDING_ADMIN_APPROVAL = "PENDING_ADMIN_APPROVAL",
|
|
630
|
-
ACTIVE = "ACTIVE",
|
|
631
|
-
DELETED = "DELETED",
|
|
632
|
-
BLOCKED = "BLOCKED",
|
|
633
|
-
OFFLINE = "OFFLINE"
|
|
634
|
-
}
|
|
635
|
-
export interface ProfileInfo {
|
|
636
|
-
/** Nickname */
|
|
637
|
-
nickname?: string | null;
|
|
638
|
-
/** Privacy status */
|
|
639
|
-
privacyStatus?: PrivacyStatus;
|
|
640
|
-
/** Indicate whether the member is reported */
|
|
641
|
-
reported?: boolean | null;
|
|
642
|
-
/** Indicate whether the member is muted */
|
|
643
|
-
muted?: boolean | null;
|
|
644
|
-
/** Profile photo */
|
|
645
|
-
photo?: string;
|
|
646
|
-
}
|
|
647
|
-
export declare enum PrivacyStatus {
|
|
648
|
-
UNKNOWN_PRIVACY_STATUS = "UNKNOWN_PRIVACY_STATUS",
|
|
649
|
-
PRIVATE = "PRIVATE",
|
|
650
|
-
PUBLIC = "PUBLIC"
|
|
651
|
-
}
|
|
652
|
-
export interface UserInfo {
|
|
653
|
-
/** User ID */
|
|
654
|
-
userId?: string;
|
|
655
|
-
/** User role */
|
|
656
|
-
role?: Role;
|
|
657
|
-
}
|
|
658
|
-
export declare enum Role {
|
|
659
|
-
UNSPECIFIED_ROLE = "UNSPECIFIED_ROLE",
|
|
660
|
-
OWNER = "OWNER",
|
|
661
|
-
CONTRIBUTOR = "CONTRIBUTOR"
|
|
662
|
-
}
|
|
663
|
-
export interface SessionInfo {
|
|
664
|
-
/** Last web login */
|
|
665
|
-
lastWebLogin?: Date;
|
|
666
|
-
/** Last mobile login */
|
|
667
|
-
lastMobileLogin?: Date;
|
|
668
|
-
/** List of mobile apps that the member has ever logged in to */
|
|
669
|
-
mobileAppNames?: string[];
|
|
670
|
-
}
|
|
671
|
-
export interface GroupInfo {
|
|
672
|
-
/** Group IDs */
|
|
673
|
-
groupIds?: string[];
|
|
674
|
-
}
|
|
675
|
-
export interface ContactSubmitted {
|
|
676
|
-
/** Pass through data, submitted with the contact */
|
|
677
|
-
passThroughData?: string | null;
|
|
678
|
-
/** Submitted activity */
|
|
679
|
-
activity?: ContactActivity;
|
|
680
|
-
/** Submitted Contact (after processing) */
|
|
681
|
-
contact?: Contact;
|
|
682
|
-
}
|
|
683
|
-
export interface ContactChanged {
|
|
684
|
-
/** The Contact before the changes */
|
|
685
|
-
previousContact?: Contact;
|
|
686
|
-
/** The Contact after the changes */
|
|
687
|
-
currentContact?: Contact;
|
|
688
|
-
}
|
|
689
|
-
export interface ContactEmailSubscriptionUpdated {
|
|
690
|
-
/** The updated contact ID. */
|
|
691
|
-
contactId?: string;
|
|
692
|
-
/** The revision of the contact. */
|
|
693
|
-
revision?: number;
|
|
694
|
-
/** The primary email of the contact with the updated subscription and deliverability status. */
|
|
695
|
-
primaryEmail?: PrimaryEmail;
|
|
696
|
-
/** Date and time the contact was updated with the email subscription or deliverability status. */
|
|
697
|
-
_updatedDate?: Date;
|
|
698
|
-
}
|
|
699
|
-
export interface ContactPhoneSubscriptionUpdated {
|
|
700
|
-
/** The updated contact ID. */
|
|
701
|
-
contactId?: string;
|
|
702
|
-
/** The revision of the contact. */
|
|
703
|
-
revision?: number;
|
|
704
|
-
/** The primary phone of the contact with the updated subscription status. */
|
|
705
|
-
primaryPhone?: PrimaryPhone;
|
|
706
|
-
/** Date and time the contact was updated with the SMS subscription status. */
|
|
707
|
-
_updatedDate?: Date;
|
|
708
|
-
}
|
|
709
|
-
/**
|
|
710
|
-
* This message is an internal message used by this app and it is used to trigger
|
|
711
|
-
* the update of the subscription status of the contact asynchronously.
|
|
712
|
-
* It is published after a contact is created/updated/merged.
|
|
713
|
-
*/
|
|
714
|
-
export interface ContactPrimaryInfoUpdated {
|
|
715
|
-
/** The updated contact ID. */
|
|
716
|
-
contactId?: string;
|
|
717
|
-
/** Indication whether the primary email was updated. */
|
|
718
|
-
primaryEmailUpdated?: boolean;
|
|
719
|
-
/** Indication whether primary phone was updated. */
|
|
720
|
-
primaryPhoneUpdated?: boolean;
|
|
721
|
-
/** previous primary email subscription status */
|
|
722
|
-
previousPrimaryEmailSubscriptionStatus?: PrimarySubscriptionStatus;
|
|
723
|
-
/** previous primary phone subscription status */
|
|
724
|
-
previousPrimaryPhoneSubscriptionStatus?: PrimarySubscriptionStatus;
|
|
725
|
-
}
|
|
726
|
-
export interface PrimarySubscriptionStatus {
|
|
727
|
-
/** subscription status */
|
|
728
|
-
subscriptionStatus?: SubscriptionStatus;
|
|
729
|
-
}
|
|
730
|
-
/** Contact creation options. */
|
|
731
|
-
export interface CreateContactRequest {
|
|
732
|
-
/** Contact info. */
|
|
733
|
-
info: ContactInfo;
|
|
734
|
-
/**
|
|
735
|
-
* Controls whether the call will succeed
|
|
736
|
-
* if the new contact information contains an email or a phone number already used by another contact.
|
|
737
|
-
*
|
|
738
|
-
* If set to `true`,
|
|
739
|
-
* the call will succeed even if an email address or phone number is used by another contact.
|
|
740
|
-
* If set to `false`,
|
|
741
|
-
* the call will fail if the given email address is used by another contact or,
|
|
742
|
-
* if the email address is not given and the given phone number is used by another contact.
|
|
743
|
-
*
|
|
744
|
-
* Default: `false`
|
|
745
|
-
*/
|
|
746
|
-
allowDuplicates?: boolean;
|
|
747
|
-
}
|
|
748
|
-
/** Contact. */
|
|
749
|
-
export interface CreateContactResponse {
|
|
750
|
-
/** Contact. */
|
|
751
|
-
contact?: Contact;
|
|
752
|
-
}
|
|
753
|
-
export interface DuplicateContactExists {
|
|
754
|
-
duplicateContactId?: string | null;
|
|
755
|
-
duplicateEmail?: string | null;
|
|
756
|
-
duplicatePhone?: string | null;
|
|
757
|
-
}
|
|
758
|
-
export interface UpdateContactRequest {
|
|
759
|
-
/** ID of the contact to update. */
|
|
760
|
-
contactId: string;
|
|
761
|
-
/**
|
|
762
|
-
* Revision number.
|
|
763
|
-
* When updating, include the existing `revision`
|
|
764
|
-
* to prevent conflicting updates.
|
|
765
|
-
*/
|
|
766
|
-
revision: number | null;
|
|
767
|
-
/**
|
|
768
|
-
* Controls whether the call will succeed
|
|
769
|
-
* if the new contact information contains an email or a phone number already used by another contact.
|
|
770
|
-
*
|
|
771
|
-
* If set to `true`,
|
|
772
|
-
* the call will succeed even if an email address or phone number is used by another contact.
|
|
773
|
-
* If set to `false`,
|
|
774
|
-
* the call will fail if the given email address is used by another contact or,
|
|
775
|
-
* if the email address is not given and the given phone number is used by another contact.
|
|
776
|
-
*
|
|
777
|
-
* Default: `false`
|
|
778
|
-
*/
|
|
779
|
-
allowDuplicates?: boolean;
|
|
780
|
-
/** Contact info. */
|
|
781
|
-
info: ContactInfo;
|
|
782
|
-
}
|
|
783
|
-
/** Updated contact. */
|
|
784
|
-
export interface UpdateContactResponse {
|
|
785
|
-
/** Updated contact. */
|
|
786
|
-
contact?: Contact;
|
|
787
|
-
}
|
|
788
|
-
export interface MergeContactsRequest {
|
|
789
|
-
/** Target contact ID. */
|
|
790
|
-
targetContactId: string;
|
|
791
|
-
/**
|
|
792
|
-
* Target contact revision number, which increments by 1 each time the contact is updated.
|
|
793
|
-
* To prevent conflicting changes,
|
|
794
|
-
* the target contact's current revision must be passed.
|
|
795
|
-
*/
|
|
796
|
-
targetContactRevision: number | null;
|
|
797
|
-
/**
|
|
798
|
-
* IDs of up to 5 contacts to merge into the target contact.
|
|
799
|
-
* If merging more than one source contact,
|
|
800
|
-
* the first source is given precedence, then the second, and so on.
|
|
801
|
-
*/
|
|
802
|
-
sourceContactIds?: string[];
|
|
803
|
-
}
|
|
804
|
-
export interface MergeContactsResponse {
|
|
805
|
-
/** Updated target contact. */
|
|
806
|
-
contact?: Contact;
|
|
807
|
-
}
|
|
808
|
-
export interface ContactMerged {
|
|
809
|
-
/** ID of the contact the source contacts were merged into. */
|
|
810
|
-
targetContactId?: string;
|
|
811
|
-
/** IDs of contacts that were merged into the target contact. */
|
|
812
|
-
sourceContactIds?: string[];
|
|
813
|
-
/** Updated target contact. */
|
|
814
|
-
targetContact?: Contact;
|
|
815
|
-
}
|
|
816
|
-
export interface PreviewMergeContactsRequest {
|
|
817
|
-
/** Target contact ID. */
|
|
818
|
-
targetContactId?: string;
|
|
819
|
-
/**
|
|
820
|
-
* IDs of up to 5 contacts to merge into the target contact.
|
|
821
|
-
* If merging more than one source contact,
|
|
822
|
-
* the first source is given precedence, then the second, and so on.
|
|
823
|
-
*/
|
|
824
|
-
sourceContactIds?: string[];
|
|
825
|
-
}
|
|
826
|
-
export interface PreviewMergeContactsResponse {
|
|
827
|
-
/** Preview of the updated target contact. */
|
|
828
|
-
contact?: Contact;
|
|
829
|
-
}
|
|
830
|
-
export interface DeleteContactRequest {
|
|
831
|
-
/** ID of the contact to delete. */
|
|
832
|
-
contactId: string;
|
|
833
|
-
}
|
|
834
|
-
export interface DeleteContactResponse {
|
|
835
|
-
}
|
|
836
|
-
export interface LabelContactRequest {
|
|
837
|
-
/** ID of the contact to add labels to. */
|
|
838
|
-
contactId: string;
|
|
839
|
-
/**
|
|
840
|
-
* List of label keys to add to the contact.
|
|
841
|
-
*
|
|
842
|
-
* Label keys must exist to be added to the contact.
|
|
843
|
-
* Contact labels can be created with the
|
|
844
|
-
* `findOrCreateLabel()` function. You can use the
|
|
845
|
-
* `queryLabels()` function to view the currently existing labels.
|
|
846
|
-
*
|
|
847
|
-
*/
|
|
848
|
-
labelKeys: string[];
|
|
849
|
-
}
|
|
850
|
-
/** Updated contact. */
|
|
851
|
-
export interface LabelContactResponse {
|
|
852
|
-
/** Updated contact. */
|
|
853
|
-
contact?: Contact;
|
|
854
|
-
}
|
|
855
|
-
export interface UnlabelContactRequest {
|
|
856
|
-
/** ID of the contact to remove labels from. */
|
|
857
|
-
contactId: string;
|
|
858
|
-
/** List of label keys to remove from the contact. */
|
|
859
|
-
labelKeys: string[];
|
|
860
|
-
}
|
|
861
|
-
/** Updated contact. */
|
|
862
|
-
export interface UnlabelContactResponse {
|
|
863
|
-
/** Updated contact. */
|
|
864
|
-
contact?: Contact;
|
|
865
|
-
}
|
|
866
|
-
export interface LabelAndUnlabelContactRequest {
|
|
867
|
-
/** Contact ID. */
|
|
868
|
-
contactId?: string;
|
|
869
|
-
/**
|
|
870
|
-
* List of label keys applied to the contact.
|
|
871
|
-
*
|
|
872
|
-
* Label keys must exist to be added to the contact.
|
|
873
|
-
* Contact labels can be created with the
|
|
874
|
-
* `findOrCreateLabel()` function. You can use the
|
|
875
|
-
* `queryLabels()` function to view the currently existing labels.
|
|
876
|
-
*/
|
|
877
|
-
labelKeysToAdd?: string[];
|
|
878
|
-
/**
|
|
879
|
-
* List of label keys to remove from the contact.
|
|
880
|
-
*
|
|
881
|
-
* You can use the `queryLabels()` function to view the currently existing labels.
|
|
882
|
-
*
|
|
883
|
-
*/
|
|
884
|
-
labelKeysToRemove?: string[];
|
|
885
|
-
}
|
|
886
|
-
export interface LabelAndUnlabelContactResponse {
|
|
887
|
-
/** Updated contact. */
|
|
888
|
-
contact?: Contact;
|
|
889
|
-
}
|
|
890
|
-
export interface ListContactsRequest {
|
|
891
|
-
/** Sort order. */
|
|
892
|
-
sort?: Sorting;
|
|
893
|
-
/** Pagination, defaults to offset = 0 and limit = 50 (max limit 1,000). */
|
|
894
|
-
paging?: Paging;
|
|
895
|
-
/**
|
|
896
|
-
* List of projected fields to return.
|
|
897
|
-
* If both `fields` and `fieldsets` are sent in the request,
|
|
898
|
-
* the union of both lists is returned.
|
|
899
|
-
* `id` and `revision` are always returned.
|
|
900
|
-
*
|
|
901
|
-
* Supported properties:
|
|
902
|
-
* `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
|
|
903
|
-
* `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
|
|
904
|
-
* `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
|
|
905
|
-
* `info.labelKeys`, `info.locations`, `info.extendedFields`
|
|
906
|
-
*/
|
|
907
|
-
fields?: string[];
|
|
908
|
-
fieldsets?: ContactFieldSet[];
|
|
909
|
-
}
|
|
910
|
-
export interface Sorting {
|
|
911
|
-
/**
|
|
912
|
-
* Field to sort by.
|
|
913
|
-
*
|
|
914
|
-
* Supported properties:
|
|
915
|
-
* `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,
|
|
916
|
-
* `info.jobTitle`, `info.birthdate`
|
|
917
|
-
*/
|
|
918
|
-
fieldName?: string;
|
|
919
|
-
/**
|
|
920
|
-
* Sort order.
|
|
921
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
922
|
-
*
|
|
923
|
-
* Defaults to `ASC`.
|
|
924
|
-
*/
|
|
925
|
-
order?: SortOrder;
|
|
926
|
-
}
|
|
927
|
-
export declare enum SortOrder {
|
|
928
|
-
ASC = "ASC",
|
|
929
|
-
DESC = "DESC"
|
|
930
|
-
}
|
|
931
|
-
export interface Paging {
|
|
932
|
-
/** Number of items to return. */
|
|
933
|
-
limit?: number | null;
|
|
934
|
-
/** Number of items to skip in the current sort order. */
|
|
935
|
-
offset?: number | null;
|
|
936
|
-
}
|
|
937
|
-
export declare enum ContactFieldSet {
|
|
938
|
-
/** name, primaryEmail, primaryPhone */
|
|
939
|
-
BASIC = "BASIC",
|
|
940
|
-
/** name, phones, emails, addresses */
|
|
941
|
-
COMMUNICATION_DETAILS = "COMMUNICATION_DETAILS",
|
|
942
|
-
/** name, primaryInfo(email, phone), extendedFields */
|
|
943
|
-
EXTENDED = "EXTENDED",
|
|
944
|
-
/** Full contact object */
|
|
945
|
-
FULL = "FULL"
|
|
946
|
-
}
|
|
947
|
-
/** List of contacts. */
|
|
948
|
-
export interface ListContactsResponse {
|
|
949
|
-
/** List of contacts. */
|
|
950
|
-
contacts?: Contact[];
|
|
951
|
-
/** Details on the paged set of results returned. */
|
|
952
|
-
pagingMetadata?: PagingMetadata;
|
|
953
|
-
}
|
|
954
|
-
export interface PagingMetadata {
|
|
955
|
-
/** The number of items returned in this response */
|
|
956
|
-
count?: number | null;
|
|
957
|
-
/** The offset which was requested */
|
|
958
|
-
offset?: number | null;
|
|
959
|
-
/** The total number of items that match the query */
|
|
960
|
-
total?: number | null;
|
|
961
|
-
/** A flag that indicates the server failed to calculate 'total' field */
|
|
962
|
-
tooManyToCount?: boolean | null;
|
|
963
|
-
}
|
|
964
|
-
export interface QueryContactsRequest {
|
|
965
|
-
/**
|
|
966
|
-
* Plain text search for an exact match.
|
|
967
|
-
*
|
|
968
|
-
* Supported properties:
|
|
969
|
-
* `info.name.first`, `info.name.last`, `info.emails.email`, `info.phones.phone`
|
|
970
|
-
*
|
|
971
|
-
* Max: 100 characters
|
|
972
|
-
*/
|
|
973
|
-
search?: string | null;
|
|
974
|
-
/** Query options. */
|
|
975
|
-
query?: Query;
|
|
976
|
-
}
|
|
977
|
-
export interface Query {
|
|
978
|
-
/**
|
|
979
|
-
* Filter object.
|
|
980
|
-
* See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
981
|
-
* for more information.
|
|
982
|
-
*
|
|
983
|
-
* For a detailed list of supported filters, see
|
|
984
|
-
* [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters).
|
|
985
|
-
*/
|
|
986
|
-
filter?: Record<string, any> | null;
|
|
987
|
-
/**
|
|
988
|
-
* Sorting options.
|
|
989
|
-
* See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)
|
|
990
|
-
* for more information.
|
|
991
|
-
*
|
|
992
|
-
* Max: 1 sort object
|
|
993
|
-
*/
|
|
994
|
-
sort?: Sorting[];
|
|
995
|
-
/** Pagination options. */
|
|
996
|
-
paging?: Paging;
|
|
997
|
-
/**
|
|
998
|
-
* List of projected fields to return.
|
|
999
|
-
* If both `fields` and `fieldsets` are sent in the request,
|
|
1000
|
-
* the union of both lists is returned.
|
|
1001
|
-
* `id` and `revision` are always returned.
|
|
1002
|
-
*
|
|
1003
|
-
* Supported properties:
|
|
1004
|
-
* `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
|
|
1005
|
-
* `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
|
|
1006
|
-
* `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
|
|
1007
|
-
* `info.labelKeys`, `info.locations`, `info.extendedFields`
|
|
1008
|
-
*/
|
|
1009
|
-
fields?: string[];
|
|
1010
|
-
/**
|
|
1011
|
-
* Predefined sets of fields to return.
|
|
1012
|
-
* If both `fields` and `fieldsets` are sent in the request,
|
|
1013
|
-
* the union of both lists is returned.
|
|
1014
|
-
*
|
|
1015
|
-
* - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
|
|
1016
|
-
* - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
|
|
1017
|
-
* - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
|
|
1018
|
-
* - `FULL`: Returns all fields.
|
|
1019
|
-
*
|
|
1020
|
-
* Default: If `fields` is omitted from the request, `FULL`.
|
|
1021
|
-
*/
|
|
1022
|
-
fieldsets?: ContactFieldSet[];
|
|
1023
|
-
}
|
|
1024
|
-
/** List of contacts. */
|
|
1025
|
-
export interface QueryContactsResponse {
|
|
1026
|
-
/** List of contacts. */
|
|
1027
|
-
contacts?: Contact[];
|
|
1028
|
-
/** Details on the paged set of results returned. */
|
|
1029
|
-
pagingMetadata?: PagingMetadata;
|
|
1030
|
-
}
|
|
1031
|
-
export interface ListFacetsRequest {
|
|
1032
|
-
/** Allow paginating, default: offset = 0 and limit = 1000 */
|
|
1033
|
-
paging?: Paging;
|
|
1034
|
-
/** Language for localization */
|
|
1035
|
-
language?: string | null;
|
|
1036
|
-
}
|
|
1037
|
-
export interface ListFacetsResponse {
|
|
1038
|
-
/** List of facets. */
|
|
1039
|
-
facets?: ContactsFacet[];
|
|
1040
|
-
/** Details on the paged set of results returned. */
|
|
1041
|
-
pagingMetadata?: PagingMetadata;
|
|
1042
|
-
}
|
|
1043
|
-
export interface ContactsFacet {
|
|
1044
|
-
/** Type of facet. */
|
|
1045
|
-
facetType?: ContactsFacetType;
|
|
1046
|
-
/**
|
|
1047
|
-
* Scope for facet keys.
|
|
1048
|
-
* When a facet key exists in a namespace,
|
|
1049
|
-
* each key is unique within that namespace.
|
|
1050
|
-
*
|
|
1051
|
-
* Currently, facets not created by Wix are in the `custom` namespace.
|
|
1052
|
-
*/
|
|
1053
|
-
namespace?: string | null;
|
|
1054
|
-
/** Human-readable display name. */
|
|
1055
|
-
namespaceDisplayName?: string | null;
|
|
1056
|
-
/** Facet key, automatically generated. */
|
|
1057
|
-
facetKey?: string | null;
|
|
1058
|
-
/** Human-readable name. Shown in the Wix UI. */
|
|
1059
|
-
facetDisplayName?: string | null;
|
|
1060
|
-
/** Number of contacts the facet is applied to. */
|
|
1061
|
-
count?: number | null;
|
|
1062
|
-
/** Filter used for query contacts of this facet */
|
|
1063
|
-
queryFilter?: Record<string, any> | null;
|
|
1064
|
-
}
|
|
1065
|
-
export declare enum ContactsFacetType {
|
|
1066
|
-
UNKNOWN = "UNKNOWN",
|
|
1067
|
-
ALL_CONTACTS = "ALL_CONTACTS",
|
|
1068
|
-
NOT_LABELED = "NOT_LABELED",
|
|
1069
|
-
LABEL = "LABEL",
|
|
1070
|
-
SUBSCRIPTION_STATUS = "SUBSCRIPTION_STATUS",
|
|
1071
|
-
MEMBERSHIP_STATUS = "MEMBERSHIP_STATUS"
|
|
1072
|
-
}
|
|
1073
|
-
export interface QueryFacetsRequest {
|
|
1074
|
-
/** Allow paginating, default: offset = 0 and limit = 1000 */
|
|
1075
|
-
paging?: Paging;
|
|
1076
|
-
/** Language for localization */
|
|
1077
|
-
language?: string | null;
|
|
1078
|
-
/**
|
|
1079
|
-
* Only allowed fields:
|
|
1080
|
-
* #info.extendedFields.emailSubscriptions.effectiveEmail ($exists)
|
|
1081
|
-
* #info.extendedFields.emailSubscriptions.subscriptionStatus ($eq, $ne, $in, $nin)
|
|
1082
|
-
* #info.extendedFields.emailSubscriptions.deliverabilityStatus ($eq, $ne, $in, $nin)
|
|
1083
|
-
*/
|
|
1084
|
-
filter?: Record<string, any> | null;
|
|
1085
|
-
}
|
|
1086
|
-
export interface QueryFacetsResponse {
|
|
1087
|
-
/** List of facets. */
|
|
1088
|
-
facets?: ContactsFacet[];
|
|
1089
|
-
/** Details on the paged set of results returned. */
|
|
1090
|
-
pagingMetadata?: PagingMetadata;
|
|
1091
|
-
}
|
|
1092
|
-
export interface BulkDeleteContactsRequest {
|
|
1093
|
-
/**
|
|
1094
|
-
* Filter object.
|
|
1095
|
-
*
|
|
1096
|
-
* Possible filters:
|
|
1097
|
-
* `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
|
|
1098
|
-
*
|
|
1099
|
-
* For a detailed list of supported filters, see
|
|
1100
|
-
* filtering and sorting for
|
|
1101
|
-
* [contact properties](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#contact-properties-filtering-sorting-and-searching),
|
|
1102
|
-
* [extended fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#extended-fields-filtering-sorting-and-searching),
|
|
1103
|
-
* and [custom fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#custom-fields-filtering-sorting-and-searching).
|
|
1104
|
-
*
|
|
1105
|
-
* Example:
|
|
1106
|
-
* `{ "filter": { "info.name.last": "Smith" } }`
|
|
1107
|
-
*/
|
|
1108
|
-
filter?: Record<string, any> | null;
|
|
1109
|
-
/**
|
|
1110
|
-
* Plain text search for an exact match, up to 100 characters.
|
|
1111
|
-
*
|
|
1112
|
-
* Searchable fields:
|
|
1113
|
-
*
|
|
1114
|
-
* - `info.name.first`
|
|
1115
|
-
* - `info.name.last`
|
|
1116
|
-
* - `info.emails.email`
|
|
1117
|
-
* - `info.phones.phone`
|
|
1118
|
-
*/
|
|
1119
|
-
search?: string | null;
|
|
1120
|
-
}
|
|
1121
|
-
export interface BulkDeleteContactsResponse {
|
|
1122
|
-
/**
|
|
1123
|
-
* Bulk job ID.
|
|
1124
|
-
* The job's status can be retrieved with
|
|
1125
|
-
* [Get Bulk Job](https://dev.wix.com/api/rest/contacts/contacts/bulk-jobs/get-bulk-job) or
|
|
1126
|
-
* [List Bulk Jobs](https://dev.wix.com/api/rest/contacts/contacts/bulk-jobs/list-bulk-jobs).
|
|
1127
|
-
*/
|
|
1128
|
-
jobId?: string;
|
|
1129
|
-
}
|
|
1130
|
-
export interface BulkUpdateContactsRequest {
|
|
1131
|
-
/**
|
|
1132
|
-
* Filter object.
|
|
1133
|
-
*
|
|
1134
|
-
* Possible filters:
|
|
1135
|
-
* `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
|
|
1136
|
-
*
|
|
1137
|
-
* For a detailed list of supported filters, see
|
|
1138
|
-
* filtering and sorting for
|
|
1139
|
-
* [contact properties](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#contact-properties-filtering-sorting-and-searching),
|
|
1140
|
-
* [extended fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#extended-fields-filtering-sorting-and-searching),
|
|
1141
|
-
* and [custom fields](https://dev.wix.com/api/rest/contacts/contacts/sorting,-filtering,-and-searching#custom-fields-filtering-sorting-and-searching).
|
|
1142
|
-
*
|
|
1143
|
-
* Example:
|
|
1144
|
-
* `{ "filter": { "info.name.last": "Smith" } }`
|
|
1145
|
-
*/
|
|
1146
|
-
filter?: Record<string, any> | null;
|
|
1147
|
-
/**
|
|
1148
|
-
* Plain text search for an exact match, up to 100 characters.
|
|
1149
|
-
*
|
|
1150
|
-
* Searchable fields:
|
|
1151
|
-
*
|
|
1152
|
-
* - `info.name.first`
|
|
1153
|
-
* - `info.name.last`
|
|
1154
|
-
* - `info.emails.email`
|
|
1155
|
-
* - `info.phones.phone`
|
|
1156
|
-
*/
|
|
1157
|
-
search?: string | null;
|
|
1158
|
-
/** Contact info. */
|
|
1159
|
-
info?: ContactInfo;
|
|
1160
|
-
}
|
|
1161
|
-
export interface BulkUpdateContactsResponse {
|
|
1162
|
-
/**
|
|
1163
|
-
* Bulk job ID.
|
|
1164
|
-
* The job's status can be retrieved with
|
|
1165
|
-
* [Get Bulk Job](https://dev.wix.com/api/rest/contacts/contacts/bulk-jobs/get-bulk-job) or
|
|
1166
|
-
* [List Bulk Jobs](https://dev.wix.com/api/rest/contacts/contacts/bulk-jobs/list-bulk-jobs).
|
|
1167
|
-
*/
|
|
1168
|
-
jobId?: string;
|
|
1169
|
-
}
|
|
1170
|
-
export interface BulkLabelAndUnlabelContactsRequest {
|
|
1171
|
-
/**
|
|
1172
|
-
* Filter options.
|
|
1173
|
-
* Labels will be removed from contacts that meet the `filter` and `search` criteria.
|
|
1174
|
-
*
|
|
1175
|
-
* See
|
|
1176
|
-
* [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter#contacts_contacts_sort-and-filter_field-support-for-filtering-sorting-and-searching)
|
|
1177
|
-
* for a list of supported filters and fields.
|
|
1178
|
-
*/
|
|
1179
|
-
filter?: Record<string, any> | null;
|
|
1180
|
-
/**
|
|
1181
|
-
* Plain text search for an exact match, up to 100 characters.
|
|
1182
|
-
* Labels will be removed from contacts that meet the `filter` and `search` criteria.
|
|
1183
|
-
*
|
|
1184
|
-
* See
|
|
1185
|
-
* [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter#contacts_contacts_sort-and-filter_field-support-for-filtering-sorting-and-searching)
|
|
1186
|
-
* for a list of searchable fields.
|
|
1187
|
-
*/
|
|
1188
|
-
search?: string | null;
|
|
1189
|
-
/**
|
|
1190
|
-
* List of label keys to add to the contacts.
|
|
1191
|
-
*
|
|
1192
|
-
* Label keys must exist to be added to the contact.
|
|
1193
|
-
* Contact labels can be created or retrieved with
|
|
1194
|
-
* [`findOrCreateLabel()`](wix-crm-v2/labels/findorcreatelabel)
|
|
1195
|
-
* or
|
|
1196
|
-
* [`queryLabels()`](wix-crm-v2/labels/queryLabels).
|
|
1197
|
-
*/
|
|
1198
|
-
labelKeysToAdd?: string[];
|
|
1199
|
-
/** List of label keys to remove from the contacts. */
|
|
1200
|
-
labelKeysToRemove?: string[];
|
|
1201
|
-
}
|
|
1202
|
-
export interface BulkLabelAndUnlabelContactsResponse {
|
|
1203
|
-
/**
|
|
1204
|
-
* Bulk job ID.
|
|
1205
|
-
* The job's status can be retrieved with
|
|
1206
|
-
* [Get Bulk Job](https://dev.wix.com/api/rest/contacts/contacts/bulk-jobs/get-bulk-job) or
|
|
1207
|
-
* [List Bulk Jobs](https://dev.wix.com/api/rest/contacts/contacts/bulk-jobs/list-bulk-jobs).
|
|
1208
|
-
*/
|
|
1209
|
-
jobId?: string;
|
|
1210
|
-
}
|
|
1211
|
-
export interface BulkUpsertContactsRequest {
|
|
1212
|
-
info?: ContactInfo[];
|
|
1213
|
-
returnFullEntity?: boolean;
|
|
1214
|
-
}
|
|
1215
|
-
export interface BulkUpsertContactsResponse {
|
|
1216
|
-
results?: Item[];
|
|
1217
|
-
metadata?: BulkUpsertContactsResponseMetadata;
|
|
1218
|
-
}
|
|
1219
|
-
export declare enum Action {
|
|
1220
|
-
UNKNOWN = "UNKNOWN",
|
|
1221
|
-
UPDATED = "UPDATED",
|
|
1222
|
-
CREATED = "CREATED"
|
|
1223
|
-
}
|
|
1224
|
-
export interface Error {
|
|
1225
|
-
/** Error code. */
|
|
1226
|
-
code?: string;
|
|
1227
|
-
/** Error details. */
|
|
1228
|
-
message?: string | null;
|
|
1229
|
-
}
|
|
1230
|
-
export interface Metadata {
|
|
1231
|
-
_id?: string | null;
|
|
1232
|
-
originalIndex?: number;
|
|
1233
|
-
action?: Action;
|
|
1234
|
-
success?: boolean;
|
|
1235
|
-
error?: Error;
|
|
1236
|
-
}
|
|
1237
|
-
export interface Item {
|
|
1238
|
-
contact?: Contact;
|
|
1239
|
-
metadata?: Metadata;
|
|
1240
|
-
}
|
|
1241
|
-
export interface BulkUpsertContactsResponseMetadata {
|
|
1242
|
-
totalSuccess?: number;
|
|
1243
|
-
totalFailure?: number;
|
|
1244
|
-
totalCreated?: number;
|
|
1245
|
-
totalUpdated?: number;
|
|
1246
|
-
}
|
|
1247
|
-
export interface UpsertContactRequest {
|
|
1248
|
-
info?: ContactInfo;
|
|
1249
|
-
}
|
|
1250
|
-
export interface UpsertContactResponse {
|
|
1251
|
-
/** Upserted contact. */
|
|
1252
|
-
contact?: Contact;
|
|
1253
|
-
action?: UpsertContactResponseAction;
|
|
1254
|
-
}
|
|
1255
|
-
export declare enum UpsertContactResponseAction {
|
|
1256
|
-
UNKNOWN = "UNKNOWN",
|
|
1257
|
-
UPDATED = "UPDATED",
|
|
1258
|
-
CREATED = "CREATED"
|
|
1259
|
-
}
|
|
1260
|
-
export interface GeneratePictureUploadUrlRequest {
|
|
1261
|
-
/** ID of the contact whose picture is being updated. */
|
|
1262
|
-
contactId?: string;
|
|
1263
|
-
/**
|
|
1264
|
-
* Mime Type. Must be one of:
|
|
1265
|
-
* `image/png`, `image/jpeg`.
|
|
1266
|
-
* Defaults to `image/png`.
|
|
1267
|
-
*/
|
|
1268
|
-
mimeType?: string | null;
|
|
1269
|
-
}
|
|
1270
|
-
export interface GeneratePictureUploadUrlResponse {
|
|
1271
|
-
/** URL to upload the image */
|
|
1272
|
-
uploadUrl?: string;
|
|
1273
|
-
}
|
|
1274
|
-
export interface GetContactRequest {
|
|
1275
|
-
/** ID of the contact to retrieve. */
|
|
1276
|
-
_id: string;
|
|
1277
|
-
/**
|
|
1278
|
-
* List of projected fields to return.
|
|
1279
|
-
* If both `fields` and `fieldsets` are sent in the request,
|
|
1280
|
-
* the union of both lists is returned.
|
|
1281
|
-
* `id` and `revision` are always returned.
|
|
1282
|
-
*
|
|
1283
|
-
* Supported properties:
|
|
1284
|
-
* `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
|
|
1285
|
-
* `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
|
|
1286
|
-
* `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
|
|
1287
|
-
* `info.labelKeys`, `info.locations`, `info.extendedFields`
|
|
1288
|
-
*/
|
|
1289
|
-
fields?: string[];
|
|
1290
|
-
/**
|
|
1291
|
-
* Predefined sets of fields to return.
|
|
1292
|
-
* If both `fields` and `fieldsets` are sent in the request,
|
|
1293
|
-
* the union of both lists is returned.
|
|
1294
|
-
*
|
|
1295
|
-
* - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
|
|
1296
|
-
* - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
|
|
1297
|
-
* - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
|
|
1298
|
-
* - `FULL`: Returns all fields.
|
|
1299
|
-
*
|
|
1300
|
-
* Default: If `fields` is omitted from the request, `FULL`.
|
|
1301
|
-
*/
|
|
1302
|
-
fieldsets?: ContactFieldSet[];
|
|
1303
|
-
}
|
|
1304
|
-
/** The requested contact. */
|
|
1305
|
-
export interface GetContactResponse {
|
|
1306
|
-
/** The requested contact. */
|
|
1307
|
-
contact?: Contact;
|
|
1308
|
-
/**
|
|
1309
|
-
* Contact response type.
|
|
1310
|
-
*
|
|
1311
|
-
* - `REGULAR`: The specified contact was returned.
|
|
1312
|
-
* - `IMPLICIT`: Not used.
|
|
1313
|
-
* - `MERGED`: The specified contact was previously merged with another contact, and the new contact was
|
|
1314
|
-
*/
|
|
1315
|
-
responseType?: GetContactResponseType;
|
|
1316
|
-
}
|
|
1317
|
-
export declare enum GetContactResponseType {
|
|
1318
|
-
/** Normal contact */
|
|
1319
|
-
REGULAR = "REGULAR",
|
|
1320
|
-
/** Contact that id was already allocated for it, but the contact not yet created. */
|
|
1321
|
-
IMPLICIT = "IMPLICIT",
|
|
1322
|
-
/** Contact was merged into another contact */
|
|
1323
|
-
MERGED = "MERGED"
|
|
1324
|
-
}
|
|
1325
|
-
export interface SyncSubmitContactRequest {
|
|
1326
|
-
contactInfo?: ContactInfo;
|
|
1327
|
-
activity?: ContactActivity;
|
|
1328
|
-
passThroughData?: string | null;
|
|
1329
|
-
contactId?: string;
|
|
1330
|
-
submitOperation?: SubmitOperation;
|
|
1331
|
-
/** Need to resolve source in allocator, because of server sign */
|
|
1332
|
-
sourceType?: ContactSourceType;
|
|
1333
|
-
sourceId?: string | null;
|
|
1334
|
-
hideFromContactList?: boolean;
|
|
1335
|
-
}
|
|
1336
|
-
export declare enum SubmitOperation {
|
|
1337
|
-
UNKNOWN = "UNKNOWN",
|
|
1338
|
-
CREATE = "CREATE",
|
|
1339
|
-
UPDATE = "UPDATE"
|
|
1340
|
-
}
|
|
1341
|
-
export interface SyncSubmitContactResponse {
|
|
1342
|
-
}
|
|
1343
|
-
export interface CountContactsRequest {
|
|
1344
|
-
}
|
|
1345
|
-
export interface CountContactsResponse {
|
|
1346
|
-
count?: number;
|
|
1347
|
-
}
|
|
1348
|
-
export interface SearchContactsRequest {
|
|
1349
|
-
/** Search object. Encapsulates filter, sorting, paging and other details */
|
|
1350
|
-
search?: Search;
|
|
1351
|
-
}
|
|
1352
|
-
export interface Search extends SearchPagingMethodOneOf {
|
|
1353
|
-
/** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */
|
|
1354
|
-
cursorPaging?: CursorPaging;
|
|
1355
|
-
/** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
|
|
1356
|
-
filter?: Record<string, any> | null;
|
|
1357
|
-
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
|
|
1358
|
-
sort?: Sorting[];
|
|
1359
|
-
/**
|
|
1360
|
-
* List of projected fields to return.
|
|
1361
|
-
*
|
|
1362
|
-
* If used in the request,
|
|
1363
|
-
* all the fields contained in `fields` and `fieldsets` are returned.
|
|
1364
|
-
* If left blank, `fieldsets` is used to determine which fields to return.
|
|
1365
|
-
*
|
|
1366
|
-
* For a list of valid projected fields, see
|
|
1367
|
-
* [Valid Contact Projection Fields](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_valid-contact-projection-fields).
|
|
1368
|
-
*/
|
|
1369
|
-
fields?: string[];
|
|
1370
|
-
/**
|
|
1371
|
-
* Predefined sets of fields to return.
|
|
1372
|
-
*
|
|
1373
|
-
* Defaults to `FULL`.
|
|
1374
|
-
* Ignored if left empty when `fields` is used in the request.
|
|
1375
|
-
*
|
|
1376
|
-
* For more information,
|
|
1377
|
-
* see [Contact Fieldsets](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_contact-fieldsets).
|
|
1378
|
-
*/
|
|
1379
|
-
fieldsets?: string[];
|
|
1380
|
-
/** free text to match in searchable fields */
|
|
1381
|
-
search?: SearchDetails;
|
|
1382
|
-
}
|
|
1383
|
-
/** @oneof */
|
|
1384
|
-
export interface SearchPagingMethodOneOf {
|
|
1385
|
-
/** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */
|
|
1386
|
-
cursorPaging?: CursorPaging;
|
|
1387
|
-
}
|
|
1388
|
-
export interface SearchDetails {
|
|
1389
|
-
/** boolean search mode. Default is `OR` */
|
|
1390
|
-
mode?: Mode;
|
|
1391
|
-
/** search term or expression */
|
|
1392
|
-
expression?: string | null;
|
|
1393
|
-
/**
|
|
1394
|
-
* fields to search in. if empty - server will search in own default fieldsDefault searchable fields:
|
|
1395
|
-
*
|
|
1396
|
-
* - `info.name.first`
|
|
1397
|
-
* - `info.name.last`
|
|
1398
|
-
* - `info.emails.email`
|
|
1399
|
-
* - `info.phones.phone`
|
|
1400
|
-
*/
|
|
1401
|
-
fields?: string[];
|
|
1402
|
-
/** flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
|
|
1403
|
-
fuzzy?: boolean;
|
|
1404
|
-
}
|
|
1405
|
-
export declare enum Mode {
|
|
1406
|
-
/** any */
|
|
1407
|
-
OR = "OR",
|
|
1408
|
-
/** all */
|
|
1409
|
-
AND = "AND"
|
|
1410
|
-
}
|
|
1411
|
-
export interface CursorPaging {
|
|
1412
|
-
/** The number of contacts to load (default = 50, max = 1000) */
|
|
1413
|
-
limit?: number | null;
|
|
1414
|
-
/** Cursor returned in last query response. Should not be provided on first page request */
|
|
1415
|
-
cursor?: string | null;
|
|
1416
|
-
}
|
|
1417
|
-
export interface SearchContactsResponse {
|
|
1418
|
-
/** List of contacts. */
|
|
1419
|
-
contacts?: Contact[];
|
|
1420
|
-
/** Details on the paged set of results returned. */
|
|
1421
|
-
pagingMetadata?: PagingMetadataV2;
|
|
1422
|
-
}
|
|
1423
|
-
export interface PagingMetadataV2 {
|
|
1424
|
-
/** The number of items returned in this response */
|
|
1425
|
-
count?: number | null;
|
|
1426
|
-
/** The offset which was requested. Returned if offset paging was used */
|
|
1427
|
-
offset?: number | null;
|
|
1428
|
-
/** The total number of items that match the query. Returned if offset paging was used and 'too_many_to_count' flag is not set */
|
|
1429
|
-
total?: number | null;
|
|
1430
|
-
/** A flag that indicates the server failed to calculate 'total' field */
|
|
1431
|
-
tooManyToCount?: boolean | null;
|
|
1432
|
-
/** Cursors to navigate through result pages. Returned if cursor paging was used */
|
|
1433
|
-
cursors?: Cursors;
|
|
1434
|
-
}
|
|
1435
|
-
export interface Cursors {
|
|
1436
|
-
/** Cursor pointing to next result page */
|
|
1437
|
-
next?: string | null;
|
|
1438
|
-
/** Cursor pointing to previous result page */
|
|
1439
|
-
prev?: string | null;
|
|
1440
|
-
}
|
|
1441
|
-
export interface BulkAddSegmentToContactsRequest {
|
|
1442
|
-
/** Segment id */
|
|
1443
|
-
segmentId?: string;
|
|
1444
|
-
/** List of Contact ids */
|
|
1445
|
-
contactIds?: string[];
|
|
1446
|
-
/** List of existing segment ids */
|
|
1447
|
-
existsSegmentIds?: string[];
|
|
1448
|
-
}
|
|
1449
|
-
export interface BulkAddSegmentToContactsResponse {
|
|
1450
|
-
/** List of action results */
|
|
1451
|
-
results?: ItemMetadata[];
|
|
1452
|
-
/** Metadata on the bulk action */
|
|
1453
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1454
|
-
}
|
|
1455
|
-
export interface ItemMetadata {
|
|
1456
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
1457
|
-
_id?: string | null;
|
|
1458
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1459
|
-
originalIndex?: number;
|
|
1460
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1461
|
-
success?: boolean;
|
|
1462
|
-
/** Details about the error in case of failure. */
|
|
1463
|
-
error?: ApplicationError;
|
|
1464
|
-
}
|
|
1465
|
-
export interface ApplicationError {
|
|
1466
|
-
/** Error code. */
|
|
1467
|
-
code?: string;
|
|
1468
|
-
/** Description of the error. */
|
|
1469
|
-
description?: string;
|
|
1470
|
-
/** Data related to the error. */
|
|
1471
|
-
data?: Record<string, any> | null;
|
|
1472
|
-
}
|
|
1473
|
-
export interface BulkActionMetadata {
|
|
1474
|
-
/** Number of items that were successfully processed. */
|
|
1475
|
-
totalSuccesses?: number;
|
|
1476
|
-
/** Number of items that couldn't be processed. */
|
|
1477
|
-
totalFailures?: number;
|
|
1478
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1479
|
-
undetailedFailures?: number;
|
|
1480
|
-
}
|
|
1481
|
-
export interface ContactAddedToSegment {
|
|
1482
|
-
/** Id of the segment to which the contact was added */
|
|
1483
|
-
segmentId?: string;
|
|
1484
|
-
/** The contact that was added */
|
|
1485
|
-
contact?: Contact;
|
|
1486
|
-
}
|
|
1487
|
-
export interface BulkRemoveSegmentFromContactsRequest {
|
|
1488
|
-
/** Segment id */
|
|
1489
|
-
segmentId?: string;
|
|
1490
|
-
/** List of Contact ids */
|
|
1491
|
-
contactIds?: string[];
|
|
1492
|
-
}
|
|
1493
|
-
export interface BulkRemoveSegmentFromContactsResponse {
|
|
1494
|
-
/** List of action results */
|
|
1495
|
-
results?: ItemMetadata[];
|
|
1496
|
-
/** Metadata on the bulk action */
|
|
1497
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1498
|
-
}
|
|
1499
|
-
export interface ContactRemovedFromSegment {
|
|
1500
|
-
/** Id of the segment from which the contact was removed */
|
|
1501
|
-
segmentId?: string;
|
|
1502
|
-
/** The contact that was removed */
|
|
1503
|
-
contact?: Contact;
|
|
1504
|
-
}
|
|
1505
|
-
export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
|
|
1506
|
-
createdEvent?: EntityCreatedEvent<T>;
|
|
1507
|
-
updatedEvent?: EntityUpdatedEvent<T>;
|
|
1508
|
-
deletedEvent?: EntityDeletedEvent<T>;
|
|
1509
|
-
actionEvent?: ActionEvent<T>;
|
|
1510
|
-
/**
|
|
1511
|
-
* Unique event ID.
|
|
1512
|
-
* Allows clients to ignore duplicate webhooks.
|
|
1513
|
-
*/
|
|
1514
|
-
_id?: string;
|
|
1515
|
-
/**
|
|
1516
|
-
* Assumes actions are also always typed to an entity_type
|
|
1517
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1518
|
-
*/
|
|
1519
|
-
entityFqdn?: string;
|
|
1520
|
-
/**
|
|
1521
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1522
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1523
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
1524
|
-
*/
|
|
1525
|
-
slug?: string;
|
|
1526
|
-
/** ID of the entity associated with the event. */
|
|
1527
|
-
entityId?: string;
|
|
1528
|
-
/** Event timestamp. */
|
|
1529
|
-
eventTime?: Date;
|
|
1530
|
-
/**
|
|
1531
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
1532
|
-
* (for example, GDPR).
|
|
1533
|
-
*/
|
|
1534
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
1535
|
-
/** If present, indicates the action that triggered the event. */
|
|
1536
|
-
originatedFrom?: string | null;
|
|
1537
|
-
/**
|
|
1538
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
1539
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1540
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1541
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1542
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1543
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1544
|
-
*/
|
|
1545
|
-
entityEventSequence?: string | null;
|
|
1546
|
-
}
|
|
1547
|
-
export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
1548
|
-
}
|
|
1549
|
-
export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
1550
|
-
}
|
|
1551
|
-
export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
|
|
1552
|
-
}
|
|
1553
|
-
export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
|
|
1554
|
-
}
|
|
1555
|
-
/** @oneof */
|
|
1556
|
-
export interface DomainEventBodyOneOf<T> {
|
|
1557
|
-
createdEvent?: EntityCreatedEvent<T>;
|
|
1558
|
-
updatedEvent?: EntityUpdatedEvent<T>;
|
|
1559
|
-
deletedEvent?: EntityDeletedEvent<T>;
|
|
1560
|
-
actionEvent?: ActionEvent<T>;
|
|
1561
|
-
}
|
|
1562
|
-
export interface EntityCreatedEvent<T> {
|
|
1563
|
-
entity?: T;
|
|
1564
|
-
}
|
|
1565
|
-
export interface EntityUpdatedEvent<T> {
|
|
1566
|
-
/**
|
|
1567
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1568
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1569
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1570
|
-
*/
|
|
1571
|
-
currentEntity?: T;
|
|
1572
|
-
}
|
|
1573
|
-
export interface EntityDeletedEvent<T> {
|
|
1574
|
-
/** Entity that was deleted */
|
|
1575
|
-
deletedEntity?: T | null;
|
|
1576
|
-
}
|
|
1577
|
-
export interface ActionEvent<T> {
|
|
1578
|
-
body?: T;
|
|
1579
|
-
}
|
|
1580
|
-
export interface CreateContactResponseNonNullableFields {
|
|
1581
|
-
contact?: {
|
|
1582
|
-
_id: string;
|
|
1583
|
-
revision: number;
|
|
1584
|
-
source?: {
|
|
1585
|
-
sourceType: ContactSourceType;
|
|
1586
|
-
};
|
|
1587
|
-
lastActivity?: {
|
|
1588
|
-
activityType: ContactActivityType;
|
|
1589
|
-
};
|
|
1590
|
-
info?: {
|
|
1591
|
-
emails?: {
|
|
1592
|
-
items: {
|
|
1593
|
-
tag: EmailTag;
|
|
1594
|
-
email: string;
|
|
1595
|
-
}[];
|
|
1596
|
-
};
|
|
1597
|
-
phones?: {
|
|
1598
|
-
items: {
|
|
1599
|
-
tag: PhoneTag;
|
|
1600
|
-
phone: string;
|
|
1601
|
-
}[];
|
|
1602
|
-
};
|
|
1603
|
-
addresses?: {
|
|
1604
|
-
items: {
|
|
1605
|
-
tag: AddressTag;
|
|
1606
|
-
}[];
|
|
1607
|
-
};
|
|
1608
|
-
labelKeys?: {
|
|
1609
|
-
items: string[];
|
|
1610
|
-
};
|
|
1611
|
-
picture?: {
|
|
1612
|
-
image: string;
|
|
1613
|
-
};
|
|
1614
|
-
};
|
|
1615
|
-
};
|
|
1616
|
-
}
|
|
1617
|
-
export interface UpdateContactResponseNonNullableFields {
|
|
1618
|
-
contact?: {
|
|
1619
|
-
_id: string;
|
|
1620
|
-
revision: number;
|
|
1621
|
-
source?: {
|
|
1622
|
-
sourceType: ContactSourceType;
|
|
1623
|
-
};
|
|
1624
|
-
lastActivity?: {
|
|
1625
|
-
activityType: ContactActivityType;
|
|
1626
|
-
};
|
|
1627
|
-
info?: {
|
|
1628
|
-
emails?: {
|
|
1629
|
-
items: {
|
|
1630
|
-
tag: EmailTag;
|
|
1631
|
-
email: string;
|
|
1632
|
-
}[];
|
|
1633
|
-
};
|
|
1634
|
-
phones?: {
|
|
1635
|
-
items: {
|
|
1636
|
-
tag: PhoneTag;
|
|
1637
|
-
phone: string;
|
|
1638
|
-
}[];
|
|
1639
|
-
};
|
|
1640
|
-
addresses?: {
|
|
1641
|
-
items: {
|
|
1642
|
-
tag: AddressTag;
|
|
1643
|
-
}[];
|
|
1644
|
-
};
|
|
1645
|
-
labelKeys?: {
|
|
1646
|
-
items: string[];
|
|
1647
|
-
};
|
|
1648
|
-
picture?: {
|
|
1649
|
-
image: string;
|
|
1650
|
-
};
|
|
1651
|
-
};
|
|
1652
|
-
};
|
|
1653
|
-
}
|
|
1654
|
-
export interface MergeContactsResponseNonNullableFields {
|
|
1655
|
-
contact?: {
|
|
1656
|
-
_id: string;
|
|
1657
|
-
revision: number;
|
|
1658
|
-
source?: {
|
|
1659
|
-
sourceType: ContactSourceType;
|
|
1660
|
-
};
|
|
1661
|
-
lastActivity?: {
|
|
1662
|
-
activityType: ContactActivityType;
|
|
1663
|
-
};
|
|
1664
|
-
info?: {
|
|
1665
|
-
emails?: {
|
|
1666
|
-
items: {
|
|
1667
|
-
tag: EmailTag;
|
|
1668
|
-
email: string;
|
|
1669
|
-
}[];
|
|
1670
|
-
};
|
|
1671
|
-
phones?: {
|
|
1672
|
-
items: {
|
|
1673
|
-
tag: PhoneTag;
|
|
1674
|
-
phone: string;
|
|
1675
|
-
}[];
|
|
1676
|
-
};
|
|
1677
|
-
addresses?: {
|
|
1678
|
-
items: {
|
|
1679
|
-
tag: AddressTag;
|
|
1680
|
-
}[];
|
|
1681
|
-
};
|
|
1682
|
-
labelKeys?: {
|
|
1683
|
-
items: string[];
|
|
1684
|
-
};
|
|
1685
|
-
picture?: {
|
|
1686
|
-
image: string;
|
|
1687
|
-
};
|
|
1688
|
-
};
|
|
1689
|
-
};
|
|
1690
|
-
}
|
|
1691
|
-
export interface LabelContactResponseNonNullableFields {
|
|
1692
|
-
contact?: {
|
|
1693
|
-
_id: string;
|
|
1694
|
-
revision: number;
|
|
1695
|
-
source?: {
|
|
1696
|
-
sourceType: ContactSourceType;
|
|
1697
|
-
};
|
|
1698
|
-
lastActivity?: {
|
|
1699
|
-
activityType: ContactActivityType;
|
|
1700
|
-
};
|
|
1701
|
-
info?: {
|
|
1702
|
-
emails?: {
|
|
1703
|
-
items: {
|
|
1704
|
-
tag: EmailTag;
|
|
1705
|
-
email: string;
|
|
1706
|
-
}[];
|
|
1707
|
-
};
|
|
1708
|
-
phones?: {
|
|
1709
|
-
items: {
|
|
1710
|
-
tag: PhoneTag;
|
|
1711
|
-
phone: string;
|
|
1712
|
-
}[];
|
|
1713
|
-
};
|
|
1714
|
-
addresses?: {
|
|
1715
|
-
items: {
|
|
1716
|
-
tag: AddressTag;
|
|
1717
|
-
}[];
|
|
1718
|
-
};
|
|
1719
|
-
labelKeys?: {
|
|
1720
|
-
items: string[];
|
|
1721
|
-
};
|
|
1722
|
-
picture?: {
|
|
1723
|
-
image: string;
|
|
1724
|
-
};
|
|
1725
|
-
};
|
|
1726
|
-
};
|
|
1727
|
-
}
|
|
1728
|
-
export interface UnlabelContactResponseNonNullableFields {
|
|
1729
|
-
contact?: {
|
|
1730
|
-
_id: string;
|
|
1731
|
-
revision: number;
|
|
1732
|
-
source?: {
|
|
1733
|
-
sourceType: ContactSourceType;
|
|
1734
|
-
};
|
|
1735
|
-
lastActivity?: {
|
|
1736
|
-
activityType: ContactActivityType;
|
|
1737
|
-
};
|
|
1738
|
-
info?: {
|
|
1739
|
-
emails?: {
|
|
1740
|
-
items: {
|
|
1741
|
-
tag: EmailTag;
|
|
1742
|
-
email: string;
|
|
1743
|
-
}[];
|
|
1744
|
-
};
|
|
1745
|
-
phones?: {
|
|
1746
|
-
items: {
|
|
1747
|
-
tag: PhoneTag;
|
|
1748
|
-
phone: string;
|
|
1749
|
-
}[];
|
|
1750
|
-
};
|
|
1751
|
-
addresses?: {
|
|
1752
|
-
items: {
|
|
1753
|
-
tag: AddressTag;
|
|
1754
|
-
}[];
|
|
1755
|
-
};
|
|
1756
|
-
labelKeys?: {
|
|
1757
|
-
items: string[];
|
|
1758
|
-
};
|
|
1759
|
-
picture?: {
|
|
1760
|
-
image: string;
|
|
1761
|
-
};
|
|
1762
|
-
};
|
|
1763
|
-
};
|
|
1764
|
-
}
|
|
1765
|
-
export interface GetContactResponseNonNullableFields {
|
|
1766
|
-
contact?: {
|
|
1767
|
-
_id: string;
|
|
1768
|
-
revision: number;
|
|
1769
|
-
source?: {
|
|
1770
|
-
sourceType: ContactSourceType;
|
|
1771
|
-
};
|
|
1772
|
-
lastActivity?: {
|
|
1773
|
-
activityType: ContactActivityType;
|
|
1774
|
-
};
|
|
1775
|
-
info?: {
|
|
1776
|
-
emails?: {
|
|
1777
|
-
items: {
|
|
1778
|
-
tag: EmailTag;
|
|
1779
|
-
email: string;
|
|
1780
|
-
}[];
|
|
1781
|
-
};
|
|
1782
|
-
phones?: {
|
|
1783
|
-
items: {
|
|
1784
|
-
tag: PhoneTag;
|
|
1785
|
-
phone: string;
|
|
1786
|
-
}[];
|
|
1787
|
-
};
|
|
1788
|
-
addresses?: {
|
|
1789
|
-
items: {
|
|
1790
|
-
tag: AddressTag;
|
|
1791
|
-
}[];
|
|
1792
|
-
};
|
|
1793
|
-
labelKeys?: {
|
|
1794
|
-
items: string[];
|
|
1795
|
-
};
|
|
1796
|
-
picture?: {
|
|
1797
|
-
image: string;
|
|
1798
|
-
};
|
|
1799
|
-
};
|
|
1800
|
-
};
|
|
1801
|
-
responseType: GetContactResponseType;
|
|
1802
|
-
}
|
|
1803
|
-
export declare const onContactCreated: EventDefinition<DomainCreatedEvent<Contact>, "wix.contacts.v4.contact_created">;
|
|
1804
|
-
export declare const onContactUpdated: EventDefinition<DomainUpdatedEvent<Contact>, "wix.contacts.v4.contact_updated">;
|
|
1805
|
-
export declare const onContactMerged: EventDefinition<DomainActionEvent<ContactMerged>, "wix.contacts.v4.contact_merged">;
|
|
1806
|
-
export declare const onContactDeleted: EventDefinition<DomainDeletedEvent<Contact>, "wix.contacts.v4.contact_deleted">;
|
|
1807
|
-
/**
|
|
1808
|
-
* Creates a new contact.
|
|
1809
|
-
*
|
|
1810
|
-
*
|
|
1811
|
-
* The `createContact()` function returns a Promise
|
|
1812
|
-
* that resolves to the new contact when it is created.
|
|
1813
|
-
*
|
|
1814
|
-
* The `info` parameter object must include a name, phone number, or email address.
|
|
1815
|
-
* If all 3 of these parameters are missing,
|
|
1816
|
-
* the contact won't be created.
|
|
1817
|
-
*
|
|
1818
|
-
* 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`.
|
|
1819
|
-
*
|
|
1820
|
-
* @param info - Contact info.
|
|
1821
|
-
* @public
|
|
1822
|
-
* @documentationMaturity preview
|
|
1823
|
-
* @requiredField info
|
|
1824
|
-
* @param options - Create contact options.
|
|
1825
|
-
* @permissionScope Manage Contacts
|
|
1826
|
-
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1827
|
-
* @permissionScope Manage Members and Contacts - all permissions
|
|
1828
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1829
|
-
* @applicableIdentity APP
|
|
1830
|
-
* @returns Contact.
|
|
1831
|
-
*/
|
|
1832
|
-
export declare function createContact(info: ContactInfo, options?: CreateContactOptions): Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
|
|
1833
|
-
export interface CreateContactOptions {
|
|
1834
|
-
/**
|
|
1835
|
-
* Controls whether the call will succeed
|
|
1836
|
-
* if the new contact information contains an email or a phone number already used by another contact.
|
|
1837
|
-
*
|
|
1838
|
-
* If set to `true`,
|
|
1839
|
-
* the call will succeed even if an email address or phone number is used by another contact.
|
|
1840
|
-
* If set to `false`,
|
|
1841
|
-
* the call will fail if the given email address is used by another contact or,
|
|
1842
|
-
* if the email address is not given and the given phone number is used by another contact.
|
|
1843
|
-
*
|
|
1844
|
-
* Default: `false`
|
|
1845
|
-
*/
|
|
1846
|
-
allowDuplicates?: boolean;
|
|
1847
|
-
}
|
|
1848
|
-
/**
|
|
1849
|
-
* Updates a contact's properties.
|
|
1850
|
-
*
|
|
1851
|
-
* The `updateContact()` function returns a Promise that resolves
|
|
1852
|
-
* when the specified contact's information is updated.
|
|
1853
|
-
*
|
|
1854
|
-
* 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.
|
|
1855
|
-
*
|
|
1856
|
-
* @param contactId - ID of the contact to update.
|
|
1857
|
-
* @param info - Contact info.
|
|
1858
|
-
* @param revision - Revision number.
|
|
1859
|
-
* When updating, include the existing `revision`
|
|
1860
|
-
* to prevent conflicting updates.
|
|
1861
|
-
* @public
|
|
1862
|
-
* @documentationMaturity preview
|
|
1863
|
-
* @requiredField contactId
|
|
1864
|
-
* @requiredField info
|
|
1865
|
-
* @requiredField revision
|
|
1866
|
-
* @param options - Contact update options.
|
|
1867
|
-
* @permissionScope Manage Contacts
|
|
1868
|
-
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1869
|
-
* @permissionScope Manage Members and Contacts - all permissions
|
|
1870
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1871
|
-
* @applicableIdentity APP
|
|
1872
|
-
* @returns Updated contact.
|
|
1873
|
-
*/
|
|
1874
|
-
export declare function updateContact(contactId: string, info: ContactInfo, revision: number | null, options?: UpdateContactOptions): Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
1875
|
-
export interface UpdateContactOptions {
|
|
1876
|
-
/**
|
|
1877
|
-
* Controls whether the call will succeed if the new contact information contains an email already used by another contact.
|
|
1878
|
-
*
|
|
1879
|
-
* If set to `true`, the call will succeed even if an email address is used by another contact. If set to `false`, the call will fail if an email address is used by another contact.
|
|
1880
|
-
*
|
|
1881
|
-
* Defaults to `false`.
|
|
1882
|
-
*/
|
|
1883
|
-
allowDuplicates?: boolean;
|
|
1884
|
-
}
|
|
1885
|
-
/**
|
|
1886
|
-
* Merges source contacts into a target contact.
|
|
1887
|
-
*
|
|
1888
|
-
* Merging contacts has these effects on the target contact:
|
|
1889
|
-
*
|
|
1890
|
-
* - No target contact data is overwritten or deleted.
|
|
1891
|
-
* - Arrays (emails, phones, addresses, and labels) are merged from the source contacts into the target contact.
|
|
1892
|
-
* - If merging more than one source contact, the 1st source is given precedence, then the 2nd, and so on.
|
|
1893
|
-
*
|
|
1894
|
-
* Source contacts are deleted when merging.
|
|
1895
|
-
* However, if a source contact is a site member or collaborator,
|
|
1896
|
-
* the `mergeContacts()` function fails because site collaborators and members can't be deleted.
|
|
1897
|
-
* Site members and collaborators can only be target contacts.
|
|
1898
|
-
*
|
|
1899
|
-
* 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.
|
|
1900
|
-
*
|
|
1901
|
-
* @param targetContactId - Target contact ID.
|
|
1902
|
-
* @param targetContactRevision - Target contact revision number, which increments by 1 each time the contact is updated.
|
|
1903
|
-
* To prevent conflicting changes,
|
|
1904
|
-
* the target contact's current revision must be passed.
|
|
1905
|
-
* @public
|
|
1906
|
-
* @documentationMaturity preview
|
|
1907
|
-
* @requiredField targetContactId
|
|
1908
|
-
* @requiredField targetContactRevision
|
|
1909
|
-
* @param options - Merge contacts options.
|
|
1910
|
-
* @permissionScope Manage Contacts
|
|
1911
|
-
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1912
|
-
* @permissionScope Manage Members and Contacts - all permissions
|
|
1913
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1914
|
-
* @applicableIdentity APP
|
|
1915
|
-
*/
|
|
1916
|
-
export declare function mergeContacts(targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions): Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
1917
|
-
export interface MergeContactsOptions {
|
|
1918
|
-
/**
|
|
1919
|
-
* IDs of up to 5 contacts to merge into the target contact.
|
|
1920
|
-
* If merging more than one source contact,
|
|
1921
|
-
* the first source is given precedence, then the second, and so on.
|
|
1922
|
-
*/
|
|
1923
|
-
sourceContactIds?: string[];
|
|
1924
|
-
}
|
|
1925
|
-
/**
|
|
1926
|
-
* Deletes a contact who is not a site member or contributor.
|
|
1927
|
-
*
|
|
1928
|
-
* The `deleteContact()` function returns a Promise
|
|
1929
|
-
* that resolves when the specified contact is deleted.
|
|
1930
|
-
*
|
|
1931
|
-
* Deleting a contact permanently removes them from your Contact List.
|
|
1932
|
-
*
|
|
1933
|
-
* If the contact is also a site member,
|
|
1934
|
-
* the member must be deleted first,
|
|
1935
|
-
* and then the contact can be deleted.
|
|
1936
|
-
*
|
|
1937
|
-
* @param contactId - ID of the contact to delete.
|
|
1938
|
-
* @public
|
|
1939
|
-
* @documentationMaturity preview
|
|
1940
|
-
* @requiredField contactId
|
|
1941
|
-
* @permissionScope Manage Contacts
|
|
1942
|
-
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1943
|
-
* @permissionScope Manage Members and Contacts - all permissions
|
|
1944
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1945
|
-
* @applicableIdentity APP
|
|
1946
|
-
*/
|
|
1947
|
-
export declare function deleteContact(contactId: string): Promise<void>;
|
|
1948
|
-
/**
|
|
1949
|
-
* Adds labels to a contact.
|
|
1950
|
-
*
|
|
1951
|
-
*
|
|
1952
|
-
* The `labelContact()` function returns a Promise
|
|
1953
|
-
* that resolves when the specified labels are added to the contact.
|
|
1954
|
-
* - **To create new labels:** Use `findOrCreateLabel()`.
|
|
1955
|
-
* - **To find labels:** Use `findOrCreateLabel()`, `getLabel()`, or `queryLabels()`.
|
|
1956
|
-
*
|
|
1957
|
-
* @param contactId - ID of the contact to add labels to.
|
|
1958
|
-
* @param labelKeys - List of label keys to add to the contact.
|
|
1959
|
-
*
|
|
1960
|
-
* Label keys must exist to be added to the contact.
|
|
1961
|
-
* Contact labels can be created with the
|
|
1962
|
-
* `findOrCreateLabel()` function. You can use the
|
|
1963
|
-
* `queryLabels()` function to view the currently existing labels.
|
|
1964
|
-
* @public
|
|
1965
|
-
* @documentationMaturity preview
|
|
1966
|
-
* @requiredField contactId
|
|
1967
|
-
* @requiredField labelKeys
|
|
1968
|
-
* @permissionScope Manage Contacts
|
|
1969
|
-
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1970
|
-
* @permissionScope Manage Members and Contacts - all permissions
|
|
1971
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1972
|
-
* @applicableIdentity APP
|
|
1973
|
-
* @returns Updated contact.
|
|
1974
|
-
*/
|
|
1975
|
-
export declare function labelContact(contactId: string, labelKeys: string[]): Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
|
|
1976
|
-
/**
|
|
1977
|
-
* Removes labels from a contact.
|
|
1978
|
-
*
|
|
1979
|
-
* The `unlabelContact()` function returns a Promise
|
|
1980
|
-
* that resolves when the specified labels are removed from the contact.
|
|
1981
|
-
*
|
|
1982
|
-
* 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.
|
|
1983
|
-
*
|
|
1984
|
-
* @param contactId - ID of the contact to remove labels from.
|
|
1985
|
-
* @param labelKeys - List of label keys to remove from the contact.
|
|
1986
|
-
* @public
|
|
1987
|
-
* @documentationMaturity preview
|
|
1988
|
-
* @requiredField contactId
|
|
1989
|
-
* @requiredField labelKeys
|
|
1990
|
-
* @permissionScope Manage Contacts
|
|
1991
|
-
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
1992
|
-
* @permissionScope Manage Members and Contacts - all permissions
|
|
1993
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
1994
|
-
* @applicableIdentity APP
|
|
1995
|
-
* @returns Updated contact.
|
|
1996
|
-
*/
|
|
1997
|
-
export declare function unlabelContact(contactId: string, labelKeys: string[]): Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
|
|
1998
|
-
/**
|
|
1999
|
-
* Retrieves a contact.
|
|
2000
|
-
*
|
|
2001
|
-
*
|
|
2002
|
-
* The `getContact()` function returns a Promise
|
|
2003
|
-
* that resolves when the contact is found.
|
|
2004
|
-
*
|
|
2005
|
-
* #### Getting Merged Contacts
|
|
2006
|
-
* When a source contact is merged into a target contact, the source contact is deleted. When calling `getContact()` for a merged contact,
|
|
2007
|
-
* you can use the source or target contact ID. In both cases, the target contact is returned.
|
|
2008
|
-
*
|
|
2009
|
-
* This is supported only when calling `getContact()`on merged contacts. Previously deleted source contact IDs can't be passed to any other function.
|
|
2010
|
-
*
|
|
2011
|
-
* @param _id - ID of the contact to retrieve.
|
|
2012
|
-
* @public
|
|
2013
|
-
* @documentationMaturity preview
|
|
2014
|
-
* @requiredField _id
|
|
2015
|
-
* @param options - Get contact options.
|
|
2016
|
-
* @permissionScope Read Contacts
|
|
2017
|
-
* @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
|
|
2018
|
-
* @permissionScope Read Members and Contacts - all read permissions
|
|
2019
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
|
|
2020
|
-
* @permissionScope Manage Contacts
|
|
2021
|
-
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
2022
|
-
* @permissionScope Manage Members and Contacts - all permissions
|
|
2023
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
2024
|
-
* @applicableIdentity APP
|
|
2025
|
-
* @returns The requested contact.
|
|
2026
|
-
*/
|
|
2027
|
-
export declare function getContact(_id: string, options?: GetContactOptions): Promise<Contact & NonNullable<GetContactResponseNonNullableFields>['contact']>;
|
|
2028
|
-
export interface GetContactOptions {
|
|
2029
|
-
/**
|
|
2030
|
-
* List of projected fields to return.
|
|
2031
|
-
* If both `fields` and `fieldsets` are sent in the request,
|
|
2032
|
-
* the union of both lists is returned.
|
|
2033
|
-
* `id` and `revision` are always returned.
|
|
2034
|
-
*
|
|
2035
|
-
* Supported properties:
|
|
2036
|
-
* `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
|
|
2037
|
-
* `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
|
|
2038
|
-
* `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
|
|
2039
|
-
* `info.labelKeys`, `info.locations`, `info.extendedFields`
|
|
2040
|
-
*/
|
|
2041
|
-
fields?: string[];
|
|
2042
|
-
/**
|
|
2043
|
-
* Predefined sets of fields to return.
|
|
2044
|
-
* If both `fields` and `fieldsets` are sent in the request,
|
|
2045
|
-
* the union of both lists is returned.
|
|
2046
|
-
*
|
|
2047
|
-
* - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
|
|
2048
|
-
* - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
|
|
2049
|
-
* - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
|
|
2050
|
-
* - `FULL`: Returns all fields.
|
|
2051
|
-
*
|
|
2052
|
-
* Default: If `fields` is omitted from the request, `FULL`.
|
|
2053
|
-
*/
|
|
2054
|
-
fieldsets?: ContactFieldSet[];
|
|
2055
|
-
}
|