@wix/auto_sdk_crm_contacts-v-5 1.0.0
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/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.ts +4256 -0
- package/build/cjs/index.d.ts +522 -0
- package/build/cjs/index.js +3749 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +38 -0
- package/build/cjs/index.typings.js +3445 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2929 -0
- package/build/cjs/meta.js +2558 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/schemas.d.ts +5693 -0
- package/build/cjs/schemas.js +8216 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.mts +4256 -0
- package/build/es/index.d.mts +522 -0
- package/build/es/index.mjs +3666 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +38 -0
- package/build/es/index.typings.mjs +3361 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2929 -0
- package/build/es/meta.mjs +2473 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/schemas.d.mts +5693 -0
- package/build/es/schemas.mjs +8116 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.ts +4256 -0
- package/build/internal/cjs/index.d.ts +522 -0
- package/build/internal/cjs/index.js +3749 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +38 -0
- package/build/internal/cjs/index.typings.js +3445 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2929 -0
- package/build/internal/cjs/meta.js +2558 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/schemas.d.ts +5693 -0
- package/build/internal/cjs/schemas.js +8216 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.mts +4256 -0
- package/build/internal/es/index.d.mts +522 -0
- package/build/internal/es/index.mjs +3666 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +38 -0
- package/build/internal/es/index.typings.mjs +3361 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2929 -0
- package/build/internal/es/meta.mjs +2473 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/build/internal/es/schemas.d.mts +5693 -0
- package/build/internal/es/schemas.mjs +8116 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +61 -0
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,4256 @@
|
|
|
1
|
+
import * as _wix_sdk_types from '@wix/sdk-types';
|
|
2
|
+
import { QuerySpec, SearchSpec, Query, Search, NonNullablePaths } from '@wix/sdk-types';
|
|
3
|
+
|
|
4
|
+
interface Contact {
|
|
5
|
+
/**
|
|
6
|
+
* Contact ID.
|
|
7
|
+
* @format GUID
|
|
8
|
+
* @immutable
|
|
9
|
+
* @readonly
|
|
10
|
+
*/
|
|
11
|
+
_id?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Revision number, which increments by 1 each time the Contact is updated.
|
|
14
|
+
* To prevent conflicting changes,
|
|
15
|
+
* the current revision must be passed when updating the Contact.
|
|
16
|
+
*
|
|
17
|
+
* Ignored when creating a Contact.
|
|
18
|
+
* @readonly
|
|
19
|
+
*/
|
|
20
|
+
revision?: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Date and time the Contact was created.
|
|
23
|
+
* @readonly
|
|
24
|
+
* @immutable
|
|
25
|
+
*/
|
|
26
|
+
_createdDate?: Date | null;
|
|
27
|
+
/**
|
|
28
|
+
* Date and time the Contact was last updated.
|
|
29
|
+
* @readonly
|
|
30
|
+
*/
|
|
31
|
+
_updatedDate?: Date | null;
|
|
32
|
+
/**
|
|
33
|
+
* Contact External ID. Used to identify contacts from external systems.
|
|
34
|
+
* This field can only be set once and cannot be updated after creation.
|
|
35
|
+
* @maxLength 100
|
|
36
|
+
*/
|
|
37
|
+
externalId?: string | null;
|
|
38
|
+
/** Contact's name information including first and last name. */
|
|
39
|
+
name?: ContactName;
|
|
40
|
+
/**
|
|
41
|
+
* The main email of the contact with subscription status and deliverability information.
|
|
42
|
+
* This email is used for contact matching and deduplication logic.
|
|
43
|
+
*/
|
|
44
|
+
email?: ContactEmail;
|
|
45
|
+
/**
|
|
46
|
+
* Additional emails of the contact.
|
|
47
|
+
* These emails do not affect subscription status or contact matching/deduplication.
|
|
48
|
+
* The main email field must be set before additional emails can be added.
|
|
49
|
+
* @maxSize 10
|
|
50
|
+
*/
|
|
51
|
+
additionalEmails?: AdditionalEmail[];
|
|
52
|
+
/**
|
|
53
|
+
* The main phone of the contact with subscription status and deliverability information.
|
|
54
|
+
* This phone is used for contact matching and deduplication logic.
|
|
55
|
+
* At least one of name, email, or phone is required for contact creation.
|
|
56
|
+
*/
|
|
57
|
+
phone?: ContactPhone;
|
|
58
|
+
/**
|
|
59
|
+
* Additional phones of the contact.
|
|
60
|
+
* These phones do not affect subscription status or contact matching/deduplication.
|
|
61
|
+
* The main phone field must be set before additional phones can be added.
|
|
62
|
+
* @maxSize 10
|
|
63
|
+
*/
|
|
64
|
+
additionalPhones?: AdditionalPhone[];
|
|
65
|
+
/**
|
|
66
|
+
* Contact's physical addresses.
|
|
67
|
+
* Each address can be tagged (HOME, WORK, BILLING, SHIPPING, OTHER) and one can be set as default.
|
|
68
|
+
* If no address is marked as default, the first address automatically becomes the default.
|
|
69
|
+
* @maxSize 50
|
|
70
|
+
*/
|
|
71
|
+
addresses?: ContactAddress[];
|
|
72
|
+
/** Contact's company information including company name and job title. */
|
|
73
|
+
company?: ContactCompany;
|
|
74
|
+
/**
|
|
75
|
+
* Locale in
|
|
76
|
+
* [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
77
|
+
* Typically, this is a lowercase 2-letter language code,
|
|
78
|
+
* followed by a hyphen, followed by an uppercase 2-letter country code.
|
|
79
|
+
* For example, `en-US` for U.S. English, and `de-DE` for Germany German.
|
|
80
|
+
* @format LANGUAGE_TAG
|
|
81
|
+
*/
|
|
82
|
+
locale?: string | null;
|
|
83
|
+
/**
|
|
84
|
+
* Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.
|
|
85
|
+
* @format LOCAL_DATE
|
|
86
|
+
*/
|
|
87
|
+
birthdate?: string | null;
|
|
88
|
+
/**
|
|
89
|
+
* IANA time zone identifier for the contact's location.
|
|
90
|
+
* Valid values are IANA time zone IDs, such as 'Europe/Rome' or 'America/New_York'.
|
|
91
|
+
* @maxLength 50
|
|
92
|
+
*/
|
|
93
|
+
timeZone?: string | null;
|
|
94
|
+
/**
|
|
95
|
+
* Site contributor user ID assigned to manage communication with this contact.
|
|
96
|
+
* Must be a valid GUID referencing an existing site contributor.
|
|
97
|
+
* Only one assignee can be set per contact.
|
|
98
|
+
* @format GUID
|
|
99
|
+
*/
|
|
100
|
+
assigneeId?: string | null;
|
|
101
|
+
/**
|
|
102
|
+
* List of business location IDs associated with this contact.
|
|
103
|
+
* Used for multi-location businesses to organize contacts by physical business locations.
|
|
104
|
+
* Each ID must be a valid GUID referencing an existing business location.
|
|
105
|
+
* @format GUID
|
|
106
|
+
* @maxSize 50
|
|
107
|
+
*/
|
|
108
|
+
locationIds?: string[];
|
|
109
|
+
/** Contact's profile image. */
|
|
110
|
+
image?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Details about the origin of the contact.
|
|
113
|
+
* This field is immutable and set automatically when the contact is created.
|
|
114
|
+
* @immutable
|
|
115
|
+
*/
|
|
116
|
+
source?: ContactSource;
|
|
117
|
+
/**
|
|
118
|
+
* Details about the contact's most recent activity on the site.
|
|
119
|
+
* Includes activity date and template ID. This field is read-only and updated automatically.
|
|
120
|
+
* @readonly
|
|
121
|
+
*/
|
|
122
|
+
lastActivity?: ContactActivity;
|
|
123
|
+
/**
|
|
124
|
+
* List of Contact segment IDs that this contact belongs to.
|
|
125
|
+
* Segments are used for organizing and targeting groups of contacts.
|
|
126
|
+
* @maxSize 60
|
|
127
|
+
* @readonly
|
|
128
|
+
* @format GUID
|
|
129
|
+
*/
|
|
130
|
+
segmentIds?: string[];
|
|
131
|
+
/**
|
|
132
|
+
* Contact's site membership information including member ID, status, and profile details.
|
|
133
|
+
* This field is read-only and populated automatically when the contact is also a site member.
|
|
134
|
+
*
|
|
135
|
+
* Updates are eventually consistent: changes to the underlying member, identity, or profile are reflected after the corresponding events are processed.
|
|
136
|
+
* @readonly
|
|
137
|
+
*/
|
|
138
|
+
memberInfo?: MemberInfo;
|
|
139
|
+
/** Tags assigned to the contact for organization and filtering. */
|
|
140
|
+
tags?: PrivateTags;
|
|
141
|
+
/**
|
|
142
|
+
* Extended fields for storing custom contact data beyond the standard fields.
|
|
143
|
+
* Allows adding custom properties specific to business needs.
|
|
144
|
+
* To define a custom extended field, use the [Schema Service API](https://dev.wix.com/docs/api-reference/business-management/data-extension-schema/about-the-data-extension-schema-api) with the contacts FQDN: `wix.contacts.*.contact`.
|
|
145
|
+
*/
|
|
146
|
+
extendedFields?: ExtendedFields;
|
|
147
|
+
}
|
|
148
|
+
interface ContactName {
|
|
149
|
+
/**
|
|
150
|
+
* Contact's first name.
|
|
151
|
+
* @maxLength 1000
|
|
152
|
+
*/
|
|
153
|
+
first?: string | null;
|
|
154
|
+
/**
|
|
155
|
+
* Contact's last name.
|
|
156
|
+
* @maxLength 1000
|
|
157
|
+
*/
|
|
158
|
+
last?: string | null;
|
|
159
|
+
}
|
|
160
|
+
interface ContactEmail {
|
|
161
|
+
/**
|
|
162
|
+
* Main email address for the contact. Used for communication and contact matching.
|
|
163
|
+
*
|
|
164
|
+
* Stored in normalized form: leading and trailing whitespace is trimmed and the address is lowercased.
|
|
165
|
+
* @format EMAIL
|
|
166
|
+
* @maxLength 320
|
|
167
|
+
*/
|
|
168
|
+
email?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Indicates the recipient's opt-in or opt-out status for marketing emails.
|
|
171
|
+
* This field is read-only and managed by the subscription system.
|
|
172
|
+
*
|
|
173
|
+
* Updates are eventually consistent, reflecting marketing consent changes after they're processed.
|
|
174
|
+
* @readonly
|
|
175
|
+
*/
|
|
176
|
+
subscriptionStatus?: ContactSubscription;
|
|
177
|
+
/**
|
|
178
|
+
* Indicates the last reported delivery status of emails sent to this address.
|
|
179
|
+
* This field is read-only and updated automatically by the email delivery system.
|
|
180
|
+
*
|
|
181
|
+
* - `NOT_SET`: No delivery status reported. Default value.
|
|
182
|
+
* - `VALID`: Emails are being successfully delivered to this address.
|
|
183
|
+
* - `BOUNCED`: The last email to this address bounced or was rejected by the recipient's email server.
|
|
184
|
+
* - `SPAM_COMPLAINT`: Recipient registered a spam complaint with their email provider.
|
|
185
|
+
* - `INACTIVE`: Multiple emails have been delivered without any engagement from the recipient.
|
|
186
|
+
* @readonly
|
|
187
|
+
*/
|
|
188
|
+
deliverabilityStatus?: EmailDeliverabilityStatusWithLiterals;
|
|
189
|
+
}
|
|
190
|
+
interface ContactSubscription {
|
|
191
|
+
/**
|
|
192
|
+
* Indicates the recipient's opt-in or opt-out status for marketing communications.
|
|
193
|
+
*
|
|
194
|
+
* - `NO_SUBSCRIPTION_STATUS`: No status exists. Used when a phone is not a valid E164 number.
|
|
195
|
+
* - `NOT_SET`: No subscription status specified. Default value.
|
|
196
|
+
* - `PENDING`: Subscription confirmation was requested, but recipient hasn't confirmed yet.
|
|
197
|
+
* - `SUBSCRIBED`: Recipient has explicitly opted in to receive marketing communications.
|
|
198
|
+
* - `UNSUBSCRIBED`: Recipient has opted out of marketing communications.
|
|
199
|
+
*/
|
|
200
|
+
status?: SubscriptionStatusWithLiterals;
|
|
201
|
+
/** Date and time when the subscription status was last updated. */
|
|
202
|
+
_updatedDate?: Date | null;
|
|
203
|
+
}
|
|
204
|
+
declare enum SubscriptionStatus {
|
|
205
|
+
NO_SUBSCRIPTION_STATUS = "NO_SUBSCRIPTION_STATUS",
|
|
206
|
+
NOT_SET = "NOT_SET",
|
|
207
|
+
PENDING = "PENDING",
|
|
208
|
+
SUBSCRIBED = "SUBSCRIBED",
|
|
209
|
+
UNSUBSCRIBED = "UNSUBSCRIBED"
|
|
210
|
+
}
|
|
211
|
+
/** @enumType */
|
|
212
|
+
type SubscriptionStatusWithLiterals = SubscriptionStatus | 'NO_SUBSCRIPTION_STATUS' | 'NOT_SET' | 'PENDING' | 'SUBSCRIBED' | 'UNSUBSCRIBED';
|
|
213
|
+
declare enum EmailDeliverabilityStatus {
|
|
214
|
+
NOT_SET = "NOT_SET",
|
|
215
|
+
VALID = "VALID",
|
|
216
|
+
BOUNCED = "BOUNCED",
|
|
217
|
+
SPAM_COMPLAINT = "SPAM_COMPLAINT",
|
|
218
|
+
INACTIVE = "INACTIVE"
|
|
219
|
+
}
|
|
220
|
+
/** @enumType */
|
|
221
|
+
type EmailDeliverabilityStatusWithLiterals = EmailDeliverabilityStatus | 'NOT_SET' | 'VALID' | 'BOUNCED' | 'SPAM_COMPLAINT' | 'INACTIVE';
|
|
222
|
+
interface AdditionalEmail {
|
|
223
|
+
/**
|
|
224
|
+
* Additional email address for the contact.
|
|
225
|
+
* Does not affect subscription status or contact matching logic.
|
|
226
|
+
* @format EMAIL
|
|
227
|
+
* @maxLength 320
|
|
228
|
+
*/
|
|
229
|
+
email?: string;
|
|
230
|
+
}
|
|
231
|
+
interface ContactPhone {
|
|
232
|
+
/**
|
|
233
|
+
* Phone type classification. Helps categorize the phone number's purpose.
|
|
234
|
+
* Default value: OTHER
|
|
235
|
+
*/
|
|
236
|
+
tag?: PhoneTagWithLiterals;
|
|
237
|
+
/**
|
|
238
|
+
* Primary phone number for the contact. Used for communication and contact matching.
|
|
239
|
+
* @minLength 1
|
|
240
|
+
* @maxLength 50
|
|
241
|
+
*/
|
|
242
|
+
phone?: string;
|
|
243
|
+
/**
|
|
244
|
+
* Phone number in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format (e.g., +12345550123).
|
|
245
|
+
* This field is automatically generated from the phone field if it represents a valid E.164 number.
|
|
246
|
+
* @readonly
|
|
247
|
+
* @maxLength 50
|
|
248
|
+
*/
|
|
249
|
+
e164?: string | null;
|
|
250
|
+
/**
|
|
251
|
+
* Indicates the recipient's opt-in or opt-out status for SMS/text message marketing.
|
|
252
|
+
* This field is read-only and managed by the subscription system.
|
|
253
|
+
*
|
|
254
|
+
* Updates are eventually consistent, reflecting marketing consent changes after they're processed.
|
|
255
|
+
* @readonly
|
|
256
|
+
*/
|
|
257
|
+
subscriptionStatus?: ContactSubscription;
|
|
258
|
+
/**
|
|
259
|
+
* Indicates the delivery status for SMS messages sent to this phone number.
|
|
260
|
+
* This field is read-only and updated automatically by the SMS delivery system.
|
|
261
|
+
* - `NO_PHONE_DELIVERABILITY_STATUS`: No status exists. Used when the phone is not a valid E164 number.
|
|
262
|
+
* - `NOT_SET`: No delivery status reported. Default when the phone is a valid E164 number.
|
|
263
|
+
* - `VALID`: Last message was sent and delivered successfully.
|
|
264
|
+
* - `INVALID`: The number is invalid (landline, number disconnected, etc.).
|
|
265
|
+
* @readonly
|
|
266
|
+
*/
|
|
267
|
+
deliverabilityStatus?: PhoneDeliverabilityStatusWithLiterals;
|
|
268
|
+
}
|
|
269
|
+
declare enum PhoneTag {
|
|
270
|
+
OTHER = "OTHER",
|
|
271
|
+
MAIN = "MAIN",
|
|
272
|
+
HOME = "HOME",
|
|
273
|
+
MOBILE = "MOBILE",
|
|
274
|
+
WORK = "WORK",
|
|
275
|
+
FAX = "FAX"
|
|
276
|
+
}
|
|
277
|
+
/** @enumType */
|
|
278
|
+
type PhoneTagWithLiterals = PhoneTag | 'OTHER' | 'MAIN' | 'HOME' | 'MOBILE' | 'WORK' | 'FAX';
|
|
279
|
+
declare enum PhoneDeliverabilityStatus {
|
|
280
|
+
NO_PHONE_DELIVERABILITY_STATUS = "NO_PHONE_DELIVERABILITY_STATUS",
|
|
281
|
+
NOT_SET = "NOT_SET",
|
|
282
|
+
VALID = "VALID",
|
|
283
|
+
INVALID = "INVALID"
|
|
284
|
+
}
|
|
285
|
+
/** @enumType */
|
|
286
|
+
type PhoneDeliverabilityStatusWithLiterals = PhoneDeliverabilityStatus | 'NO_PHONE_DELIVERABILITY_STATUS' | 'NOT_SET' | 'VALID' | 'INVALID';
|
|
287
|
+
interface AdditionalPhone {
|
|
288
|
+
/**
|
|
289
|
+
* Phone type classification for the additional phone number.
|
|
290
|
+
* Default value: OTHER
|
|
291
|
+
*/
|
|
292
|
+
tag?: PhoneTagWithLiterals;
|
|
293
|
+
/**
|
|
294
|
+
* Additional phone number for the contact.
|
|
295
|
+
* Does not affect subscription status or contact matching logic.
|
|
296
|
+
* @minLength 1
|
|
297
|
+
* @maxLength 50
|
|
298
|
+
*/
|
|
299
|
+
phone?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Additional phone number in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format (e.g., +12345550123).
|
|
302
|
+
* This field is automatically generated from the phone field if it represents a valid E.164 number.
|
|
303
|
+
* @readonly
|
|
304
|
+
* @maxLength 50
|
|
305
|
+
*/
|
|
306
|
+
e164?: string | null;
|
|
307
|
+
}
|
|
308
|
+
interface ContactAddress {
|
|
309
|
+
/**
|
|
310
|
+
* Address type classification. Helps categorize the address purpose.
|
|
311
|
+
* Default value: OTHER
|
|
312
|
+
*/
|
|
313
|
+
tag?: AddressTagWithLiterals;
|
|
314
|
+
/**
|
|
315
|
+
* Physical address information including street, city, country, and postal code.
|
|
316
|
+
* Contains structured address data following common address formatting standards.
|
|
317
|
+
*/
|
|
318
|
+
address?: Address;
|
|
319
|
+
/**
|
|
320
|
+
* Indicates whether this address is the primary/default address for the contact.
|
|
321
|
+
* Only one address can be designated as default per contact.
|
|
322
|
+
* If no address is explicitly set as default, the first address automatically becomes the default.
|
|
323
|
+
* All other addresses will have this field set to false.
|
|
324
|
+
*/
|
|
325
|
+
defaultAddress?: boolean | null;
|
|
326
|
+
/**
|
|
327
|
+
* Address ID
|
|
328
|
+
* @format GUID
|
|
329
|
+
*/
|
|
330
|
+
addressId?: string | null;
|
|
331
|
+
/** Address recipient information for delivery purposes */
|
|
332
|
+
recipient?: Recipient;
|
|
333
|
+
}
|
|
334
|
+
declare enum AddressTag {
|
|
335
|
+
OTHER = "OTHER",
|
|
336
|
+
HOME = "HOME",
|
|
337
|
+
WORK = "WORK",
|
|
338
|
+
BILLING = "BILLING",
|
|
339
|
+
SHIPPING = "SHIPPING"
|
|
340
|
+
}
|
|
341
|
+
/** @enumType */
|
|
342
|
+
type AddressTagWithLiterals = AddressTag | 'OTHER' | 'HOME' | 'WORK' | 'BILLING' | 'SHIPPING';
|
|
343
|
+
/** Physical address */
|
|
344
|
+
interface Address extends AddressStreetOneOf {
|
|
345
|
+
/** Street address object, with number and name in separate fields. */
|
|
346
|
+
streetAddress?: StreetAddress;
|
|
347
|
+
/**
|
|
348
|
+
* Main address line, usually street and number, as free text.
|
|
349
|
+
* @maxLength 1000
|
|
350
|
+
*/
|
|
351
|
+
addressLine1?: string | null;
|
|
352
|
+
/**
|
|
353
|
+
* 2-letter country code in an
|
|
354
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
355
|
+
* @format COUNTRY
|
|
356
|
+
*/
|
|
357
|
+
country?: string | null;
|
|
358
|
+
/**
|
|
359
|
+
* Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY
|
|
360
|
+
* @format SUBDIVISION
|
|
361
|
+
*/
|
|
362
|
+
subdivision?: string | null;
|
|
363
|
+
/**
|
|
364
|
+
* City name.
|
|
365
|
+
* @maxLength 300
|
|
366
|
+
*/
|
|
367
|
+
city?: string | null;
|
|
368
|
+
/**
|
|
369
|
+
* Postal or zip code.
|
|
370
|
+
* @maxLength 100
|
|
371
|
+
*/
|
|
372
|
+
postalCode?: string | null;
|
|
373
|
+
/**
|
|
374
|
+
* Free text providing more detailed address information,
|
|
375
|
+
* such as apartment, suite, or floor.
|
|
376
|
+
* @maxLength 1000
|
|
377
|
+
*/
|
|
378
|
+
addressLine2?: string | null;
|
|
379
|
+
/**
|
|
380
|
+
* Human-readable address string.
|
|
381
|
+
* If not provided, the value is generated from the available address data.
|
|
382
|
+
* @maxLength 2000
|
|
383
|
+
*/
|
|
384
|
+
formatted?: string | null;
|
|
385
|
+
/**
|
|
386
|
+
* Instructions to help someone find the address, such as landmarks or where the entrance is.
|
|
387
|
+
* @maxLength 200
|
|
388
|
+
*/
|
|
389
|
+
hint?: string | null;
|
|
390
|
+
/** Coordinates of the physical address. */
|
|
391
|
+
location?: AddressLocation;
|
|
392
|
+
/**
|
|
393
|
+
* Full country name.
|
|
394
|
+
* @maxLength 100
|
|
395
|
+
*/
|
|
396
|
+
countryFullname?: string | null;
|
|
397
|
+
/**
|
|
398
|
+
* Hierarchical list of subdivisions, where the first array item is the highest level of hierarchy, and so on.
|
|
399
|
+
* @maxSize 6
|
|
400
|
+
*/
|
|
401
|
+
subdivisions?: Subdivision[];
|
|
402
|
+
/**
|
|
403
|
+
* Subdivision full name.
|
|
404
|
+
* @maxLength 100
|
|
405
|
+
*/
|
|
406
|
+
subdivisionFullname?: string | null;
|
|
407
|
+
}
|
|
408
|
+
/** @oneof */
|
|
409
|
+
interface AddressStreetOneOf {
|
|
410
|
+
/** Street address object, with number and name in separate fields. */
|
|
411
|
+
streetAddress?: StreetAddress;
|
|
412
|
+
/**
|
|
413
|
+
* Main address line, usually street and number, as free text.
|
|
414
|
+
* @maxLength 1000
|
|
415
|
+
*/
|
|
416
|
+
addressLine?: string | null;
|
|
417
|
+
}
|
|
418
|
+
interface StreetAddress {
|
|
419
|
+
/**
|
|
420
|
+
* Street number.
|
|
421
|
+
* @maxLength 100
|
|
422
|
+
*/
|
|
423
|
+
number?: string;
|
|
424
|
+
/**
|
|
425
|
+
* Street name.
|
|
426
|
+
* @maxLength 300
|
|
427
|
+
*/
|
|
428
|
+
name?: string;
|
|
429
|
+
/**
|
|
430
|
+
* Apartment number.
|
|
431
|
+
* @maxLength 50
|
|
432
|
+
*/
|
|
433
|
+
apt?: string;
|
|
434
|
+
/**
|
|
435
|
+
* Optional address line 1
|
|
436
|
+
* @maxLength 2000
|
|
437
|
+
*/
|
|
438
|
+
formattedAddressLine?: string | null;
|
|
439
|
+
}
|
|
440
|
+
interface AddressLocation {
|
|
441
|
+
/**
|
|
442
|
+
* Address latitude.
|
|
443
|
+
* @min -90
|
|
444
|
+
* @max 90
|
|
445
|
+
*/
|
|
446
|
+
latitude?: number | null;
|
|
447
|
+
/**
|
|
448
|
+
* Address longitude.
|
|
449
|
+
* @min -180
|
|
450
|
+
* @max 180
|
|
451
|
+
*/
|
|
452
|
+
longitude?: number | null;
|
|
453
|
+
}
|
|
454
|
+
interface Subdivision {
|
|
455
|
+
/**
|
|
456
|
+
* subdivision short code
|
|
457
|
+
* @maxLength 20
|
|
458
|
+
*/
|
|
459
|
+
code?: string;
|
|
460
|
+
/**
|
|
461
|
+
* Full subdivision name.
|
|
462
|
+
* @maxLength 100
|
|
463
|
+
*/
|
|
464
|
+
name?: string;
|
|
465
|
+
/** Subdivision level */
|
|
466
|
+
type?: SubdivisionTypeWithLiterals;
|
|
467
|
+
/**
|
|
468
|
+
* Free text description of subdivision type.
|
|
469
|
+
* Examples: `"state"`, `"province"`, `"prefecture"`.
|
|
470
|
+
* @maxLength 100
|
|
471
|
+
*/
|
|
472
|
+
typeInfo?: string | null;
|
|
473
|
+
}
|
|
474
|
+
declare enum SubdivisionType {
|
|
475
|
+
UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
|
|
476
|
+
/** State */
|
|
477
|
+
ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
|
|
478
|
+
/** County */
|
|
479
|
+
ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
|
|
480
|
+
/** City/town */
|
|
481
|
+
ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
|
|
482
|
+
/** Neighborhood/quarter */
|
|
483
|
+
ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
|
|
484
|
+
/** Street/block */
|
|
485
|
+
ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
|
|
486
|
+
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
487
|
+
COUNTRY = "COUNTRY"
|
|
488
|
+
}
|
|
489
|
+
/** @enumType */
|
|
490
|
+
type SubdivisionTypeWithLiterals = SubdivisionType | 'UNKNOWN_SUBDIVISION_TYPE' | 'ADMINISTRATIVE_AREA_LEVEL_1' | 'ADMINISTRATIVE_AREA_LEVEL_2' | 'ADMINISTRATIVE_AREA_LEVEL_3' | 'ADMINISTRATIVE_AREA_LEVEL_4' | 'ADMINISTRATIVE_AREA_LEVEL_5' | 'COUNTRY';
|
|
491
|
+
/** Subdivision Concordance values */
|
|
492
|
+
interface StandardDetails {
|
|
493
|
+
/**
|
|
494
|
+
* subdivision iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. US-NY, GB-SCT, NO-30
|
|
495
|
+
* @maxLength 20
|
|
496
|
+
*/
|
|
497
|
+
iso31662?: string | null;
|
|
498
|
+
}
|
|
499
|
+
interface Recipient {
|
|
500
|
+
/**
|
|
501
|
+
* Recipient's first name.
|
|
502
|
+
* @maxLength 1000
|
|
503
|
+
*/
|
|
504
|
+
firstName?: string | null;
|
|
505
|
+
/**
|
|
506
|
+
* Recipient's last name.
|
|
507
|
+
* @maxLength 1000
|
|
508
|
+
*/
|
|
509
|
+
lastName?: string | null;
|
|
510
|
+
/**
|
|
511
|
+
* Recipient's company name.
|
|
512
|
+
* @maxLength 1000
|
|
513
|
+
*/
|
|
514
|
+
company?: string | null;
|
|
515
|
+
/**
|
|
516
|
+
* Recipient's phone number.
|
|
517
|
+
* @minLength 1
|
|
518
|
+
* @maxLength 50
|
|
519
|
+
*/
|
|
520
|
+
phone?: string | null;
|
|
521
|
+
}
|
|
522
|
+
interface ContactCompany {
|
|
523
|
+
/**
|
|
524
|
+
* Contact's company name.
|
|
525
|
+
* @maxLength 1000
|
|
526
|
+
*/
|
|
527
|
+
name?: string | null;
|
|
528
|
+
/**
|
|
529
|
+
* Contact's job title.
|
|
530
|
+
* @maxLength 1000
|
|
531
|
+
*/
|
|
532
|
+
jobTitle?: string | null;
|
|
533
|
+
}
|
|
534
|
+
interface ContactSource {
|
|
535
|
+
/**
|
|
536
|
+
* ID of the user who created this contact.
|
|
537
|
+
* @readonly
|
|
538
|
+
* @format GUID
|
|
539
|
+
* @immutable
|
|
540
|
+
*/
|
|
541
|
+
userId?: string | null;
|
|
542
|
+
/**
|
|
543
|
+
* ID of the application that created this contact.
|
|
544
|
+
* @readonly
|
|
545
|
+
* @format GUID
|
|
546
|
+
* @immutable
|
|
547
|
+
*/
|
|
548
|
+
appId?: string | null;
|
|
549
|
+
/**
|
|
550
|
+
* Additional information about the contact's origin or creation context.
|
|
551
|
+
* @maxLength 1000
|
|
552
|
+
* @immutable
|
|
553
|
+
*/
|
|
554
|
+
additionalInfo?: string | null;
|
|
555
|
+
}
|
|
556
|
+
interface ContactActivity {
|
|
557
|
+
/** Date and time when the contact's most recent activity occurred. */
|
|
558
|
+
date?: Date | null;
|
|
559
|
+
/**
|
|
560
|
+
* ID of the activity template that defines the type of activity performed.
|
|
561
|
+
* References a template in the contacts activity log system.
|
|
562
|
+
* @format GUID
|
|
563
|
+
*/
|
|
564
|
+
templateId?: string | null;
|
|
565
|
+
}
|
|
566
|
+
interface MemberInfo {
|
|
567
|
+
/**
|
|
568
|
+
* Member ID
|
|
569
|
+
* @format GUID
|
|
570
|
+
*/
|
|
571
|
+
memberId?: string | null;
|
|
572
|
+
/** Signup date */
|
|
573
|
+
signupDate?: Date | null;
|
|
574
|
+
/**
|
|
575
|
+
* Login email
|
|
576
|
+
* @format EMAIL
|
|
577
|
+
*/
|
|
578
|
+
email?: string | null;
|
|
579
|
+
/** Indicate whether the email is verified */
|
|
580
|
+
emailVerified?: boolean | null;
|
|
581
|
+
/** Indicates whether the member is required to verify their email */
|
|
582
|
+
emailVerificationRequired?: boolean | null;
|
|
583
|
+
/**
|
|
584
|
+
* Member status.
|
|
585
|
+
* - `PENDING`: Member created and is waiting for approval by site owner.
|
|
586
|
+
* - `ACTIVE`: Member can log in to the site.
|
|
587
|
+
* - `BLOCKED': Member is blocked and cannot log in to the site.
|
|
588
|
+
* - `OFFLINE`: Member is a [managed writer](https://support.wix.com/en/article/wix-blog-adding-managed-writers-to-your-blog) for the site blog and cannot log in to the site.
|
|
589
|
+
*/
|
|
590
|
+
status?: MemberStatusWithLiterals;
|
|
591
|
+
/** Profile info */
|
|
592
|
+
profileInfo?: ProfileInfo;
|
|
593
|
+
/** User info */
|
|
594
|
+
userInfo?: UserInfo;
|
|
595
|
+
/** Session info */
|
|
596
|
+
sessionInfo?: SessionInfo;
|
|
597
|
+
/** Group info */
|
|
598
|
+
groupInfo?: GroupInfo;
|
|
599
|
+
}
|
|
600
|
+
declare enum MemberStatus {
|
|
601
|
+
PENDING = "PENDING",
|
|
602
|
+
ACTIVE = "ACTIVE",
|
|
603
|
+
BLOCKED = "BLOCKED",
|
|
604
|
+
OFFLINE = "OFFLINE"
|
|
605
|
+
}
|
|
606
|
+
/** @enumType */
|
|
607
|
+
type MemberStatusWithLiterals = MemberStatus | 'PENDING' | 'ACTIVE' | 'BLOCKED' | 'OFFLINE';
|
|
608
|
+
interface ProfileInfo {
|
|
609
|
+
/**
|
|
610
|
+
* Nickname
|
|
611
|
+
* @maxLength 255
|
|
612
|
+
*/
|
|
613
|
+
nickname?: string | null;
|
|
614
|
+
/** Privacy status */
|
|
615
|
+
privacyStatus?: PrivacyStatusWithLiterals;
|
|
616
|
+
/** Indicate whether the member is reported */
|
|
617
|
+
reported?: boolean | null;
|
|
618
|
+
/** Indicate whether the member is muted */
|
|
619
|
+
muted?: boolean | null;
|
|
620
|
+
/** Profile photo */
|
|
621
|
+
photo?: string;
|
|
622
|
+
}
|
|
623
|
+
declare enum PrivacyStatus {
|
|
624
|
+
PRIVATE = "PRIVATE",
|
|
625
|
+
PUBLIC = "PUBLIC"
|
|
626
|
+
}
|
|
627
|
+
/** @enumType */
|
|
628
|
+
type PrivacyStatusWithLiterals = PrivacyStatus | 'PRIVATE' | 'PUBLIC';
|
|
629
|
+
interface UserInfo {
|
|
630
|
+
/**
|
|
631
|
+
* User ID
|
|
632
|
+
* @format GUID
|
|
633
|
+
*/
|
|
634
|
+
userId?: string;
|
|
635
|
+
/** The user's role on the website */
|
|
636
|
+
role?: RoleWithLiterals;
|
|
637
|
+
}
|
|
638
|
+
declare enum Role {
|
|
639
|
+
OWNER = "OWNER",
|
|
640
|
+
CONTRIBUTOR = "CONTRIBUTOR",
|
|
641
|
+
MEMBER = "MEMBER"
|
|
642
|
+
}
|
|
643
|
+
/** @enumType */
|
|
644
|
+
type RoleWithLiterals = Role | 'OWNER' | 'CONTRIBUTOR' | 'MEMBER';
|
|
645
|
+
interface SessionInfo {
|
|
646
|
+
/** Last time the member logged in to the website */
|
|
647
|
+
lastWebLogin?: Date | null;
|
|
648
|
+
/** Last time the member logged in to one of the mobile apps */
|
|
649
|
+
lastMobileLogin?: Date | null;
|
|
650
|
+
/**
|
|
651
|
+
* List of mobile apps that the member has ever logged in to
|
|
652
|
+
* @maxSize 50
|
|
653
|
+
* @maxLength 50
|
|
654
|
+
*/
|
|
655
|
+
mobileAppNames?: string[];
|
|
656
|
+
}
|
|
657
|
+
interface GroupInfo {
|
|
658
|
+
/**
|
|
659
|
+
* Group IDs
|
|
660
|
+
* @format GUID
|
|
661
|
+
* @maxSize 1000
|
|
662
|
+
*/
|
|
663
|
+
groupIds?: string[];
|
|
664
|
+
}
|
|
665
|
+
interface PrivateTags {
|
|
666
|
+
/** Tags that are exposed to anyone with access to the entity. */
|
|
667
|
+
privateTags?: TagList;
|
|
668
|
+
}
|
|
669
|
+
interface TagList {
|
|
670
|
+
/**
|
|
671
|
+
* A list of tag IDs.
|
|
672
|
+
* To create a tag, use the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) with the contacts FQDN: `wix.contacts.*.contact`.
|
|
673
|
+
* @maxSize 1000
|
|
674
|
+
* @maxLength 5
|
|
675
|
+
*/
|
|
676
|
+
tagIds?: string[];
|
|
677
|
+
}
|
|
678
|
+
interface ExtendedFields {
|
|
679
|
+
/**
|
|
680
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
681
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
682
|
+
*
|
|
683
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
684
|
+
*
|
|
685
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
686
|
+
*/
|
|
687
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Message for reindexing search data to a given search schema. Support both upsert and delete flows as well as
|
|
691
|
+
* performs context manipulation with adding tenant, provided in message to callscope.
|
|
692
|
+
*/
|
|
693
|
+
interface ReindexMessage extends ReindexMessageActionOneOf {
|
|
694
|
+
upsert?: Upsert;
|
|
695
|
+
delete?: ReindexMessageDelete;
|
|
696
|
+
entityFqdn?: string;
|
|
697
|
+
tenantId?: string;
|
|
698
|
+
eventTime?: Date | null;
|
|
699
|
+
entityEventSequence?: string | null;
|
|
700
|
+
schema?: Schema;
|
|
701
|
+
}
|
|
702
|
+
/** @oneof */
|
|
703
|
+
interface ReindexMessageActionOneOf {
|
|
704
|
+
upsert?: Upsert;
|
|
705
|
+
delete?: ReindexMessageDelete;
|
|
706
|
+
}
|
|
707
|
+
interface Upsert {
|
|
708
|
+
entityId?: string;
|
|
709
|
+
entityAsJson?: string;
|
|
710
|
+
}
|
|
711
|
+
interface ReindexMessageDelete {
|
|
712
|
+
entityId?: string;
|
|
713
|
+
}
|
|
714
|
+
interface Schema {
|
|
715
|
+
label?: string;
|
|
716
|
+
clusterName?: string;
|
|
717
|
+
}
|
|
718
|
+
interface ContactMerged {
|
|
719
|
+
/**
|
|
720
|
+
* ID of the contact the source contacts were merged into.
|
|
721
|
+
* @format GUID
|
|
722
|
+
*/
|
|
723
|
+
targetContactId?: string;
|
|
724
|
+
/**
|
|
725
|
+
* IDs of contacts that were merged into the target contact.
|
|
726
|
+
* @format GUID
|
|
727
|
+
* @minSize 1
|
|
728
|
+
* @maxSize 5
|
|
729
|
+
*/
|
|
730
|
+
sourceContactIds?: string[];
|
|
731
|
+
/** Updated target contact. */
|
|
732
|
+
targetContact?: Contact;
|
|
733
|
+
}
|
|
734
|
+
interface ContactEmailSubscriptionUpdated {
|
|
735
|
+
/**
|
|
736
|
+
* The updated contact ID.
|
|
737
|
+
* @format GUID
|
|
738
|
+
*/
|
|
739
|
+
contactId?: string;
|
|
740
|
+
/** The revision of the contact. */
|
|
741
|
+
revision?: string | null;
|
|
742
|
+
/** The email of the contact with the updated subscription and deliverability status. */
|
|
743
|
+
email?: ContactEmail;
|
|
744
|
+
/** Date and time the contact was updated with the email subscription or deliverability status. */
|
|
745
|
+
_updatedDate?: Date | null;
|
|
746
|
+
}
|
|
747
|
+
interface ContactPhoneSubscriptionUpdated {
|
|
748
|
+
/**
|
|
749
|
+
* The updated contact ID.
|
|
750
|
+
* @format GUID
|
|
751
|
+
*/
|
|
752
|
+
contactId?: string;
|
|
753
|
+
/** The revision of the contact. */
|
|
754
|
+
revision?: string | null;
|
|
755
|
+
/** The phone of the contact with the updated subscription status. */
|
|
756
|
+
phone?: ContactPhone;
|
|
757
|
+
/** Date and time the contact was updated with the SMS subscription status. */
|
|
758
|
+
_updatedDate?: Date | null;
|
|
759
|
+
}
|
|
760
|
+
interface ContactImageUploaded {
|
|
761
|
+
/**
|
|
762
|
+
* The updated contact ID.
|
|
763
|
+
* @format GUID
|
|
764
|
+
*/
|
|
765
|
+
contactId?: string;
|
|
766
|
+
/** The revision of the contact. */
|
|
767
|
+
revision?: string | null;
|
|
768
|
+
/** The contact's uploaded image. */
|
|
769
|
+
image?: string;
|
|
770
|
+
/** Date and time the contact's image was updated. */
|
|
771
|
+
_updatedDate?: Date | null;
|
|
772
|
+
/**
|
|
773
|
+
* The upload ID.
|
|
774
|
+
* @format GUID
|
|
775
|
+
*/
|
|
776
|
+
uploadId?: string | null;
|
|
777
|
+
}
|
|
778
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
779
|
+
createdEvent?: EntityCreatedEvent;
|
|
780
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
781
|
+
deletedEvent?: EntityDeletedEvent;
|
|
782
|
+
actionEvent?: ActionEvent;
|
|
783
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
784
|
+
_id?: string;
|
|
785
|
+
/**
|
|
786
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
787
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
788
|
+
*/
|
|
789
|
+
entityFqdn?: string;
|
|
790
|
+
/**
|
|
791
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
792
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
793
|
+
*/
|
|
794
|
+
slug?: string;
|
|
795
|
+
/** ID of the entity associated with the event. */
|
|
796
|
+
entityId?: string;
|
|
797
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
798
|
+
eventTime?: Date | null;
|
|
799
|
+
/**
|
|
800
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
801
|
+
* (for example, GDPR).
|
|
802
|
+
*/
|
|
803
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
804
|
+
/** If present, indicates the action that triggered the event. */
|
|
805
|
+
originatedFrom?: string | null;
|
|
806
|
+
/**
|
|
807
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
|
|
808
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
809
|
+
*/
|
|
810
|
+
entityEventSequence?: string | null;
|
|
811
|
+
}
|
|
812
|
+
/** @oneof */
|
|
813
|
+
interface DomainEventBodyOneOf {
|
|
814
|
+
createdEvent?: EntityCreatedEvent;
|
|
815
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
816
|
+
deletedEvent?: EntityDeletedEvent;
|
|
817
|
+
actionEvent?: ActionEvent;
|
|
818
|
+
}
|
|
819
|
+
interface EntityCreatedEvent {
|
|
820
|
+
entity?: string;
|
|
821
|
+
}
|
|
822
|
+
interface RestoreInfo {
|
|
823
|
+
deletedDate?: Date | null;
|
|
824
|
+
}
|
|
825
|
+
interface EntityUpdatedEvent {
|
|
826
|
+
/**
|
|
827
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
828
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
829
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
830
|
+
*/
|
|
831
|
+
currentEntity?: string;
|
|
832
|
+
}
|
|
833
|
+
interface EntityDeletedEvent {
|
|
834
|
+
/** Entity that was deleted. */
|
|
835
|
+
deletedEntity?: string | null;
|
|
836
|
+
}
|
|
837
|
+
interface ActionEvent {
|
|
838
|
+
body?: string;
|
|
839
|
+
}
|
|
840
|
+
interface MessageEnvelope {
|
|
841
|
+
/**
|
|
842
|
+
* App instance ID.
|
|
843
|
+
* @format GUID
|
|
844
|
+
*/
|
|
845
|
+
instanceId?: string | null;
|
|
846
|
+
/**
|
|
847
|
+
* Event type.
|
|
848
|
+
* @maxLength 150
|
|
849
|
+
*/
|
|
850
|
+
eventType?: string;
|
|
851
|
+
/** The identification type and identity data. */
|
|
852
|
+
identity?: IdentificationData;
|
|
853
|
+
/** Stringify payload. */
|
|
854
|
+
data?: string;
|
|
855
|
+
/** Details related to the account */
|
|
856
|
+
accountInfo?: AccountInfo;
|
|
857
|
+
}
|
|
858
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
859
|
+
/**
|
|
860
|
+
* ID of a site visitor that has not logged in to the site.
|
|
861
|
+
* @format GUID
|
|
862
|
+
*/
|
|
863
|
+
anonymousVisitorId?: string;
|
|
864
|
+
/**
|
|
865
|
+
* ID of a site visitor that has logged in to the site.
|
|
866
|
+
* @format GUID
|
|
867
|
+
*/
|
|
868
|
+
memberId?: string;
|
|
869
|
+
/**
|
|
870
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
871
|
+
* @format GUID
|
|
872
|
+
*/
|
|
873
|
+
wixUserId?: string;
|
|
874
|
+
/**
|
|
875
|
+
* ID of an app.
|
|
876
|
+
* @format GUID
|
|
877
|
+
*/
|
|
878
|
+
appId?: string;
|
|
879
|
+
/** @readonly */
|
|
880
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
881
|
+
}
|
|
882
|
+
/** @oneof */
|
|
883
|
+
interface IdentificationDataIdOneOf {
|
|
884
|
+
/**
|
|
885
|
+
* ID of a site visitor that has not logged in to the site.
|
|
886
|
+
* @format GUID
|
|
887
|
+
*/
|
|
888
|
+
anonymousVisitorId?: string;
|
|
889
|
+
/**
|
|
890
|
+
* ID of a site visitor that has logged in to the site.
|
|
891
|
+
* @format GUID
|
|
892
|
+
*/
|
|
893
|
+
memberId?: string;
|
|
894
|
+
/**
|
|
895
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
896
|
+
* @format GUID
|
|
897
|
+
*/
|
|
898
|
+
wixUserId?: string;
|
|
899
|
+
/**
|
|
900
|
+
* ID of an app.
|
|
901
|
+
* @format GUID
|
|
902
|
+
*/
|
|
903
|
+
appId?: string;
|
|
904
|
+
}
|
|
905
|
+
declare enum WebhookIdentityType {
|
|
906
|
+
UNKNOWN = "UNKNOWN",
|
|
907
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
908
|
+
MEMBER = "MEMBER",
|
|
909
|
+
WIX_USER = "WIX_USER",
|
|
910
|
+
APP = "APP"
|
|
911
|
+
}
|
|
912
|
+
/** @enumType */
|
|
913
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
914
|
+
interface AccountInfo {
|
|
915
|
+
/**
|
|
916
|
+
* ID of the Wix account associated with the event.
|
|
917
|
+
* @format GUID
|
|
918
|
+
*/
|
|
919
|
+
accountId?: string | null;
|
|
920
|
+
/**
|
|
921
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
922
|
+
* @format GUID
|
|
923
|
+
*/
|
|
924
|
+
parentAccountId?: string | null;
|
|
925
|
+
/**
|
|
926
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
927
|
+
* @format GUID
|
|
928
|
+
*/
|
|
929
|
+
siteId?: string | null;
|
|
930
|
+
}
|
|
931
|
+
interface BulkUpdateContactSubscriptionsRequest {
|
|
932
|
+
/**
|
|
933
|
+
* A filter for the contacts that the subscription statuses will be applied to.
|
|
934
|
+
*
|
|
935
|
+
* Example:
|
|
936
|
+
* `{ "filter": { "name.last": "Smith" } }`
|
|
937
|
+
*/
|
|
938
|
+
filter: Record<string, any> | null;
|
|
939
|
+
/** Free text to match in searchable fields for the contacts that the subscription statuses will be applied to. */
|
|
940
|
+
search?: SearchDetails;
|
|
941
|
+
/** The subscription status to apply to the contact's email address. */
|
|
942
|
+
emailSubscriptionStatus?: V5SubscriptionStatusWithLiterals;
|
|
943
|
+
/** The subscription status to apply to the contact's phone. */
|
|
944
|
+
phoneSubscriptionStatus?: V5SubscriptionStatusWithLiterals;
|
|
945
|
+
}
|
|
946
|
+
interface SearchDetails {
|
|
947
|
+
/** Defines how separate search terms in `expression` are combined */
|
|
948
|
+
mode?: ModeWithLiterals;
|
|
949
|
+
/**
|
|
950
|
+
* Search term or expression
|
|
951
|
+
* @maxLength 100
|
|
952
|
+
*/
|
|
953
|
+
expression?: string | null;
|
|
954
|
+
/**
|
|
955
|
+
* Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path
|
|
956
|
+
* @maxLength 200
|
|
957
|
+
* @maxSize 20
|
|
958
|
+
*/
|
|
959
|
+
fields?: string[];
|
|
960
|
+
/** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
|
|
961
|
+
fuzzy?: boolean;
|
|
962
|
+
}
|
|
963
|
+
declare enum Mode {
|
|
964
|
+
/** Any of the search terms must be present */
|
|
965
|
+
OR = "OR",
|
|
966
|
+
/** All search terms must be present */
|
|
967
|
+
AND = "AND"
|
|
968
|
+
}
|
|
969
|
+
/** @enumType */
|
|
970
|
+
type ModeWithLiterals = Mode | 'OR' | 'AND';
|
|
971
|
+
declare enum V5SubscriptionStatus {
|
|
972
|
+
NOT_SET = "NOT_SET",
|
|
973
|
+
SUBSCRIBED = "SUBSCRIBED",
|
|
974
|
+
UNSUBSCRIBED = "UNSUBSCRIBED"
|
|
975
|
+
}
|
|
976
|
+
/** @enumType */
|
|
977
|
+
type V5SubscriptionStatusWithLiterals = V5SubscriptionStatus | 'NOT_SET' | 'SUBSCRIBED' | 'UNSUBSCRIBED';
|
|
978
|
+
interface BulkUpdateContactSubscriptionsResponse {
|
|
979
|
+
/**
|
|
980
|
+
* The ID of the bulk update contact subscription job.
|
|
981
|
+
*
|
|
982
|
+
* Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.
|
|
983
|
+
* @format GUID
|
|
984
|
+
*/
|
|
985
|
+
jobId?: string;
|
|
986
|
+
}
|
|
987
|
+
/** Message for reindexing an entity across all active schemas (for fqdn). Tenant needs to be provided in call context. */
|
|
988
|
+
interface ReindexEntityForFQDN extends ReindexEntityForFQDNActionOneOf {
|
|
989
|
+
/** to upsert an entity */
|
|
990
|
+
index?: Index;
|
|
991
|
+
/** to remove an entity */
|
|
992
|
+
delete?: Delete;
|
|
993
|
+
/** to report completion of reindexing */
|
|
994
|
+
reportBatchCompleted?: ReportBatchCompleted;
|
|
995
|
+
/** to bulk upsert entities */
|
|
996
|
+
bulkIndex?: BulkIndex;
|
|
997
|
+
/** to bulk delete entities */
|
|
998
|
+
bulkDelete?: BulkDelete;
|
|
999
|
+
/**
|
|
1000
|
+
* entity fqdn
|
|
1001
|
+
* @maxLength 256
|
|
1002
|
+
*/
|
|
1003
|
+
entityFqdn?: string;
|
|
1004
|
+
/** event time */
|
|
1005
|
+
eventTime?: Date | null;
|
|
1006
|
+
}
|
|
1007
|
+
/** @oneof */
|
|
1008
|
+
interface ReindexEntityForFQDNActionOneOf {
|
|
1009
|
+
/** to upsert an entity */
|
|
1010
|
+
index?: Index;
|
|
1011
|
+
/** to remove an entity */
|
|
1012
|
+
delete?: Delete;
|
|
1013
|
+
/** to report completion of reindexing */
|
|
1014
|
+
reportBatchCompleted?: ReportBatchCompleted;
|
|
1015
|
+
/** to bulk upsert entities */
|
|
1016
|
+
bulkIndex?: BulkIndex;
|
|
1017
|
+
/** to bulk delete entities */
|
|
1018
|
+
bulkDelete?: BulkDelete;
|
|
1019
|
+
}
|
|
1020
|
+
/** Will create or update entity in search index */
|
|
1021
|
+
interface Index {
|
|
1022
|
+
/**
|
|
1023
|
+
* entity id
|
|
1024
|
+
* @format GUID
|
|
1025
|
+
*/
|
|
1026
|
+
entityId?: string;
|
|
1027
|
+
/** entity as json string */
|
|
1028
|
+
entityAsJson?: string;
|
|
1029
|
+
/** entity sequence for versioning */
|
|
1030
|
+
entityEventSequence?: string | null;
|
|
1031
|
+
}
|
|
1032
|
+
/** Will delete entity from search index */
|
|
1033
|
+
interface Delete {
|
|
1034
|
+
/**
|
|
1035
|
+
* entity id
|
|
1036
|
+
* @format GUID
|
|
1037
|
+
*/
|
|
1038
|
+
entityId?: string;
|
|
1039
|
+
/** entity sequence for versioning */
|
|
1040
|
+
entityEventSequence?: string | null;
|
|
1041
|
+
}
|
|
1042
|
+
/** Will report completion of reindexing */
|
|
1043
|
+
interface ReportBatchCompleted {
|
|
1044
|
+
/** completion time */
|
|
1045
|
+
batchStart?: Date | null;
|
|
1046
|
+
}
|
|
1047
|
+
/** Will create or update entities in search index. Max 1000 entities per message. */
|
|
1048
|
+
interface BulkIndex {
|
|
1049
|
+
items?: Index[];
|
|
1050
|
+
}
|
|
1051
|
+
/** Will delete entities from search index. Max 1000 entities per message. */
|
|
1052
|
+
interface BulkDelete {
|
|
1053
|
+
items?: Delete[];
|
|
1054
|
+
}
|
|
1055
|
+
interface CreateContactRequest {
|
|
1056
|
+
/** Contact to be created. */
|
|
1057
|
+
contact: Contact;
|
|
1058
|
+
/**
|
|
1059
|
+
* Allows creating a duplicate contact.
|
|
1060
|
+
* More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).
|
|
1061
|
+
*/
|
|
1062
|
+
allowDuplicates?: boolean;
|
|
1063
|
+
}
|
|
1064
|
+
interface CreateContactResponse {
|
|
1065
|
+
/** The created Contact. */
|
|
1066
|
+
contact?: Contact;
|
|
1067
|
+
/**
|
|
1068
|
+
* The upload ID of the image upload process.
|
|
1069
|
+
* @maxLength 100
|
|
1070
|
+
*/
|
|
1071
|
+
imageUploadId?: string | null;
|
|
1072
|
+
}
|
|
1073
|
+
interface DuplicateContactExists {
|
|
1074
|
+
/**
|
|
1075
|
+
* The ID of an existing contact that matches a duplicate in the request.
|
|
1076
|
+
* @format GUID
|
|
1077
|
+
*/
|
|
1078
|
+
matchingContactId?: string | null;
|
|
1079
|
+
/** The field(s) of an existing contact that match a duplicate in the request. */
|
|
1080
|
+
matchType?: MatchTypeWithLiterals;
|
|
1081
|
+
}
|
|
1082
|
+
declare enum MatchType {
|
|
1083
|
+
EMAIL = "EMAIL",
|
|
1084
|
+
PHONE = "PHONE",
|
|
1085
|
+
EXTERNAL_ID = "EXTERNAL_ID",
|
|
1086
|
+
EMAIL_AND_PHONE = "EMAIL_AND_PHONE"
|
|
1087
|
+
}
|
|
1088
|
+
/** @enumType */
|
|
1089
|
+
type MatchTypeWithLiterals = MatchType | 'EMAIL' | 'PHONE' | 'EXTERNAL_ID' | 'EMAIL_AND_PHONE';
|
|
1090
|
+
interface GetContactRequest {
|
|
1091
|
+
/**
|
|
1092
|
+
* ID of the Contact to retrieve.
|
|
1093
|
+
* @format GUID
|
|
1094
|
+
*/
|
|
1095
|
+
contactId: string;
|
|
1096
|
+
}
|
|
1097
|
+
interface GetContactResponse {
|
|
1098
|
+
/** The requested Contact. */
|
|
1099
|
+
contact?: Contact;
|
|
1100
|
+
}
|
|
1101
|
+
interface UpdateContactRequest {
|
|
1102
|
+
/** Contact to be updated, may be partial. */
|
|
1103
|
+
contact: Contact;
|
|
1104
|
+
/**
|
|
1105
|
+
* Allows updating the contact even if it becomes a duplicate of another contact.
|
|
1106
|
+
* More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).
|
|
1107
|
+
*/
|
|
1108
|
+
allowDuplicates?: boolean;
|
|
1109
|
+
}
|
|
1110
|
+
interface UpdateContactResponse {
|
|
1111
|
+
/** Updated Contact. */
|
|
1112
|
+
contact?: Contact;
|
|
1113
|
+
/**
|
|
1114
|
+
* The upload ID of the image upload process.
|
|
1115
|
+
* @maxLength 100
|
|
1116
|
+
*/
|
|
1117
|
+
imageUploadId?: string | null;
|
|
1118
|
+
}
|
|
1119
|
+
interface UpsertContactRequest {
|
|
1120
|
+
/** Contact to be upserted. */
|
|
1121
|
+
contact: Contact;
|
|
1122
|
+
/** The mode in which the upsert should work in. */
|
|
1123
|
+
upsertMode?: UpsertModeWithLiterals;
|
|
1124
|
+
/** Indicates whether to update the contact even if it is a site member. */
|
|
1125
|
+
updateMember?: boolean | null;
|
|
1126
|
+
}
|
|
1127
|
+
declare enum UpsertMode {
|
|
1128
|
+
/** Fields will be overwritten (default). */
|
|
1129
|
+
OVERWRITE = "OVERWRITE",
|
|
1130
|
+
/** Fields will be appended. Non-array fields will be set only if it does not have an existing value. */
|
|
1131
|
+
APPEND = "APPEND",
|
|
1132
|
+
/** Array fields, will be appended. Non-array fields will be overwritten. */
|
|
1133
|
+
OVERWRITE_APPEND_ARRAYS = "OVERWRITE_APPEND_ARRAYS"
|
|
1134
|
+
}
|
|
1135
|
+
/** @enumType */
|
|
1136
|
+
type UpsertModeWithLiterals = UpsertMode | 'OVERWRITE' | 'APPEND' | 'OVERWRITE_APPEND_ARRAYS';
|
|
1137
|
+
interface UpsertContactResponse {
|
|
1138
|
+
/** Upserted contact. */
|
|
1139
|
+
contact?: Contact;
|
|
1140
|
+
/** The action performed on the contact. */
|
|
1141
|
+
action?: UpsertContactResponseActionWithLiterals;
|
|
1142
|
+
/**
|
|
1143
|
+
* The upload ID of the image upload process.
|
|
1144
|
+
* @maxLength 100
|
|
1145
|
+
*/
|
|
1146
|
+
imageUploadId?: string | null;
|
|
1147
|
+
}
|
|
1148
|
+
declare enum UpsertContactResponseAction {
|
|
1149
|
+
UPDATED = "UPDATED",
|
|
1150
|
+
CREATED = "CREATED"
|
|
1151
|
+
}
|
|
1152
|
+
/** @enumType */
|
|
1153
|
+
type UpsertContactResponseActionWithLiterals = UpsertContactResponseAction | 'UPDATED' | 'CREATED';
|
|
1154
|
+
interface FailedMemberUpdate {
|
|
1155
|
+
/**
|
|
1156
|
+
* Contact ID.
|
|
1157
|
+
* @format GUID
|
|
1158
|
+
*/
|
|
1159
|
+
contactId?: string | null;
|
|
1160
|
+
}
|
|
1161
|
+
interface UpdateContactTagsRequest {
|
|
1162
|
+
/**
|
|
1163
|
+
* The contact from which to add or remove tags.
|
|
1164
|
+
* @format GUID
|
|
1165
|
+
*/
|
|
1166
|
+
contactId: string;
|
|
1167
|
+
/** The tags to add. */
|
|
1168
|
+
assignTags?: PrivateTags;
|
|
1169
|
+
/** The tags to remove. */
|
|
1170
|
+
unassignTags?: PrivateTags;
|
|
1171
|
+
}
|
|
1172
|
+
interface UpdateContactTagsResponse {
|
|
1173
|
+
/** Updated Contact. */
|
|
1174
|
+
contact?: Contact;
|
|
1175
|
+
}
|
|
1176
|
+
interface MergeContactsRequest {
|
|
1177
|
+
/**
|
|
1178
|
+
* Target contact ID.
|
|
1179
|
+
* @format GUID
|
|
1180
|
+
*/
|
|
1181
|
+
targetContactId: string;
|
|
1182
|
+
/** Target contact revision number, which increments by 1 each time the contact is updated to prevent conflicting changes. */
|
|
1183
|
+
targetContactRevision: string | null;
|
|
1184
|
+
/** When the target contact is provided, the merged result will be overwritten. */
|
|
1185
|
+
targetContact?: Contact;
|
|
1186
|
+
/**
|
|
1187
|
+
* IDs of up to 5 contacts to merge into the target contact.
|
|
1188
|
+
* If merging more than one source contact,
|
|
1189
|
+
* the first source is given precedence, then the second, and so on.
|
|
1190
|
+
* @minSize 1
|
|
1191
|
+
* @maxSize 5
|
|
1192
|
+
* @format GUID
|
|
1193
|
+
*/
|
|
1194
|
+
sourceContactIds?: string[];
|
|
1195
|
+
/** Indicates whether to only return a preview of the merged contact or perform the actual merge. */
|
|
1196
|
+
preview?: boolean | null;
|
|
1197
|
+
/**
|
|
1198
|
+
* Allows updating the target contact even if it becomes a duplicate of another contact.
|
|
1199
|
+
* This can happen only where the target contact is provided.
|
|
1200
|
+
* More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).
|
|
1201
|
+
*/
|
|
1202
|
+
allowDuplicates?: boolean;
|
|
1203
|
+
}
|
|
1204
|
+
interface MergeContactsResponse {
|
|
1205
|
+
/** Updated target contact. */
|
|
1206
|
+
contact?: Contact;
|
|
1207
|
+
}
|
|
1208
|
+
interface DeleteContactRequest {
|
|
1209
|
+
/**
|
|
1210
|
+
* Id of the Contact to delete.
|
|
1211
|
+
* @format GUID
|
|
1212
|
+
*/
|
|
1213
|
+
contactId: string;
|
|
1214
|
+
/**
|
|
1215
|
+
* Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even
|
|
1216
|
+
* if it is a site member and the site member is also deleted. Default: `false`
|
|
1217
|
+
*/
|
|
1218
|
+
deleteMember?: boolean | null;
|
|
1219
|
+
}
|
|
1220
|
+
interface DeleteContactResponse {
|
|
1221
|
+
}
|
|
1222
|
+
interface FindMatchingContactsRequest {
|
|
1223
|
+
/**
|
|
1224
|
+
* Contact External ID.
|
|
1225
|
+
* @maxLength 100
|
|
1226
|
+
*/
|
|
1227
|
+
externalId?: string | null;
|
|
1228
|
+
/**
|
|
1229
|
+
* Email address.
|
|
1230
|
+
* @format EMAIL
|
|
1231
|
+
* @maxLength 320
|
|
1232
|
+
*/
|
|
1233
|
+
email?: string | null;
|
|
1234
|
+
/**
|
|
1235
|
+
* Phone number.
|
|
1236
|
+
* @minLength 1
|
|
1237
|
+
* @maxLength 50
|
|
1238
|
+
*/
|
|
1239
|
+
phone?: string | null;
|
|
1240
|
+
}
|
|
1241
|
+
interface FindMatchingContactsResponse {
|
|
1242
|
+
/** List of Contacts. At most 100 contacts are returned. */
|
|
1243
|
+
contacts?: Contact[];
|
|
1244
|
+
}
|
|
1245
|
+
interface QueryContactsRequest {
|
|
1246
|
+
/** WQL expression. */
|
|
1247
|
+
query?: CursorQuery;
|
|
1248
|
+
}
|
|
1249
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
1250
|
+
/**
|
|
1251
|
+
* Cursor paging options.
|
|
1252
|
+
*
|
|
1253
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
1254
|
+
*/
|
|
1255
|
+
cursorPaging?: CursorPaging;
|
|
1256
|
+
/**
|
|
1257
|
+
* Filter object.
|
|
1258
|
+
*
|
|
1259
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
1260
|
+
*/
|
|
1261
|
+
filter?: Record<string, any> | null;
|
|
1262
|
+
/**
|
|
1263
|
+
* Sort object.
|
|
1264
|
+
*
|
|
1265
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1266
|
+
* @maxSize 5
|
|
1267
|
+
*/
|
|
1268
|
+
sort?: Sorting[];
|
|
1269
|
+
}
|
|
1270
|
+
/** @oneof */
|
|
1271
|
+
interface CursorQueryPagingMethodOneOf {
|
|
1272
|
+
/**
|
|
1273
|
+
* Cursor paging options.
|
|
1274
|
+
*
|
|
1275
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
1276
|
+
*/
|
|
1277
|
+
cursorPaging?: CursorPaging;
|
|
1278
|
+
}
|
|
1279
|
+
interface Sorting {
|
|
1280
|
+
/**
|
|
1281
|
+
* Name of the field to sort by.
|
|
1282
|
+
* @maxLength 512
|
|
1283
|
+
*/
|
|
1284
|
+
fieldName?: string;
|
|
1285
|
+
/** Sort order. */
|
|
1286
|
+
order?: SortOrderWithLiterals;
|
|
1287
|
+
}
|
|
1288
|
+
declare enum SortOrder {
|
|
1289
|
+
ASC = "ASC",
|
|
1290
|
+
DESC = "DESC"
|
|
1291
|
+
}
|
|
1292
|
+
/** @enumType */
|
|
1293
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
1294
|
+
interface CursorPaging {
|
|
1295
|
+
/**
|
|
1296
|
+
* Maximum number of items to return in the results.
|
|
1297
|
+
* @max 100
|
|
1298
|
+
*/
|
|
1299
|
+
limit?: number | null;
|
|
1300
|
+
/**
|
|
1301
|
+
* Pointer to the next or previous page in the list of results.
|
|
1302
|
+
*
|
|
1303
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1304
|
+
* Not relevant for the first request.
|
|
1305
|
+
* @maxLength 16000
|
|
1306
|
+
*/
|
|
1307
|
+
cursor?: string | null;
|
|
1308
|
+
}
|
|
1309
|
+
interface QueryContactsResponse {
|
|
1310
|
+
/** List of Contacts. */
|
|
1311
|
+
contacts?: Contact[];
|
|
1312
|
+
/** Paging metadata */
|
|
1313
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
1314
|
+
}
|
|
1315
|
+
interface CursorPagingMetadata {
|
|
1316
|
+
/** Number of items returned in current page. */
|
|
1317
|
+
count?: number | null;
|
|
1318
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
1319
|
+
cursors?: Cursors;
|
|
1320
|
+
/**
|
|
1321
|
+
* Whether there are more pages to retrieve following the current page.
|
|
1322
|
+
*
|
|
1323
|
+
* + `true`: Another page of results can be retrieved.
|
|
1324
|
+
* + `false`: This is the last page.
|
|
1325
|
+
*/
|
|
1326
|
+
hasNext?: boolean | null;
|
|
1327
|
+
/**
|
|
1328
|
+
* Total number of items matching the filter.
|
|
1329
|
+
* Available only on the first page of *Search* results, not included in *Query* or *List* results.
|
|
1330
|
+
* If the Search results span multiple pages, the value of `total` will exceed the number of items returned on the first page.
|
|
1331
|
+
*/
|
|
1332
|
+
total?: number | null;
|
|
1333
|
+
}
|
|
1334
|
+
interface Cursors {
|
|
1335
|
+
/**
|
|
1336
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1337
|
+
* @maxLength 16000
|
|
1338
|
+
*/
|
|
1339
|
+
next?: string | null;
|
|
1340
|
+
/**
|
|
1341
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1342
|
+
* @maxLength 16000
|
|
1343
|
+
*/
|
|
1344
|
+
prev?: string | null;
|
|
1345
|
+
}
|
|
1346
|
+
interface SearchContactsRequest {
|
|
1347
|
+
/** WQL search expression */
|
|
1348
|
+
search?: CursorSearch;
|
|
1349
|
+
/**
|
|
1350
|
+
* Name Format for sorting and searching.
|
|
1351
|
+
* When sorting by `displayName`, the returned contacts are ordered by first and last names, by default.
|
|
1352
|
+
* Alternatively, when sorting by `displayName` with `BY_LAST_NAME`, the returned contacts are ordered by last and first names.
|
|
1353
|
+
* For contacts that do not have names, sorting is by email or phone.
|
|
1354
|
+
* When searching by `name.full`, the contacts returned are matched and ordered by first and last names.
|
|
1355
|
+
* Alternatively, when searching by `name.full` with `BY_LAST_NAME`, the contacts returned
|
|
1356
|
+
* are matched and ordered by last and first names.
|
|
1357
|
+
*/
|
|
1358
|
+
nameFormat?: NameFormatWithLiterals;
|
|
1359
|
+
}
|
|
1360
|
+
interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
1361
|
+
/**
|
|
1362
|
+
* Cursor paging options.
|
|
1363
|
+
*
|
|
1364
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
1365
|
+
*/
|
|
1366
|
+
cursorPaging?: CursorPaging;
|
|
1367
|
+
/**
|
|
1368
|
+
* Filter object.
|
|
1369
|
+
*
|
|
1370
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
1371
|
+
*/
|
|
1372
|
+
filter?: Record<string, any> | null;
|
|
1373
|
+
/**
|
|
1374
|
+
* List of sort objects.
|
|
1375
|
+
*
|
|
1376
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1377
|
+
* @maxSize 10
|
|
1378
|
+
*/
|
|
1379
|
+
sort?: Sorting[];
|
|
1380
|
+
/**
|
|
1381
|
+
* Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
|
|
1382
|
+
* @maxSize 10
|
|
1383
|
+
*/
|
|
1384
|
+
aggregations?: Aggregation[];
|
|
1385
|
+
/** Free text to match in searchable fields. */
|
|
1386
|
+
search?: SearchDetails;
|
|
1387
|
+
/**
|
|
1388
|
+
* UTC offset or IANA time zone. Valid values are
|
|
1389
|
+
* ISO 8601 UTC offsets, such as +02:00 or -06:00,
|
|
1390
|
+
* and IANA time zone IDs, such as Europe/Rome
|
|
1391
|
+
*
|
|
1392
|
+
* Affects all filters and aggregations returned values.
|
|
1393
|
+
* You may override this behavior in a specific filter by providing
|
|
1394
|
+
* timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
|
|
1395
|
+
* @maxLength 50
|
|
1396
|
+
*/
|
|
1397
|
+
timeZone?: string | null;
|
|
1398
|
+
}
|
|
1399
|
+
/** @oneof */
|
|
1400
|
+
interface CursorSearchPagingMethodOneOf {
|
|
1401
|
+
/**
|
|
1402
|
+
* Cursor paging options.
|
|
1403
|
+
*
|
|
1404
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
1405
|
+
*/
|
|
1406
|
+
cursorPaging?: CursorPaging;
|
|
1407
|
+
}
|
|
1408
|
+
interface Aggregation extends AggregationKindOneOf {
|
|
1409
|
+
/** Value aggregation */
|
|
1410
|
+
value?: ValueAggregation;
|
|
1411
|
+
/** Range aggregation */
|
|
1412
|
+
range?: RangeAggregation;
|
|
1413
|
+
/** Scalar aggregation */
|
|
1414
|
+
scalar?: ScalarAggregation;
|
|
1415
|
+
/** Date histogram aggregation */
|
|
1416
|
+
dateHistogram?: DateHistogramAggregation;
|
|
1417
|
+
/** Nested aggregation */
|
|
1418
|
+
nested?: NestedAggregation;
|
|
1419
|
+
/**
|
|
1420
|
+
* User-defined name of aggregation, should be unique, will appear in aggregation results
|
|
1421
|
+
* @maxLength 100
|
|
1422
|
+
*/
|
|
1423
|
+
name?: string | null;
|
|
1424
|
+
/** Type of aggregation, client must provide matching aggregation field below */
|
|
1425
|
+
type?: AggregationTypeWithLiterals;
|
|
1426
|
+
/**
|
|
1427
|
+
* Field to aggregate by, use dot notation to specify json path
|
|
1428
|
+
* @maxLength 200
|
|
1429
|
+
*/
|
|
1430
|
+
fieldPath?: string;
|
|
1431
|
+
}
|
|
1432
|
+
/** @oneof */
|
|
1433
|
+
interface AggregationKindOneOf {
|
|
1434
|
+
/** Value aggregation */
|
|
1435
|
+
value?: ValueAggregation;
|
|
1436
|
+
/** Range aggregation */
|
|
1437
|
+
range?: RangeAggregation;
|
|
1438
|
+
/** Scalar aggregation */
|
|
1439
|
+
scalar?: ScalarAggregation;
|
|
1440
|
+
/** Date histogram aggregation */
|
|
1441
|
+
dateHistogram?: DateHistogramAggregation;
|
|
1442
|
+
/** Nested aggregation */
|
|
1443
|
+
nested?: NestedAggregation;
|
|
1444
|
+
}
|
|
1445
|
+
interface RangeBucket {
|
|
1446
|
+
/** Inclusive lower bound of the range. Required if to is not given */
|
|
1447
|
+
from?: number | null;
|
|
1448
|
+
/** Exclusive upper bound of the range. Required if from is not given */
|
|
1449
|
+
to?: number | null;
|
|
1450
|
+
}
|
|
1451
|
+
declare enum SortType {
|
|
1452
|
+
/** Should sort by number of matches */
|
|
1453
|
+
COUNT = "COUNT",
|
|
1454
|
+
/** Should sort by value of the field alphabetically */
|
|
1455
|
+
VALUE = "VALUE"
|
|
1456
|
+
}
|
|
1457
|
+
/** @enumType */
|
|
1458
|
+
type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
|
|
1459
|
+
declare enum SortDirection {
|
|
1460
|
+
/** Should sort in descending order */
|
|
1461
|
+
DESC = "DESC",
|
|
1462
|
+
/** Should sort in ascending order */
|
|
1463
|
+
ASC = "ASC"
|
|
1464
|
+
}
|
|
1465
|
+
/** @enumType */
|
|
1466
|
+
type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
|
|
1467
|
+
declare enum MissingValues {
|
|
1468
|
+
/** Should missing values be excluded from the aggregation results */
|
|
1469
|
+
EXCLUDE = "EXCLUDE",
|
|
1470
|
+
/** Should missing values be included in the aggregation results */
|
|
1471
|
+
INCLUDE = "INCLUDE"
|
|
1472
|
+
}
|
|
1473
|
+
/** @enumType */
|
|
1474
|
+
type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
|
|
1475
|
+
interface IncludeMissingValuesOptions {
|
|
1476
|
+
/**
|
|
1477
|
+
* Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
|
|
1478
|
+
* @maxLength 20
|
|
1479
|
+
*/
|
|
1480
|
+
addToBucket?: string;
|
|
1481
|
+
}
|
|
1482
|
+
declare enum ScalarType {
|
|
1483
|
+
/** Count of distinct values */
|
|
1484
|
+
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
1485
|
+
/** Minimum value */
|
|
1486
|
+
MIN = "MIN",
|
|
1487
|
+
/** Maximum value */
|
|
1488
|
+
MAX = "MAX"
|
|
1489
|
+
}
|
|
1490
|
+
/** @enumType */
|
|
1491
|
+
type ScalarTypeWithLiterals = ScalarType | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
|
|
1492
|
+
declare enum NestedAggregationType {
|
|
1493
|
+
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
1494
|
+
VALUE = "VALUE",
|
|
1495
|
+
/** An aggregation, where user can define set of ranges - each representing a bucket */
|
|
1496
|
+
RANGE = "RANGE",
|
|
1497
|
+
/** A single-value metric aggregation - e.g. min, max, sum, avg */
|
|
1498
|
+
SCALAR = "SCALAR",
|
|
1499
|
+
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
1500
|
+
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
1501
|
+
}
|
|
1502
|
+
/** @enumType */
|
|
1503
|
+
type NestedAggregationTypeWithLiterals = NestedAggregationType | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
|
|
1504
|
+
interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
1505
|
+
/** Options for including missing values */
|
|
1506
|
+
includeOptions?: IncludeMissingValuesOptions;
|
|
1507
|
+
/** Should sort by number of matches or value of the field */
|
|
1508
|
+
sortType?: SortTypeWithLiterals;
|
|
1509
|
+
/** Should sort in ascending or descending order */
|
|
1510
|
+
sortDirection?: SortDirectionWithLiterals;
|
|
1511
|
+
/** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
|
|
1512
|
+
limit?: number | null;
|
|
1513
|
+
/** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
|
|
1514
|
+
missingValues?: MissingValuesWithLiterals;
|
|
1515
|
+
}
|
|
1516
|
+
/** @oneof */
|
|
1517
|
+
interface ValueAggregationOptionsOneOf {
|
|
1518
|
+
/** Options for including missing values */
|
|
1519
|
+
includeOptions?: IncludeMissingValuesOptions;
|
|
1520
|
+
}
|
|
1521
|
+
interface RangeAggregation {
|
|
1522
|
+
/**
|
|
1523
|
+
* List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds
|
|
1524
|
+
* @maxSize 50
|
|
1525
|
+
*/
|
|
1526
|
+
buckets?: RangeBucket[];
|
|
1527
|
+
}
|
|
1528
|
+
interface ScalarAggregation {
|
|
1529
|
+
/** Define the operator for the scalar aggregation */
|
|
1530
|
+
type?: ScalarTypeWithLiterals;
|
|
1531
|
+
}
|
|
1532
|
+
interface DateHistogramAggregation {
|
|
1533
|
+
/** Interval for date histogram aggregation */
|
|
1534
|
+
interval?: IntervalWithLiterals;
|
|
1535
|
+
}
|
|
1536
|
+
declare enum Interval {
|
|
1537
|
+
/** Yearly interval */
|
|
1538
|
+
YEAR = "YEAR",
|
|
1539
|
+
/** Monthly interval */
|
|
1540
|
+
MONTH = "MONTH",
|
|
1541
|
+
/** Weekly interval */
|
|
1542
|
+
WEEK = "WEEK",
|
|
1543
|
+
/** Daily interval */
|
|
1544
|
+
DAY = "DAY",
|
|
1545
|
+
/** Hourly interval */
|
|
1546
|
+
HOUR = "HOUR",
|
|
1547
|
+
/** Minute interval */
|
|
1548
|
+
MINUTE = "MINUTE",
|
|
1549
|
+
/** Second interval */
|
|
1550
|
+
SECOND = "SECOND"
|
|
1551
|
+
}
|
|
1552
|
+
/** @enumType */
|
|
1553
|
+
type IntervalWithLiterals = Interval | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
|
|
1554
|
+
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
1555
|
+
/** Value aggregation */
|
|
1556
|
+
value?: ValueAggregation;
|
|
1557
|
+
/** Range aggregation */
|
|
1558
|
+
range?: RangeAggregation;
|
|
1559
|
+
/** Scalar aggregation */
|
|
1560
|
+
scalar?: ScalarAggregation;
|
|
1561
|
+
/** Date histogram aggregation */
|
|
1562
|
+
dateHistogram?: DateHistogramAggregation;
|
|
1563
|
+
/**
|
|
1564
|
+
* User-defined name of aggregation, should be unique, will appear in aggregation results
|
|
1565
|
+
* @maxLength 100
|
|
1566
|
+
*/
|
|
1567
|
+
name?: string | null;
|
|
1568
|
+
/** Type of aggregation, client must provide matching aggregation field below */
|
|
1569
|
+
type?: NestedAggregationTypeWithLiterals;
|
|
1570
|
+
/**
|
|
1571
|
+
* Field to aggregate by, use dont notation to specify json path
|
|
1572
|
+
* @maxLength 200
|
|
1573
|
+
*/
|
|
1574
|
+
fieldPath?: string;
|
|
1575
|
+
}
|
|
1576
|
+
/** @oneof */
|
|
1577
|
+
interface NestedAggregationItemKindOneOf {
|
|
1578
|
+
/** Value aggregation */
|
|
1579
|
+
value?: ValueAggregation;
|
|
1580
|
+
/** Range aggregation */
|
|
1581
|
+
range?: RangeAggregation;
|
|
1582
|
+
/** Scalar aggregation */
|
|
1583
|
+
scalar?: ScalarAggregation;
|
|
1584
|
+
/** Date histogram aggregation */
|
|
1585
|
+
dateHistogram?: DateHistogramAggregation;
|
|
1586
|
+
}
|
|
1587
|
+
declare enum AggregationType {
|
|
1588
|
+
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
1589
|
+
VALUE = "VALUE",
|
|
1590
|
+
/** An aggregation, where user can define set of ranges - each representing a bucket */
|
|
1591
|
+
RANGE = "RANGE",
|
|
1592
|
+
/** A single-value metric aggregation - e.g. min, max, sum, avg */
|
|
1593
|
+
SCALAR = "SCALAR",
|
|
1594
|
+
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
1595
|
+
DATE_HISTOGRAM = "DATE_HISTOGRAM",
|
|
1596
|
+
/** Multi-level aggregation, where each next aggregation is nested within previous one */
|
|
1597
|
+
NESTED = "NESTED"
|
|
1598
|
+
}
|
|
1599
|
+
/** @enumType */
|
|
1600
|
+
type AggregationTypeWithLiterals = AggregationType | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
|
|
1601
|
+
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
|
|
1602
|
+
interface NestedAggregation {
|
|
1603
|
+
/**
|
|
1604
|
+
* Flattened list of aggregations, where each next aggregation is nested within previous one
|
|
1605
|
+
* @minSize 2
|
|
1606
|
+
* @maxSize 3
|
|
1607
|
+
*/
|
|
1608
|
+
nestedAggregations?: NestedAggregationItem[];
|
|
1609
|
+
}
|
|
1610
|
+
/** Name format types for sorting and searching. */
|
|
1611
|
+
declare enum NameFormat {
|
|
1612
|
+
/** Names will be formatted starting with the first name followed by the last name. */
|
|
1613
|
+
BY_FIRST_NAME = "BY_FIRST_NAME",
|
|
1614
|
+
/** Names will be formatted starting with the last name followed by the first name. */
|
|
1615
|
+
BY_LAST_NAME = "BY_LAST_NAME"
|
|
1616
|
+
}
|
|
1617
|
+
/** @enumType */
|
|
1618
|
+
type NameFormatWithLiterals = NameFormat | 'BY_FIRST_NAME' | 'BY_LAST_NAME';
|
|
1619
|
+
interface SearchContactsResponse {
|
|
1620
|
+
/** List of Contacts. */
|
|
1621
|
+
contacts?: Contact[];
|
|
1622
|
+
/** Paging metadata */
|
|
1623
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
1624
|
+
/** Aggregation data */
|
|
1625
|
+
aggregationData?: AggregationData;
|
|
1626
|
+
}
|
|
1627
|
+
interface AggregationData {
|
|
1628
|
+
/**
|
|
1629
|
+
* key = aggregation name (as derived from search request)
|
|
1630
|
+
* @maxSize 10000
|
|
1631
|
+
*/
|
|
1632
|
+
results?: AggregationResults[];
|
|
1633
|
+
}
|
|
1634
|
+
interface ValueAggregationResult {
|
|
1635
|
+
/**
|
|
1636
|
+
* Value of the field
|
|
1637
|
+
* @maxLength 100
|
|
1638
|
+
*/
|
|
1639
|
+
value?: string;
|
|
1640
|
+
/** Count of entities with this value */
|
|
1641
|
+
count?: number;
|
|
1642
|
+
}
|
|
1643
|
+
interface RangeAggregationResult {
|
|
1644
|
+
/** Inclusive lower bound of the range */
|
|
1645
|
+
from?: number | null;
|
|
1646
|
+
/** Exclusive upper bound of the range */
|
|
1647
|
+
to?: number | null;
|
|
1648
|
+
/** Count of entities in this range */
|
|
1649
|
+
count?: number;
|
|
1650
|
+
}
|
|
1651
|
+
interface ValueResults {
|
|
1652
|
+
/**
|
|
1653
|
+
* List of value aggregations
|
|
1654
|
+
* @maxSize 250
|
|
1655
|
+
*/
|
|
1656
|
+
results?: ValueAggregationResult[];
|
|
1657
|
+
}
|
|
1658
|
+
interface RangeResults {
|
|
1659
|
+
/**
|
|
1660
|
+
* List of ranges returned in same order as requested
|
|
1661
|
+
* @maxSize 50
|
|
1662
|
+
*/
|
|
1663
|
+
results?: RangeAggregationResult[];
|
|
1664
|
+
}
|
|
1665
|
+
interface AggregationResultsScalarResult {
|
|
1666
|
+
/** Type of scalar aggregation */
|
|
1667
|
+
type?: ScalarTypeWithLiterals;
|
|
1668
|
+
/** Value of the scalar aggregation */
|
|
1669
|
+
value?: number;
|
|
1670
|
+
}
|
|
1671
|
+
interface ValueResult {
|
|
1672
|
+
/**
|
|
1673
|
+
* Value of the field
|
|
1674
|
+
* @maxLength 1000
|
|
1675
|
+
*/
|
|
1676
|
+
value?: string;
|
|
1677
|
+
/** Count of entities with this value */
|
|
1678
|
+
count?: number | null;
|
|
1679
|
+
}
|
|
1680
|
+
interface RangeResult {
|
|
1681
|
+
/** Inclusive lower bound of the range */
|
|
1682
|
+
from?: number | null;
|
|
1683
|
+
/** Exclusive upper bound of the range */
|
|
1684
|
+
to?: number | null;
|
|
1685
|
+
/** Count of entities in this range */
|
|
1686
|
+
count?: number | null;
|
|
1687
|
+
}
|
|
1688
|
+
interface ScalarResult {
|
|
1689
|
+
/** Value of the scalar aggregation */
|
|
1690
|
+
value?: number;
|
|
1691
|
+
}
|
|
1692
|
+
interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
1693
|
+
/** Value aggregation result */
|
|
1694
|
+
value?: ValueResult;
|
|
1695
|
+
/** Range aggregation result */
|
|
1696
|
+
range?: RangeResult;
|
|
1697
|
+
/** Scalar aggregation result */
|
|
1698
|
+
scalar?: ScalarResult;
|
|
1699
|
+
/** Date histogram aggregation result */
|
|
1700
|
+
dateHistogram?: ValueResult;
|
|
1701
|
+
}
|
|
1702
|
+
/** @oneof */
|
|
1703
|
+
interface NestedResultValueResultOneOf {
|
|
1704
|
+
/** Value aggregation result */
|
|
1705
|
+
value?: ValueResult;
|
|
1706
|
+
/** Range aggregation result */
|
|
1707
|
+
range?: RangeResult;
|
|
1708
|
+
/** Scalar aggregation result */
|
|
1709
|
+
scalar?: ScalarResult;
|
|
1710
|
+
/** Date histogram aggregation result */
|
|
1711
|
+
dateHistogram?: ValueResult;
|
|
1712
|
+
}
|
|
1713
|
+
interface Results {
|
|
1714
|
+
/** List of nested aggregations */
|
|
1715
|
+
results?: Record<string, NestedResultValue>;
|
|
1716
|
+
}
|
|
1717
|
+
interface DateHistogramResult {
|
|
1718
|
+
/**
|
|
1719
|
+
* Date in ISO 8601 format
|
|
1720
|
+
* @maxLength 100
|
|
1721
|
+
*/
|
|
1722
|
+
value?: string;
|
|
1723
|
+
/** Count of documents in the bucket */
|
|
1724
|
+
count?: number;
|
|
1725
|
+
}
|
|
1726
|
+
interface DateHistogramResults {
|
|
1727
|
+
/**
|
|
1728
|
+
* List of date histogram aggregations
|
|
1729
|
+
* @maxSize 200
|
|
1730
|
+
*/
|
|
1731
|
+
results?: DateHistogramResult[];
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* Results of `NESTED` aggregation type in a flattened form
|
|
1735
|
+
* aggregations in resulting array are keyed by requested aggregation `name`.
|
|
1736
|
+
*/
|
|
1737
|
+
interface NestedResults {
|
|
1738
|
+
/**
|
|
1739
|
+
* List of nested aggregations
|
|
1740
|
+
* @maxSize 1000
|
|
1741
|
+
*/
|
|
1742
|
+
results?: Results[];
|
|
1743
|
+
}
|
|
1744
|
+
interface AggregationResults extends AggregationResultsResultOneOf {
|
|
1745
|
+
/** Value aggregation results */
|
|
1746
|
+
values?: ValueResults;
|
|
1747
|
+
/** Range aggregation results */
|
|
1748
|
+
ranges?: RangeResults;
|
|
1749
|
+
/** Scalar aggregation results */
|
|
1750
|
+
scalar?: AggregationResultsScalarResult;
|
|
1751
|
+
/** Date histogram aggregation results */
|
|
1752
|
+
dateHistogram?: DateHistogramResults;
|
|
1753
|
+
/** Nested aggregation results */
|
|
1754
|
+
nested?: NestedResults;
|
|
1755
|
+
/**
|
|
1756
|
+
* User-defined name of aggregation as derived from search request
|
|
1757
|
+
* @maxLength 100
|
|
1758
|
+
*/
|
|
1759
|
+
name?: string;
|
|
1760
|
+
/** Type of aggregation that must match provided kind as derived from search request */
|
|
1761
|
+
type?: AggregationTypeWithLiterals;
|
|
1762
|
+
/**
|
|
1763
|
+
* Field to aggregate by as derived from search request
|
|
1764
|
+
* @maxLength 200
|
|
1765
|
+
*/
|
|
1766
|
+
fieldPath?: string;
|
|
1767
|
+
}
|
|
1768
|
+
/** @oneof */
|
|
1769
|
+
interface AggregationResultsResultOneOf {
|
|
1770
|
+
/** Value aggregation results */
|
|
1771
|
+
values?: ValueResults;
|
|
1772
|
+
/** Range aggregation results */
|
|
1773
|
+
ranges?: RangeResults;
|
|
1774
|
+
/** Scalar aggregation results */
|
|
1775
|
+
scalar?: AggregationResultsScalarResult;
|
|
1776
|
+
/** Date histogram aggregation results */
|
|
1777
|
+
dateHistogram?: DateHistogramResults;
|
|
1778
|
+
/** Nested aggregation results */
|
|
1779
|
+
nested?: NestedResults;
|
|
1780
|
+
}
|
|
1781
|
+
interface CountContactsRequest {
|
|
1782
|
+
/**
|
|
1783
|
+
* Filter object.
|
|
1784
|
+
*
|
|
1785
|
+
* Example:
|
|
1786
|
+
* `{ "filter": { "name.last": "Smith" } }`
|
|
1787
|
+
*/
|
|
1788
|
+
filter?: Record<string, any> | null;
|
|
1789
|
+
/**
|
|
1790
|
+
* Plain text search for an exact match.
|
|
1791
|
+
*
|
|
1792
|
+
* Supported search properties are:
|
|
1793
|
+
*
|
|
1794
|
+
* - `name.full`
|
|
1795
|
+
* - `email.email`
|
|
1796
|
+
* - `phone.phone`
|
|
1797
|
+
* - `member_info.email`
|
|
1798
|
+
* - `member_info.profile_info.nickname`
|
|
1799
|
+
* - `company.name`
|
|
1800
|
+
* - `company.job_title`
|
|
1801
|
+
*
|
|
1802
|
+
* Max: 100 characters
|
|
1803
|
+
* @maxLength 100
|
|
1804
|
+
*/
|
|
1805
|
+
search?: string | null;
|
|
1806
|
+
}
|
|
1807
|
+
interface CountContactsResponse {
|
|
1808
|
+
/** number of contacts */
|
|
1809
|
+
count?: number;
|
|
1810
|
+
}
|
|
1811
|
+
interface GenerateContactImageUploadUrlRequest {
|
|
1812
|
+
/**
|
|
1813
|
+
* ID of the contact whose picture is being updated.
|
|
1814
|
+
* @format GUID
|
|
1815
|
+
*/
|
|
1816
|
+
contactId: string;
|
|
1817
|
+
/**
|
|
1818
|
+
* Mime Type. Must be one of: `image/png`, `image/jpeg`.
|
|
1819
|
+
* Defaults to `image/png`.
|
|
1820
|
+
* @maxLength 100
|
|
1821
|
+
*/
|
|
1822
|
+
mimeType?: string | null;
|
|
1823
|
+
}
|
|
1824
|
+
interface GenerateContactImageUploadUrlResponse {
|
|
1825
|
+
/**
|
|
1826
|
+
* URL to upload the image to.
|
|
1827
|
+
* @format WEB_URL
|
|
1828
|
+
*/
|
|
1829
|
+
uploadUrl?: string;
|
|
1830
|
+
/**
|
|
1831
|
+
* The upload id.
|
|
1832
|
+
* @format GUID
|
|
1833
|
+
*/
|
|
1834
|
+
imageUploadId?: string;
|
|
1835
|
+
}
|
|
1836
|
+
interface AddContactAdditionalEmailRequest {
|
|
1837
|
+
/**
|
|
1838
|
+
* ID of the Contact to add an email.
|
|
1839
|
+
* @format GUID
|
|
1840
|
+
*/
|
|
1841
|
+
contactId: string;
|
|
1842
|
+
/** The email to add. */
|
|
1843
|
+
email: AdditionalEmail;
|
|
1844
|
+
/** Contact revision number for optimistic concurrency control. */
|
|
1845
|
+
revision: string | null;
|
|
1846
|
+
}
|
|
1847
|
+
interface AddContactAdditionalEmailResponse {
|
|
1848
|
+
/** Updated Contact. */
|
|
1849
|
+
contact?: Contact;
|
|
1850
|
+
}
|
|
1851
|
+
interface AddContactAdditionalPhoneRequest {
|
|
1852
|
+
/**
|
|
1853
|
+
* ID of the Contact to add a phone.
|
|
1854
|
+
* @format GUID
|
|
1855
|
+
*/
|
|
1856
|
+
contactId: string;
|
|
1857
|
+
/** The phone to add. */
|
|
1858
|
+
phone: AdditionalPhone;
|
|
1859
|
+
/** Contact revision number for optimistic concurrency control. */
|
|
1860
|
+
revision: string | null;
|
|
1861
|
+
}
|
|
1862
|
+
interface AddContactAdditionalPhoneResponse {
|
|
1863
|
+
/** Updated Contact. */
|
|
1864
|
+
contact?: Contact;
|
|
1865
|
+
}
|
|
1866
|
+
interface AddContactAddressRequest {
|
|
1867
|
+
/**
|
|
1868
|
+
* ID of the Contact to add an address.
|
|
1869
|
+
* @format GUID
|
|
1870
|
+
*/
|
|
1871
|
+
contactId: string;
|
|
1872
|
+
/** The address to add. */
|
|
1873
|
+
address: ContactAddress;
|
|
1874
|
+
/** Contact revision number for optimistic concurrency control. */
|
|
1875
|
+
revision: string | null;
|
|
1876
|
+
}
|
|
1877
|
+
interface AddContactAddressResponse {
|
|
1878
|
+
/** Updated Contact. */
|
|
1879
|
+
contact?: Contact;
|
|
1880
|
+
}
|
|
1881
|
+
interface DeleteContactAddressRequest {
|
|
1882
|
+
/**
|
|
1883
|
+
* ID of the Contact from which to delete an address.
|
|
1884
|
+
* @format GUID
|
|
1885
|
+
*/
|
|
1886
|
+
contactId: string;
|
|
1887
|
+
/**
|
|
1888
|
+
* ID of the address to delete.
|
|
1889
|
+
* @format GUID
|
|
1890
|
+
*/
|
|
1891
|
+
addressId: string;
|
|
1892
|
+
/** Contact revision number for optimistic concurrency control. */
|
|
1893
|
+
revision: string | null;
|
|
1894
|
+
}
|
|
1895
|
+
interface DeleteContactAddressResponse {
|
|
1896
|
+
/** Updated Contact after address deletion. */
|
|
1897
|
+
contact?: Contact;
|
|
1898
|
+
}
|
|
1899
|
+
interface UpdateContactAddressRequest {
|
|
1900
|
+
/**
|
|
1901
|
+
* ID of the Contact to update address on.
|
|
1902
|
+
* @format GUID
|
|
1903
|
+
*/
|
|
1904
|
+
contactId: string;
|
|
1905
|
+
/** The updated address (must include address.id). */
|
|
1906
|
+
address: ContactAddress;
|
|
1907
|
+
/** Contact revision number for optimistic concurrency control. */
|
|
1908
|
+
revision: string | null;
|
|
1909
|
+
}
|
|
1910
|
+
interface UpdateContactAddressResponse {
|
|
1911
|
+
/** Updated Contact after address update. */
|
|
1912
|
+
contact?: Contact;
|
|
1913
|
+
}
|
|
1914
|
+
interface BulkCreateContactsRequest {
|
|
1915
|
+
/**
|
|
1916
|
+
* List of Contacts to be created
|
|
1917
|
+
* @minSize 1
|
|
1918
|
+
* @maxSize 100
|
|
1919
|
+
*/
|
|
1920
|
+
contacts: Contact[];
|
|
1921
|
+
/** set to `true` if you wish to receive back the created Contacts in the response */
|
|
1922
|
+
returnEntity?: boolean;
|
|
1923
|
+
/** Allows creating the contact even if a duplicate already exists. */
|
|
1924
|
+
allowDuplicates?: boolean;
|
|
1925
|
+
}
|
|
1926
|
+
interface BulkCreateContactsResponse {
|
|
1927
|
+
/**
|
|
1928
|
+
* List of the bulk create operation results including the Contacts and metadata.
|
|
1929
|
+
* @minSize 1
|
|
1930
|
+
* @maxSize 100
|
|
1931
|
+
*/
|
|
1932
|
+
results?: BulkContactResult[];
|
|
1933
|
+
/** Metadata regarding the bulk create operation */
|
|
1934
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1935
|
+
}
|
|
1936
|
+
interface ItemMetadata {
|
|
1937
|
+
/**
|
|
1938
|
+
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
1939
|
+
* @format GUID
|
|
1940
|
+
*/
|
|
1941
|
+
_id?: string | null;
|
|
1942
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1943
|
+
originalIndex?: number;
|
|
1944
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1945
|
+
success?: boolean;
|
|
1946
|
+
/** Details about the error in case of failure. */
|
|
1947
|
+
error?: ApplicationError;
|
|
1948
|
+
}
|
|
1949
|
+
interface ApplicationError {
|
|
1950
|
+
/** Error code. */
|
|
1951
|
+
code?: string;
|
|
1952
|
+
/** Description of the error. */
|
|
1953
|
+
description?: string;
|
|
1954
|
+
/** Data related to the error. */
|
|
1955
|
+
data?: Record<string, any> | null;
|
|
1956
|
+
}
|
|
1957
|
+
interface BulkContactResult {
|
|
1958
|
+
/** Metadata regarding the specific single create operation */
|
|
1959
|
+
itemMetadata?: ItemMetadata;
|
|
1960
|
+
/** Only exists if `returnEntity` was set to true in the request */
|
|
1961
|
+
item?: Contact;
|
|
1962
|
+
}
|
|
1963
|
+
interface BulkActionMetadata {
|
|
1964
|
+
/** Number of items that were successfully processed. */
|
|
1965
|
+
totalSuccesses?: number;
|
|
1966
|
+
/** Number of items that couldn't be processed. */
|
|
1967
|
+
totalFailures?: number;
|
|
1968
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1969
|
+
undetailedFailures?: number;
|
|
1970
|
+
}
|
|
1971
|
+
interface BulkUpdateContactsRequest {
|
|
1972
|
+
/**
|
|
1973
|
+
* List of Contacts to be updated.
|
|
1974
|
+
* @minSize 1
|
|
1975
|
+
* @maxSize 100
|
|
1976
|
+
*/
|
|
1977
|
+
contacts: MaskedContact[];
|
|
1978
|
+
/** set to `true` if you wish to receive back the updated Contacts in the response */
|
|
1979
|
+
returnEntity?: boolean;
|
|
1980
|
+
/** Allows updating the contact even if it becomes a duplicate of another contact. */
|
|
1981
|
+
allowDuplicates?: boolean;
|
|
1982
|
+
}
|
|
1983
|
+
interface MaskedContact {
|
|
1984
|
+
/** Contact to be updated, may be partial */
|
|
1985
|
+
contact?: Contact;
|
|
1986
|
+
}
|
|
1987
|
+
interface BulkUpdateContactsResponse {
|
|
1988
|
+
/**
|
|
1989
|
+
* Results
|
|
1990
|
+
* @minSize 1
|
|
1991
|
+
* @maxSize 100
|
|
1992
|
+
*/
|
|
1993
|
+
results?: BulkUpdateContactsResponseBulkContactResult[];
|
|
1994
|
+
/** Metadata regarding the bulk update operation */
|
|
1995
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1996
|
+
}
|
|
1997
|
+
interface BulkUpdateContactsResponseBulkContactResult {
|
|
1998
|
+
/** Metadata regarding the specific single update operation */
|
|
1999
|
+
itemMetadata?: ItemMetadata;
|
|
2000
|
+
/** Only exists if `returnEntity` was set to true in the request */
|
|
2001
|
+
item?: Contact;
|
|
2002
|
+
}
|
|
2003
|
+
interface BulkUpdateContactTagsRequest {
|
|
2004
|
+
/**
|
|
2005
|
+
* The contacts from which to add or remove tags.
|
|
2006
|
+
* @minSize 1
|
|
2007
|
+
* @maxSize 100
|
|
2008
|
+
* @format GUID
|
|
2009
|
+
*/
|
|
2010
|
+
contactIds: string[];
|
|
2011
|
+
/** set to `true` if you wish to receive back the updated Contacts in the response */
|
|
2012
|
+
returnEntity?: boolean;
|
|
2013
|
+
/** The tags to add. */
|
|
2014
|
+
assignTags?: PrivateTags;
|
|
2015
|
+
/** The tags to remove. */
|
|
2016
|
+
unassignTags?: PrivateTags;
|
|
2017
|
+
}
|
|
2018
|
+
interface BulkUpdateContactTagsResponse {
|
|
2019
|
+
/**
|
|
2020
|
+
* The results of the update for all contacts in the request.
|
|
2021
|
+
* @minSize 1
|
|
2022
|
+
* @maxSize 100
|
|
2023
|
+
*/
|
|
2024
|
+
results?: BulkUpdateContactTagsResult[];
|
|
2025
|
+
/** Summary of successes and failures. */
|
|
2026
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
2027
|
+
}
|
|
2028
|
+
interface BulkUpdateContactTagsResult {
|
|
2029
|
+
/** Metadata regarding the specific single update operation */
|
|
2030
|
+
itemMetadata?: ItemMetadata;
|
|
2031
|
+
/** Only exists if `returnEntity` was set to true in the request */
|
|
2032
|
+
item?: Contact;
|
|
2033
|
+
}
|
|
2034
|
+
interface BulkUpdateContactTagsByFilterRequest {
|
|
2035
|
+
/** A filter object. See documentation [here](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters) */
|
|
2036
|
+
filter: Record<string, any> | null;
|
|
2037
|
+
/** Free text to match in searchable fields. */
|
|
2038
|
+
search?: SearchDetails;
|
|
2039
|
+
/** Tag ids to add to the contact. */
|
|
2040
|
+
assignTags?: PrivateTags;
|
|
2041
|
+
/** Tag ids to remove from the contact. */
|
|
2042
|
+
unassignTags?: PrivateTags;
|
|
2043
|
+
}
|
|
2044
|
+
interface BulkUpdateContactTagsByFilterResponse {
|
|
2045
|
+
/**
|
|
2046
|
+
* The ID of the update tags job.
|
|
2047
|
+
*
|
|
2048
|
+
* Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.
|
|
2049
|
+
* @format GUID
|
|
2050
|
+
*/
|
|
2051
|
+
jobId?: string;
|
|
2052
|
+
}
|
|
2053
|
+
interface BulkUpsertContactsRequest {
|
|
2054
|
+
/**
|
|
2055
|
+
* List of Contacts to be updated.
|
|
2056
|
+
* @minSize 1
|
|
2057
|
+
* @maxSize 100
|
|
2058
|
+
*/
|
|
2059
|
+
contacts: BulkUpsertContactsRequestMaskedContact[];
|
|
2060
|
+
/** set to `true` if you wish to receive back the updated Contacts in the response */
|
|
2061
|
+
returnEntity?: boolean;
|
|
2062
|
+
/** The mode in which the upsert should work in. */
|
|
2063
|
+
upsertMode?: UpsertModeWithLiterals;
|
|
2064
|
+
/** Indicates whether to update a contact even if it is a site member. */
|
|
2065
|
+
updateMember?: boolean | null;
|
|
2066
|
+
}
|
|
2067
|
+
interface BulkUpsertContactsRequestMaskedContact {
|
|
2068
|
+
/** Contact to be updated, may be partial */
|
|
2069
|
+
contact?: Contact;
|
|
2070
|
+
}
|
|
2071
|
+
interface BulkUpsertContactsResponse {
|
|
2072
|
+
/**
|
|
2073
|
+
* Results
|
|
2074
|
+
* @minSize 1
|
|
2075
|
+
* @maxSize 100
|
|
2076
|
+
*/
|
|
2077
|
+
results?: BulkUpsertContactsResponseBulkContactResult[];
|
|
2078
|
+
/** Metadata regarding the bulk update operation */
|
|
2079
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
2080
|
+
}
|
|
2081
|
+
declare enum Action {
|
|
2082
|
+
UNKNOWN_ACTION = "UNKNOWN_ACTION",
|
|
2083
|
+
UPDATED = "UPDATED",
|
|
2084
|
+
CREATED = "CREATED"
|
|
2085
|
+
}
|
|
2086
|
+
/** @enumType */
|
|
2087
|
+
type ActionWithLiterals = Action | 'UNKNOWN_ACTION' | 'UPDATED' | 'CREATED';
|
|
2088
|
+
interface BulkUpsertContactsResponseBulkContactResult {
|
|
2089
|
+
/** Metadata regarding the specific single update operation */
|
|
2090
|
+
itemMetadata?: ItemMetadata;
|
|
2091
|
+
/** Only exists if `returnEntity` was set to true in the request */
|
|
2092
|
+
item?: Contact;
|
|
2093
|
+
/** The action performed on the contact. */
|
|
2094
|
+
action?: ActionWithLiterals;
|
|
2095
|
+
}
|
|
2096
|
+
interface BulkDeleteContactsRequest {
|
|
2097
|
+
/**
|
|
2098
|
+
* Contact ids to be deleted
|
|
2099
|
+
* @minSize 1
|
|
2100
|
+
* @maxSize 100
|
|
2101
|
+
* @format GUID
|
|
2102
|
+
*/
|
|
2103
|
+
contactIds: string[];
|
|
2104
|
+
/**
|
|
2105
|
+
* Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even
|
|
2106
|
+
* if it is a site member and the site member is also deleted. Default: `false`
|
|
2107
|
+
*/
|
|
2108
|
+
deleteMembers?: boolean | null;
|
|
2109
|
+
}
|
|
2110
|
+
interface BulkDeleteContactsResponse {
|
|
2111
|
+
/**
|
|
2112
|
+
* Results
|
|
2113
|
+
* @minSize 1
|
|
2114
|
+
* @maxSize 100
|
|
2115
|
+
*/
|
|
2116
|
+
results?: BulkDeleteContactsResponseBulkContactResult[];
|
|
2117
|
+
/** Metadata regarding the bulk delete operation */
|
|
2118
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
2119
|
+
}
|
|
2120
|
+
interface BulkDeleteContactsResponseBulkContactResult {
|
|
2121
|
+
/** Metadata regarding the specific single delete operation */
|
|
2122
|
+
itemMetadata?: ItemMetadata;
|
|
2123
|
+
}
|
|
2124
|
+
interface BulkDeleteContactsByFilterRequest {
|
|
2125
|
+
/**
|
|
2126
|
+
* Filter object.
|
|
2127
|
+
*
|
|
2128
|
+
* Example:
|
|
2129
|
+
* `{ "filter": { "name.last": "Smith" } }`
|
|
2130
|
+
*/
|
|
2131
|
+
filter: Record<string, any> | null;
|
|
2132
|
+
/** Free text to match in searchable fields */
|
|
2133
|
+
search?: SearchDetails;
|
|
2134
|
+
/**
|
|
2135
|
+
* Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even
|
|
2136
|
+
* if it is a site member and the site member is also deleted. Default: `false`
|
|
2137
|
+
*/
|
|
2138
|
+
deleteMembers?: boolean | null;
|
|
2139
|
+
}
|
|
2140
|
+
interface BulkDeleteContactsByFilterResponse {
|
|
2141
|
+
/**
|
|
2142
|
+
* The ID of the delete job.
|
|
2143
|
+
*
|
|
2144
|
+
* Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.
|
|
2145
|
+
* @format GUID
|
|
2146
|
+
*/
|
|
2147
|
+
jobId?: string;
|
|
2148
|
+
}
|
|
2149
|
+
interface RemoveContactFromTrashBinRequest {
|
|
2150
|
+
/**
|
|
2151
|
+
* Id of the Contact to remove from trashbin.
|
|
2152
|
+
* @format GUID
|
|
2153
|
+
*/
|
|
2154
|
+
contactId: string;
|
|
2155
|
+
}
|
|
2156
|
+
interface RemoveContactFromTrashBinResponse {
|
|
2157
|
+
}
|
|
2158
|
+
interface RestoreContactFromTrashBinRequest {
|
|
2159
|
+
/**
|
|
2160
|
+
* Id of the Contact to restore from trashbin.
|
|
2161
|
+
* @format GUID
|
|
2162
|
+
*/
|
|
2163
|
+
contactId: string;
|
|
2164
|
+
}
|
|
2165
|
+
interface RestoreContactFromTrashBinResponse {
|
|
2166
|
+
/** The restored Contact. */
|
|
2167
|
+
contact?: Contact;
|
|
2168
|
+
}
|
|
2169
|
+
interface BulkRestoreContactsFromTrashBinRequest {
|
|
2170
|
+
/**
|
|
2171
|
+
* List of Contacts to be restored
|
|
2172
|
+
* @minSize 1
|
|
2173
|
+
* @maxSize 100
|
|
2174
|
+
* @format GUID
|
|
2175
|
+
*/
|
|
2176
|
+
contactIds?: string[];
|
|
2177
|
+
/** return full entity in response */
|
|
2178
|
+
returnEntity?: boolean;
|
|
2179
|
+
}
|
|
2180
|
+
interface BulkRestoreContactsFromTrashBinResponse {
|
|
2181
|
+
/**
|
|
2182
|
+
* Results
|
|
2183
|
+
* @minSize 1
|
|
2184
|
+
* @maxSize 100
|
|
2185
|
+
*/
|
|
2186
|
+
results?: BulkRestoreContactsFromTrashBinResponseBulkContactResult[];
|
|
2187
|
+
/** Metadata regarding the bulk delete operation */
|
|
2188
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
2189
|
+
}
|
|
2190
|
+
interface BulkRestoreContactsFromTrashBinResponseBulkContactResult {
|
|
2191
|
+
/** Metadata regarding the specific single restore operation */
|
|
2192
|
+
itemMetadata?: ItemMetadata;
|
|
2193
|
+
/** Only exists if returnEntity was set to true in the request */
|
|
2194
|
+
item?: Contact;
|
|
2195
|
+
}
|
|
2196
|
+
interface GetDeletedContactRequest {
|
|
2197
|
+
/**
|
|
2198
|
+
* Id of the Contact to retrieve from trashbin.
|
|
2199
|
+
* @format GUID
|
|
2200
|
+
*/
|
|
2201
|
+
contactId: string;
|
|
2202
|
+
}
|
|
2203
|
+
interface GetDeletedContactResponse {
|
|
2204
|
+
/** The requested Contact. */
|
|
2205
|
+
contact?: Contact;
|
|
2206
|
+
}
|
|
2207
|
+
interface ListDeletedContactsRequest {
|
|
2208
|
+
/**
|
|
2209
|
+
* External ID
|
|
2210
|
+
* @maxLength 100
|
|
2211
|
+
*/
|
|
2212
|
+
externalId?: string | null;
|
|
2213
|
+
/**
|
|
2214
|
+
* Email address.
|
|
2215
|
+
* @format EMAIL
|
|
2216
|
+
* @maxLength 320
|
|
2217
|
+
*/
|
|
2218
|
+
email?: string | null;
|
|
2219
|
+
/**
|
|
2220
|
+
* Phone number.
|
|
2221
|
+
* @minLength 1
|
|
2222
|
+
* @maxLength 50
|
|
2223
|
+
*/
|
|
2224
|
+
phone?: string | null;
|
|
2225
|
+
/**
|
|
2226
|
+
* Contact IDs.
|
|
2227
|
+
* @maxSize 100
|
|
2228
|
+
* @format GUID
|
|
2229
|
+
*/
|
|
2230
|
+
contactIds?: string[];
|
|
2231
|
+
/** From date and time that contact was deleted. */
|
|
2232
|
+
deletedFromDate?: Date | null;
|
|
2233
|
+
/** Until date and time that contact was deleted. */
|
|
2234
|
+
deletedToDate?: Date | null;
|
|
2235
|
+
/** Cursor paging. */
|
|
2236
|
+
paging?: CursorPaging;
|
|
2237
|
+
}
|
|
2238
|
+
interface ListDeletedContactsResponse {
|
|
2239
|
+
/** List of Contacts. */
|
|
2240
|
+
contacts?: Contact[];
|
|
2241
|
+
/** Paging metadata */
|
|
2242
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
2243
|
+
}
|
|
2244
|
+
interface BulkAddSegmentToContactsRequest {
|
|
2245
|
+
/**
|
|
2246
|
+
* Segment id
|
|
2247
|
+
* @format GUID
|
|
2248
|
+
*/
|
|
2249
|
+
segmentId?: string;
|
|
2250
|
+
/**
|
|
2251
|
+
* List of Contact ids
|
|
2252
|
+
* @format GUID
|
|
2253
|
+
* @minSize 1
|
|
2254
|
+
* @maxSize 100
|
|
2255
|
+
*/
|
|
2256
|
+
contactIds?: string[];
|
|
2257
|
+
/**
|
|
2258
|
+
* List of existing segment ids. It is used to remove segments that no longer exist that are still on the contact.
|
|
2259
|
+
* @format GUID
|
|
2260
|
+
* @maxSize 100
|
|
2261
|
+
*/
|
|
2262
|
+
existingSegmentIds?: string[];
|
|
2263
|
+
}
|
|
2264
|
+
interface BulkAddSegmentToContactsResponse {
|
|
2265
|
+
/** List of action results */
|
|
2266
|
+
results?: ItemMetadata[];
|
|
2267
|
+
/** Metadata on the bulk action */
|
|
2268
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
2269
|
+
}
|
|
2270
|
+
interface BulkRemoveSegmentFromContactsRequest {
|
|
2271
|
+
/**
|
|
2272
|
+
* Segment id
|
|
2273
|
+
* @format GUID
|
|
2274
|
+
*/
|
|
2275
|
+
segmentId?: string;
|
|
2276
|
+
/**
|
|
2277
|
+
* List of Contact ids
|
|
2278
|
+
* @format GUID
|
|
2279
|
+
* @minSize 1
|
|
2280
|
+
* @maxSize 100
|
|
2281
|
+
*/
|
|
2282
|
+
contactIds?: string[];
|
|
2283
|
+
}
|
|
2284
|
+
interface BulkRemoveSegmentFromContactsResponse {
|
|
2285
|
+
/** List of action results */
|
|
2286
|
+
results?: ItemMetadata[];
|
|
2287
|
+
/** Metadata on the bulk action */
|
|
2288
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
2289
|
+
}
|
|
2290
|
+
interface QueryContactsByOffsetInternalRequest {
|
|
2291
|
+
/** WQL expression. */
|
|
2292
|
+
query?: QueryV2;
|
|
2293
|
+
/**
|
|
2294
|
+
* Plain text search for an exact match.
|
|
2295
|
+
*
|
|
2296
|
+
* Supported search properties are:
|
|
2297
|
+
*
|
|
2298
|
+
* - `name.full`
|
|
2299
|
+
* - `email.email`
|
|
2300
|
+
* - `phone.phone`
|
|
2301
|
+
* - `member_info.email`
|
|
2302
|
+
* - `member_info.profile_info.nickname`
|
|
2303
|
+
* - `company.name`
|
|
2304
|
+
* - `company.job_title`
|
|
2305
|
+
*
|
|
2306
|
+
* Max: 100 characters
|
|
2307
|
+
* @maxLength 100
|
|
2308
|
+
*/
|
|
2309
|
+
search?: string | null;
|
|
2310
|
+
/**
|
|
2311
|
+
* Name Format for sorting and searching.
|
|
2312
|
+
* When sorting by `displayName`, the returned contacts are ordered by first and last names, by default.
|
|
2313
|
+
* Alternatively, when sorting by `displayName` with `BY_LAST_NAME`, the returned contacts are ordered by last and first names.
|
|
2314
|
+
* For contacts that do not have names, sorting is by email or phone.
|
|
2315
|
+
* When searching by `name.full`, the contacts returned are matched and ordered by first and last names.
|
|
2316
|
+
* Alternatively, when searching by `name.full` with `BY_LAST_NAME`, the contacts returned
|
|
2317
|
+
* are matched and ordered by last and first names.
|
|
2318
|
+
*/
|
|
2319
|
+
nameFormat?: QueryContactsByOffsetInternalRequestNameFormatWithLiterals;
|
|
2320
|
+
}
|
|
2321
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
2322
|
+
/** Paging options to limit and skip the number of items. */
|
|
2323
|
+
paging?: Paging;
|
|
2324
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
2325
|
+
cursorPaging?: CursorPaging;
|
|
2326
|
+
/**
|
|
2327
|
+
* Filter object.
|
|
2328
|
+
*
|
|
2329
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
2330
|
+
*/
|
|
2331
|
+
filter?: Record<string, any> | null;
|
|
2332
|
+
/**
|
|
2333
|
+
* Sort object.
|
|
2334
|
+
*
|
|
2335
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
2336
|
+
* @maxSize 100
|
|
2337
|
+
*/
|
|
2338
|
+
sort?: Sorting[];
|
|
2339
|
+
/**
|
|
2340
|
+
* Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned.
|
|
2341
|
+
* @maxSize 1000
|
|
2342
|
+
* @maxLength 100
|
|
2343
|
+
*/
|
|
2344
|
+
fields?: string[];
|
|
2345
|
+
/**
|
|
2346
|
+
* Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned.
|
|
2347
|
+
* @maxSize 100
|
|
2348
|
+
* @maxLength 100
|
|
2349
|
+
*/
|
|
2350
|
+
fieldsets?: string[];
|
|
2351
|
+
}
|
|
2352
|
+
/** @oneof */
|
|
2353
|
+
interface QueryV2PagingMethodOneOf {
|
|
2354
|
+
/** Paging options to limit and skip the number of items. */
|
|
2355
|
+
paging?: Paging;
|
|
2356
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
2357
|
+
cursorPaging?: CursorPaging;
|
|
2358
|
+
}
|
|
2359
|
+
interface Paging {
|
|
2360
|
+
/**
|
|
2361
|
+
* Number of items to load.
|
|
2362
|
+
* @max 100
|
|
2363
|
+
*/
|
|
2364
|
+
limit?: number | null;
|
|
2365
|
+
/** Number of items to skip in the current sort order. */
|
|
2366
|
+
offset?: number | null;
|
|
2367
|
+
}
|
|
2368
|
+
/** Name format types for sorting and searching. */
|
|
2369
|
+
declare enum QueryContactsByOffsetInternalRequestNameFormat {
|
|
2370
|
+
BY_FIRST_NAME = "BY_FIRST_NAME",
|
|
2371
|
+
BY_LAST_NAME = "BY_LAST_NAME"
|
|
2372
|
+
}
|
|
2373
|
+
/** @enumType */
|
|
2374
|
+
type QueryContactsByOffsetInternalRequestNameFormatWithLiterals = QueryContactsByOffsetInternalRequestNameFormat | 'BY_FIRST_NAME' | 'BY_LAST_NAME';
|
|
2375
|
+
interface QueryContactsByOffsetInternalResponse {
|
|
2376
|
+
/** List of Contacts. */
|
|
2377
|
+
contacts?: Contact[];
|
|
2378
|
+
/** Paging metadata */
|
|
2379
|
+
pagingMetadata?: PagingMetadataV2;
|
|
2380
|
+
}
|
|
2381
|
+
interface PagingMetadataV2 {
|
|
2382
|
+
/** Number of items returned in the response. */
|
|
2383
|
+
count?: number | null;
|
|
2384
|
+
/** Offset that was requested. */
|
|
2385
|
+
offset?: number | null;
|
|
2386
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
2387
|
+
total?: number | null;
|
|
2388
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
2389
|
+
tooManyToCount?: boolean | null;
|
|
2390
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
2391
|
+
cursors?: Cursors;
|
|
2392
|
+
}
|
|
2393
|
+
interface GetContactImageUploadStatusRequest {
|
|
2394
|
+
/**
|
|
2395
|
+
* Id of the contact for which to retrieve the image upload status.
|
|
2396
|
+
* @format GUID
|
|
2397
|
+
*/
|
|
2398
|
+
contactId: string;
|
|
2399
|
+
/**
|
|
2400
|
+
* The upload ID of the image upload process. Returned in case an image URL was provided when creating or
|
|
2401
|
+
* updating a contact. It is also returned from the GenerateContactImageUploadUrl endpoint.
|
|
2402
|
+
* @maxLength 100
|
|
2403
|
+
*/
|
|
2404
|
+
imageUploadId: string;
|
|
2405
|
+
}
|
|
2406
|
+
interface GetContactImageUploadStatusResponse {
|
|
2407
|
+
/** The status of the image upload process. */
|
|
2408
|
+
status?: ImageUploadStatusWithLiterals;
|
|
2409
|
+
}
|
|
2410
|
+
declare enum ImageUploadStatus {
|
|
2411
|
+
/** Image upload is in progress. */
|
|
2412
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
2413
|
+
/** Image is uploaded. */
|
|
2414
|
+
SUCCESS = "SUCCESS",
|
|
2415
|
+
/** Image upload failed. */
|
|
2416
|
+
FAILURE = "FAILURE"
|
|
2417
|
+
}
|
|
2418
|
+
/** @enumType */
|
|
2419
|
+
type ImageUploadStatusWithLiterals = ImageUploadStatus | 'IN_PROGRESS' | 'SUCCESS' | 'FAILURE';
|
|
2420
|
+
interface BulkUpdatePhoneCountryCodeByFilterRequest {
|
|
2421
|
+
/**
|
|
2422
|
+
* A filter for the contacts that the country code will be applied to.
|
|
2423
|
+
*
|
|
2424
|
+
* Example:
|
|
2425
|
+
* `{ "filter": { "name.last": "Smith" } }`
|
|
2426
|
+
*/
|
|
2427
|
+
filter?: Record<string, any> | null;
|
|
2428
|
+
/** Free text to match in searchable fields for the contacts that the country code will be applied to. */
|
|
2429
|
+
search?: SearchDetails;
|
|
2430
|
+
/**
|
|
2431
|
+
* [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code to apply.
|
|
2432
|
+
* The country code will be added to the contacts main phone number, when adding it the phone, makes it a valid phone number.
|
|
2433
|
+
* @format COUNTRY
|
|
2434
|
+
*/
|
|
2435
|
+
countryCode: string;
|
|
2436
|
+
}
|
|
2437
|
+
interface BulkUpdatePhoneCountryCodeByFilterResponse {
|
|
2438
|
+
/**
|
|
2439
|
+
* The ID of the bulk update contact job.
|
|
2440
|
+
*
|
|
2441
|
+
* Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.
|
|
2442
|
+
* @format GUID
|
|
2443
|
+
*/
|
|
2444
|
+
jobId?: string;
|
|
2445
|
+
}
|
|
2446
|
+
interface Empty {
|
|
2447
|
+
}
|
|
2448
|
+
interface MediaFileUploadedEvent {
|
|
2449
|
+
fileId?: string;
|
|
2450
|
+
path?: string;
|
|
2451
|
+
mimeType?: string;
|
|
2452
|
+
acl?: string | null;
|
|
2453
|
+
size?: string | null;
|
|
2454
|
+
dateCreated?: Date | null;
|
|
2455
|
+
dateUpdated?: Date | null;
|
|
2456
|
+
}
|
|
2457
|
+
/** @docsIgnore */
|
|
2458
|
+
type BulkUpdateContactSubscriptionsApplicationErrors = {
|
|
2459
|
+
code?: 'MISSING_SUBSCRIPTION_STATUS';
|
|
2460
|
+
description?: string;
|
|
2461
|
+
data?: Record<string, any>;
|
|
2462
|
+
};
|
|
2463
|
+
/** @docsIgnore */
|
|
2464
|
+
type CreateContactApplicationErrors = {
|
|
2465
|
+
code?: 'INSUFFICIENT_CONTACT_DATA';
|
|
2466
|
+
description?: string;
|
|
2467
|
+
data?: Record<string, any>;
|
|
2468
|
+
} | {
|
|
2469
|
+
code?: 'DUPLICATE_EMAIL';
|
|
2470
|
+
description?: string;
|
|
2471
|
+
data?: Record<string, any>;
|
|
2472
|
+
} | {
|
|
2473
|
+
code?: 'DUPLICATE_PHONE';
|
|
2474
|
+
description?: string;
|
|
2475
|
+
data?: Record<string, any>;
|
|
2476
|
+
} | {
|
|
2477
|
+
code?: 'DUPLICATE_ADDRESS';
|
|
2478
|
+
description?: string;
|
|
2479
|
+
data?: Record<string, any>;
|
|
2480
|
+
} | {
|
|
2481
|
+
code?: 'MULTIPLE_DEFAULT_ADDRESSES';
|
|
2482
|
+
description?: string;
|
|
2483
|
+
data?: Record<string, any>;
|
|
2484
|
+
} | {
|
|
2485
|
+
code?: 'DUPLICATE_ADDRESS_ID';
|
|
2486
|
+
description?: string;
|
|
2487
|
+
data?: Record<string, any>;
|
|
2488
|
+
} | {
|
|
2489
|
+
code?: 'EMAIL_REQUIRED';
|
|
2490
|
+
description?: string;
|
|
2491
|
+
data?: Record<string, any>;
|
|
2492
|
+
} | {
|
|
2493
|
+
code?: 'PHONE_REQUIRED';
|
|
2494
|
+
description?: string;
|
|
2495
|
+
data?: Record<string, any>;
|
|
2496
|
+
} | {
|
|
2497
|
+
code?: 'DUPLICATE_CONTACT_EXISTS';
|
|
2498
|
+
description?: string;
|
|
2499
|
+
data?: DuplicateContactExists;
|
|
2500
|
+
} | {
|
|
2501
|
+
code?: 'INVALID_TIME_ZONE';
|
|
2502
|
+
description?: string;
|
|
2503
|
+
data?: Record<string, any>;
|
|
2504
|
+
} | {
|
|
2505
|
+
code?: 'INVALID_BIRTHDATE';
|
|
2506
|
+
description?: string;
|
|
2507
|
+
data?: Record<string, any>;
|
|
2508
|
+
} | {
|
|
2509
|
+
code?: 'INVALID_IMAGE_URL';
|
|
2510
|
+
description?: string;
|
|
2511
|
+
data?: Record<string, any>;
|
|
2512
|
+
};
|
|
2513
|
+
/** @docsIgnore */
|
|
2514
|
+
type UpdateContactApplicationErrors = {
|
|
2515
|
+
code?: 'INSUFFICIENT_CONTACT_DATA';
|
|
2516
|
+
description?: string;
|
|
2517
|
+
data?: Record<string, any>;
|
|
2518
|
+
} | {
|
|
2519
|
+
code?: 'DUPLICATE_EMAIL';
|
|
2520
|
+
description?: string;
|
|
2521
|
+
data?: Record<string, any>;
|
|
2522
|
+
} | {
|
|
2523
|
+
code?: 'DUPLICATE_PHONE';
|
|
2524
|
+
description?: string;
|
|
2525
|
+
data?: Record<string, any>;
|
|
2526
|
+
} | {
|
|
2527
|
+
code?: 'DUPLICATE_ADDRESS';
|
|
2528
|
+
description?: string;
|
|
2529
|
+
data?: Record<string, any>;
|
|
2530
|
+
} | {
|
|
2531
|
+
code?: 'MULTIPLE_DEFAULT_ADDRESSES';
|
|
2532
|
+
description?: string;
|
|
2533
|
+
data?: Record<string, any>;
|
|
2534
|
+
} | {
|
|
2535
|
+
code?: 'DUPLICATE_ADDRESS_ID';
|
|
2536
|
+
description?: string;
|
|
2537
|
+
data?: Record<string, any>;
|
|
2538
|
+
} | {
|
|
2539
|
+
code?: 'EMAIL_REQUIRED';
|
|
2540
|
+
description?: string;
|
|
2541
|
+
data?: Record<string, any>;
|
|
2542
|
+
} | {
|
|
2543
|
+
code?: 'PHONE_REQUIRED';
|
|
2544
|
+
description?: string;
|
|
2545
|
+
data?: Record<string, any>;
|
|
2546
|
+
} | {
|
|
2547
|
+
code?: 'CANNOT_CHANGE_EXTERNAL_ID';
|
|
2548
|
+
description?: string;
|
|
2549
|
+
data?: Record<string, any>;
|
|
2550
|
+
} | {
|
|
2551
|
+
code?: 'DUPLICATE_CONTACT_EXISTS';
|
|
2552
|
+
description?: string;
|
|
2553
|
+
data?: DuplicateContactExists;
|
|
2554
|
+
} | {
|
|
2555
|
+
code?: 'CANNOT_UPDATE_MEMBER_EMAIL';
|
|
2556
|
+
description?: string;
|
|
2557
|
+
data?: Record<string, any>;
|
|
2558
|
+
} | {
|
|
2559
|
+
code?: 'INVALID_TIME_ZONE';
|
|
2560
|
+
description?: string;
|
|
2561
|
+
data?: Record<string, any>;
|
|
2562
|
+
} | {
|
|
2563
|
+
code?: 'INVALID_IMAGE_URL';
|
|
2564
|
+
description?: string;
|
|
2565
|
+
data?: Record<string, any>;
|
|
2566
|
+
};
|
|
2567
|
+
/** @docsIgnore */
|
|
2568
|
+
type UpsertContactApplicationErrors = {
|
|
2569
|
+
code?: 'INSUFFICIENT_CONTACT_DATA';
|
|
2570
|
+
description?: string;
|
|
2571
|
+
data?: Record<string, any>;
|
|
2572
|
+
} | {
|
|
2573
|
+
code?: 'DUPLICATE_EMAIL';
|
|
2574
|
+
description?: string;
|
|
2575
|
+
data?: Record<string, any>;
|
|
2576
|
+
} | {
|
|
2577
|
+
code?: 'DUPLICATE_PHONE';
|
|
2578
|
+
description?: string;
|
|
2579
|
+
data?: Record<string, any>;
|
|
2580
|
+
} | {
|
|
2581
|
+
code?: 'DUPLICATE_ADDRESS';
|
|
2582
|
+
description?: string;
|
|
2583
|
+
data?: Record<string, any>;
|
|
2584
|
+
} | {
|
|
2585
|
+
code?: 'MULTIPLE_DEFAULT_ADDRESSES';
|
|
2586
|
+
description?: string;
|
|
2587
|
+
data?: Record<string, any>;
|
|
2588
|
+
} | {
|
|
2589
|
+
code?: 'DUPLICATE_ADDRESS_ID';
|
|
2590
|
+
description?: string;
|
|
2591
|
+
data?: Record<string, any>;
|
|
2592
|
+
} | {
|
|
2593
|
+
code?: 'EMAIL_REQUIRED';
|
|
2594
|
+
description?: string;
|
|
2595
|
+
data?: Record<string, any>;
|
|
2596
|
+
} | {
|
|
2597
|
+
code?: 'PHONE_REQUIRED';
|
|
2598
|
+
description?: string;
|
|
2599
|
+
data?: Record<string, any>;
|
|
2600
|
+
} | {
|
|
2601
|
+
code?: 'INVALID_TIME_ZONE';
|
|
2602
|
+
description?: string;
|
|
2603
|
+
data?: Record<string, any>;
|
|
2604
|
+
} | {
|
|
2605
|
+
code?: 'INVALID_IMAGE_URL';
|
|
2606
|
+
description?: string;
|
|
2607
|
+
data?: Record<string, any>;
|
|
2608
|
+
} | {
|
|
2609
|
+
code?: 'CANNOT_CHANGE_EXTERNAL_ID';
|
|
2610
|
+
description?: string;
|
|
2611
|
+
data?: Record<string, any>;
|
|
2612
|
+
} | {
|
|
2613
|
+
code?: 'CANNOT_UPDATE_MEMBER_EMAIL';
|
|
2614
|
+
description?: string;
|
|
2615
|
+
data?: Record<string, any>;
|
|
2616
|
+
} | {
|
|
2617
|
+
code?: 'UNAUTHORIZED_UPDATE_MEMBER';
|
|
2618
|
+
description?: string;
|
|
2619
|
+
data?: FailedMemberUpdate;
|
|
2620
|
+
} | {
|
|
2621
|
+
code?: 'CANNOT_UPDATE_MEMBER';
|
|
2622
|
+
description?: string;
|
|
2623
|
+
data?: FailedMemberUpdate;
|
|
2624
|
+
};
|
|
2625
|
+
/** @docsIgnore */
|
|
2626
|
+
type UpdateContactTagsApplicationErrors = {
|
|
2627
|
+
code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
|
|
2628
|
+
description?: string;
|
|
2629
|
+
data?: Record<string, any>;
|
|
2630
|
+
};
|
|
2631
|
+
/** @docsIgnore */
|
|
2632
|
+
type MergeContactsApplicationErrors = {
|
|
2633
|
+
code?: 'CANNOT_MERGE_SOURCE_MEMBER';
|
|
2634
|
+
description?: string;
|
|
2635
|
+
data?: Record<string, any>;
|
|
2636
|
+
} | {
|
|
2637
|
+
code?: 'CANNOT_UPDATE_MEMBER_EMAIL';
|
|
2638
|
+
description?: string;
|
|
2639
|
+
data?: Record<string, any>;
|
|
2640
|
+
} | {
|
|
2641
|
+
code?: 'INVALID_CONTACT_MERGE';
|
|
2642
|
+
description?: string;
|
|
2643
|
+
data?: Record<string, any>;
|
|
2644
|
+
} | {
|
|
2645
|
+
code?: 'SOURCE_NOT_FOUND';
|
|
2646
|
+
description?: string;
|
|
2647
|
+
data?: Record<string, any>;
|
|
2648
|
+
} | {
|
|
2649
|
+
code?: 'INSUFFICIENT_CONTACT_DATA';
|
|
2650
|
+
description?: string;
|
|
2651
|
+
data?: Record<string, any>;
|
|
2652
|
+
} | {
|
|
2653
|
+
code?: 'DUPLICATE_EMAIL';
|
|
2654
|
+
description?: string;
|
|
2655
|
+
data?: Record<string, any>;
|
|
2656
|
+
} | {
|
|
2657
|
+
code?: 'DUPLICATE_PHONE';
|
|
2658
|
+
description?: string;
|
|
2659
|
+
data?: Record<string, any>;
|
|
2660
|
+
} | {
|
|
2661
|
+
code?: 'DUPLICATE_ADDRESS';
|
|
2662
|
+
description?: string;
|
|
2663
|
+
data?: Record<string, any>;
|
|
2664
|
+
} | {
|
|
2665
|
+
code?: 'MULTIPLE_DEFAULT_ADDRESSES';
|
|
2666
|
+
description?: string;
|
|
2667
|
+
data?: Record<string, any>;
|
|
2668
|
+
} | {
|
|
2669
|
+
code?: 'DUPLICATE_ADDRESS_ID';
|
|
2670
|
+
description?: string;
|
|
2671
|
+
data?: Record<string, any>;
|
|
2672
|
+
} | {
|
|
2673
|
+
code?: 'EMAIL_REQUIRED';
|
|
2674
|
+
description?: string;
|
|
2675
|
+
data?: Record<string, any>;
|
|
2676
|
+
} | {
|
|
2677
|
+
code?: 'PHONE_REQUIRED';
|
|
2678
|
+
description?: string;
|
|
2679
|
+
data?: Record<string, any>;
|
|
2680
|
+
} | {
|
|
2681
|
+
code?: 'CANNOT_CHANGE_EXTERNAL_ID';
|
|
2682
|
+
description?: string;
|
|
2683
|
+
data?: Record<string, any>;
|
|
2684
|
+
} | {
|
|
2685
|
+
code?: 'DUPLICATE_CONTACT_EXISTS';
|
|
2686
|
+
description?: string;
|
|
2687
|
+
data?: DuplicateContactExists;
|
|
2688
|
+
} | {
|
|
2689
|
+
code?: 'INVALID_TIME_ZONE';
|
|
2690
|
+
description?: string;
|
|
2691
|
+
data?: Record<string, any>;
|
|
2692
|
+
} | {
|
|
2693
|
+
code?: 'INVALID_IMAGE_URL';
|
|
2694
|
+
description?: string;
|
|
2695
|
+
data?: Record<string, any>;
|
|
2696
|
+
};
|
|
2697
|
+
/** @docsIgnore */
|
|
2698
|
+
type DeleteContactApplicationErrors = {
|
|
2699
|
+
code?: 'UNAUTHORIZED_DELETE_MEMBER';
|
|
2700
|
+
description?: string;
|
|
2701
|
+
data?: Record<string, any>;
|
|
2702
|
+
} | {
|
|
2703
|
+
code?: 'CANNOT_DELETE_MEMBER';
|
|
2704
|
+
description?: string;
|
|
2705
|
+
data?: Record<string, any>;
|
|
2706
|
+
} | {
|
|
2707
|
+
code?: 'CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION';
|
|
2708
|
+
description?: string;
|
|
2709
|
+
data?: Record<string, any>;
|
|
2710
|
+
} | {
|
|
2711
|
+
code?: 'CANNOT_DELETE_WIX_USERS_MEMBER';
|
|
2712
|
+
description?: string;
|
|
2713
|
+
data?: Record<string, any>;
|
|
2714
|
+
} | {
|
|
2715
|
+
code?: 'FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION';
|
|
2716
|
+
description?: string;
|
|
2717
|
+
data?: Record<string, any>;
|
|
2718
|
+
};
|
|
2719
|
+
/** @docsIgnore */
|
|
2720
|
+
type FindMatchingContactsApplicationErrors = {
|
|
2721
|
+
code?: 'NO_IDENTIFIER_PROVIDED';
|
|
2722
|
+
description?: string;
|
|
2723
|
+
data?: Record<string, any>;
|
|
2724
|
+
};
|
|
2725
|
+
/** @docsIgnore */
|
|
2726
|
+
type GenerateContactImageUploadUrlApplicationErrors = {
|
|
2727
|
+
code?: 'INVALID_MIME_TYPE';
|
|
2728
|
+
description?: string;
|
|
2729
|
+
data?: Record<string, any>;
|
|
2730
|
+
};
|
|
2731
|
+
/** @docsIgnore */
|
|
2732
|
+
type AddContactAdditionalEmailApplicationErrors = {
|
|
2733
|
+
code?: 'EMAIL_REQUIRED';
|
|
2734
|
+
description?: string;
|
|
2735
|
+
data?: Record<string, any>;
|
|
2736
|
+
} | {
|
|
2737
|
+
code?: 'ADDITIONAL_EMAILS_LIMIT_REACHED';
|
|
2738
|
+
description?: string;
|
|
2739
|
+
data?: Record<string, any>;
|
|
2740
|
+
};
|
|
2741
|
+
/** @docsIgnore */
|
|
2742
|
+
type AddContactAdditionalPhoneApplicationErrors = {
|
|
2743
|
+
code?: 'PHONE_REQUIRED';
|
|
2744
|
+
description?: string;
|
|
2745
|
+
data?: Record<string, any>;
|
|
2746
|
+
} | {
|
|
2747
|
+
code?: 'ADDITIONAL_PHONES_LIMIT_REACHED';
|
|
2748
|
+
description?: string;
|
|
2749
|
+
data?: Record<string, any>;
|
|
2750
|
+
};
|
|
2751
|
+
/** @docsIgnore */
|
|
2752
|
+
type AddContactAddressApplicationErrors = {
|
|
2753
|
+
code?: 'ADDRESSES_LIMIT_REACHED';
|
|
2754
|
+
description?: string;
|
|
2755
|
+
data?: Record<string, any>;
|
|
2756
|
+
} | {
|
|
2757
|
+
code?: 'DUPLICATE_ADDRESS_ID';
|
|
2758
|
+
description?: string;
|
|
2759
|
+
data?: Record<string, any>;
|
|
2760
|
+
};
|
|
2761
|
+
/** @docsIgnore */
|
|
2762
|
+
type DeleteContactAddressApplicationErrors = {
|
|
2763
|
+
code?: 'ADDRESS_NOT_FOUND';
|
|
2764
|
+
description?: string;
|
|
2765
|
+
data?: Record<string, any>;
|
|
2766
|
+
} | {
|
|
2767
|
+
code?: 'DUPLICATE_ADDRESS_ID';
|
|
2768
|
+
description?: string;
|
|
2769
|
+
data?: Record<string, any>;
|
|
2770
|
+
};
|
|
2771
|
+
/** @docsIgnore */
|
|
2772
|
+
type UpdateContactAddressApplicationErrors = {
|
|
2773
|
+
code?: 'ADDRESS_NOT_FOUND';
|
|
2774
|
+
description?: string;
|
|
2775
|
+
data?: Record<string, any>;
|
|
2776
|
+
} | {
|
|
2777
|
+
code?: 'DUPLICATE_ADDRESS';
|
|
2778
|
+
description?: string;
|
|
2779
|
+
data?: Record<string, any>;
|
|
2780
|
+
};
|
|
2781
|
+
/** @docsIgnore */
|
|
2782
|
+
type BulkUpdateContactTagsApplicationErrors = {
|
|
2783
|
+
code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
|
|
2784
|
+
description?: string;
|
|
2785
|
+
data?: Record<string, any>;
|
|
2786
|
+
};
|
|
2787
|
+
/** @docsIgnore */
|
|
2788
|
+
type BulkUpdateContactTagsByFilterApplicationErrors = {
|
|
2789
|
+
code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
|
|
2790
|
+
description?: string;
|
|
2791
|
+
data?: Record<string, any>;
|
|
2792
|
+
};
|
|
2793
|
+
/** @docsIgnore */
|
|
2794
|
+
type BulkDeleteContactsApplicationErrors = {
|
|
2795
|
+
code?: 'UNAUTHORIZED_DELETE_MEMBER';
|
|
2796
|
+
description?: string;
|
|
2797
|
+
data?: Record<string, any>;
|
|
2798
|
+
};
|
|
2799
|
+
/** @docsIgnore */
|
|
2800
|
+
type BulkDeleteContactsByFilterApplicationErrors = {
|
|
2801
|
+
code?: 'UNAUTHORIZED_DELETE_MEMBER';
|
|
2802
|
+
description?: string;
|
|
2803
|
+
data?: Record<string, any>;
|
|
2804
|
+
};
|
|
2805
|
+
/** @docsIgnore */
|
|
2806
|
+
type GetContactImageUploadStatusApplicationErrors = {
|
|
2807
|
+
code?: 'UPLOAD_ID_NOT_FOUND';
|
|
2808
|
+
description?: string;
|
|
2809
|
+
data?: Record<string, any>;
|
|
2810
|
+
};
|
|
2811
|
+
/**
|
|
2812
|
+
* Creates an async job to bulk update email and phone subscription statuses for multiple contacts.
|
|
2813
|
+
* If the new subscription status is equal to the current one, there will be no update.
|
|
2814
|
+
* @param filter - A filter for the contacts that the subscription statuses will be applied to.
|
|
2815
|
+
*
|
|
2816
|
+
* Example:
|
|
2817
|
+
* `{ "filter": { "name.last": "Smith" } }`
|
|
2818
|
+
* @public
|
|
2819
|
+
* @documentationMaturity preview
|
|
2820
|
+
* @requiredField filter
|
|
2821
|
+
* @permissionId CONTACTS.CONTACT_SUBSCRIPTION_UPDATE
|
|
2822
|
+
* @applicableIdentity APP
|
|
2823
|
+
* @fqn wix.contacts.v5.ContactSubscriptions.BulkUpdateContactSubscriptions
|
|
2824
|
+
*/
|
|
2825
|
+
declare function bulkUpdateContactSubscriptions(filter: Record<string, any>, options?: BulkUpdateContactSubscriptionsOptions): Promise<NonNullablePaths<BulkUpdateContactSubscriptionsResponse, `jobId`, 2> & {
|
|
2826
|
+
__applicationErrorsType?: BulkUpdateContactSubscriptionsApplicationErrors;
|
|
2827
|
+
}>;
|
|
2828
|
+
interface BulkUpdateContactSubscriptionsOptions {
|
|
2829
|
+
/** Free text to match in searchable fields for the contacts that the subscription statuses will be applied to. */
|
|
2830
|
+
search?: SearchDetails;
|
|
2831
|
+
/** The subscription status to apply to the contact's email address. */
|
|
2832
|
+
emailSubscriptionStatus?: V5SubscriptionStatusWithLiterals;
|
|
2833
|
+
/** The subscription status to apply to the contact's phone. */
|
|
2834
|
+
phoneSubscriptionStatus?: V5SubscriptionStatusWithLiterals;
|
|
2835
|
+
}
|
|
2836
|
+
/**
|
|
2837
|
+
* Creates a contact in the site's contact list.
|
|
2838
|
+
*
|
|
2839
|
+
* *Required Fields:** At least one of the following must be provided:
|
|
2840
|
+
* - `name.first` or `name.last`
|
|
2841
|
+
* - `email.email`
|
|
2842
|
+
* - `phone.phone`
|
|
2843
|
+
*
|
|
2844
|
+
* *Duplicate Handling:** By default, creation fails if a contact with the same identifiers
|
|
2845
|
+
* (external_id, email, or phone) already exists. Set `allow_duplicates` to true to bypass this check.
|
|
2846
|
+
* Learn more about [contact matching and duplicates](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).
|
|
2847
|
+
*
|
|
2848
|
+
* *Image Upload:** When providing an image URL, the image is uploaded asynchronously.
|
|
2849
|
+
* An `image_upload_id` is returned for tracking upload progress.
|
|
2850
|
+
* Use [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.
|
|
2851
|
+
*
|
|
2852
|
+
* To create multiple contacts in a single request, call [Bulk Create Contacts](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-create-contacts).
|
|
2853
|
+
* @param contact - Contact to be created.
|
|
2854
|
+
* @public
|
|
2855
|
+
* @documentationMaturity preview
|
|
2856
|
+
* @requiredField contact
|
|
2857
|
+
* @permissionId CONTACTS.CONTACT_CREATE
|
|
2858
|
+
* @applicableIdentity APP
|
|
2859
|
+
* @returns The created Contact.
|
|
2860
|
+
* @fqn wix.contacts.v5.Contacts.CreateContact
|
|
2861
|
+
*/
|
|
2862
|
+
declare function createContact(contact: Contact, options?: CreateContactOptions): Promise<NonNullablePaths<Contact, `email.email` | `email.subscriptionStatus.status` | `email.deliverabilityStatus` | `additionalEmails` | `additionalEmails.${number}.email` | `phone.tag` | `phone.phone` | `phone.deliverabilityStatus` | `additionalPhones` | `additionalPhones.${number}.tag` | `additionalPhones.${number}.phone` | `addresses` | `addresses.${number}.tag` | `addresses.${number}.address.streetAddress.number` | `addresses.${number}.address.streetAddress.name` | `addresses.${number}.address.streetAddress.apt` | `locationIds` | `segmentIds` | `memberInfo.status` | `memberInfo.profileInfo.privacyStatus` | `memberInfo.userInfo.userId` | `memberInfo.userInfo.role` | `memberInfo.sessionInfo.mobileAppNames` | `memberInfo.groupInfo.groupIds` | `tags.privateTags.tagIds`, 6> & {
|
|
2863
|
+
__applicationErrorsType?: CreateContactApplicationErrors;
|
|
2864
|
+
}>;
|
|
2865
|
+
interface CreateContactOptions {
|
|
2866
|
+
/**
|
|
2867
|
+
* Allows creating a duplicate contact.
|
|
2868
|
+
* More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).
|
|
2869
|
+
*/
|
|
2870
|
+
allowDuplicates?: boolean;
|
|
2871
|
+
}
|
|
2872
|
+
/**
|
|
2873
|
+
* Retrieves a single contact by ID.
|
|
2874
|
+
* @param contactId - ID of the Contact to retrieve.
|
|
2875
|
+
* @public
|
|
2876
|
+
* @documentationMaturity preview
|
|
2877
|
+
* @requiredField contactId
|
|
2878
|
+
* @permissionId CONTACTS.CONTACT_READ
|
|
2879
|
+
* @applicableIdentity APP
|
|
2880
|
+
* @returns The requested Contact.
|
|
2881
|
+
* @fqn wix.contacts.v5.Contacts.GetContact
|
|
2882
|
+
*/
|
|
2883
|
+
declare function getContact(contactId: string): Promise<NonNullablePaths<Contact, `email.email` | `email.subscriptionStatus.status` | `email.deliverabilityStatus` | `additionalEmails` | `additionalEmails.${number}.email` | `phone.tag` | `phone.phone` | `phone.deliverabilityStatus` | `additionalPhones` | `additionalPhones.${number}.tag` | `additionalPhones.${number}.phone` | `addresses` | `addresses.${number}.tag` | `addresses.${number}.address.streetAddress.number` | `addresses.${number}.address.streetAddress.name` | `addresses.${number}.address.streetAddress.apt` | `locationIds` | `segmentIds` | `memberInfo.status` | `memberInfo.profileInfo.privacyStatus` | `memberInfo.userInfo.userId` | `memberInfo.userInfo.role` | `memberInfo.sessionInfo.mobileAppNames` | `memberInfo.groupInfo.groupIds` | `tags.privateTags.tagIds`, 6>>;
|
|
2884
|
+
/**
|
|
2885
|
+
* Updates an existing contact with new information.
|
|
2886
|
+
*
|
|
2887
|
+
* *Revision Control:** The current `revision` number must be provided to prevent
|
|
2888
|
+
* conflicting updates. The revision increments with each update.
|
|
2889
|
+
*
|
|
2890
|
+
*
|
|
2891
|
+
* *Restrictions:**
|
|
2892
|
+
* - `external_id` can only be set once and cannot be changed
|
|
2893
|
+
* - Site member contacts main email cannot be changed
|
|
2894
|
+
* - At least one of name, email, or phone must remain after update
|
|
2895
|
+
*
|
|
2896
|
+
* *Image Upload:** When providing an image URL, the image is uploaded asynchronously.
|
|
2897
|
+
* An `image_upload_id` is returned for tracking upload progress.
|
|
2898
|
+
* Use [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.
|
|
2899
|
+
*
|
|
2900
|
+
* To update multiple contacts in a single request, call [Bulk Update Contacts](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-update-contacts).
|
|
2901
|
+
* @param _id - Contact ID.
|
|
2902
|
+
* @public
|
|
2903
|
+
* @documentationMaturity preview
|
|
2904
|
+
* @requiredField _id
|
|
2905
|
+
* @requiredField contact
|
|
2906
|
+
* @requiredField contact.revision
|
|
2907
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
2908
|
+
* @permissionId CONTACTS.CONTACT_MEMBER_EMAIL_UPDATE
|
|
2909
|
+
* @applicableIdentity APP
|
|
2910
|
+
* @returns Updated Contact.
|
|
2911
|
+
* @fqn wix.contacts.v5.Contacts.UpdateContact
|
|
2912
|
+
*/
|
|
2913
|
+
declare function updateContact(_id: string, contact: NonNullablePaths<UpdateContact, `revision`, 2>, options?: UpdateContactOptions): Promise<NonNullablePaths<Contact, `email.email` | `email.subscriptionStatus.status` | `email.deliverabilityStatus` | `additionalEmails` | `additionalEmails.${number}.email` | `phone.tag` | `phone.phone` | `phone.deliverabilityStatus` | `additionalPhones` | `additionalPhones.${number}.tag` | `additionalPhones.${number}.phone` | `addresses` | `addresses.${number}.tag` | `addresses.${number}.address.streetAddress.number` | `addresses.${number}.address.streetAddress.name` | `addresses.${number}.address.streetAddress.apt` | `locationIds` | `segmentIds` | `memberInfo.status` | `memberInfo.profileInfo.privacyStatus` | `memberInfo.userInfo.userId` | `memberInfo.userInfo.role` | `memberInfo.sessionInfo.mobileAppNames` | `memberInfo.groupInfo.groupIds` | `tags.privateTags.tagIds`, 6> & {
|
|
2914
|
+
__applicationErrorsType?: UpdateContactApplicationErrors;
|
|
2915
|
+
}>;
|
|
2916
|
+
interface UpdateContact {
|
|
2917
|
+
/**
|
|
2918
|
+
* Contact ID.
|
|
2919
|
+
* @format GUID
|
|
2920
|
+
* @immutable
|
|
2921
|
+
* @readonly
|
|
2922
|
+
*/
|
|
2923
|
+
_id?: string | null;
|
|
2924
|
+
/**
|
|
2925
|
+
* Revision number, which increments by 1 each time the Contact is updated.
|
|
2926
|
+
* To prevent conflicting changes,
|
|
2927
|
+
* the current revision must be passed when updating the Contact.
|
|
2928
|
+
*
|
|
2929
|
+
* Ignored when creating a Contact.
|
|
2930
|
+
* @readonly
|
|
2931
|
+
*/
|
|
2932
|
+
revision?: string | null;
|
|
2933
|
+
/**
|
|
2934
|
+
* Date and time the Contact was created.
|
|
2935
|
+
* @readonly
|
|
2936
|
+
* @immutable
|
|
2937
|
+
*/
|
|
2938
|
+
_createdDate?: Date | null;
|
|
2939
|
+
/**
|
|
2940
|
+
* Date and time the Contact was last updated.
|
|
2941
|
+
* @readonly
|
|
2942
|
+
*/
|
|
2943
|
+
_updatedDate?: Date | null;
|
|
2944
|
+
/**
|
|
2945
|
+
* Contact External ID. Used to identify contacts from external systems.
|
|
2946
|
+
* This field can only be set once and cannot be updated after creation.
|
|
2947
|
+
* @maxLength 100
|
|
2948
|
+
*/
|
|
2949
|
+
externalId?: string | null;
|
|
2950
|
+
/** Contact's name information including first and last name. */
|
|
2951
|
+
name?: ContactName;
|
|
2952
|
+
/**
|
|
2953
|
+
* The main email of the contact with subscription status and deliverability information.
|
|
2954
|
+
* This email is used for contact matching and deduplication logic.
|
|
2955
|
+
*/
|
|
2956
|
+
email?: ContactEmail;
|
|
2957
|
+
/**
|
|
2958
|
+
* Additional emails of the contact.
|
|
2959
|
+
* These emails do not affect subscription status or contact matching/deduplication.
|
|
2960
|
+
* The main email field must be set before additional emails can be added.
|
|
2961
|
+
* @maxSize 10
|
|
2962
|
+
*/
|
|
2963
|
+
additionalEmails?: AdditionalEmail[];
|
|
2964
|
+
/**
|
|
2965
|
+
* The main phone of the contact with subscription status and deliverability information.
|
|
2966
|
+
* This phone is used for contact matching and deduplication logic.
|
|
2967
|
+
* At least one of name, email, or phone is required for contact creation.
|
|
2968
|
+
*/
|
|
2969
|
+
phone?: ContactPhone;
|
|
2970
|
+
/**
|
|
2971
|
+
* Additional phones of the contact.
|
|
2972
|
+
* These phones do not affect subscription status or contact matching/deduplication.
|
|
2973
|
+
* The main phone field must be set before additional phones can be added.
|
|
2974
|
+
* @maxSize 10
|
|
2975
|
+
*/
|
|
2976
|
+
additionalPhones?: AdditionalPhone[];
|
|
2977
|
+
/**
|
|
2978
|
+
* Contact's physical addresses.
|
|
2979
|
+
* Each address can be tagged (HOME, WORK, BILLING, SHIPPING, OTHER) and one can be set as default.
|
|
2980
|
+
* If no address is marked as default, the first address automatically becomes the default.
|
|
2981
|
+
* @maxSize 50
|
|
2982
|
+
*/
|
|
2983
|
+
addresses?: ContactAddress[];
|
|
2984
|
+
/** Contact's company information including company name and job title. */
|
|
2985
|
+
company?: ContactCompany;
|
|
2986
|
+
/**
|
|
2987
|
+
* Locale in
|
|
2988
|
+
* [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
2989
|
+
* Typically, this is a lowercase 2-letter language code,
|
|
2990
|
+
* followed by a hyphen, followed by an uppercase 2-letter country code.
|
|
2991
|
+
* For example, `en-US` for U.S. English, and `de-DE` for Germany German.
|
|
2992
|
+
* @format LANGUAGE_TAG
|
|
2993
|
+
*/
|
|
2994
|
+
locale?: string | null;
|
|
2995
|
+
/**
|
|
2996
|
+
* Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.
|
|
2997
|
+
* @format LOCAL_DATE
|
|
2998
|
+
*/
|
|
2999
|
+
birthdate?: string | null;
|
|
3000
|
+
/**
|
|
3001
|
+
* IANA time zone identifier for the contact's location.
|
|
3002
|
+
* Valid values are IANA time zone IDs, such as 'Europe/Rome' or 'America/New_York'.
|
|
3003
|
+
* @maxLength 50
|
|
3004
|
+
*/
|
|
3005
|
+
timeZone?: string | null;
|
|
3006
|
+
/**
|
|
3007
|
+
* Site contributor user ID assigned to manage communication with this contact.
|
|
3008
|
+
* Must be a valid GUID referencing an existing site contributor.
|
|
3009
|
+
* Only one assignee can be set per contact.
|
|
3010
|
+
* @format GUID
|
|
3011
|
+
*/
|
|
3012
|
+
assigneeId?: string | null;
|
|
3013
|
+
/**
|
|
3014
|
+
* List of business location IDs associated with this contact.
|
|
3015
|
+
* Used for multi-location businesses to organize contacts by physical business locations.
|
|
3016
|
+
* Each ID must be a valid GUID referencing an existing business location.
|
|
3017
|
+
* @format GUID
|
|
3018
|
+
* @maxSize 50
|
|
3019
|
+
*/
|
|
3020
|
+
locationIds?: string[];
|
|
3021
|
+
/** Contact's profile image. */
|
|
3022
|
+
image?: string;
|
|
3023
|
+
/**
|
|
3024
|
+
* Details about the origin of the contact.
|
|
3025
|
+
* This field is immutable and set automatically when the contact is created.
|
|
3026
|
+
* @immutable
|
|
3027
|
+
*/
|
|
3028
|
+
source?: ContactSource;
|
|
3029
|
+
/**
|
|
3030
|
+
* Details about the contact's most recent activity on the site.
|
|
3031
|
+
* Includes activity date and template ID. This field is read-only and updated automatically.
|
|
3032
|
+
* @readonly
|
|
3033
|
+
*/
|
|
3034
|
+
lastActivity?: ContactActivity;
|
|
3035
|
+
/**
|
|
3036
|
+
* List of Contact segment IDs that this contact belongs to.
|
|
3037
|
+
* Segments are used for organizing and targeting groups of contacts.
|
|
3038
|
+
* @maxSize 60
|
|
3039
|
+
* @readonly
|
|
3040
|
+
* @format GUID
|
|
3041
|
+
*/
|
|
3042
|
+
segmentIds?: string[];
|
|
3043
|
+
/**
|
|
3044
|
+
* Contact's site membership information including member ID, status, and profile details.
|
|
3045
|
+
* This field is read-only and populated automatically when the contact is also a site member.
|
|
3046
|
+
*
|
|
3047
|
+
* Updates are eventually consistent: changes to the underlying member, identity, or profile are reflected after the corresponding events are processed.
|
|
3048
|
+
* @readonly
|
|
3049
|
+
*/
|
|
3050
|
+
memberInfo?: MemberInfo;
|
|
3051
|
+
/** Tags assigned to the contact for organization and filtering. */
|
|
3052
|
+
tags?: PrivateTags;
|
|
3053
|
+
/**
|
|
3054
|
+
* Extended fields for storing custom contact data beyond the standard fields.
|
|
3055
|
+
* Allows adding custom properties specific to business needs.
|
|
3056
|
+
* To define a custom extended field, use the [Schema Service API](https://dev.wix.com/docs/api-reference/business-management/data-extension-schema/about-the-data-extension-schema-api) with the contacts FQDN: `wix.contacts.*.contact`.
|
|
3057
|
+
*/
|
|
3058
|
+
extendedFields?: ExtendedFields;
|
|
3059
|
+
}
|
|
3060
|
+
interface UpdateContactOptions {
|
|
3061
|
+
/**
|
|
3062
|
+
* Allows updating the contact even if it becomes a duplicate of another contact.
|
|
3063
|
+
* More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).
|
|
3064
|
+
*/
|
|
3065
|
+
allowDuplicates?: boolean;
|
|
3066
|
+
}
|
|
3067
|
+
/**
|
|
3068
|
+
* Creates a contact or updates an existing one based on matching identifiers.
|
|
3069
|
+
*
|
|
3070
|
+
* *Matching Logic:** Uses external_id, email, and phone to find existing contacts.
|
|
3071
|
+
* See [contact matching documentation](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts)
|
|
3072
|
+
* for detailed matching rules.
|
|
3073
|
+
*
|
|
3074
|
+
* *Upsert Modes:**
|
|
3075
|
+
* - `OVERWRITE` (default): Replaces existing field values
|
|
3076
|
+
* - `APPEND`: Sets fields only if they don't have existing values; appends to arrays
|
|
3077
|
+
* - `OVERWRITE_APPEND_ARRAYS`: Overwrites non-array fields, appends to arrays
|
|
3078
|
+
*
|
|
3079
|
+
* *Member Contacts:** Set `update_member` to `true` when upserting site member contacts.
|
|
3080
|
+
*
|
|
3081
|
+
* *Response:** The `action` field indicates whether the contact was `CREATED` or `UPDATED`.
|
|
3082
|
+
*
|
|
3083
|
+
* *Image Upload:** When providing an image URL, the image is uploaded asynchronously.
|
|
3084
|
+
* An `image_upload_id` is returned for tracking upload progress.
|
|
3085
|
+
* Use [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to monitor the upload.
|
|
3086
|
+
*
|
|
3087
|
+
* To create or update multiple contacts in a single request, call [Bulk Upsert Contacts](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-upsert-contacts).
|
|
3088
|
+
* @param contact - Contact to be upserted.
|
|
3089
|
+
* @public
|
|
3090
|
+
* @documentationMaturity preview
|
|
3091
|
+
* @requiredField contact
|
|
3092
|
+
* @permissionId CONTACTS.CONTACT_UPSERT
|
|
3093
|
+
* @permissionId CONTACTS.CONTACT_MEMBER_UPDATE
|
|
3094
|
+
* @applicableIdentity APP
|
|
3095
|
+
* @fqn wix.contacts.v5.Contacts.UpsertContact
|
|
3096
|
+
*/
|
|
3097
|
+
declare function upsertContact(contact: Contact, options?: UpsertContactOptions): Promise<NonNullablePaths<UpsertContactResponse, `contact.email.email` | `contact.email.subscriptionStatus.status` | `contact.email.deliverabilityStatus` | `contact.additionalEmails` | `contact.additionalEmails.${number}.email` | `contact.phone.tag` | `contact.phone.phone` | `contact.phone.deliverabilityStatus` | `contact.additionalPhones` | `contact.additionalPhones.${number}.tag` | `contact.additionalPhones.${number}.phone` | `contact.addresses` | `contact.addresses.${number}.tag` | `contact.addresses.${number}.address.streetAddress.number` | `contact.addresses.${number}.address.streetAddress.name` | `contact.addresses.${number}.address.streetAddress.apt` | `contact.locationIds` | `contact.segmentIds` | `contact.memberInfo.status` | `contact.memberInfo.profileInfo.privacyStatus` | `contact.memberInfo.userInfo.userId` | `contact.memberInfo.userInfo.role` | `contact.memberInfo.sessionInfo.mobileAppNames` | `contact.memberInfo.groupInfo.groupIds` | `contact.tags.privateTags.tagIds` | `action`, 7> & {
|
|
3098
|
+
__applicationErrorsType?: UpsertContactApplicationErrors;
|
|
3099
|
+
}>;
|
|
3100
|
+
interface UpsertContactOptions {
|
|
3101
|
+
/** The mode in which the upsert should work in. */
|
|
3102
|
+
upsertMode?: UpsertModeWithLiterals;
|
|
3103
|
+
/** Indicates whether to update the contact even if it is a site member. */
|
|
3104
|
+
updateMember?: boolean | null;
|
|
3105
|
+
}
|
|
3106
|
+
/**
|
|
3107
|
+
* Updates tags assigned to a specific contact.
|
|
3108
|
+
*
|
|
3109
|
+
* *Assignment Logic:** If a tag appears in both assign and unassign lists, it will be assigned.
|
|
3110
|
+
* At least one tag must be specified in either the assign or unassign list.
|
|
3111
|
+
* @param contactId - The contact from which to add or remove tags.
|
|
3112
|
+
* @public
|
|
3113
|
+
* @documentationMaturity preview
|
|
3114
|
+
* @requiredField contactId
|
|
3115
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
3116
|
+
* @applicableIdentity APP
|
|
3117
|
+
* @fqn wix.contacts.v5.Contacts.UpdateContactTags
|
|
3118
|
+
*/
|
|
3119
|
+
declare function updateContactTags(contactId: string, options?: UpdateContactTagsOptions): Promise<NonNullablePaths<UpdateContactTagsResponse, `contact.email.email` | `contact.email.subscriptionStatus.status` | `contact.email.deliverabilityStatus` | `contact.additionalEmails` | `contact.additionalEmails.${number}.email` | `contact.phone.tag` | `contact.phone.phone` | `contact.phone.deliverabilityStatus` | `contact.additionalPhones` | `contact.additionalPhones.${number}.tag` | `contact.additionalPhones.${number}.phone` | `contact.addresses` | `contact.addresses.${number}.tag` | `contact.addresses.${number}.address.streetAddress.number` | `contact.addresses.${number}.address.streetAddress.name` | `contact.addresses.${number}.address.streetAddress.apt` | `contact.locationIds` | `contact.segmentIds` | `contact.memberInfo.status` | `contact.memberInfo.profileInfo.privacyStatus` | `contact.memberInfo.userInfo.userId` | `contact.memberInfo.userInfo.role` | `contact.memberInfo.sessionInfo.mobileAppNames` | `contact.memberInfo.groupInfo.groupIds` | `contact.tags.privateTags.tagIds`, 7> & {
|
|
3120
|
+
__applicationErrorsType?: UpdateContactTagsApplicationErrors;
|
|
3121
|
+
}>;
|
|
3122
|
+
interface UpdateContactTagsOptions {
|
|
3123
|
+
/** The tags to add. */
|
|
3124
|
+
assignTags?: PrivateTags;
|
|
3125
|
+
/** The tags to remove. */
|
|
3126
|
+
unassignTags?: PrivateTags;
|
|
3127
|
+
}
|
|
3128
|
+
/**
|
|
3129
|
+
* Merges multiple source contacts into a single target contact.
|
|
3130
|
+
*
|
|
3131
|
+
* *Merge Process:**
|
|
3132
|
+
* - Source contacts are permanently deleted after successful merge
|
|
3133
|
+
* - Target contact is updated with merged information
|
|
3134
|
+
* - Data from source contacts is combined based on merge priority
|
|
3135
|
+
*
|
|
3136
|
+
* *Field Merging Rules:**
|
|
3137
|
+
* - Non-empty fields from source contacts fill empty fields in target
|
|
3138
|
+
* - Arrays (emails, phones, addresses) are combined and deduplicated
|
|
3139
|
+
* - External ID can only be set once and cannot be changed if already set
|
|
3140
|
+
*
|
|
3141
|
+
* *Restrictions:**
|
|
3142
|
+
* - Source contacts cannot be site members
|
|
3143
|
+
* - Maximum 5 source contacts per merge operation
|
|
3144
|
+
* - Target contact must remain valid after merge
|
|
3145
|
+
* @param targetContactId - Target contact ID.
|
|
3146
|
+
* @param targetContactRevision - Target contact revision number, which increments by 1 each time the contact is updated to prevent conflicting changes.
|
|
3147
|
+
* @public
|
|
3148
|
+
* @documentationMaturity preview
|
|
3149
|
+
* @requiredField targetContactId
|
|
3150
|
+
* @requiredField targetContactRevision
|
|
3151
|
+
* @permissionId CONTACTS.CONTACT_MERGE
|
|
3152
|
+
* @applicableIdentity APP
|
|
3153
|
+
* @fqn wix.contacts.v5.Contacts.MergeContacts
|
|
3154
|
+
*/
|
|
3155
|
+
declare function mergeContacts(targetContactId: string, targetContactRevision: string, options?: MergeContactsOptions): Promise<NonNullablePaths<MergeContactsResponse, `contact.email.email` | `contact.email.subscriptionStatus.status` | `contact.email.deliverabilityStatus` | `contact.additionalEmails` | `contact.additionalEmails.${number}.email` | `contact.phone.tag` | `contact.phone.phone` | `contact.phone.deliverabilityStatus` | `contact.additionalPhones` | `contact.additionalPhones.${number}.tag` | `contact.additionalPhones.${number}.phone` | `contact.addresses` | `contact.addresses.${number}.tag` | `contact.addresses.${number}.address.streetAddress.number` | `contact.addresses.${number}.address.streetAddress.name` | `contact.addresses.${number}.address.streetAddress.apt` | `contact.locationIds` | `contact.segmentIds` | `contact.memberInfo.status` | `contact.memberInfo.profileInfo.privacyStatus` | `contact.memberInfo.userInfo.userId` | `contact.memberInfo.userInfo.role` | `contact.memberInfo.sessionInfo.mobileAppNames` | `contact.memberInfo.groupInfo.groupIds` | `contact.tags.privateTags.tagIds`, 7> & {
|
|
3156
|
+
__applicationErrorsType?: MergeContactsApplicationErrors;
|
|
3157
|
+
}>;
|
|
3158
|
+
interface MergeContactsOptions {
|
|
3159
|
+
/** When the target contact is provided, the merged result will be overwritten. */
|
|
3160
|
+
targetContact?: Contact;
|
|
3161
|
+
/**
|
|
3162
|
+
* IDs of up to 5 contacts to merge into the target contact.
|
|
3163
|
+
* If merging more than one source contact,
|
|
3164
|
+
* the first source is given precedence, then the second, and so on.
|
|
3165
|
+
* @minSize 1
|
|
3166
|
+
* @maxSize 5
|
|
3167
|
+
* @format GUID
|
|
3168
|
+
*/
|
|
3169
|
+
sourceContactIds?: string[];
|
|
3170
|
+
/** Indicates whether to only return a preview of the merged contact or perform the actual merge. */
|
|
3171
|
+
preview?: boolean | null;
|
|
3172
|
+
/**
|
|
3173
|
+
* Allows updating the target contact even if it becomes a duplicate of another contact.
|
|
3174
|
+
* This can happen only where the target contact is provided.
|
|
3175
|
+
* More about duplicate contacts can be found [here](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).
|
|
3176
|
+
*/
|
|
3177
|
+
allowDuplicates?: boolean;
|
|
3178
|
+
}
|
|
3179
|
+
/**
|
|
3180
|
+
* Deletes a contact from the contact list.
|
|
3181
|
+
*
|
|
3182
|
+
* *Soft Delete:** Contacts are moved to a trash bin and can be restored within 90 days
|
|
3183
|
+
* using RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.
|
|
3184
|
+
*
|
|
3185
|
+
* *Member Contacts:** To delete a contact that is also a site member, set `delete_member` to `true` to delete both the contact and the member. Some member types, such as owners and contributors, can't be deleted.
|
|
3186
|
+
*
|
|
3187
|
+
* *Restrictions:**
|
|
3188
|
+
* - Contacts with active billing subscriptions can't be deleted.
|
|
3189
|
+
* - Site owners and contributors can't be deleted.
|
|
3190
|
+
*
|
|
3191
|
+
* To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/bulk-delete-contacts).
|
|
3192
|
+
* @param contactId - Id of the Contact to delete.
|
|
3193
|
+
* @public
|
|
3194
|
+
* @documentationMaturity preview
|
|
3195
|
+
* @requiredField contactId
|
|
3196
|
+
* @permissionId CONTACTS.CONTACT_DELETE
|
|
3197
|
+
* @permissionId MEMBERS.MEMBER_DELETE
|
|
3198
|
+
* @applicableIdentity APP
|
|
3199
|
+
* @fqn wix.contacts.v5.Contacts.DeleteContact
|
|
3200
|
+
*/
|
|
3201
|
+
declare function deleteContact(contactId: string, options?: DeleteContactOptions): Promise<void & {
|
|
3202
|
+
__applicationErrorsType?: DeleteContactApplicationErrors;
|
|
3203
|
+
}>;
|
|
3204
|
+
interface DeleteContactOptions {
|
|
3205
|
+
/**
|
|
3206
|
+
* Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even
|
|
3207
|
+
* if it is a site member and the site member is also deleted. Default: `false`
|
|
3208
|
+
*/
|
|
3209
|
+
deleteMember?: boolean | null;
|
|
3210
|
+
}
|
|
3211
|
+
/**
|
|
3212
|
+
* Finds contacts that match the provided identifiers using intelligent matching logic.
|
|
3213
|
+
*
|
|
3214
|
+
* *Matching Logic:** Uses external_id, email, and phone to identify potential duplicates.
|
|
3215
|
+
* The system applies sophisticated matching rules to find contacts that likely represent
|
|
3216
|
+
* the same person across different data sources.
|
|
3217
|
+
*
|
|
3218
|
+
* *Result Ordering:** Returns up to 100 contacts ordered by match strength:
|
|
3219
|
+
* 1. Contacts matching multiple identifiers (highest priority)
|
|
3220
|
+
* 2. Contacts matching single identifiers
|
|
3221
|
+
* 3. Within each group, ordered by creation date (oldest first)
|
|
3222
|
+
*
|
|
3223
|
+
* *Identifier Priority:**
|
|
3224
|
+
* 1. External ID (highest priority)
|
|
3225
|
+
* 2. Email address
|
|
3226
|
+
* 3. Phone number (lowest priority)
|
|
3227
|
+
*
|
|
3228
|
+
* Learn more: [Contact Matching Documentation](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts)
|
|
3229
|
+
* @public
|
|
3230
|
+
* @documentationMaturity preview
|
|
3231
|
+
* @permissionId CONTACTS.CONTACT_READ
|
|
3232
|
+
* @applicableIdentity APP
|
|
3233
|
+
* @fqn wix.contacts.v5.Contacts.FindMatchingContacts
|
|
3234
|
+
*/
|
|
3235
|
+
declare function findMatchingContacts(options?: FindMatchingContactsOptions): Promise<NonNullablePaths<FindMatchingContactsResponse, `contacts` | `contacts.${number}.email.email` | `contacts.${number}.email.subscriptionStatus.status` | `contacts.${number}.email.deliverabilityStatus` | `contacts.${number}.phone.tag` | `contacts.${number}.phone.phone` | `contacts.${number}.phone.deliverabilityStatus` | `contacts.${number}.memberInfo.status` | `contacts.${number}.memberInfo.profileInfo.privacyStatus` | `contacts.${number}.memberInfo.userInfo.userId` | `contacts.${number}.memberInfo.userInfo.role`, 6> & {
|
|
3236
|
+
__applicationErrorsType?: FindMatchingContactsApplicationErrors;
|
|
3237
|
+
}>;
|
|
3238
|
+
interface FindMatchingContactsOptions {
|
|
3239
|
+
/**
|
|
3240
|
+
* Contact External ID.
|
|
3241
|
+
* @maxLength 100
|
|
3242
|
+
*/
|
|
3243
|
+
externalId?: string | null;
|
|
3244
|
+
/**
|
|
3245
|
+
* Email address.
|
|
3246
|
+
* @format EMAIL
|
|
3247
|
+
* @maxLength 320
|
|
3248
|
+
*/
|
|
3249
|
+
email?: string | null;
|
|
3250
|
+
/**
|
|
3251
|
+
* Phone number.
|
|
3252
|
+
* @minLength 1
|
|
3253
|
+
* @maxLength 50
|
|
3254
|
+
*/
|
|
3255
|
+
phone?: string | null;
|
|
3256
|
+
}
|
|
3257
|
+
/**
|
|
3258
|
+
* Retrieves a list of contacts, given the provided paging, filtering, and sorting.
|
|
3259
|
+
*
|
|
3260
|
+
*
|
|
3261
|
+
* To learn how to query Contacts, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).
|
|
3262
|
+
*
|
|
3263
|
+
* Query Contacts runs with these defaults, which you can override:
|
|
3264
|
+
*
|
|
3265
|
+
* - `createdDate` is sorted in `DESC` order
|
|
3266
|
+
* - `paging.limit` is `50`
|
|
3267
|
+
*
|
|
3268
|
+
* To learn about working with query endpoints, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).
|
|
3269
|
+
* @public
|
|
3270
|
+
* @documentationMaturity preview
|
|
3271
|
+
* @permissionId CONTACTS.CONTACT_READ
|
|
3272
|
+
* @applicableIdentity APP
|
|
3273
|
+
* @fqn wix.contacts.v5.Contacts.QueryContacts
|
|
3274
|
+
*/
|
|
3275
|
+
declare function queryContacts(): ContactsQueryBuilder;
|
|
3276
|
+
interface QueryCursorResult {
|
|
3277
|
+
cursors: Cursors;
|
|
3278
|
+
hasNext: () => boolean;
|
|
3279
|
+
hasPrev: () => boolean;
|
|
3280
|
+
length: number;
|
|
3281
|
+
pageSize: number;
|
|
3282
|
+
}
|
|
3283
|
+
interface ContactsQueryResult extends QueryCursorResult {
|
|
3284
|
+
items: Contact[];
|
|
3285
|
+
query: ContactsQueryBuilder;
|
|
3286
|
+
next: () => Promise<ContactsQueryResult>;
|
|
3287
|
+
prev: () => Promise<ContactsQueryResult>;
|
|
3288
|
+
}
|
|
3289
|
+
interface ContactsQueryBuilder {
|
|
3290
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
3291
|
+
* @param value - Value to compare against.
|
|
3292
|
+
* @documentationMaturity preview
|
|
3293
|
+
*/
|
|
3294
|
+
eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'externalId' | 'email.email' | 'phone.phone', value: any) => ContactsQueryBuilder;
|
|
3295
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
3296
|
+
* @param value - Value to compare against.
|
|
3297
|
+
* @documentationMaturity preview
|
|
3298
|
+
*/
|
|
3299
|
+
ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ContactsQueryBuilder;
|
|
3300
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
3301
|
+
* @param value - Value to compare against.
|
|
3302
|
+
* @documentationMaturity preview
|
|
3303
|
+
*/
|
|
3304
|
+
gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ContactsQueryBuilder;
|
|
3305
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
3306
|
+
* @param value - Value to compare against.
|
|
3307
|
+
* @documentationMaturity preview
|
|
3308
|
+
*/
|
|
3309
|
+
le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ContactsQueryBuilder;
|
|
3310
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
3311
|
+
* @param value - Value to compare against.
|
|
3312
|
+
* @documentationMaturity preview
|
|
3313
|
+
*/
|
|
3314
|
+
lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ContactsQueryBuilder;
|
|
3315
|
+
/** @documentationMaturity preview */
|
|
3316
|
+
in: (propertyName: '_id' | 'externalId' | 'email.email' | 'phone.phone', value: any) => ContactsQueryBuilder;
|
|
3317
|
+
/** @documentationMaturity preview */
|
|
3318
|
+
exists: (propertyName: 'externalId' | 'email.email' | 'phone.phone', value: boolean) => ContactsQueryBuilder;
|
|
3319
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
3320
|
+
* @documentationMaturity preview
|
|
3321
|
+
*/
|
|
3322
|
+
ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => ContactsQueryBuilder;
|
|
3323
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
3324
|
+
* @documentationMaturity preview
|
|
3325
|
+
*/
|
|
3326
|
+
limit: (limit: number) => ContactsQueryBuilder;
|
|
3327
|
+
/** @param cursor - A pointer to specific record
|
|
3328
|
+
* @documentationMaturity preview
|
|
3329
|
+
*/
|
|
3330
|
+
skipTo: (cursor: string) => ContactsQueryBuilder;
|
|
3331
|
+
/** @documentationMaturity preview */
|
|
3332
|
+
find: () => Promise<ContactsQueryResult>;
|
|
3333
|
+
}
|
|
3334
|
+
/**
|
|
3335
|
+
* @hidden
|
|
3336
|
+
* @fqn wix.contacts.v5.Contacts.QueryContacts
|
|
3337
|
+
* @requiredField query
|
|
3338
|
+
*/
|
|
3339
|
+
declare function typedQueryContacts(query: ContactQuery): Promise<NonNullablePaths<QueryContactsResponse, `contacts` | `contacts.${number}.email.email` | `contacts.${number}.email.subscriptionStatus.status` | `contacts.${number}.email.deliverabilityStatus` | `contacts.${number}.phone.tag` | `contacts.${number}.phone.phone` | `contacts.${number}.phone.deliverabilityStatus` | `contacts.${number}.memberInfo.status` | `contacts.${number}.memberInfo.profileInfo.privacyStatus` | `contacts.${number}.memberInfo.userInfo.userId` | `contacts.${number}.memberInfo.userInfo.role`, 6>>;
|
|
3340
|
+
interface ContactQuerySpec extends QuerySpec {
|
|
3341
|
+
paging: 'cursor';
|
|
3342
|
+
wql: [
|
|
3343
|
+
{
|
|
3344
|
+
fields: ['_id'];
|
|
3345
|
+
operators: ['$eq', '$in'];
|
|
3346
|
+
sort: 'NONE';
|
|
3347
|
+
},
|
|
3348
|
+
{
|
|
3349
|
+
fields: ['_createdDate', '_updatedDate'];
|
|
3350
|
+
operators: ['$eq', '$gt', '$gte', '$lt', '$lte'];
|
|
3351
|
+
sort: 'ASC';
|
|
3352
|
+
},
|
|
3353
|
+
{
|
|
3354
|
+
fields: ['email.email', 'externalId', 'phone.phone'];
|
|
3355
|
+
operators: ['$eq', '$exists', '$in'];
|
|
3356
|
+
sort: 'NONE';
|
|
3357
|
+
}
|
|
3358
|
+
];
|
|
3359
|
+
}
|
|
3360
|
+
type CommonQueryWithEntityContext = Query<Contact, ContactQuerySpec>;
|
|
3361
|
+
type ContactQuery = {
|
|
3362
|
+
/**
|
|
3363
|
+
Cursor paging options.
|
|
3364
|
+
|
|
3365
|
+
Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
3366
|
+
*/
|
|
3367
|
+
cursorPaging?: {
|
|
3368
|
+
/**
|
|
3369
|
+
Maximum number of items to return in the results.
|
|
3370
|
+
@max: 100
|
|
3371
|
+
*/
|
|
3372
|
+
limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
|
|
3373
|
+
/**
|
|
3374
|
+
Pointer to the next or previous page in the list of results.
|
|
3375
|
+
|
|
3376
|
+
Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
3377
|
+
Not relevant for the first request.
|
|
3378
|
+
@maxLength: 16000
|
|
3379
|
+
*/
|
|
3380
|
+
cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
3381
|
+
};
|
|
3382
|
+
/**
|
|
3383
|
+
Filter object.
|
|
3384
|
+
|
|
3385
|
+
Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
3386
|
+
*/
|
|
3387
|
+
filter?: CommonQueryWithEntityContext['filter'] | null;
|
|
3388
|
+
/**
|
|
3389
|
+
Sort object.
|
|
3390
|
+
|
|
3391
|
+
Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
3392
|
+
@maxSize: 5
|
|
3393
|
+
*/
|
|
3394
|
+
sort?: {
|
|
3395
|
+
/**
|
|
3396
|
+
Name of the field to sort by.
|
|
3397
|
+
@maxLength: 512
|
|
3398
|
+
*/
|
|
3399
|
+
fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
|
|
3400
|
+
/**
|
|
3401
|
+
Sort order.
|
|
3402
|
+
*/
|
|
3403
|
+
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
3404
|
+
}[];
|
|
3405
|
+
};
|
|
3406
|
+
declare const utils: {
|
|
3407
|
+
query: {
|
|
3408
|
+
QueryBuilder: () => _wix_sdk_types.QueryBuilder<Contact, ContactQuerySpec, ContactQuery>;
|
|
3409
|
+
Filter: _wix_sdk_types.FilterFactory<Contact, ContactQuerySpec>;
|
|
3410
|
+
Sort: _wix_sdk_types.SortFactory<ContactQuerySpec>;
|
|
3411
|
+
};
|
|
3412
|
+
search: {
|
|
3413
|
+
SearchBuilder: () => _wix_sdk_types.SearchBuilder<Contact, ContactSearchSpec, ContactSearch>;
|
|
3414
|
+
Filter: _wix_sdk_types.FilterFactory<Contact, ContactSearchSpec>;
|
|
3415
|
+
Sort: _wix_sdk_types.SortFactory<ContactSearchSpec>;
|
|
3416
|
+
SearchParams: _wix_sdk_types.SearchParamsFactory<ContactSearchSpec>;
|
|
3417
|
+
Aggregation: _wix_sdk_types.AggregationFactory<ContactSearchSpec>;
|
|
3418
|
+
};
|
|
3419
|
+
};
|
|
3420
|
+
interface SearchContactsOptions {
|
|
3421
|
+
/**
|
|
3422
|
+
* Name Format for sorting and searching.
|
|
3423
|
+
* When sorting by `displayName`, the returned contacts are ordered by first and last names, by default.
|
|
3424
|
+
* Alternatively, when sorting by `displayName` with `BY_LAST_NAME`, the returned contacts are ordered by last and first names.
|
|
3425
|
+
* For contacts that do not have names, sorting is by email or phone.
|
|
3426
|
+
* When searching by `name.full`, the contacts returned are matched and ordered by first and last names.
|
|
3427
|
+
* Alternatively, when searching by `name.full` with `BY_LAST_NAME`, the contacts returned
|
|
3428
|
+
* are matched and ordered by last and first names.
|
|
3429
|
+
*/
|
|
3430
|
+
nameFormat?: NameFormatWithLiterals;
|
|
3431
|
+
}
|
|
3432
|
+
interface ContactSearchSpec extends SearchSpec {
|
|
3433
|
+
searchable: [
|
|
3434
|
+
'company.jobTitle',
|
|
3435
|
+
'company.name',
|
|
3436
|
+
'email.email',
|
|
3437
|
+
'memberInfo.email',
|
|
3438
|
+
'memberInfo.profileInfo.nickname',
|
|
3439
|
+
'name.full',
|
|
3440
|
+
'phone.phone'
|
|
3441
|
+
];
|
|
3442
|
+
aggregatable: [
|
|
3443
|
+
'_createdDate',
|
|
3444
|
+
'_id',
|
|
3445
|
+
'_updatedDate',
|
|
3446
|
+
'addresses.address.country',
|
|
3447
|
+
'addresses.address.subdivision',
|
|
3448
|
+
'addresses.address.subdivisionFullname',
|
|
3449
|
+
'assigneeId',
|
|
3450
|
+
'email.deliverabilityStatus',
|
|
3451
|
+
'email.subscriptionStatus.status',
|
|
3452
|
+
'lastActivity.date',
|
|
3453
|
+
'locale',
|
|
3454
|
+
'locationIds',
|
|
3455
|
+
'memberInfo.emailVerificationRequired',
|
|
3456
|
+
'memberInfo.emailVerified',
|
|
3457
|
+
'memberInfo.groupInfo.groupIds',
|
|
3458
|
+
'memberInfo.memberId',
|
|
3459
|
+
'memberInfo.profileInfo.muted',
|
|
3460
|
+
'memberInfo.profileInfo.privacyStatus',
|
|
3461
|
+
'memberInfo.profileInfo.reported',
|
|
3462
|
+
'memberInfo.sessionInfo.lastMobileLogin',
|
|
3463
|
+
'memberInfo.sessionInfo.lastWebLogin',
|
|
3464
|
+
'memberInfo.sessionInfo.mobileAppNames',
|
|
3465
|
+
'memberInfo.signupDate',
|
|
3466
|
+
'memberInfo.status',
|
|
3467
|
+
'memberInfo.userInfo.role',
|
|
3468
|
+
'phone.deliverabilityStatus',
|
|
3469
|
+
'phone.subscriptionStatus.status',
|
|
3470
|
+
'segmentIds',
|
|
3471
|
+
'source.additionalInfo',
|
|
3472
|
+
'source.appId',
|
|
3473
|
+
'source.userId',
|
|
3474
|
+
'tags.privateTags.tagIds',
|
|
3475
|
+
'timeZone'
|
|
3476
|
+
];
|
|
3477
|
+
paging: 'cursor';
|
|
3478
|
+
wql: [
|
|
3479
|
+
{
|
|
3480
|
+
operators: ['$eq', '$exists', '$in', '$ne', '$nin'];
|
|
3481
|
+
fields: [
|
|
3482
|
+
'assigneeId',
|
|
3483
|
+
'memberInfo.memberId',
|
|
3484
|
+
'source.appId',
|
|
3485
|
+
'source.userId',
|
|
3486
|
+
'timeZone'
|
|
3487
|
+
];
|
|
3488
|
+
sort: 'NONE';
|
|
3489
|
+
},
|
|
3490
|
+
{
|
|
3491
|
+
operators: ['$eq', '$exists', '$in', '$ne', '$nin'];
|
|
3492
|
+
fields: [
|
|
3493
|
+
'memberInfo.profileInfo.privacyStatus',
|
|
3494
|
+
'memberInfo.status',
|
|
3495
|
+
'memberInfo.userInfo.role'
|
|
3496
|
+
];
|
|
3497
|
+
sort: 'BOTH';
|
|
3498
|
+
},
|
|
3499
|
+
{
|
|
3500
|
+
operators: ['$eq', '$ne'];
|
|
3501
|
+
fields: [
|
|
3502
|
+
'memberInfo.emailVerificationRequired',
|
|
3503
|
+
'memberInfo.emailVerified',
|
|
3504
|
+
'memberInfo.profileInfo.muted',
|
|
3505
|
+
'memberInfo.profileInfo.reported'
|
|
3506
|
+
];
|
|
3507
|
+
sort: 'NONE';
|
|
3508
|
+
},
|
|
3509
|
+
{
|
|
3510
|
+
operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];
|
|
3511
|
+
fields: [
|
|
3512
|
+
'_createdDate',
|
|
3513
|
+
'_updatedDate',
|
|
3514
|
+
'lastActivity.date',
|
|
3515
|
+
'memberInfo.sessionInfo.lastMobileLogin',
|
|
3516
|
+
'memberInfo.sessionInfo.lastWebLogin',
|
|
3517
|
+
'memberInfo.signupDate'
|
|
3518
|
+
];
|
|
3519
|
+
sort: 'BOTH';
|
|
3520
|
+
},
|
|
3521
|
+
{
|
|
3522
|
+
operators: ['$eq', '$exists', '$in', '$ne', '$nin', '$startsWith'];
|
|
3523
|
+
fields: [
|
|
3524
|
+
'company.jobTitle',
|
|
3525
|
+
'company.name',
|
|
3526
|
+
'email.email',
|
|
3527
|
+
'memberInfo.email',
|
|
3528
|
+
'memberInfo.profileInfo.nickname',
|
|
3529
|
+
'name.first',
|
|
3530
|
+
'name.last',
|
|
3531
|
+
'phone.phone'
|
|
3532
|
+
];
|
|
3533
|
+
sort: 'BOTH';
|
|
3534
|
+
},
|
|
3535
|
+
{
|
|
3536
|
+
operators: ['$eq', '$in', '$ne', '$nin'];
|
|
3537
|
+
fields: [
|
|
3538
|
+
'_id',
|
|
3539
|
+
'email.deliverabilityStatus',
|
|
3540
|
+
'email.subscriptionStatus.status',
|
|
3541
|
+
'phone.deliverabilityStatus',
|
|
3542
|
+
'phone.subscriptionStatus.status'
|
|
3543
|
+
];
|
|
3544
|
+
sort: 'NONE';
|
|
3545
|
+
},
|
|
3546
|
+
{
|
|
3547
|
+
operators: ['$eq', '$exists', '$in', '$ne', '$nin', '$startsWith'];
|
|
3548
|
+
fields: ['locale', 'phone.e164', 'source.additionalInfo'];
|
|
3549
|
+
sort: 'NONE';
|
|
3550
|
+
},
|
|
3551
|
+
{
|
|
3552
|
+
operators: ['$exists', '$hasAll', '$hasSome', '$isEmpty'];
|
|
3553
|
+
fields: [
|
|
3554
|
+
'locationIds',
|
|
3555
|
+
'memberInfo.groupInfo.groupIds',
|
|
3556
|
+
'memberInfo.sessionInfo.mobileAppNames',
|
|
3557
|
+
'segmentIds',
|
|
3558
|
+
'tags.privateTags.tagIds'
|
|
3559
|
+
];
|
|
3560
|
+
sort: 'NONE';
|
|
3561
|
+
},
|
|
3562
|
+
{
|
|
3563
|
+
operators: ['$exists', '$hasAll', '$hasSome'];
|
|
3564
|
+
fields: [
|
|
3565
|
+
'addresses.address.country',
|
|
3566
|
+
'addresses.address.subdivision',
|
|
3567
|
+
'addresses.recipient.phone'
|
|
3568
|
+
];
|
|
3569
|
+
sort: 'NONE';
|
|
3570
|
+
},
|
|
3571
|
+
{
|
|
3572
|
+
operators: ['$exists', '$hasAll', '$hasSome', '$startsWith'];
|
|
3573
|
+
fields: [
|
|
3574
|
+
'additionalEmails.email',
|
|
3575
|
+
'additionalPhones.e164',
|
|
3576
|
+
'additionalPhones.phone',
|
|
3577
|
+
'addresses.address.addressLine',
|
|
3578
|
+
'addresses.address.city',
|
|
3579
|
+
'addresses.address.postalCode',
|
|
3580
|
+
'addresses.address.streetAddress.name',
|
|
3581
|
+
'addresses.address.subdivisionFullname',
|
|
3582
|
+
'addresses.recipient.company',
|
|
3583
|
+
'addresses.recipient.firstName',
|
|
3584
|
+
'addresses.recipient.lastName'
|
|
3585
|
+
];
|
|
3586
|
+
sort: 'NONE';
|
|
3587
|
+
},
|
|
3588
|
+
{
|
|
3589
|
+
operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];
|
|
3590
|
+
fields: ['birthdate'];
|
|
3591
|
+
sort: 'BOTH';
|
|
3592
|
+
}
|
|
3593
|
+
];
|
|
3594
|
+
}
|
|
3595
|
+
type CommonSearchWithEntityContext = Search<Contact, ContactSearchSpec>;
|
|
3596
|
+
type ContactSearch = {
|
|
3597
|
+
/**
|
|
3598
|
+
Cursor paging options.
|
|
3599
|
+
|
|
3600
|
+
Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
3601
|
+
*/
|
|
3602
|
+
cursorPaging?: {
|
|
3603
|
+
/**
|
|
3604
|
+
Maximum number of items to return in the results.
|
|
3605
|
+
@max: 100
|
|
3606
|
+
*/
|
|
3607
|
+
limit?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit'] | null;
|
|
3608
|
+
/**
|
|
3609
|
+
Pointer to the next or previous page in the list of results.
|
|
3610
|
+
|
|
3611
|
+
Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
3612
|
+
Not relevant for the first request.
|
|
3613
|
+
@maxLength: 16000
|
|
3614
|
+
*/
|
|
3615
|
+
cursor?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
3616
|
+
};
|
|
3617
|
+
/**
|
|
3618
|
+
Filter object.
|
|
3619
|
+
|
|
3620
|
+
Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
3621
|
+
*/
|
|
3622
|
+
filter?: CommonSearchWithEntityContext['filter'] | null;
|
|
3623
|
+
/**
|
|
3624
|
+
List of sort objects.
|
|
3625
|
+
|
|
3626
|
+
Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
3627
|
+
@maxSize: 10
|
|
3628
|
+
*/
|
|
3629
|
+
sort?: {
|
|
3630
|
+
/**
|
|
3631
|
+
Name of the field to sort by.
|
|
3632
|
+
@maxLength: 512
|
|
3633
|
+
*/
|
|
3634
|
+
fieldName?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['fieldName'];
|
|
3635
|
+
/**
|
|
3636
|
+
Sort order.
|
|
3637
|
+
*/
|
|
3638
|
+
order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];
|
|
3639
|
+
}[];
|
|
3640
|
+
/**
|
|
3641
|
+
Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
|
|
3642
|
+
@maxSize: 10
|
|
3643
|
+
*/
|
|
3644
|
+
aggregations?: {
|
|
3645
|
+
/**
|
|
3646
|
+
Value aggregation
|
|
3647
|
+
*/
|
|
3648
|
+
value?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['value'];
|
|
3649
|
+
/**
|
|
3650
|
+
Range aggregation
|
|
3651
|
+
*/
|
|
3652
|
+
range?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['range'];
|
|
3653
|
+
/**
|
|
3654
|
+
Scalar aggregation
|
|
3655
|
+
*/
|
|
3656
|
+
scalar?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['scalar'];
|
|
3657
|
+
/**
|
|
3658
|
+
Date histogram aggregation
|
|
3659
|
+
*/
|
|
3660
|
+
dateHistogram?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['dateHistogram'];
|
|
3661
|
+
/**
|
|
3662
|
+
Nested aggregation
|
|
3663
|
+
*/
|
|
3664
|
+
nested?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['nested'];
|
|
3665
|
+
/**
|
|
3666
|
+
User-defined name of aggregation, should be unique, will appear in aggregation results
|
|
3667
|
+
@maxLength: 100
|
|
3668
|
+
*/
|
|
3669
|
+
name?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['name'] | null;
|
|
3670
|
+
/**
|
|
3671
|
+
Type of aggregation, client must provide matching aggregation field below
|
|
3672
|
+
*/
|
|
3673
|
+
type?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['type'];
|
|
3674
|
+
/**
|
|
3675
|
+
Field to aggregate by, use dot notation to specify json path
|
|
3676
|
+
@maxLength: 200
|
|
3677
|
+
*/
|
|
3678
|
+
fieldPath?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['fieldPath'];
|
|
3679
|
+
}[];
|
|
3680
|
+
/**
|
|
3681
|
+
Free text to match in searchable fields.
|
|
3682
|
+
*/
|
|
3683
|
+
search?: {
|
|
3684
|
+
/**
|
|
3685
|
+
Defines how separate search terms in `expression` are combined
|
|
3686
|
+
*/
|
|
3687
|
+
mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];
|
|
3688
|
+
/**
|
|
3689
|
+
Search term or expression
|
|
3690
|
+
@maxLength: 100
|
|
3691
|
+
*/
|
|
3692
|
+
expression?: NonNullable<CommonSearchWithEntityContext['search']>['expression'] | null;
|
|
3693
|
+
/**
|
|
3694
|
+
Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path
|
|
3695
|
+
@maxLength: 200,
|
|
3696
|
+
@maxSize: 20
|
|
3697
|
+
*/
|
|
3698
|
+
fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];
|
|
3699
|
+
/**
|
|
3700
|
+
Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm)
|
|
3701
|
+
*/
|
|
3702
|
+
fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];
|
|
3703
|
+
};
|
|
3704
|
+
/**
|
|
3705
|
+
UTC offset or IANA time zone. Valid values are
|
|
3706
|
+
ISO 8601 UTC offsets, such as +02:00 or -06:00,
|
|
3707
|
+
and IANA time zone IDs, such as Europe/Rome
|
|
3708
|
+
|
|
3709
|
+
Affects all filters and aggregations returned values.
|
|
3710
|
+
You may override this behavior in a specific filter by providing
|
|
3711
|
+
timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
|
|
3712
|
+
@maxLength: 50
|
|
3713
|
+
*/
|
|
3714
|
+
timeZone?: CommonSearchWithEntityContext['timeZone'] | null;
|
|
3715
|
+
};
|
|
3716
|
+
/**
|
|
3717
|
+
* Returns the total number of contacts matching the specified criteria.
|
|
3718
|
+
* @public
|
|
3719
|
+
* @documentationMaturity preview
|
|
3720
|
+
* @permissionId CONTACTS.CONTACT_READ
|
|
3721
|
+
* @applicableIdentity APP
|
|
3722
|
+
* @fqn wix.contacts.v5.Contacts.CountContacts
|
|
3723
|
+
*/
|
|
3724
|
+
declare function countContacts(options?: CountContactsOptions): Promise<NonNullablePaths<CountContactsResponse, `count`, 2>>;
|
|
3725
|
+
interface CountContactsOptions {
|
|
3726
|
+
/**
|
|
3727
|
+
* Filter object.
|
|
3728
|
+
*
|
|
3729
|
+
* Example:
|
|
3730
|
+
* `{ "filter": { "name.last": "Smith" } }`
|
|
3731
|
+
*/
|
|
3732
|
+
filter?: Record<string, any> | null;
|
|
3733
|
+
/**
|
|
3734
|
+
* Plain text search for an exact match.
|
|
3735
|
+
*
|
|
3736
|
+
* Supported search properties are:
|
|
3737
|
+
*
|
|
3738
|
+
* - `name.full`
|
|
3739
|
+
* - `email.email`
|
|
3740
|
+
* - `phone.phone`
|
|
3741
|
+
* - `member_info.email`
|
|
3742
|
+
* - `member_info.profile_info.nickname`
|
|
3743
|
+
* - `company.name`
|
|
3744
|
+
* - `company.job_title`
|
|
3745
|
+
*
|
|
3746
|
+
* Max: 100 characters
|
|
3747
|
+
* @maxLength 100
|
|
3748
|
+
*/
|
|
3749
|
+
search?: string | null;
|
|
3750
|
+
}
|
|
3751
|
+
/**
|
|
3752
|
+
* Generates an upload URL to allow external clients to upload a contact image.
|
|
3753
|
+
* To learn how external clients can use the generated upload URL in the response to upload a file,
|
|
3754
|
+
* see the [Upload API](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/upload-api) article.
|
|
3755
|
+
*
|
|
3756
|
+
* You can call [Get Contact Image Upload Status](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/get-contact-image-upload-status) to query the status of the image upload.
|
|
3757
|
+
* @param contactId - ID of the contact whose picture is being updated.
|
|
3758
|
+
* @public
|
|
3759
|
+
* @documentationMaturity preview
|
|
3760
|
+
* @requiredField contactId
|
|
3761
|
+
* @permissionId CONTACTS.GENERATE_IMAGE_UPLOAD_URL
|
|
3762
|
+
* @applicableIdentity APP
|
|
3763
|
+
* @fqn wix.contacts.v5.Contacts.GenerateContactImageUploadUrl
|
|
3764
|
+
*/
|
|
3765
|
+
declare function generateContactImageUploadUrl(contactId: string, options?: GenerateContactImageUploadUrlOptions): Promise<NonNullablePaths<GenerateContactImageUploadUrlResponse, `uploadUrl` | `imageUploadId`, 2> & {
|
|
3766
|
+
__applicationErrorsType?: GenerateContactImageUploadUrlApplicationErrors;
|
|
3767
|
+
}>;
|
|
3768
|
+
interface GenerateContactImageUploadUrlOptions {
|
|
3769
|
+
/**
|
|
3770
|
+
* Mime Type. Must be one of: `image/png`, `image/jpeg`.
|
|
3771
|
+
* Defaults to `image/png`.
|
|
3772
|
+
* @maxLength 100
|
|
3773
|
+
*/
|
|
3774
|
+
mimeType?: string | null;
|
|
3775
|
+
}
|
|
3776
|
+
/**
|
|
3777
|
+
* Adds an email as an additional email.
|
|
3778
|
+
* If the contact's email is not set, it cannot have an additional email and
|
|
3779
|
+
* EMAIL_REQUIRED error will be returned.
|
|
3780
|
+
* @param contactId - ID of the Contact to add an email.
|
|
3781
|
+
* @param email - The email to add.
|
|
3782
|
+
* @public
|
|
3783
|
+
* @documentationMaturity preview
|
|
3784
|
+
* @requiredField contactId
|
|
3785
|
+
* @requiredField email
|
|
3786
|
+
* @requiredField options
|
|
3787
|
+
* @requiredField options.revision
|
|
3788
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
3789
|
+
* @applicableIdentity APP
|
|
3790
|
+
* @fqn wix.contacts.v5.Contacts.AddContactAdditionalEmail
|
|
3791
|
+
*/
|
|
3792
|
+
declare function addContactAdditionalEmail(contactId: string, email: AdditionalEmail, options: NonNullablePaths<AddContactAdditionalEmailOptions, `revision`, 2>): Promise<NonNullablePaths<AddContactAdditionalEmailResponse, `contact.email.email` | `contact.email.subscriptionStatus.status` | `contact.email.deliverabilityStatus` | `contact.additionalEmails` | `contact.additionalEmails.${number}.email` | `contact.phone.tag` | `contact.phone.phone` | `contact.phone.deliverabilityStatus` | `contact.additionalPhones` | `contact.additionalPhones.${number}.tag` | `contact.additionalPhones.${number}.phone` | `contact.addresses` | `contact.addresses.${number}.tag` | `contact.addresses.${number}.address.streetAddress.number` | `contact.addresses.${number}.address.streetAddress.name` | `contact.addresses.${number}.address.streetAddress.apt` | `contact.locationIds` | `contact.segmentIds` | `contact.memberInfo.status` | `contact.memberInfo.profileInfo.privacyStatus` | `contact.memberInfo.userInfo.userId` | `contact.memberInfo.userInfo.role` | `contact.memberInfo.sessionInfo.mobileAppNames` | `contact.memberInfo.groupInfo.groupIds` | `contact.tags.privateTags.tagIds`, 7> & {
|
|
3793
|
+
__applicationErrorsType?: AddContactAdditionalEmailApplicationErrors;
|
|
3794
|
+
}>;
|
|
3795
|
+
interface AddContactAdditionalEmailOptions {
|
|
3796
|
+
/** Contact revision number for optimistic concurrency control. */
|
|
3797
|
+
revision: string | null;
|
|
3798
|
+
}
|
|
3799
|
+
/**
|
|
3800
|
+
* Adds a phone as an additional phone.
|
|
3801
|
+
* If the contact's phone is not set, it cannot have an additional phone and
|
|
3802
|
+
* PHONE_REQUIRED error will be returned.
|
|
3803
|
+
* Checking if the contact already has the given phone, is done by comparing the phone number and tag.
|
|
3804
|
+
* @param contactId - ID of the Contact to add a phone.
|
|
3805
|
+
* @param phone - The phone to add.
|
|
3806
|
+
* @public
|
|
3807
|
+
* @documentationMaturity preview
|
|
3808
|
+
* @requiredField contactId
|
|
3809
|
+
* @requiredField options
|
|
3810
|
+
* @requiredField options.revision
|
|
3811
|
+
* @requiredField phone
|
|
3812
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
3813
|
+
* @applicableIdentity APP
|
|
3814
|
+
* @fqn wix.contacts.v5.Contacts.AddContactAdditionalPhone
|
|
3815
|
+
*/
|
|
3816
|
+
declare function addContactAdditionalPhone(contactId: string, phone: AdditionalPhone, options: NonNullablePaths<AddContactAdditionalPhoneOptions, `revision`, 2>): Promise<NonNullablePaths<AddContactAdditionalPhoneResponse, `contact.email.email` | `contact.email.subscriptionStatus.status` | `contact.email.deliverabilityStatus` | `contact.additionalEmails` | `contact.additionalEmails.${number}.email` | `contact.phone.tag` | `contact.phone.phone` | `contact.phone.deliverabilityStatus` | `contact.additionalPhones` | `contact.additionalPhones.${number}.tag` | `contact.additionalPhones.${number}.phone` | `contact.addresses` | `contact.addresses.${number}.tag` | `contact.addresses.${number}.address.streetAddress.number` | `contact.addresses.${number}.address.streetAddress.name` | `contact.addresses.${number}.address.streetAddress.apt` | `contact.locationIds` | `contact.segmentIds` | `contact.memberInfo.status` | `contact.memberInfo.profileInfo.privacyStatus` | `contact.memberInfo.userInfo.userId` | `contact.memberInfo.userInfo.role` | `contact.memberInfo.sessionInfo.mobileAppNames` | `contact.memberInfo.groupInfo.groupIds` | `contact.tags.privateTags.tagIds`, 7> & {
|
|
3817
|
+
__applicationErrorsType?: AddContactAdditionalPhoneApplicationErrors;
|
|
3818
|
+
}>;
|
|
3819
|
+
interface AddContactAdditionalPhoneOptions {
|
|
3820
|
+
/** Contact revision number for optimistic concurrency control. */
|
|
3821
|
+
revision: string | null;
|
|
3822
|
+
}
|
|
3823
|
+
/**
|
|
3824
|
+
* Adds a contact's address.
|
|
3825
|
+
* Checks that the address does not exist and appends to list of addresses.
|
|
3826
|
+
* If the address exists, it is ignored.
|
|
3827
|
+
* Checking if the contact already has the given address, is done by comparing the address and tag.
|
|
3828
|
+
* @param contactId - ID of the Contact to add an address.
|
|
3829
|
+
* @param address - The address to add.
|
|
3830
|
+
* @public
|
|
3831
|
+
* @documentationMaturity preview
|
|
3832
|
+
* @requiredField address
|
|
3833
|
+
* @requiredField contactId
|
|
3834
|
+
* @requiredField options
|
|
3835
|
+
* @requiredField options.revision
|
|
3836
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
3837
|
+
* @applicableIdentity APP
|
|
3838
|
+
* @fqn wix.contacts.v5.Contacts.AddContactAddress
|
|
3839
|
+
*/
|
|
3840
|
+
declare function addContactAddress(contactId: string, address: ContactAddress, options: NonNullablePaths<AddContactAddressOptions, `revision`, 2>): Promise<NonNullablePaths<AddContactAddressResponse, `contact.email.email` | `contact.email.subscriptionStatus.status` | `contact.email.deliverabilityStatus` | `contact.additionalEmails` | `contact.additionalEmails.${number}.email` | `contact.phone.tag` | `contact.phone.phone` | `contact.phone.deliverabilityStatus` | `contact.additionalPhones` | `contact.additionalPhones.${number}.tag` | `contact.additionalPhones.${number}.phone` | `contact.addresses` | `contact.addresses.${number}.tag` | `contact.addresses.${number}.address.streetAddress.number` | `contact.addresses.${number}.address.streetAddress.name` | `contact.addresses.${number}.address.streetAddress.apt` | `contact.locationIds` | `contact.segmentIds` | `contact.memberInfo.status` | `contact.memberInfo.profileInfo.privacyStatus` | `contact.memberInfo.userInfo.userId` | `contact.memberInfo.userInfo.role` | `contact.memberInfo.sessionInfo.mobileAppNames` | `contact.memberInfo.groupInfo.groupIds` | `contact.tags.privateTags.tagIds`, 7> & {
|
|
3841
|
+
__applicationErrorsType?: AddContactAddressApplicationErrors;
|
|
3842
|
+
}>;
|
|
3843
|
+
interface AddContactAddressOptions {
|
|
3844
|
+
/** Contact revision number for optimistic concurrency control. */
|
|
3845
|
+
revision: string | null;
|
|
3846
|
+
}
|
|
3847
|
+
/**
|
|
3848
|
+
* Deletes a contact's address by address ID.
|
|
3849
|
+
* @param revision - Contact revision number for optimistic concurrency control.
|
|
3850
|
+
* @public
|
|
3851
|
+
* @documentationMaturity preview
|
|
3852
|
+
* @requiredField identifiers
|
|
3853
|
+
* @requiredField identifiers.addressId
|
|
3854
|
+
* @requiredField identifiers.contactId
|
|
3855
|
+
* @requiredField revision
|
|
3856
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
3857
|
+
* @applicableIdentity APP
|
|
3858
|
+
* @fqn wix.contacts.v5.Contacts.DeleteContactAddress
|
|
3859
|
+
*/
|
|
3860
|
+
declare function deleteContactAddress(identifiers: NonNullablePaths<DeleteContactAddressIdentifiers, `addressId` | `contactId`, 2>, revision: string): Promise<NonNullablePaths<DeleteContactAddressResponse, `contact.email.email` | `contact.email.subscriptionStatus.status` | `contact.email.deliverabilityStatus` | `contact.additionalEmails` | `contact.additionalEmails.${number}.email` | `contact.phone.tag` | `contact.phone.phone` | `contact.phone.deliverabilityStatus` | `contact.additionalPhones` | `contact.additionalPhones.${number}.tag` | `contact.additionalPhones.${number}.phone` | `contact.addresses` | `contact.addresses.${number}.tag` | `contact.addresses.${number}.address.streetAddress.number` | `contact.addresses.${number}.address.streetAddress.name` | `contact.addresses.${number}.address.streetAddress.apt` | `contact.locationIds` | `contact.segmentIds` | `contact.memberInfo.status` | `contact.memberInfo.profileInfo.privacyStatus` | `contact.memberInfo.userInfo.userId` | `contact.memberInfo.userInfo.role` | `contact.memberInfo.sessionInfo.mobileAppNames` | `contact.memberInfo.groupInfo.groupIds` | `contact.tags.privateTags.tagIds`, 7> & {
|
|
3861
|
+
__applicationErrorsType?: DeleteContactAddressApplicationErrors;
|
|
3862
|
+
}>;
|
|
3863
|
+
interface DeleteContactAddressIdentifiers {
|
|
3864
|
+
/**
|
|
3865
|
+
* ID of the Contact from which to delete an address.
|
|
3866
|
+
* @format GUID
|
|
3867
|
+
*/
|
|
3868
|
+
contactId: string;
|
|
3869
|
+
/**
|
|
3870
|
+
* ID of the address to delete.
|
|
3871
|
+
* @format GUID
|
|
3872
|
+
*/
|
|
3873
|
+
addressId: string;
|
|
3874
|
+
}
|
|
3875
|
+
/**
|
|
3876
|
+
* Updates a contact's address.
|
|
3877
|
+
* @param address - The updated address (must include address.id).
|
|
3878
|
+
* @public
|
|
3879
|
+
* @documentationMaturity preview
|
|
3880
|
+
* @requiredField address
|
|
3881
|
+
* @requiredField identifiers
|
|
3882
|
+
* @requiredField identifiers.contactId
|
|
3883
|
+
* @requiredField options
|
|
3884
|
+
* @requiredField options.revision
|
|
3885
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
3886
|
+
* @applicableIdentity APP
|
|
3887
|
+
* @fqn wix.contacts.v5.Contacts.UpdateContactAddress
|
|
3888
|
+
*/
|
|
3889
|
+
declare function updateContactAddress(identifiers: NonNullablePaths<UpdateContactAddressIdentifiers, `contactId`, 2>, address: ContactAddress, options: NonNullablePaths<UpdateContactAddressOptions, `revision`, 2>): Promise<NonNullablePaths<UpdateContactAddressResponse, `contact.email.email` | `contact.email.subscriptionStatus.status` | `contact.email.deliverabilityStatus` | `contact.additionalEmails` | `contact.additionalEmails.${number}.email` | `contact.phone.tag` | `contact.phone.phone` | `contact.phone.deliverabilityStatus` | `contact.additionalPhones` | `contact.additionalPhones.${number}.tag` | `contact.additionalPhones.${number}.phone` | `contact.addresses` | `contact.addresses.${number}.tag` | `contact.addresses.${number}.address.streetAddress.number` | `contact.addresses.${number}.address.streetAddress.name` | `contact.addresses.${number}.address.streetAddress.apt` | `contact.locationIds` | `contact.segmentIds` | `contact.memberInfo.status` | `contact.memberInfo.profileInfo.privacyStatus` | `contact.memberInfo.userInfo.userId` | `contact.memberInfo.userInfo.role` | `contact.memberInfo.sessionInfo.mobileAppNames` | `contact.memberInfo.groupInfo.groupIds` | `contact.tags.privateTags.tagIds`, 7> & {
|
|
3890
|
+
__applicationErrorsType?: UpdateContactAddressApplicationErrors;
|
|
3891
|
+
}>;
|
|
3892
|
+
interface UpdateContactAddressIdentifiers {
|
|
3893
|
+
/**
|
|
3894
|
+
* ID of the Contact to update address on.
|
|
3895
|
+
* @format GUID
|
|
3896
|
+
*/
|
|
3897
|
+
contactId: string;
|
|
3898
|
+
}
|
|
3899
|
+
interface UpdateContactAddressOptions {
|
|
3900
|
+
/** Contact revision number for optimistic concurrency control. */
|
|
3901
|
+
revision: string | null;
|
|
3902
|
+
}
|
|
3903
|
+
/**
|
|
3904
|
+
* Create multiple Contacts in a single request. Works synchronously.
|
|
3905
|
+
*
|
|
3906
|
+
* When providing an image url for a contact, the images will be uploaded in the background,
|
|
3907
|
+
* and each returned contact will temporarily have no image.
|
|
3908
|
+
* Once the upload succeeds, the contacts image will be updated.
|
|
3909
|
+
*
|
|
3910
|
+
* To create a single contact, call [Create Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/create-contact).
|
|
3911
|
+
* @param contacts - List of Contacts to be created
|
|
3912
|
+
* @public
|
|
3913
|
+
* @documentationMaturity preview
|
|
3914
|
+
* @requiredField contacts
|
|
3915
|
+
* @permissionId CONTACTS.CONTACT_CREATE
|
|
3916
|
+
* @applicableIdentity APP
|
|
3917
|
+
* @fqn wix.contacts.v5.Contacts.BulkCreateContacts
|
|
3918
|
+
*/
|
|
3919
|
+
declare function bulkCreateContacts(contacts: Contact[], options?: BulkCreateContactsOptions): Promise<NonNullablePaths<BulkCreateContactsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.email.email` | `results.${number}.item.email.deliverabilityStatus` | `results.${number}.item.phone.tag` | `results.${number}.item.phone.phone` | `results.${number}.item.phone.deliverabilityStatus` | `results.${number}.item.memberInfo.status` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
3920
|
+
interface BulkCreateContactsOptions {
|
|
3921
|
+
/** set to `true` if you wish to receive back the created Contacts in the response */
|
|
3922
|
+
returnEntity?: boolean;
|
|
3923
|
+
/** Allows creating the contact even if a duplicate already exists. */
|
|
3924
|
+
allowDuplicates?: boolean;
|
|
3925
|
+
}
|
|
3926
|
+
/**
|
|
3927
|
+
* Update multiple Contacts in a single request. Works synchronously.
|
|
3928
|
+
*
|
|
3929
|
+
* When providing an image url for a contact, the images will be uploaded in the background,
|
|
3930
|
+
* and each returned contact will temporarily have the previous image.
|
|
3931
|
+
* Once the upload succeeds, the contacts image will be updated.
|
|
3932
|
+
*
|
|
3933
|
+
* The `external_id` of a contact can be set only once and if it is already set it cannot be updated.
|
|
3934
|
+
*
|
|
3935
|
+
* To update a single contact, call [Update Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/update-contact).
|
|
3936
|
+
* @param contacts - List of Contacts to be updated.
|
|
3937
|
+
* @public
|
|
3938
|
+
* @documentationMaturity preview
|
|
3939
|
+
* @requiredField contacts
|
|
3940
|
+
* @requiredField contacts.contact._id
|
|
3941
|
+
* @requiredField contacts.contact.revision
|
|
3942
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
3943
|
+
* @applicableIdentity APP
|
|
3944
|
+
* @fqn wix.contacts.v5.Contacts.BulkUpdateContacts
|
|
3945
|
+
*/
|
|
3946
|
+
declare function bulkUpdateContacts(contacts: NonNullablePaths<MaskedContact, `contact._id` | `contact.revision`, 3>[], options?: BulkUpdateContactsOptions): Promise<NonNullablePaths<BulkUpdateContactsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.email.email` | `results.${number}.item.email.deliverabilityStatus` | `results.${number}.item.phone.tag` | `results.${number}.item.phone.phone` | `results.${number}.item.phone.deliverabilityStatus` | `results.${number}.item.memberInfo.status` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
3947
|
+
interface BulkUpdateContactsOptions {
|
|
3948
|
+
/** set to `true` if you wish to receive back the updated Contacts in the response */
|
|
3949
|
+
returnEntity?: boolean;
|
|
3950
|
+
/** Allows updating the contact even if it becomes a duplicate of another contact. */
|
|
3951
|
+
allowDuplicates?: boolean;
|
|
3952
|
+
}
|
|
3953
|
+
/**
|
|
3954
|
+
* Synchronously update tags on multiple contacts, by list of contact ids
|
|
3955
|
+
* A tag that appears both in the list of assign and unassign tags, will be assigned.
|
|
3956
|
+
* There must be at least one tag to assign or unassign in the request.
|
|
3957
|
+
* @param contactIds - The contacts from which to add or remove tags.
|
|
3958
|
+
* @public
|
|
3959
|
+
* @documentationMaturity preview
|
|
3960
|
+
* @requiredField contactIds
|
|
3961
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
3962
|
+
* @applicableIdentity APP
|
|
3963
|
+
* @fqn wix.contacts.v5.Contacts.BulkUpdateContactTags
|
|
3964
|
+
*/
|
|
3965
|
+
declare function bulkUpdateContactTags(contactIds: string[], options?: BulkUpdateContactTagsOptions): Promise<NonNullablePaths<BulkUpdateContactTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.email.email` | `results.${number}.item.email.deliverabilityStatus` | `results.${number}.item.phone.tag` | `results.${number}.item.phone.phone` | `results.${number}.item.phone.deliverabilityStatus` | `results.${number}.item.memberInfo.status` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
3966
|
+
__applicationErrorsType?: BulkUpdateContactTagsApplicationErrors;
|
|
3967
|
+
}>;
|
|
3968
|
+
interface BulkUpdateContactTagsOptions {
|
|
3969
|
+
/** set to `true` if you wish to receive back the updated Contacts in the response */
|
|
3970
|
+
returnEntity?: boolean;
|
|
3971
|
+
/** The tags to add. */
|
|
3972
|
+
assignTags?: PrivateTags;
|
|
3973
|
+
/** The tags to remove. */
|
|
3974
|
+
unassignTags?: PrivateTags;
|
|
3975
|
+
}
|
|
3976
|
+
/**
|
|
3977
|
+
* Asynchronously update tags on multiple contacts, by provided filter
|
|
3978
|
+
* An empty filter will update all contacts
|
|
3979
|
+
* A tag that appears both in the list of assign and unassign tags, will be assigned.
|
|
3980
|
+
* There must be at least one tag to assign or unassign in the request.
|
|
3981
|
+
* @param filter - A filter object. See documentation [here](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters)
|
|
3982
|
+
* @public
|
|
3983
|
+
* @documentationMaturity preview
|
|
3984
|
+
* @requiredField filter
|
|
3985
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
3986
|
+
* @applicableIdentity APP
|
|
3987
|
+
* @fqn wix.contacts.v5.Contacts.BulkUpdateContactTagsByFilter
|
|
3988
|
+
*/
|
|
3989
|
+
declare function bulkUpdateContactTagsByFilter(filter: Record<string, any>, options?: BulkUpdateContactTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateContactTagsByFilterResponse, `jobId`, 2> & {
|
|
3990
|
+
__applicationErrorsType?: BulkUpdateContactTagsByFilterApplicationErrors;
|
|
3991
|
+
}>;
|
|
3992
|
+
interface BulkUpdateContactTagsByFilterOptions {
|
|
3993
|
+
/** Free text to match in searchable fields. */
|
|
3994
|
+
search?: SearchDetails;
|
|
3995
|
+
/** Tag ids to add to the contact. */
|
|
3996
|
+
assignTags?: PrivateTags;
|
|
3997
|
+
/** Tag ids to remove from the contact. */
|
|
3998
|
+
unassignTags?: PrivateTags;
|
|
3999
|
+
}
|
|
4000
|
+
/**
|
|
4001
|
+
* Creates or updates multiple contacts in a single request. Works synchronously.
|
|
4002
|
+
*
|
|
4003
|
+
* Tries finding a contact by the [matching logic](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/matching-contacts).
|
|
4004
|
+
* If the contact is found, by the contact identifiers, the contact is updated. Otherwise created.
|
|
4005
|
+
*
|
|
4006
|
+
* If the contact is being updated, the upsert can run in three modes:
|
|
4007
|
+
* `OVERWRITE` (default): Fields will be overwritten.
|
|
4008
|
+
*
|
|
4009
|
+
* `APPEND`: Fields will be appended. Non-array fields will be set only if it does not have an existing value.
|
|
4010
|
+
*
|
|
4011
|
+
* `OVERWRITE_APPEND_ARRAYS`: Array fields, will be appended. Non-array fields will be overwritten.
|
|
4012
|
+
*
|
|
4013
|
+
* When updating in `APPEND` or `OVERWRITE_APPEND_ARRAYS` mode and the request contains addresses,
|
|
4014
|
+
* the default address flag will will be ignored unless there are no existing addresses on the contact.
|
|
4015
|
+
*
|
|
4016
|
+
* When providing an image url for a contact, given that the upsert mode allow the image to be updated,
|
|
4017
|
+
* the images will be uploaded in the background, and each returned contact will temporarily
|
|
4018
|
+
* have no image if the contact was created or the previous image if the contact was updated.
|
|
4019
|
+
* Once the upload succeeds, the contact image will be updated.
|
|
4020
|
+
* @param contacts - List of Contacts to be updated.
|
|
4021
|
+
* @public
|
|
4022
|
+
* @documentationMaturity preview
|
|
4023
|
+
* @requiredField contacts
|
|
4024
|
+
* @permissionId CONTACTS.CONTACT_UPSERT
|
|
4025
|
+
* @permissionId CONTACTS.CONTACT_MEMBER_UPDATE
|
|
4026
|
+
* @applicableIdentity APP
|
|
4027
|
+
* @fqn wix.contacts.v5.Contacts.BulkUpsertContacts
|
|
4028
|
+
*/
|
|
4029
|
+
declare function bulkUpsertContacts(contacts: BulkUpsertContactsRequestMaskedContact[], options?: BulkUpsertContactsOptions): Promise<NonNullablePaths<BulkUpsertContactsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.email.email` | `results.${number}.item.email.deliverabilityStatus` | `results.${number}.item.phone.tag` | `results.${number}.item.phone.phone` | `results.${number}.item.phone.deliverabilityStatus` | `results.${number}.item.memberInfo.status` | `results.${number}.action` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
4030
|
+
interface BulkUpsertContactsOptions {
|
|
4031
|
+
/** set to `true` if you wish to receive back the updated Contacts in the response */
|
|
4032
|
+
returnEntity?: boolean;
|
|
4033
|
+
/** The mode in which the upsert should work in. */
|
|
4034
|
+
upsertMode?: UpsertModeWithLiterals;
|
|
4035
|
+
/** Indicates whether to update a contact even if it is a site member. */
|
|
4036
|
+
updateMember?: boolean | null;
|
|
4037
|
+
}
|
|
4038
|
+
/**
|
|
4039
|
+
* Delete multiple Contacts in a single request. Works synchronously.
|
|
4040
|
+
*
|
|
4041
|
+
* When deleting contacts, the contact can be restored up to 90 days using the
|
|
4042
|
+
* RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.
|
|
4043
|
+
*
|
|
4044
|
+
* To delete a single contact, call [Delete Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v5/delete-contact).
|
|
4045
|
+
* @param contactIds - Contact ids to be deleted
|
|
4046
|
+
* @public
|
|
4047
|
+
* @documentationMaturity preview
|
|
4048
|
+
* @requiredField contactIds
|
|
4049
|
+
* @permissionId CONTACTS.CONTACT_DELETE
|
|
4050
|
+
* @permissionId MEMBERS.MEMBER_DELETE
|
|
4051
|
+
* @applicableIdentity APP
|
|
4052
|
+
* @fqn wix.contacts.v5.Contacts.BulkDeleteContacts
|
|
4053
|
+
*/
|
|
4054
|
+
declare function bulkDeleteContacts(contactIds: string[], options?: BulkDeleteContactsOptions): Promise<NonNullablePaths<BulkDeleteContactsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
4055
|
+
__applicationErrorsType?: BulkDeleteContactsApplicationErrors;
|
|
4056
|
+
}>;
|
|
4057
|
+
interface BulkDeleteContactsOptions {
|
|
4058
|
+
/**
|
|
4059
|
+
* Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even
|
|
4060
|
+
* if it is a site member and the site member is also deleted. Default: `false`
|
|
4061
|
+
*/
|
|
4062
|
+
deleteMembers?: boolean | null;
|
|
4063
|
+
}
|
|
4064
|
+
/**
|
|
4065
|
+
* Deletes multiple contacts.
|
|
4066
|
+
*
|
|
4067
|
+
* All contacts that meet the specified `filter` and `search` criteria are deleted.
|
|
4068
|
+
* The request should contain a `filter` value or a `search` value, or both.
|
|
4069
|
+
* To perform a dry run, use the intended filter options with
|
|
4070
|
+
* [Search Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/search-contacts).
|
|
4071
|
+
*
|
|
4072
|
+
* The following errors can happen while processing the bulk and they will appear in the bulk job:
|
|
4073
|
+
* - `CANNOT_DELETE_SITE_MEMBERS` - Contact is a site member and cannot be deleted. Site member must be deleted first.
|
|
4074
|
+
* - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION` - Contact has an active billing subscription and cannot be deleted.
|
|
4075
|
+
* - `CANNOT_DELETE_WIX_USERS_MEMBER` - Site member cannot be deleted because it is the owner or a contributor.
|
|
4076
|
+
* - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION` - Site member was deleted, but contact was not.
|
|
4077
|
+
* - 'FAILED_DELETE_CONTACT' - Contact could not be deleted.
|
|
4078
|
+
*
|
|
4079
|
+
* When deleting contacts, the contact can be restored up to 90 days using the
|
|
4080
|
+
* RestoreContactFromTrashBin or BulkRestoreContactsFromTrashBin.
|
|
4081
|
+
* @param filter - Filter object.
|
|
4082
|
+
*
|
|
4083
|
+
* Example:
|
|
4084
|
+
* `{ "filter": { "name.last": "Smith" } }`
|
|
4085
|
+
* @public
|
|
4086
|
+
* @documentationMaturity preview
|
|
4087
|
+
* @requiredField filter
|
|
4088
|
+
* @permissionId CONTACTS.CONTACT_DELETE
|
|
4089
|
+
* @permissionId MEMBERS.MEMBER_DELETE
|
|
4090
|
+
* @applicableIdentity APP
|
|
4091
|
+
* @fqn wix.contacts.v5.Contacts.BulkDeleteContactsByFilter
|
|
4092
|
+
*/
|
|
4093
|
+
declare function bulkDeleteContactsByFilter(filter: Record<string, any>, options?: BulkDeleteContactsByFilterOptions): Promise<NonNullablePaths<BulkDeleteContactsByFilterResponse, `jobId`, 2> & {
|
|
4094
|
+
__applicationErrorsType?: BulkDeleteContactsByFilterApplicationErrors;
|
|
4095
|
+
}>;
|
|
4096
|
+
interface BulkDeleteContactsByFilterOptions {
|
|
4097
|
+
/** Free text to match in searchable fields */
|
|
4098
|
+
search?: SearchDetails;
|
|
4099
|
+
/**
|
|
4100
|
+
* Indicates whether to delete the contact that is a site member. If set to `true`, the contact is deleted even
|
|
4101
|
+
* if it is a site member and the site member is also deleted. Default: `false`
|
|
4102
|
+
*/
|
|
4103
|
+
deleteMembers?: boolean | null;
|
|
4104
|
+
}
|
|
4105
|
+
/**
|
|
4106
|
+
* Remove a contact from the trash-bin.
|
|
4107
|
+
* The contact will not be able to be restored anymore.
|
|
4108
|
+
* @param contactId - Id of the Contact to remove from trashbin.
|
|
4109
|
+
* @public
|
|
4110
|
+
* @documentationMaturity preview
|
|
4111
|
+
* @requiredField contactId
|
|
4112
|
+
* @permissionId CONTACTS.CONTACT_REMOVE_FROM_TRASHBIN
|
|
4113
|
+
* @applicableIdentity APP
|
|
4114
|
+
* @fqn wix.contacts.v5.Contacts.RemoveContactFromTrashBin
|
|
4115
|
+
*/
|
|
4116
|
+
declare function removeContactFromTrashBin(contactId: string): Promise<void>;
|
|
4117
|
+
/**
|
|
4118
|
+
* Restore a contact from the trash-bin.
|
|
4119
|
+
* @param contactId - Id of the Contact to restore from trashbin.
|
|
4120
|
+
* @public
|
|
4121
|
+
* @documentationMaturity preview
|
|
4122
|
+
* @requiredField contactId
|
|
4123
|
+
* @permissionId CONTACTS.CONTACT_RESTORE_FROM_TRASHBIN
|
|
4124
|
+
* @applicableIdentity APP
|
|
4125
|
+
* @fqn wix.contacts.v5.Contacts.RestoreContactFromTrashBin
|
|
4126
|
+
*/
|
|
4127
|
+
declare function restoreContactFromTrashBin(contactId: string): Promise<NonNullablePaths<RestoreContactFromTrashBinResponse, `contact.email.email` | `contact.email.subscriptionStatus.status` | `contact.email.deliverabilityStatus` | `contact.additionalEmails` | `contact.additionalEmails.${number}.email` | `contact.phone.tag` | `contact.phone.phone` | `contact.phone.deliverabilityStatus` | `contact.additionalPhones` | `contact.additionalPhones.${number}.tag` | `contact.additionalPhones.${number}.phone` | `contact.addresses` | `contact.addresses.${number}.tag` | `contact.addresses.${number}.address.streetAddress.number` | `contact.addresses.${number}.address.streetAddress.name` | `contact.addresses.${number}.address.streetAddress.apt` | `contact.locationIds` | `contact.segmentIds` | `contact.memberInfo.status` | `contact.memberInfo.profileInfo.privacyStatus` | `contact.memberInfo.userInfo.userId` | `contact.memberInfo.userInfo.role` | `contact.memberInfo.sessionInfo.mobileAppNames` | `contact.memberInfo.groupInfo.groupIds` | `contact.tags.privateTags.tagIds`, 7>>;
|
|
4128
|
+
/**
|
|
4129
|
+
* Restore contacts from the trash-bin
|
|
4130
|
+
* @public
|
|
4131
|
+
* @documentationMaturity preview
|
|
4132
|
+
* @permissionId CONTACTS.CONTACT_RESTORE_FROM_TRASHBIN
|
|
4133
|
+
* @applicableIdentity APP
|
|
4134
|
+
* @fqn wix.contacts.v5.Contacts.BulkRestoreContactsFromTrashBin
|
|
4135
|
+
*/
|
|
4136
|
+
declare function bulkRestoreContactsFromTrashBin(options?: BulkRestoreContactsFromTrashBinOptions): Promise<NonNullablePaths<BulkRestoreContactsFromTrashBinResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.email.email` | `results.${number}.item.email.deliverabilityStatus` | `results.${number}.item.phone.tag` | `results.${number}.item.phone.phone` | `results.${number}.item.phone.deliverabilityStatus` | `results.${number}.item.memberInfo.status` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
4137
|
+
interface BulkRestoreContactsFromTrashBinOptions {
|
|
4138
|
+
/**
|
|
4139
|
+
* List of Contacts to be restored
|
|
4140
|
+
* @minSize 1
|
|
4141
|
+
* @maxSize 100
|
|
4142
|
+
* @format GUID
|
|
4143
|
+
*/
|
|
4144
|
+
contactIds?: string[];
|
|
4145
|
+
/** return full entity in response */
|
|
4146
|
+
returnEntity?: boolean;
|
|
4147
|
+
}
|
|
4148
|
+
/**
|
|
4149
|
+
* Retrieves a deleted contact from the trash bin by ID.
|
|
4150
|
+
* @param contactId - Id of the Contact to retrieve from trashbin.
|
|
4151
|
+
* @public
|
|
4152
|
+
* @documentationMaturity preview
|
|
4153
|
+
* @requiredField contactId
|
|
4154
|
+
* @permissionId CONTACTS.CONTACT_READ_FROM_TRASHBIN
|
|
4155
|
+
* @applicableIdentity APP
|
|
4156
|
+
* @fqn wix.contacts.v5.Contacts.GetDeletedContact
|
|
4157
|
+
*/
|
|
4158
|
+
declare function getDeletedContact(contactId: string): Promise<NonNullablePaths<GetDeletedContactResponse, `contact.email.email` | `contact.email.subscriptionStatus.status` | `contact.email.deliverabilityStatus` | `contact.additionalEmails` | `contact.additionalEmails.${number}.email` | `contact.phone.tag` | `contact.phone.phone` | `contact.phone.deliverabilityStatus` | `contact.additionalPhones` | `contact.additionalPhones.${number}.tag` | `contact.additionalPhones.${number}.phone` | `contact.addresses` | `contact.addresses.${number}.tag` | `contact.addresses.${number}.address.streetAddress.number` | `contact.addresses.${number}.address.streetAddress.name` | `contact.addresses.${number}.address.streetAddress.apt` | `contact.locationIds` | `contact.segmentIds` | `contact.memberInfo.status` | `contact.memberInfo.profileInfo.privacyStatus` | `contact.memberInfo.userInfo.userId` | `contact.memberInfo.userInfo.role` | `contact.memberInfo.sessionInfo.mobileAppNames` | `contact.memberInfo.groupInfo.groupIds` | `contact.tags.privateTags.tagIds`, 7>>;
|
|
4159
|
+
/**
|
|
4160
|
+
* List deleted contacts by the provided identifiers.
|
|
4161
|
+
* @public
|
|
4162
|
+
* @documentationMaturity preview
|
|
4163
|
+
* @permissionId CONTACTS.CONTACT_READ_FROM_TRASHBIN
|
|
4164
|
+
* @applicableIdentity APP
|
|
4165
|
+
* @fqn wix.contacts.v5.Contacts.ListDeletedContacts
|
|
4166
|
+
*/
|
|
4167
|
+
declare function listDeletedContacts(options?: ListDeletedContactsOptions): Promise<NonNullablePaths<ListDeletedContactsResponse, `contacts` | `contacts.${number}.email.email` | `contacts.${number}.email.subscriptionStatus.status` | `contacts.${number}.email.deliverabilityStatus` | `contacts.${number}.phone.tag` | `contacts.${number}.phone.phone` | `contacts.${number}.phone.deliverabilityStatus` | `contacts.${number}.memberInfo.status` | `contacts.${number}.memberInfo.profileInfo.privacyStatus` | `contacts.${number}.memberInfo.userInfo.userId` | `contacts.${number}.memberInfo.userInfo.role`, 6>>;
|
|
4168
|
+
interface ListDeletedContactsOptions {
|
|
4169
|
+
/**
|
|
4170
|
+
* External ID
|
|
4171
|
+
* @maxLength 100
|
|
4172
|
+
*/
|
|
4173
|
+
externalId?: string | null;
|
|
4174
|
+
/**
|
|
4175
|
+
* Email address.
|
|
4176
|
+
* @format EMAIL
|
|
4177
|
+
* @maxLength 320
|
|
4178
|
+
*/
|
|
4179
|
+
email?: string | null;
|
|
4180
|
+
/**
|
|
4181
|
+
* Phone number.
|
|
4182
|
+
* @minLength 1
|
|
4183
|
+
* @maxLength 50
|
|
4184
|
+
*/
|
|
4185
|
+
phone?: string | null;
|
|
4186
|
+
/**
|
|
4187
|
+
* Contact IDs.
|
|
4188
|
+
* @maxSize 100
|
|
4189
|
+
* @format GUID
|
|
4190
|
+
*/
|
|
4191
|
+
contactIds?: string[];
|
|
4192
|
+
/** From date and time that contact was deleted. */
|
|
4193
|
+
deletedFromDate?: Date | null;
|
|
4194
|
+
/** Until date and time that contact was deleted. */
|
|
4195
|
+
deletedToDate?: Date | null;
|
|
4196
|
+
/** Cursor paging. */
|
|
4197
|
+
paging?: CursorPaging;
|
|
4198
|
+
}
|
|
4199
|
+
/**
|
|
4200
|
+
* Retrieves the status of the contact image upload process.
|
|
4201
|
+
* @public
|
|
4202
|
+
* @documentationMaturity preview
|
|
4203
|
+
* @requiredField identifiers
|
|
4204
|
+
* @requiredField identifiers.contactId
|
|
4205
|
+
* @requiredField identifiers.imageUploadId
|
|
4206
|
+
* @permissionId CONTACTS.CONTACT_IMAGE_STATUS_READ
|
|
4207
|
+
* @applicableIdentity APP
|
|
4208
|
+
* @fqn wix.contacts.v5.Contacts.GetContactImageUploadStatus
|
|
4209
|
+
*/
|
|
4210
|
+
declare function getContactImageUploadStatus(identifiers: NonNullablePaths<GetContactImageUploadStatusIdentifiers, `contactId` | `imageUploadId`, 2>): Promise<NonNullablePaths<GetContactImageUploadStatusResponse, `status`, 2> & {
|
|
4211
|
+
__applicationErrorsType?: GetContactImageUploadStatusApplicationErrors;
|
|
4212
|
+
}>;
|
|
4213
|
+
interface GetContactImageUploadStatusIdentifiers {
|
|
4214
|
+
/**
|
|
4215
|
+
* Id of the contact for which to retrieve the image upload status.
|
|
4216
|
+
* @format GUID
|
|
4217
|
+
*/
|
|
4218
|
+
contactId: string;
|
|
4219
|
+
/**
|
|
4220
|
+
* The upload ID of the image upload process. Returned in case an image URL was provided when creating or
|
|
4221
|
+
* updating a contact. It is also returned from the GenerateContactImageUploadUrl endpoint.
|
|
4222
|
+
* @maxLength 100
|
|
4223
|
+
*/
|
|
4224
|
+
imageUploadId: string;
|
|
4225
|
+
}
|
|
4226
|
+
/**
|
|
4227
|
+
* Adds the requested country code to contact's main phones.
|
|
4228
|
+
* The main phone of a contact will be changed if the resulting number with the added country code,
|
|
4229
|
+
* is a valid phone number. Otherwise, the contact is not changed.
|
|
4230
|
+
* @public
|
|
4231
|
+
* @documentationMaturity preview
|
|
4232
|
+
* @requiredField options.countryCode
|
|
4233
|
+
* @permissionId CONTACTS.CONTACT_UPDATE
|
|
4234
|
+
* @applicableIdentity APP
|
|
4235
|
+
* @fqn wix.contacts.v5.Contacts.BulkUpdatePhoneCountryCodeByFilter
|
|
4236
|
+
*/
|
|
4237
|
+
declare function bulkUpdatePhoneCountryCodeByFilter(options?: NonNullablePaths<BulkUpdatePhoneCountryCodeByFilterOptions, `countryCode`, 2>): Promise<NonNullablePaths<BulkUpdatePhoneCountryCodeByFilterResponse, `jobId`, 2>>;
|
|
4238
|
+
interface BulkUpdatePhoneCountryCodeByFilterOptions {
|
|
4239
|
+
/**
|
|
4240
|
+
* A filter for the contacts that the country code will be applied to.
|
|
4241
|
+
*
|
|
4242
|
+
* Example:
|
|
4243
|
+
* `{ "filter": { "name.last": "Smith" } }`
|
|
4244
|
+
*/
|
|
4245
|
+
filter?: Record<string, any> | null;
|
|
4246
|
+
/** Free text to match in searchable fields for the contacts that the country code will be applied to. */
|
|
4247
|
+
search?: SearchDetails;
|
|
4248
|
+
/**
|
|
4249
|
+
* [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code to apply.
|
|
4250
|
+
* The country code will be added to the contacts main phone number, when adding it the phone, makes it a valid phone number.
|
|
4251
|
+
* @format COUNTRY
|
|
4252
|
+
*/
|
|
4253
|
+
countryCode: string;
|
|
4254
|
+
}
|
|
4255
|
+
|
|
4256
|
+
export { type BulkUpdateContactsOptions as $, type AdditionalEmail as A, type BulkUpdateContactSubscriptionsOptions as B, type Contact as C, type DeleteContactOptions as D, type AdditionalPhone as E, type FindMatchingContactsOptions as F, type GenerateContactImageUploadUrlOptions as G, type AddContactAdditionalPhoneOptions as H, type AddContactAdditionalPhoneResponse as I, type AddContactAdditionalPhoneApplicationErrors as J, type ContactAddress as K, type AddContactAddressOptions as L, type MergeContactsOptions as M, type AddContactAddressResponse as N, type AddContactAddressApplicationErrors as O, type DeleteContactAddressIdentifiers as P, type DeleteContactAddressResponse as Q, type DeleteContactAddressApplicationErrors as R, type SearchContactsOptions as S, type UpdateContactAddressIdentifiers as T, type UpdateContact as U, type UpdateContactAddressOptions as V, type UpdateContactAddressResponse as W, type UpdateContactAddressApplicationErrors as X, type BulkCreateContactsOptions as Y, type BulkCreateContactsResponse as Z, type MaskedContact as _, type BulkUpdateContactSubscriptionsResponse as a, type StreetAddress as a$, type BulkUpdateContactsResponse as a0, type BulkUpdateContactTagsOptions as a1, type BulkUpdateContactTagsResponse as a2, type BulkUpdateContactTagsApplicationErrors as a3, type BulkUpdateContactTagsByFilterOptions as a4, type BulkUpdateContactTagsByFilterResponse as a5, type BulkUpdateContactTagsByFilterApplicationErrors as a6, type BulkUpsertContactsRequestMaskedContact as a7, type BulkUpsertContactsOptions as a8, type BulkUpsertContactsResponse as a9, MemberStatus as aA, PrivacyStatus as aB, Role as aC, WebhookIdentityType as aD, Mode as aE, V5SubscriptionStatus as aF, MatchType as aG, UpsertMode as aH, UpsertContactResponseAction as aI, SortOrder as aJ, SortType as aK, SortDirection as aL, MissingValues as aM, ScalarType as aN, NestedAggregationType as aO, Interval as aP, AggregationType as aQ, NameFormat as aR, Action as aS, QueryContactsByOffsetInternalRequestNameFormat as aT, ImageUploadStatus as aU, type ContactName as aV, type ContactEmail as aW, type ContactSubscription as aX, type ContactPhone as aY, type Address as aZ, type AddressStreetOneOf as a_, type BulkDeleteContactsOptions as aa, type BulkDeleteContactsResponse as ab, type BulkDeleteContactsApplicationErrors as ac, type BulkDeleteContactsByFilterOptions as ad, type BulkDeleteContactsByFilterResponse as ae, type BulkDeleteContactsByFilterApplicationErrors as af, type RestoreContactFromTrashBinResponse as ag, type BulkRestoreContactsFromTrashBinOptions as ah, type BulkRestoreContactsFromTrashBinResponse as ai, type GetDeletedContactResponse as aj, type ListDeletedContactsOptions as ak, type ListDeletedContactsResponse as al, type GetContactImageUploadStatusIdentifiers as am, type GetContactImageUploadStatusResponse as an, type GetContactImageUploadStatusApplicationErrors as ao, type BulkUpdatePhoneCountryCodeByFilterOptions as ap, type BulkUpdatePhoneCountryCodeByFilterResponse as aq, type ContactsQueryBuilder as ar, type ContactQuery as as, typedQueryContacts as at, SubscriptionStatus as au, EmailDeliverabilityStatus as av, PhoneTag as aw, PhoneDeliverabilityStatus as ax, AddressTag as ay, SubdivisionType as az, type BulkUpdateContactSubscriptionsApplicationErrors as b, type QueryContactsResponse as b$, type AddressLocation as b0, type Subdivision as b1, type StandardDetails as b2, type Recipient as b3, type ContactCompany as b4, type ContactSource as b5, type ContactActivity as b6, type MemberInfo as b7, type ProfileInfo as b8, type UserInfo as b9, type SearchDetails as bA, type ReindexEntityForFQDN as bB, type ReindexEntityForFQDNActionOneOf as bC, type Index as bD, type Delete as bE, type ReportBatchCompleted as bF, type BulkIndex as bG, type BulkDelete as bH, type CreateContactRequest as bI, type CreateContactResponse as bJ, type DuplicateContactExists as bK, type GetContactRequest as bL, type GetContactResponse as bM, type UpdateContactRequest as bN, type UpdateContactResponse as bO, type UpsertContactRequest as bP, type FailedMemberUpdate as bQ, type UpdateContactTagsRequest as bR, type MergeContactsRequest as bS, type DeleteContactRequest as bT, type DeleteContactResponse as bU, type FindMatchingContactsRequest as bV, type QueryContactsRequest as bW, type CursorQuery as bX, type CursorQueryPagingMethodOneOf as bY, type Sorting as bZ, type CursorPaging as b_, type SessionInfo as ba, type GroupInfo as bb, type PrivateTags as bc, type TagList as bd, type ExtendedFields as be, type ReindexMessage as bf, type ReindexMessageActionOneOf as bg, type Upsert as bh, type ReindexMessageDelete as bi, type Schema as bj, type ContactMerged as bk, type ContactEmailSubscriptionUpdated as bl, type ContactPhoneSubscriptionUpdated as bm, type ContactImageUploaded as bn, type DomainEvent as bo, type DomainEventBodyOneOf as bp, type EntityCreatedEvent as bq, type RestoreInfo as br, type EntityUpdatedEvent as bs, type EntityDeletedEvent as bt, type ActionEvent as bu, type MessageEnvelope as bv, type IdentificationData as bw, type IdentificationDataIdOneOf as bx, type AccountInfo as by, type BulkUpdateContactSubscriptionsRequest as bz, type CreateContactOptions as c, type BulkAddSegmentToContactsRequest as c$, type CursorPagingMetadata as c0, type Cursors as c1, type SearchContactsRequest as c2, type CursorSearch as c3, type CursorSearchPagingMethodOneOf as c4, type Aggregation as c5, type AggregationKindOneOf as c6, type RangeBucket as c7, type IncludeMissingValuesOptions as c8, type ValueAggregation as c9, type AddContactAdditionalEmailRequest as cA, type AddContactAdditionalPhoneRequest as cB, type AddContactAddressRequest as cC, type DeleteContactAddressRequest as cD, type UpdateContactAddressRequest as cE, type BulkCreateContactsRequest as cF, type ItemMetadata as cG, type ApplicationError as cH, type BulkContactResult as cI, type BulkActionMetadata as cJ, type BulkUpdateContactsRequest as cK, type BulkUpdateContactsResponseBulkContactResult as cL, type BulkUpdateContactTagsRequest as cM, type BulkUpdateContactTagsResult as cN, type BulkUpdateContactTagsByFilterRequest as cO, type BulkUpsertContactsRequest as cP, type BulkUpsertContactsResponseBulkContactResult as cQ, type BulkDeleteContactsRequest as cR, type BulkDeleteContactsResponseBulkContactResult as cS, type BulkDeleteContactsByFilterRequest as cT, type RemoveContactFromTrashBinRequest as cU, type RemoveContactFromTrashBinResponse as cV, type RestoreContactFromTrashBinRequest as cW, type BulkRestoreContactsFromTrashBinRequest as cX, type BulkRestoreContactsFromTrashBinResponseBulkContactResult as cY, type GetDeletedContactRequest as cZ, type ListDeletedContactsRequest as c_, type ValueAggregationOptionsOneOf as ca, type RangeAggregation as cb, type ScalarAggregation as cc, type DateHistogramAggregation as cd, type NestedAggregationItem as ce, type NestedAggregationItemKindOneOf as cf, type NestedAggregation as cg, type AggregationData as ch, type ValueAggregationResult as ci, type RangeAggregationResult as cj, type ValueResults as ck, type RangeResults as cl, type AggregationResultsScalarResult as cm, type ValueResult as cn, type RangeResult as co, type ScalarResult as cp, type NestedResultValue as cq, type NestedResultValueResultOneOf as cr, type Results as cs, type DateHistogramResult as ct, type DateHistogramResults as cu, type NestedResults as cv, type AggregationResults as cw, type AggregationResultsResultOneOf as cx, type CountContactsRequest as cy, type GenerateContactImageUploadUrlRequest as cz, type CreateContactApplicationErrors as d, updateContactAddress as d$, type BulkAddSegmentToContactsResponse as d0, type BulkRemoveSegmentFromContactsRequest as d1, type BulkRemoveSegmentFromContactsResponse as d2, type QueryContactsByOffsetInternalRequest as d3, type QueryV2 as d4, type QueryV2PagingMethodOneOf as d5, type Paging as d6, type QueryContactsByOffsetInternalResponse as d7, type PagingMetadataV2 as d8, type GetContactImageUploadStatusRequest as d9, type MissingValuesWithLiterals as dA, type ScalarTypeWithLiterals as dB, type NestedAggregationTypeWithLiterals as dC, type IntervalWithLiterals as dD, type AggregationTypeWithLiterals as dE, type NameFormatWithLiterals as dF, type ActionWithLiterals as dG, type QueryContactsByOffsetInternalRequestNameFormatWithLiterals as dH, type ImageUploadStatusWithLiterals as dI, type CommonQueryWithEntityContext as dJ, type CommonSearchWithEntityContext as dK, bulkUpdateContactSubscriptions as dL, createContact as dM, getContact as dN, updateContact as dO, upsertContact as dP, updateContactTags as dQ, mergeContacts as dR, deleteContact as dS, findMatchingContacts as dT, queryContacts as dU, countContacts as dV, generateContactImageUploadUrl as dW, addContactAdditionalEmail as dX, addContactAdditionalPhone as dY, addContactAddress as dZ, deleteContactAddress as d_, type BulkUpdatePhoneCountryCodeByFilterRequest as da, type Empty as db, type MediaFileUploadedEvent as dc, type ContactsQueryResult as dd, type ContactQuerySpec as de, type ContactSearchSpec as df, utils as dg, type SubscriptionStatusWithLiterals as dh, type EmailDeliverabilityStatusWithLiterals as di, type PhoneTagWithLiterals as dj, type PhoneDeliverabilityStatusWithLiterals as dk, type AddressTagWithLiterals as dl, type SubdivisionTypeWithLiterals as dm, type MemberStatusWithLiterals as dn, type PrivacyStatusWithLiterals as dp, type RoleWithLiterals as dq, type WebhookIdentityTypeWithLiterals as dr, type ModeWithLiterals as ds, type V5SubscriptionStatusWithLiterals as dt, type MatchTypeWithLiterals as du, type UpsertModeWithLiterals as dv, type UpsertContactResponseActionWithLiterals as dw, type SortOrderWithLiterals as dx, type SortTypeWithLiterals as dy, type SortDirectionWithLiterals as dz, type UpdateContactOptions as e, bulkCreateContacts as e0, bulkUpdateContacts as e1, bulkUpdateContactTags as e2, bulkUpdateContactTagsByFilter as e3, bulkUpsertContacts as e4, bulkDeleteContacts as e5, bulkDeleteContactsByFilter as e6, removeContactFromTrashBin as e7, restoreContactFromTrashBin as e8, bulkRestoreContactsFromTrashBin as e9, getDeletedContact as ea, listDeletedContacts as eb, getContactImageUploadStatus as ec, bulkUpdatePhoneCountryCodeByFilter as ed, type UpdateContactApplicationErrors as f, type UpsertContactOptions as g, type UpsertContactResponse as h, type UpsertContactApplicationErrors as i, type UpdateContactTagsOptions as j, type UpdateContactTagsResponse as k, type UpdateContactTagsApplicationErrors as l, type MergeContactsResponse as m, type MergeContactsApplicationErrors as n, type DeleteContactApplicationErrors as o, type FindMatchingContactsResponse as p, type FindMatchingContactsApplicationErrors as q, type ContactSearch as r, type SearchContactsResponse as s, type CountContactsOptions as t, type CountContactsResponse as u, type GenerateContactImageUploadUrlResponse as v, type GenerateContactImageUploadUrlApplicationErrors as w, type AddContactAdditionalEmailOptions as x, type AddContactAdditionalEmailResponse as y, type AddContactAdditionalEmailApplicationErrors as z };
|