@wix/auto_sdk_crm_contacts 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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/contacts-v4-contact-contacts.context.d.ts +36 -0
  11. package/build/cjs/src/contacts-v4-contact-contacts.context.js +61 -0
  12. package/build/cjs/src/contacts-v4-contact-contacts.context.js.map +1 -0
  13. package/build/cjs/src/contacts-v4-contact-contacts.http.d.ts +126 -0
  14. package/build/cjs/src/contacts-v4-contact-contacts.http.js +555 -0
  15. package/build/cjs/src/contacts-v4-contact-contacts.http.js.map +1 -0
  16. package/build/cjs/src/contacts-v4-contact-contacts.meta.d.ts +32 -0
  17. package/build/cjs/src/contacts-v4-contact-contacts.meta.js +180 -0
  18. package/build/cjs/src/contacts-v4-contact-contacts.meta.js.map +1 -0
  19. package/build/cjs/src/contacts-v4-contact-contacts.public.d.ts +188 -0
  20. package/build/cjs/src/contacts-v4-contact-contacts.public.js +193 -0
  21. package/build/cjs/src/contacts-v4-contact-contacts.public.js.map +1 -0
  22. package/build/cjs/src/contacts-v4-contact-contacts.types.d.ts +1701 -0
  23. package/build/cjs/src/contacts-v4-contact-contacts.types.js +266 -0
  24. package/build/cjs/src/contacts-v4-contact-contacts.types.js.map +1 -0
  25. package/build/cjs/src/contacts-v4-contact-contacts.universal.d.ts +2153 -0
  26. package/build/cjs/src/contacts-v4-contact-contacts.universal.js +883 -0
  27. package/build/cjs/src/contacts-v4-contact-contacts.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/contacts-v4-contact-contacts.context.d.ts +36 -0
  39. package/build/es/src/contacts-v4-contact-contacts.context.js +36 -0
  40. package/build/es/src/contacts-v4-contact-contacts.context.js.map +1 -0
  41. package/build/es/src/contacts-v4-contact-contacts.http.d.ts +126 -0
  42. package/build/es/src/contacts-v4-contact-contacts.http.js +544 -0
  43. package/build/es/src/contacts-v4-contact-contacts.http.js.map +1 -0
  44. package/build/es/src/contacts-v4-contact-contacts.meta.d.ts +32 -0
  45. package/build/es/src/contacts-v4-contact-contacts.meta.js +146 -0
  46. package/build/es/src/contacts-v4-contact-contacts.meta.js.map +1 -0
  47. package/build/es/src/contacts-v4-contact-contacts.public.d.ts +188 -0
  48. package/build/es/src/contacts-v4-contact-contacts.public.js +160 -0
  49. package/build/es/src/contacts-v4-contact-contacts.public.js.map +1 -0
  50. package/build/es/src/contacts-v4-contact-contacts.types.d.ts +1701 -0
  51. package/build/es/src/contacts-v4-contact-contacts.types.js +263 -0
  52. package/build/es/src/contacts-v4-contact-contacts.types.js.map +1 -0
  53. package/build/es/src/contacts-v4-contact-contacts.universal.d.ts +2153 -0
  54. package/build/es/src/contacts-v4-contact-contacts.universal.js +849 -0
  55. package/build/es/src/contacts-v4-contact-contacts.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/contacts-v4-contact-contacts.context.d.ts +36 -0
  66. package/build/internal/cjs/src/contacts-v4-contact-contacts.context.js +61 -0
  67. package/build/internal/cjs/src/contacts-v4-contact-contacts.context.js.map +1 -0
  68. package/build/internal/cjs/src/contacts-v4-contact-contacts.http.d.ts +126 -0
  69. package/build/internal/cjs/src/contacts-v4-contact-contacts.http.js +555 -0
  70. package/build/internal/cjs/src/contacts-v4-contact-contacts.http.js.map +1 -0
  71. package/build/internal/cjs/src/contacts-v4-contact-contacts.meta.d.ts +32 -0
  72. package/build/internal/cjs/src/contacts-v4-contact-contacts.meta.js +180 -0
  73. package/build/internal/cjs/src/contacts-v4-contact-contacts.meta.js.map +1 -0
  74. package/build/internal/cjs/src/contacts-v4-contact-contacts.public.d.ts +188 -0
  75. package/build/internal/cjs/src/contacts-v4-contact-contacts.public.js +193 -0
  76. package/build/internal/cjs/src/contacts-v4-contact-contacts.public.js.map +1 -0
  77. package/build/internal/cjs/src/contacts-v4-contact-contacts.types.d.ts +1729 -0
  78. package/build/internal/cjs/src/contacts-v4-contact-contacts.types.js +266 -0
  79. package/build/internal/cjs/src/contacts-v4-contact-contacts.types.js.map +1 -0
  80. package/build/internal/cjs/src/contacts-v4-contact-contacts.universal.d.ts +2187 -0
  81. package/build/internal/cjs/src/contacts-v4-contact-contacts.universal.js +883 -0
  82. package/build/internal/cjs/src/contacts-v4-contact-contacts.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/contacts-v4-contact-contacts.context.d.ts +36 -0
  93. package/build/internal/es/src/contacts-v4-contact-contacts.context.js +36 -0
  94. package/build/internal/es/src/contacts-v4-contact-contacts.context.js.map +1 -0
  95. package/build/internal/es/src/contacts-v4-contact-contacts.http.d.ts +126 -0
  96. package/build/internal/es/src/contacts-v4-contact-contacts.http.js +544 -0
  97. package/build/internal/es/src/contacts-v4-contact-contacts.http.js.map +1 -0
  98. package/build/internal/es/src/contacts-v4-contact-contacts.meta.d.ts +32 -0
  99. package/build/internal/es/src/contacts-v4-contact-contacts.meta.js +146 -0
  100. package/build/internal/es/src/contacts-v4-contact-contacts.meta.js.map +1 -0
  101. package/build/internal/es/src/contacts-v4-contact-contacts.public.d.ts +188 -0
  102. package/build/internal/es/src/contacts-v4-contact-contacts.public.js +160 -0
  103. package/build/internal/es/src/contacts-v4-contact-contacts.public.js.map +1 -0
  104. package/build/internal/es/src/contacts-v4-contact-contacts.types.d.ts +1729 -0
  105. package/build/internal/es/src/contacts-v4-contact-contacts.types.js +263 -0
  106. package/build/internal/es/src/contacts-v4-contact-contacts.types.js.map +1 -0
  107. package/build/internal/es/src/contacts-v4-contact-contacts.universal.d.ts +2187 -0
  108. package/build/internal/es/src/contacts-v4-contact-contacts.universal.js +849 -0
  109. package/build/internal/es/src/contacts-v4-contact-contacts.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1701 @@
1
+ export interface Contact {
2
+ /**
3
+ * Contact ID.
4
+ * @readonly
5
+ */
6
+ id?: string;
7
+ /**
8
+ * Revision number, which increments by 1 each time the contact is updated.
9
+ * To prevent conflicting changes,
10
+ * the existing `revision` must be specified when updating a contact.
11
+ * @readonly
12
+ */
13
+ revision?: number;
14
+ /**
15
+ * Details about the contact's source.
16
+ * @readonly
17
+ */
18
+ source?: ContactSource;
19
+ /**
20
+ * Date and time the contact was created.
21
+ * @readonly
22
+ */
23
+ createdDate?: Date | null;
24
+ /**
25
+ * Date and time the contact was last updated.
26
+ * @readonly
27
+ */
28
+ updatedDate?: Date | null;
29
+ /**
30
+ * Details about the contact's last action in the site.
31
+ * @readonly
32
+ */
33
+ lastActivity?: ContactActivity;
34
+ /**
35
+ * Contact's primary phone and email.
36
+ * @readonly
37
+ */
38
+ primaryInfo?: PrimaryContactInfo;
39
+ /** Contact's details. */
40
+ info?: ContactInfo;
41
+ /**
42
+ * Contact's primary email details.
43
+ * @readonly
44
+ */
45
+ primaryEmail?: PrimaryEmail;
46
+ /**
47
+ * Contact's primary phone details.
48
+ * @readonly
49
+ */
50
+ primaryPhone?: PrimaryPhone;
51
+ }
52
+ export interface ContactSource {
53
+ /**
54
+ * Source type.
55
+ * @readonly
56
+ */
57
+ sourceType?: ContactSourceType;
58
+ /**
59
+ * App ID, if the contact was created by an app.
60
+ * @readonly
61
+ */
62
+ appId?: string | null;
63
+ }
64
+ export declare enum ContactSourceType {
65
+ OTHER = "OTHER",
66
+ ADMIN = "ADMIN",
67
+ WIX_APP = "WIX_APP",
68
+ IMPORT = "IMPORT",
69
+ THIRD_PARTY = "THIRD_PARTY",
70
+ WIX_BOOKINGS = "WIX_BOOKINGS",
71
+ WIX_CHAT = "WIX_CHAT",
72
+ WIX_EMAIL_MARKETING = "WIX_EMAIL_MARKETING",
73
+ WIX_EVENTS = "WIX_EVENTS",
74
+ WIX_FORMS = "WIX_FORMS",
75
+ WIX_GROUPS = "WIX_GROUPS",
76
+ WIX_HOTELS = "WIX_HOTELS",
77
+ WIX_MARKET_PLACE = "WIX_MARKET_PLACE",
78
+ WIX_MUSIC = "WIX_MUSIC",
79
+ WIX_RESTAURANTS = "WIX_RESTAURANTS",
80
+ WIX_SITE_MEMBERS = "WIX_SITE_MEMBERS",
81
+ WIX_STORES = "WIX_STORES",
82
+ WIX_CODE = "WIX_CODE",
83
+ HOPP = "HOPP"
84
+ }
85
+ export interface ContactActivity {
86
+ /** Date and time of the last action. */
87
+ activityDate?: Date | null;
88
+ /** Contact's last action in the site. */
89
+ activityType?: ContactActivityType;
90
+ }
91
+ export declare enum ContactActivityType {
92
+ /** Visited the site. */
93
+ GENERAL = "GENERAL",
94
+ /** Became a new contact. */
95
+ CONTACT_CREATED = "CONTACT_CREATED",
96
+ /** Logged in. */
97
+ MEMBER_LOGIN = "MEMBER_LOGIN",
98
+ /** Requested a site membership. */
99
+ MEMBER_REGISTER = "MEMBER_REGISTER",
100
+ /** Was approved, blocked, or unblocked. */
101
+ MEMBER_STATUS_CHANGED = "MEMBER_STATUS_CHANGED",
102
+ /** Submitted a form. */
103
+ FORM_SUBMITTED = "FORM_SUBMITTED",
104
+ /** Started a chat. */
105
+ INBOX_FORM_SUBMITTED = "INBOX_FORM_SUBMITTED",
106
+ /** Paid a payment request. */
107
+ INBOX_PAYMENT_REQUEST_PAID = "INBOX_PAYMENT_REQUEST_PAID",
108
+ /** Received a message from the site. */
109
+ INBOX_MESSAGE_TO_CUSTOMER = "INBOX_MESSAGE_TO_CUSTOMER",
110
+ /** Sent a new message to the site. */
111
+ INBOX_MESSAGE_FROM_CUSTOMER = "INBOX_MESSAGE_FROM_CUSTOMER",
112
+ /** Subscribed to a site newsletter through a form. */
113
+ NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED = "NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED",
114
+ /** Unsubscribed from a site newsletter. */
115
+ NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE",
116
+ /** Made a purchase. */
117
+ ECOM_PURCHASE = "ECOM_PURCHASE",
118
+ /** Abandoned a shopping cart. */
119
+ ECOM_CART_ABANDON = "ECOM_CART_ABANDON",
120
+ /** Checked out shopping cart and submitted buyer info (but didn’t complete the purchase yet). */
121
+ ECOM_CHECKOUT_BUYER = "ECOM_CHECKOUT_BUYER",
122
+ /** Booked an appointment. */
123
+ BOOKINGS_APPOINTMENT = "BOOKINGS_APPOINTMENT",
124
+ /** Made a Wix Hotels reservation. */
125
+ HOTELS_RESERVATION = "HOTELS_RESERVATION",
126
+ /** Paid for a Wix Hotels reservation. */
127
+ HOTELS_PURCHASE = "HOTELS_PURCHASE",
128
+ /** Confirmed a Wix Hotels reservation. */
129
+ HOTELS_CONFIRMATION = "HOTELS_CONFIRMATION",
130
+ /** Canceled a Wix Hotels reservation. */
131
+ HOTELS_CANCEL = "HOTELS_CANCEL",
132
+ /** Purchased a video. */
133
+ VIDEO_PURCHASE = "VIDEO_PURCHASE",
134
+ /** Rented a video. */
135
+ VIDEO_RENT = "VIDEO_RENT",
136
+ /** Made a purchase with a pay button. */
137
+ CASHIER_BUTTON_PURCHASE = "CASHIER_BUTTON_PURCHASE",
138
+ /** Became a new Wix Marketplace lead. */
139
+ ARENA_NEW_LEAD = "ARENA_NEW_LEAD",
140
+ /** RSVP'd to an event. */
141
+ EVENTS_RSVP = "EVENTS_RSVP",
142
+ /** Paid an invoice. */
143
+ INVOICE_PAY = "INVOICE_PAY",
144
+ /** An invoice is now overdue. */
145
+ INVOICE_OVERDUE = "INVOICE_OVERDUE",
146
+ /** Accepted a price quote. */
147
+ PRICE_QUOTE_ACCEPT = "PRICE_QUOTE_ACCEPT",
148
+ /** A price quote has expired. */
149
+ PRICE_QUOTE_EXPIRE = "PRICE_QUOTE_EXPIRE",
150
+ /** Ordered food with Wix Restaurants. */
151
+ RESTAURANTS_ORDER = "RESTAURANTS_ORDER",
152
+ /** Made a Wix Restaurants reservation. */
153
+ RESTAURANTS_RESERVATION = "RESTAURANTS_RESERVATION",
154
+ /** Opened an email from the site. */
155
+ SHOUTOUT_OPEN = "SHOUTOUT_OPEN",
156
+ /** Clicked a link in an email from the site. */
157
+ SHOUTOUT_CLICK = "SHOUTOUT_CLICK",
158
+ /** Merged with another contact. */
159
+ CONTACT_MERGED = "CONTACT_MERGED",
160
+ /** Subscribed to a site newsletter. */
161
+ NEWSLETTER_SUBSCRIPTION_SUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_SUBSCRIBE",
162
+ /** Subscription status to site newsletters is pending confirmation. */
163
+ NEWSLETTER_SUBSCRIPTION_PENDING = "NEWSLETTER_SUBSCRIPTION_PENDING",
164
+ /** Subscription status to site newsletters is not set. */
165
+ NEWSLETTER_SUBSCRIPTION_NOT_SET = "NEWSLETTER_SUBSCRIPTION_NOT_SET",
166
+ /** Subscribed to phone notifications. */
167
+ PHONE_SUBSCRIPTION_SUBSCRIBE = "PHONE_SUBSCRIPTION_SUBSCRIBE",
168
+ /** Subscription to phone notificatons is pending confirmation. */
169
+ PHONE_SUBSCRIPTION_PENDING = "PHONE_SUBSCRIPTION_PENDING",
170
+ /** Subscription to phone notificatons is not set. */
171
+ PHONE_SUBSCRIPTION_NOT_SET = "PHONE_SUBSCRIPTION_NOT_SET",
172
+ /** Subscribed to phone notifications. */
173
+ PHONE_SUBSCRIPTION_UNSUBSCRIBE = "PHONE_SUBSCRIPTION_UNSUBSCRIBE"
174
+ }
175
+ export interface ActivityIcon {
176
+ /** Icon name */
177
+ name?: string | null;
178
+ /** Icon url */
179
+ url?: string | null;
180
+ }
181
+ export interface PrimaryContactInfo {
182
+ /**
183
+ * Primary email address.
184
+ *
185
+ * This property reflects the email address in `info.emails`
186
+ * where `primary` is `true`.
187
+ * @readonly
188
+ */
189
+ email?: string | null;
190
+ /**
191
+ * Primary phone number.
192
+ *
193
+ * This property reflects the phone number in `info.phones`
194
+ * where `primary` is `true`.
195
+ * @readonly
196
+ */
197
+ phone?: string | null;
198
+ }
199
+ export interface Image {
200
+ /**
201
+ * WixMedia image ID.
202
+ * This property is written by Wix when an image is uploaded to the Wix Media Manager.
203
+ */
204
+ id?: string;
205
+ /** Image source: Either a Media Manager URL or external URL. */
206
+ url?: string;
207
+ /** Height of the original image. */
208
+ height?: number;
209
+ /** Width of the original image. */
210
+ width?: number;
211
+ /** Image alt text (optional). */
212
+ altText?: string | null;
213
+ /**
214
+ * Image URL expiration date (optional).
215
+ * @readonly
216
+ */
217
+ urlExpirationDate?: Date | null;
218
+ }
219
+ export interface ContactInfo {
220
+ /** Contact's first and last name. */
221
+ name?: ContactName;
222
+ /** Contact's email addresses. */
223
+ emails?: ContactEmailsWrapper;
224
+ /** Contact's phone numbers. */
225
+ phones?: ContactPhonesWrapper;
226
+ /** Contact's street addresses. */
227
+ addresses?: ContactAddressesWrapper;
228
+ /** Contact's company name. */
229
+ company?: string | null;
230
+ /** Contact's job title. */
231
+ jobTitle?: string | null;
232
+ /** Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`. */
233
+ birthdate?: string | null;
234
+ /**
235
+ * Locale in
236
+ * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
237
+ * Typically, this is a lowercase 2-letter language code,
238
+ * followed by a hyphen, followed by an uppercase 2-letter country code.
239
+ * For example, `en-US` for U.S. English, and `de-DE` for Germany German.
240
+ */
241
+ locale?: string | null;
242
+ /**
243
+ * List of contact's labels.
244
+ *
245
+ * Labels are used to organize contacts. Labels can be
246
+ * added and removed using Label Contact and Unlabel Contact, respectively.
247
+ *
248
+ * To view or manage contact labels, use the Labels API.
249
+ */
250
+ labelKeys?: LabelsWrapper;
251
+ /**
252
+ * Additional custom fields.
253
+ *
254
+ * Empty fields are not returned.
255
+ */
256
+ extendedFields?: ExtendedFieldsWrapper;
257
+ /** Contact's profile picture. */
258
+ picture?: ContactPicture;
259
+ }
260
+ export interface ContactName {
261
+ /** Contact's first name. */
262
+ first?: string | null;
263
+ /** Contact's last name. */
264
+ last?: string | null;
265
+ }
266
+ export interface ContactEmailsWrapper {
267
+ /** List of up to 50 email addresses. */
268
+ items?: ContactEmail[];
269
+ }
270
+ export interface ContactEmail {
271
+ /**
272
+ * Email ID.
273
+ * @readonly
274
+ */
275
+ id?: string | null;
276
+ /**
277
+ * Email type.
278
+ *
279
+ * `UNTAGGED` is shown as "Other" in the Contact List.
280
+ */
281
+ tag?: EmailTag;
282
+ /** Email address. */
283
+ email?: string;
284
+ /**
285
+ * Indicates whether this is the contact's primary email address.
286
+ * When changing `primary` to `true` for an email,
287
+ * the contact's other emails become `false`.
288
+ * Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email.
289
+ */
290
+ primary?: boolean | null;
291
+ }
292
+ export declare enum EmailTag {
293
+ UNTAGGED = "UNTAGGED",
294
+ MAIN = "MAIN",
295
+ HOME = "HOME",
296
+ WORK = "WORK"
297
+ }
298
+ export interface ContactPhonesWrapper {
299
+ /** List of up to 50 phone numbers. */
300
+ items?: ContactPhone[];
301
+ }
302
+ export interface ContactPhone {
303
+ /**
304
+ * Phone ID.
305
+ * @readonly
306
+ */
307
+ id?: string | null;
308
+ /**
309
+ * Phone type.
310
+ *
311
+ * `UNTAGGED` is shown as "Other" in the Contact List.
312
+ */
313
+ tag?: PhoneTag;
314
+ /** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */
315
+ countryCode?: string | null;
316
+ /** Phone number. */
317
+ phone?: string;
318
+ /**
319
+ * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
320
+ * phone number.
321
+ * Automatically generated using `phone` and `countryCode`, pending both values are valid.
322
+ * @readonly
323
+ */
324
+ e164Phone?: string | null;
325
+ /**
326
+ * Indicates whether this is the contact's primary phone number.
327
+ * When changing `primary` to `true` for a phone,
328
+ * the contact's `primary` field for other phones becomes `false`.
329
+ * Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone.
330
+ */
331
+ primary?: boolean | null;
332
+ }
333
+ export declare enum PhoneTag {
334
+ UNTAGGED = "UNTAGGED",
335
+ MAIN = "MAIN",
336
+ HOME = "HOME",
337
+ MOBILE = "MOBILE",
338
+ WORK = "WORK",
339
+ FAX = "FAX"
340
+ }
341
+ export interface ContactAddressesWrapper {
342
+ /** List of up to 50 addresses. */
343
+ items?: ContactAddress[];
344
+ }
345
+ export interface ContactAddress {
346
+ /**
347
+ * Street address ID.
348
+ * @readonly
349
+ */
350
+ id?: string | null;
351
+ /**
352
+ * Address type.
353
+ * `UNTAGGED` is shown as "Other" in the Contact List.
354
+ */
355
+ tag?: AddressTag;
356
+ /** Street address. */
357
+ address?: Address;
358
+ }
359
+ export declare enum AddressTag {
360
+ UNTAGGED = "UNTAGGED",
361
+ HOME = "HOME",
362
+ WORK = "WORK",
363
+ BILLING = "BILLING",
364
+ SHIPPING = "SHIPPING"
365
+ }
366
+ /** Physical address */
367
+ export interface Address extends AddressStreetOneOf {
368
+ /** Street address object, with number and name in separate fields. */
369
+ streetAddress?: StreetAddress;
370
+ /** Main address line, usually street and number, as free text. */
371
+ addressLine?: string | null;
372
+ /**
373
+ * 2-letter country code in an
374
+ * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
375
+ */
376
+ country?: string | null;
377
+ /**
378
+ * Code for a subdivision (such as state, prefecture, or province) in an
379
+ * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
380
+ */
381
+ subdivision?: string | null;
382
+ /** City name. */
383
+ city?: string | null;
384
+ /** Postal or zip code. */
385
+ postalCode?: string | null;
386
+ /**
387
+ * Free text providing more detailed address information,
388
+ * such as apartment, suite, or floor.
389
+ */
390
+ addressLine2?: string | null;
391
+ }
392
+ /** @oneof */
393
+ export interface AddressStreetOneOf {
394
+ /** Street address object, with number and name in separate fields. */
395
+ streetAddress?: StreetAddress;
396
+ /** Main address line, usually street and number, as free text. */
397
+ addressLine?: string | null;
398
+ }
399
+ export interface StreetAddress {
400
+ /** Street number. */
401
+ number?: string;
402
+ /** Street name. */
403
+ name?: string;
404
+ }
405
+ export interface AddressLocation {
406
+ /** Address's latitude. */
407
+ latitude?: number | null;
408
+ /** Address's longitude. */
409
+ longitude?: number | null;
410
+ }
411
+ export interface Subdivision {
412
+ /** subdivision short code */
413
+ code?: string;
414
+ /** Full subdivision name. */
415
+ name?: string;
416
+ }
417
+ export declare enum SubdivisionType {
418
+ UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
419
+ /** State */
420
+ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
421
+ /** County */
422
+ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
423
+ /** City/town */
424
+ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
425
+ /** Neighborhood/quarter */
426
+ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
427
+ /** Street/block */
428
+ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
429
+ /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
430
+ COUNTRY = "COUNTRY"
431
+ }
432
+ export interface AssigneesWrapper {
433
+ /** List of site contributor user IDs. */
434
+ items?: string[];
435
+ }
436
+ export interface LabelsWrapper {
437
+ /**
438
+ * List of contact label keys.
439
+ *
440
+ * Contact labels help categorize contacts. Label keys must exist to be added to the contact.
441
+ * Contact labels can be created or retrieved with Find or Create Label or List Labels.
442
+ */
443
+ items?: string[];
444
+ }
445
+ export interface ExtendedFieldsWrapper {
446
+ /**
447
+ * Contact's extended fields,
448
+ * where each key is the field key,
449
+ * and each value is the field's value for the contact.
450
+ *
451
+ * To view and manage extended fields, use the Extended Fields API.
452
+ */
453
+ items?: Record<string, any>;
454
+ }
455
+ export interface LocationsWrapper {
456
+ /** List of location ids. */
457
+ items?: string[];
458
+ }
459
+ /** TEST contact picture description */
460
+ export interface ContactPicture {
461
+ /**
462
+ * Image.
463
+ * This can contain an image URL or a Wix Media image ID.
464
+ */
465
+ image?: Image;
466
+ }
467
+ export declare enum ImageProvider {
468
+ UNKNOWN = "UNKNOWN",
469
+ /** Image stored outside Wix */
470
+ EXTERNAL = "EXTERNAL",
471
+ /** Stored in wix media platform, Must be uploaded by using `GeneratePictureUploadUrl` */
472
+ WIX_MEDIA = "WIX_MEDIA"
473
+ }
474
+ export interface SegmentsWrapper {
475
+ /** List of Contact segment IDs */
476
+ items?: string[];
477
+ }
478
+ export interface PrimaryEmail {
479
+ /**
480
+ * Primary email address.
481
+ *
482
+ * This property reflects the email address in `info.emails`
483
+ * where `primary` is `true`.
484
+ * @readonly
485
+ */
486
+ email?: string | null;
487
+ /**
488
+ * Indicates the recipient's opt-in or opt-out status for marketing emails.
489
+ *
490
+ * - `NOT_SET`: No status specified. Default.
491
+ * - `PENDING`: Subscription confirmation was requested,
492
+ * but recipient hasn't confirmed yet.
493
+ * - `SUBSCRIBED`: Recipient has opted in to marketing emails.
494
+ * - `UNSUBSCRIBED`: Recipient has opted out of marketing emails.
495
+ * @readonly
496
+ */
497
+ subscriptionStatus?: SubscriptionStatus;
498
+ /**
499
+ * Indicates last reported status of sent emails.
500
+ *
501
+ * - `NOT_SET`: No status reported. Default.
502
+ * - `VALID`: Emails are being successfully delivered.
503
+ * - `BOUNCED`: The last email to the recipient bounced or was rejected.
504
+ * - `SPAM_COMPLAINT`: Recipient registered a spam complaint
505
+ * with their email provider.
506
+ * - `INACTIVE`: Multiple emails have been delivered without any kind of engagement from the recipient.
507
+ * @readonly
508
+ */
509
+ deliverabilityStatus?: EmailDeliverabilityStatus;
510
+ }
511
+ export declare enum SubscriptionStatus {
512
+ NO_SUBSCRIPTION_STATUS = "NO_SUBSCRIPTION_STATUS",
513
+ NOT_SET = "NOT_SET",
514
+ PENDING = "PENDING",
515
+ SUBSCRIBED = "SUBSCRIBED",
516
+ UNSUBSCRIBED = "UNSUBSCRIBED"
517
+ }
518
+ export declare enum EmailDeliverabilityStatus {
519
+ NOT_SET = "NOT_SET",
520
+ VALID = "VALID",
521
+ BOUNCED = "BOUNCED",
522
+ SPAM_COMPLAINT = "SPAM_COMPLAINT",
523
+ INACTIVE = "INACTIVE"
524
+ }
525
+ export interface PrimaryPhone {
526
+ /** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the primary phone. */
527
+ countryCode?: string | null;
528
+ /**
529
+ * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
530
+ * phone number.
531
+ * Automatically generated using `phone` and `countryCode`,
532
+ * as long as both of those values are valid.
533
+ * @readonly
534
+ */
535
+ e164Phone?: string | null;
536
+ /**
537
+ * Formatted phone. Automatically generated using phone and countryCode.
538
+ * @readonly
539
+ */
540
+ formattedPhone?: string | null;
541
+ /**
542
+ * Indicates the recipient's opt-in or opt-out status for SMS messages.
543
+ *
544
+ * - `NO_SUBSCRIPTION_STATUS`: No status exists. This is the status when the phone is not a valid E164 phone.
545
+ * - `NOT_SET`: No status specified. Default when the phone is a valid E164 phone.
546
+ * - `PENDING`: Subscription confirmation was requested,
547
+ * but recipient hasn't confirmed yet.
548
+ * - `SUBSCRIBED`: Recipient has opted in to SMS messages.
549
+ * - `UNSUBSCRIBED`: Recipient has opted out of SMS messages.
550
+ * @readonly
551
+ */
552
+ subscriptionStatus?: SubscriptionStatus;
553
+ /**
554
+ * Primary phone number.
555
+ *
556
+ * This property reflects the phone number in `info.phones`
557
+ * where `primary` is `true`.
558
+ * @readonly
559
+ */
560
+ phone?: string | null;
561
+ }
562
+ export declare enum PhoneDeliverabilityStatus {
563
+ NO_PHONE_DELIVERABILITY_STATUS = "NO_PHONE_DELIVERABILITY_STATUS",
564
+ NOT_SET = "NOT_SET"
565
+ }
566
+ export interface MemberInfo {
567
+ /** Member ID */
568
+ memberId?: string | null;
569
+ /** Signup date */
570
+ signupDate?: Date | null;
571
+ /** Login email */
572
+ email?: string | null;
573
+ /** Indicate whether the email is verified */
574
+ emailVerified?: boolean | null;
575
+ /** Indicates whether the member is required to verify their email */
576
+ emailVerificationRequired?: boolean | null;
577
+ /**
578
+ * Member status.
579
+ * - `PENDING`: Member created and is waiting for approval by site owner.
580
+ * - `ACTIVE`: Member can log in to the site.
581
+ * - `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.
582
+ * - `BLOCKED': Member is blocked and cannot log in to the site.
583
+ */
584
+ status?: MemberStatus;
585
+ /** Profile info */
586
+ profileInfo?: ProfileInfo;
587
+ /** User info */
588
+ userInfo?: UserInfo;
589
+ /** Session info */
590
+ sessionInfo?: SessionInfo;
591
+ /** Group info */
592
+ groupInfo?: GroupInfo;
593
+ }
594
+ export declare enum MemberStatus {
595
+ PENDING = "PENDING",
596
+ ACTIVE = "ACTIVE",
597
+ DELETED = "DELETED",
598
+ BLOCKED = "BLOCKED",
599
+ OFFLINE = "OFFLINE"
600
+ }
601
+ export interface ProfileInfo {
602
+ /** Nickname */
603
+ nickname?: string | null;
604
+ /** Privacy status */
605
+ privacyStatus?: PrivacyStatus;
606
+ /** Indicate whether the member is reported */
607
+ reported?: boolean | null;
608
+ /** Indicate whether the member is muted */
609
+ muted?: boolean | null;
610
+ /** Profile photo */
611
+ photo?: Image;
612
+ }
613
+ export declare enum PrivacyStatus {
614
+ PRIVATE = "PRIVATE",
615
+ PUBLIC = "PUBLIC"
616
+ }
617
+ export interface UserInfo {
618
+ /** User ID */
619
+ userId?: string;
620
+ /** The user's role on the website */
621
+ role?: Role;
622
+ }
623
+ export declare enum Role {
624
+ UNSPECIFIED_ROLE = "UNSPECIFIED_ROLE",
625
+ OWNER = "OWNER",
626
+ CONTRIBUTOR = "CONTRIBUTOR"
627
+ }
628
+ export interface SessionInfo {
629
+ /** Last time the member logged in to the website */
630
+ lastWebLogin?: Date | null;
631
+ /** Last time the member logged in to one of the mobile apps */
632
+ lastMobileLogin?: Date | null;
633
+ /** List of mobile apps that the member has ever logged in to */
634
+ mobileAppNames?: string[];
635
+ }
636
+ export interface GroupInfo {
637
+ /** Group IDs */
638
+ groupIds?: string[];
639
+ }
640
+ export interface ContactSubmitted {
641
+ /** Pass through data, submitted with the contact */
642
+ passThroughData?: string | null;
643
+ /** Submitted activity */
644
+ activity?: ContactActivity;
645
+ /** Submitted Contact (after processing) */
646
+ contact?: Contact;
647
+ }
648
+ export interface ContactChanged {
649
+ /** The Contact before the changes */
650
+ previousContact?: Contact;
651
+ /** The Contact after the changes */
652
+ currentContact?: Contact;
653
+ }
654
+ export interface ContactEmailSubscriptionUpdated {
655
+ /** The updated contact ID. */
656
+ contactId?: string;
657
+ /** The revision of the contact. */
658
+ revision?: number;
659
+ /** The primary email of the contact with the updated subscription and deliverability status. */
660
+ primaryEmail?: PrimaryEmail;
661
+ /** Date and time the contact was updated with the email subscription or deliverability status. */
662
+ updatedDate?: Date | null;
663
+ }
664
+ export interface ContactPhoneSubscriptionUpdated {
665
+ /** The updated contact ID. */
666
+ contactId?: string;
667
+ /** The revision of the contact. */
668
+ revision?: number;
669
+ /** The primary phone of the contact with the updated subscription status. */
670
+ primaryPhone?: PrimaryPhone;
671
+ /** Date and time the contact was updated with the SMS subscription status. */
672
+ updatedDate?: Date | null;
673
+ }
674
+ /**
675
+ * This message is an internal message used by this app and it is used to trigger
676
+ * the update of the subscription status of the contact asynchronously.
677
+ * It is published after a contact is created/updated/merged.
678
+ */
679
+ export interface ContactPrimaryInfoUpdated {
680
+ /** The updated contact ID. */
681
+ contactId?: string;
682
+ /** Indication whether the primary email was updated. */
683
+ primaryEmailUpdated?: boolean;
684
+ /** Indication whether primary phone was updated. */
685
+ primaryPhoneUpdated?: boolean;
686
+ /** previous primary email subscription status */
687
+ previousPrimaryEmailSubscriptionStatus?: PrimarySubscriptionStatus;
688
+ /** previous primary phone subscription status */
689
+ previousPrimaryPhoneSubscriptionStatus?: PrimarySubscriptionStatus;
690
+ }
691
+ export interface PrimarySubscriptionStatus {
692
+ /** subscription status */
693
+ subscriptionStatus?: SubscriptionStatus;
694
+ }
695
+ /**
696
+ * This message is an internal message used by this app and it is used to trigger
697
+ * the update of the contact's last activity is done asynchronously.
698
+ */
699
+ export interface LastActivityUpdate {
700
+ /** The contact ID. */
701
+ contactId?: string;
702
+ /** Activity date. */
703
+ activityDate?: Date | null;
704
+ /** Activity translation key. */
705
+ activityTranslationKey?: string;
706
+ /** Activity icon. */
707
+ icon?: string | null;
708
+ }
709
+ /** Contact creation options. */
710
+ export interface CreateContactRequest {
711
+ /** Contact info. */
712
+ info: ContactInfo;
713
+ /**
714
+ * Controls whether the call will succeed
715
+ * if the new contact information contains an email or a phone number already used by another contact.
716
+ *
717
+ * If set to `true`,
718
+ * the call will succeed even if an email address or phone number is used by another contact.
719
+ * If set to `false`,
720
+ * the call will fail if the given email address is used by another contact or,
721
+ * if the email address is not given and the given phone number is used by another contact.
722
+ *
723
+ * Default: `false`
724
+ */
725
+ allowDuplicates?: boolean;
726
+ }
727
+ /** Contact. */
728
+ export interface CreateContactResponse {
729
+ /** Contact. */
730
+ contact?: Contact;
731
+ }
732
+ export interface DuplicateContactExists {
733
+ duplicateContactId?: string | null;
734
+ duplicateEmail?: string | null;
735
+ duplicatePhone?: string | null;
736
+ }
737
+ export interface UpdateContactRequest {
738
+ /** ID of the contact to update. */
739
+ contactId: string;
740
+ /**
741
+ * Revision number.
742
+ * When updating, include the existing `revision`
743
+ * to prevent conflicting updates.
744
+ */
745
+ revision: number | null;
746
+ /**
747
+ * Controls whether the call will succeed
748
+ * if the new contact information contains an email or a phone number already used by another contact.
749
+ *
750
+ * If set to `true`,
751
+ * the call will succeed even if an email address or phone number is used by another contact.
752
+ * If set to `false`,
753
+ * the call will fail if the given email address is used by another contact or,
754
+ * if the email address is not given and the given phone number is used by another contact.
755
+ *
756
+ * Default: `false`
757
+ */
758
+ allowDuplicates?: boolean;
759
+ /** Contact info. */
760
+ info: ContactInfo;
761
+ }
762
+ /** Updated contact. */
763
+ export interface UpdateContactResponse {
764
+ /** Updated contact. */
765
+ contact?: Contact;
766
+ }
767
+ export interface MergeContactsRequest {
768
+ /** Target contact ID. */
769
+ targetContactId: string;
770
+ /**
771
+ * Target contact revision number, which increments by 1 each time the contact is updated.
772
+ * To prevent conflicting changes,
773
+ * the target contact's current `revision` must be specified.
774
+ */
775
+ targetContactRevision: number | null;
776
+ /**
777
+ * IDs of up to 5 contacts to merge into the target contact.
778
+ * When you merge more than one source contact,
779
+ * the first source is given precedence, then the second, and so on.
780
+ */
781
+ sourceContactIds?: string[];
782
+ }
783
+ export interface MergeContactsResponse {
784
+ /** Updated target contact. */
785
+ contact?: Contact;
786
+ }
787
+ export interface ContactMerged {
788
+ /** ID of the contact the source contacts were merged into. */
789
+ targetContactId?: string;
790
+ /** IDs of contacts that were merged into the target contact. */
791
+ sourceContactIds?: string[];
792
+ /** Updated target contact. */
793
+ targetContact?: Contact;
794
+ }
795
+ export interface PreviewMergeContactsRequest {
796
+ /** Target contact ID. */
797
+ targetContactId?: string;
798
+ /**
799
+ * IDs of up to 5 contacts to merge into the target contact.
800
+ * When you merge more than one source contact,
801
+ * the first source is given precedence, then the second, and so on.
802
+ */
803
+ sourceContactIds?: string[];
804
+ }
805
+ export interface PreviewMergeContactsResponse {
806
+ /** Preview of the updated target contact. */
807
+ contact?: Contact;
808
+ }
809
+ export interface DeleteContactRequest {
810
+ /** ID of the contact to delete. */
811
+ contactId: string;
812
+ }
813
+ export interface DeleteContactResponse {
814
+ }
815
+ export interface LabelContactRequest {
816
+ /** ID of the contact to add labels to. */
817
+ contactId: string;
818
+ /**
819
+ * List of label keys to add to the contact.
820
+ *
821
+ * Label keys must exist to be added to the contact.
822
+ * Use the Labels API to create or retrieve labels.
823
+ */
824
+ labelKeys: string[];
825
+ }
826
+ /** Updated contact. */
827
+ export interface LabelContactResponse {
828
+ /** Updated contact. */
829
+ contact?: Contact;
830
+ }
831
+ export interface UnlabelContactRequest {
832
+ /** ID of the contact to remove labels from. */
833
+ contactId: string;
834
+ /** List of label keys to remove from the contact. */
835
+ labelKeys: string[];
836
+ }
837
+ /** Updated contact. */
838
+ export interface UnlabelContactResponse {
839
+ /** Updated contact. */
840
+ contact?: Contact;
841
+ }
842
+ export interface LabelAndUnlabelContactRequest {
843
+ /** Contact ID. */
844
+ contactId?: string;
845
+ /**
846
+ * List of label keys to add to the contact.
847
+ *
848
+ * Label keys must exist to be added to the contact.
849
+ * Contact labels can be created or retrieved with
850
+ * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)
851
+ * or
852
+ * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
853
+ */
854
+ labelKeysToAdd?: string[];
855
+ /** List of label keys to remove from the contact. */
856
+ labelKeysToRemove?: string[];
857
+ }
858
+ export interface LabelAndUnlabelContactResponse {
859
+ /** Updated contact. */
860
+ contact?: Contact;
861
+ }
862
+ export interface ListContactsRequest {
863
+ /** [Sort order](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter). */
864
+ sort?: Sorting;
865
+ /** [Pagination](https://dev.wix.com/api/rest/getting-started/pagination), defaults to offset = 0 and limit = 50 (max limit 1,000). */
866
+ paging?: Paging;
867
+ /**
868
+ * List of projected fields to return.
869
+ * If both `fields` and `fieldsets` are sent in the request,
870
+ * the union of both lists is returned.
871
+ * `id` and `revision` are always returned.
872
+ *
873
+ * Supported properties:
874
+ * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
875
+ * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
876
+ * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
877
+ * `info.labelKeys`, `info.locations`, `info.extendedFields`
878
+ */
879
+ fields?: string[];
880
+ fieldsets?: ContactFieldSet[];
881
+ }
882
+ export interface Sorting {
883
+ /**
884
+ * Field to sort by.
885
+ *
886
+ * Supported properties:
887
+ * `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,
888
+ * `info.jobTitle`, `info.birthdate`
889
+ */
890
+ fieldName?: string;
891
+ /**
892
+ * Sort order.
893
+ * Use `ASC` for ascending order or `DESC` for descending order.
894
+ *
895
+ * Defaults to `ASC`.
896
+ */
897
+ order?: SortOrder;
898
+ }
899
+ export declare enum SortOrder {
900
+ ASC = "ASC",
901
+ DESC = "DESC"
902
+ }
903
+ export interface Paging {
904
+ /**
905
+ * Number of items to return. Learn more about pagination in API Query Language([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language)|[REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging).
906
+ *
907
+ * Default: `50`. <br>
908
+ * Maximum: `1000`.
909
+ */
910
+ limit?: number | null;
911
+ /** Number of items to skip in the current sort order. */
912
+ offset?: number | null;
913
+ }
914
+ export declare enum ContactFieldSet {
915
+ /** name, primaryEmail, primaryPhone */
916
+ BASIC = "BASIC",
917
+ /** name, phones, emails, addresses */
918
+ COMMUNICATION_DETAILS = "COMMUNICATION_DETAILS",
919
+ /** name, primaryInfo(email, phone), extendedFields */
920
+ EXTENDED = "EXTENDED",
921
+ /** Full contact object */
922
+ FULL = "FULL"
923
+ }
924
+ /** List of contacts. */
925
+ export interface ListContactsResponse {
926
+ /** List of contacts. */
927
+ contacts?: Contact[];
928
+ /** Details on the paged set of results returned. */
929
+ pagingMetadata?: PagingMetadata;
930
+ }
931
+ export interface PagingMetadata {
932
+ /** The number of items returned in this response. */
933
+ count?: number | null;
934
+ /** The offset which was requested. */
935
+ offset?: number | null;
936
+ /** The total number of items that match the query. */
937
+ total?: number | null;
938
+ /** A flag that indicates the server failed to calculate 'total' field. */
939
+ tooManyToCount?: boolean | null;
940
+ }
941
+ export interface QueryContactsRequest {
942
+ /**
943
+ * Plain text search for an exact match.
944
+ *
945
+ * Supported properties:
946
+ * `info.name.first`, `info.name.last`, `info.emails.email`, `info.phones.phone`
947
+ *
948
+ * Max: 100 characters
949
+ */
950
+ search?: string | null;
951
+ /** Query options. */
952
+ query?: Query;
953
+ }
954
+ export interface Query {
955
+ /**
956
+ * Filter object.
957
+ * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
958
+ * for more information.
959
+ *
960
+ * For a detailed list of supported filters, see
961
+ * [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters).
962
+ */
963
+ filter?: Record<string, any> | null;
964
+ /**
965
+ * Sorting options.
966
+ * See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)
967
+ * for more information.
968
+ *
969
+ * Max: 1 sort object
970
+ */
971
+ sort?: Sorting[];
972
+ /** Pagination options. */
973
+ paging?: Paging;
974
+ /**
975
+ * List of projected fields to return.
976
+ * If both `fields` and `fieldsets` are sent in the request,
977
+ * the union of both lists is returned.
978
+ * `id` and `revision` are always returned.
979
+ *
980
+ * Supported properties:
981
+ * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
982
+ * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
983
+ * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
984
+ * `info.labelKeys`, `info.locations`, `info.extendedFields`
985
+ */
986
+ fields?: string[];
987
+ /**
988
+ * Predefined sets of fields to return.
989
+ * If both `fields` and `fieldsets` are sent in the request,
990
+ * the union of both lists is returned.
991
+ *
992
+ * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
993
+ * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
994
+ * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
995
+ * - `FULL`: Returns all fields.
996
+ *
997
+ * Default: If `fields` is omitted from the request, `FULL`.
998
+ */
999
+ fieldsets?: ContactFieldSet[];
1000
+ }
1001
+ /** List of contacts. */
1002
+ export interface QueryContactsResponse {
1003
+ /** List of contacts. */
1004
+ contacts?: Contact[];
1005
+ /** Details on the paged set of results returned. */
1006
+ pagingMetadata?: PagingMetadata;
1007
+ }
1008
+ export interface ListFacetsRequest {
1009
+ /** Pagination options. */
1010
+ paging?: Paging;
1011
+ /** Language for localization. */
1012
+ language?: string | null;
1013
+ }
1014
+ export interface ListFacetsResponse {
1015
+ /** List of facets. */
1016
+ facets?: ContactsFacet[];
1017
+ /** Details on the paged set of results returned. */
1018
+ pagingMetadata?: PagingMetadata;
1019
+ }
1020
+ export interface ContactsFacet {
1021
+ /** Type of facet. */
1022
+ facetType?: ContactsFacetType;
1023
+ /**
1024
+ * Scope for facet keys.
1025
+ * When a facet key exists in a namespace,
1026
+ * each key is unique within that namespace.
1027
+ *
1028
+ * Currently, facets not created by Wix are in the `custom` namespace.
1029
+ */
1030
+ namespace?: string | null;
1031
+ /** Human-readable display name. */
1032
+ namespaceDisplayName?: string | null;
1033
+ /** Facet key, automatically generated. */
1034
+ facetKey?: string | null;
1035
+ /** Human-readable name. Shown in the Wix UI. */
1036
+ facetDisplayName?: string | null;
1037
+ /** Number of contacts the facet applies to. */
1038
+ count?: number | null;
1039
+ /** Filter used to query contacts of this facet. */
1040
+ queryFilter?: Record<string, any> | null;
1041
+ }
1042
+ export declare enum ContactsFacetType {
1043
+ UNKNOWN = "UNKNOWN",
1044
+ ALL_CONTACTS = "ALL_CONTACTS",
1045
+ NOT_LABELED = "NOT_LABELED",
1046
+ LABEL = "LABEL",
1047
+ SUBSCRIPTION_STATUS = "SUBSCRIPTION_STATUS",
1048
+ MEMBERSHIP_STATUS = "MEMBERSHIP_STATUS"
1049
+ }
1050
+ export interface QueryFacetsRequest {
1051
+ /** Pagination options. */
1052
+ paging?: Paging;
1053
+ /** Language for localization. */
1054
+ language?: string | null;
1055
+ /**
1056
+ * Filterable fields:
1057
+ * - `'info.extendedFields.emailSubscriptions.effectiveEmail'` (`$exists`).
1058
+ * - `'info.extendedFields.emailSubscriptions.subscriptionStatus'` (`$eq`, `$ne`, `$in`, `$nin`).
1059
+ * - `'info.extendedFields.emailSubscriptions.deliverabilityStatus'` (`$eq`, `$ne`, `$in`, `$nin`).
1060
+ */
1061
+ filter?: Record<string, any> | null;
1062
+ }
1063
+ export interface QueryFacetsResponse {
1064
+ /** List of facets. */
1065
+ facets?: ContactsFacet[];
1066
+ /** Details on the paged set of results returned. */
1067
+ pagingMetadata?: PagingMetadata;
1068
+ }
1069
+ export interface BulkDeleteContactsRequest {
1070
+ /**
1071
+ * Filter object.
1072
+ *
1073
+ * Possible filters:
1074
+ * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
1075
+ *
1076
+ * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1077
+ * for a detailed list of supported filters for contact properties, extended fields, and custom fields.
1078
+ *
1079
+ *
1080
+ * Example:
1081
+ * `{ "filter": { "info.name.last": "Smith" } }`
1082
+ */
1083
+ filter?: Record<string, any> | null;
1084
+ /**
1085
+ * Plain text search for an exact match, up to 100 characters.
1086
+ *
1087
+ * Searchable fields:
1088
+ *
1089
+ * - `info.name.first`
1090
+ * - `info.name.last`
1091
+ * - `info.emails.email`
1092
+ * - `info.phones.phone`
1093
+ */
1094
+ search?: string | null;
1095
+ }
1096
+ export interface BulkDeleteContactsResponse {
1097
+ /**
1098
+ * Bulk job ID.
1099
+ * The job's status can be retrieved with Get Bulk Job.
1100
+ */
1101
+ jobId?: string;
1102
+ }
1103
+ export interface BulkUpdateContactsRequest {
1104
+ /**
1105
+ * Filter object.
1106
+ *
1107
+ * Possible filters:
1108
+ * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
1109
+ *
1110
+ * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1111
+ * for a detailed list of supported filters for contact properties, extended fields, and custom fields.
1112
+ *
1113
+ *
1114
+ * Example:
1115
+ * `{ "filter": { "info.name.last": "Smith" } }`
1116
+ */
1117
+ filter?: Record<string, any> | null;
1118
+ /**
1119
+ * Plain text search for an exact match, up to 100 characters.
1120
+ *
1121
+ * Searchable fields:
1122
+ *
1123
+ * - `info.name.first`
1124
+ * - `info.name.last`
1125
+ * - `info.emails.email`
1126
+ * - `info.phones.phone`
1127
+ */
1128
+ search?: string | null;
1129
+ /** Contact info. */
1130
+ info?: ContactInfo;
1131
+ }
1132
+ export interface BulkUpdateContactsResponse {
1133
+ /**
1134
+ * Bulk job ID.
1135
+ * The job's status can be retrieved with Get Bulk Job.
1136
+ */
1137
+ jobId?: string;
1138
+ }
1139
+ export interface BulkLabelAndUnlabelContactsRequest {
1140
+ /**
1141
+ * Filter options.
1142
+ * Labels will be removed from contacts that meet the `filter` and `search` criteria.
1143
+ *
1144
+ * See
1145
+ * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1146
+ * for a list of supported filters and fields.
1147
+ */
1148
+ filter?: Record<string, any> | null;
1149
+ /**
1150
+ * Plain text search for an exact match, up to 100 characters.
1151
+ * Labels will be removed from contacts that meet the `filter` and `search` criteria.
1152
+ *
1153
+ * See
1154
+ * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1155
+ * for a list of searchable fields.
1156
+ */
1157
+ search?: string | null;
1158
+ /**
1159
+ * List of label keys to add to the contacts.
1160
+ *
1161
+ * Label keys must exist to be added to the contact.
1162
+ * Contact labels can be created or retrieved with
1163
+ * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)
1164
+ * or
1165
+ * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels)
1166
+ */
1167
+ labelKeysToAdd?: string[];
1168
+ /** List of label keys to remove from the contacts. */
1169
+ labelKeysToRemove?: string[];
1170
+ }
1171
+ export interface BulkLabelAndUnlabelContactsResponse {
1172
+ /**
1173
+ * Bulk job ID.
1174
+ * The job's status can be retrieved with Get Bulk Job.
1175
+ */
1176
+ jobId?: string;
1177
+ }
1178
+ export interface BulkUpsertContactsRequest {
1179
+ info?: ContactInfo[];
1180
+ returnFullEntity?: boolean;
1181
+ }
1182
+ export interface BulkUpsertContactsResponse {
1183
+ results?: Item[];
1184
+ metadata?: BulkUpsertContactsResponseMetadata;
1185
+ }
1186
+ export declare enum Action {
1187
+ UNKNOWN = "UNKNOWN",
1188
+ UPDATED = "UPDATED",
1189
+ CREATED = "CREATED"
1190
+ }
1191
+ export interface Error {
1192
+ /** Error code. */
1193
+ code?: string;
1194
+ /** Error details. */
1195
+ message?: string | null;
1196
+ }
1197
+ export interface Metadata {
1198
+ id?: string | null;
1199
+ originalIndex?: number;
1200
+ action?: Action;
1201
+ success?: boolean;
1202
+ error?: Error;
1203
+ }
1204
+ export interface Item {
1205
+ contact?: Contact;
1206
+ metadata?: Metadata;
1207
+ }
1208
+ export interface BulkUpsertContactsResponseMetadata {
1209
+ totalSuccess?: number;
1210
+ totalFailure?: number;
1211
+ totalCreated?: number;
1212
+ totalUpdated?: number;
1213
+ }
1214
+ export interface UpsertContactRequest {
1215
+ info?: ContactInfo;
1216
+ }
1217
+ export interface UpsertContactResponse {
1218
+ /** Upserted contact. */
1219
+ contact?: Contact;
1220
+ action?: UpsertContactResponseAction;
1221
+ }
1222
+ export declare enum UpsertContactResponseAction {
1223
+ UNKNOWN = "UNKNOWN",
1224
+ UPDATED = "UPDATED",
1225
+ CREATED = "CREATED"
1226
+ }
1227
+ export interface GeneratePictureUploadUrlRequest {
1228
+ /** ID of the contact whose picture is being updated. */
1229
+ contactId?: string;
1230
+ /**
1231
+ * Mime Type. Must be one of:
1232
+ * `image/png`, `image/jpeg`.
1233
+ * Defaults to `image/png`.
1234
+ */
1235
+ mimeType?: string | null;
1236
+ }
1237
+ export interface GeneratePictureUploadUrlResponse {
1238
+ /** URL to upload the image */
1239
+ uploadUrl?: string;
1240
+ }
1241
+ export interface GetContactRequest {
1242
+ /** ID of the contact to retrieve. */
1243
+ id: string;
1244
+ /**
1245
+ * List of projected fields to return.
1246
+ * If both `fields` and `fieldsets` are sent in the request,
1247
+ * the union of both lists is returned.
1248
+ * `id` and `revision` are always returned.
1249
+ *
1250
+ * Supported properties:
1251
+ * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
1252
+ * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
1253
+ * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
1254
+ * `info.labelKeys`, `info.locations`, `info.extendedFields`
1255
+ */
1256
+ fields?: string[];
1257
+ /**
1258
+ * Predefined sets of fields to return.
1259
+ * If both `fields` and `fieldsets` are sent in the request,
1260
+ * the union of both lists is returned.
1261
+ *
1262
+ * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
1263
+ * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
1264
+ * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
1265
+ * - `FULL`: Returns all fields.
1266
+ *
1267
+ * Default: If `fields` is omitted from the request, `FULL`.
1268
+ */
1269
+ fieldsets?: ContactFieldSet[];
1270
+ }
1271
+ /** The requested contact. */
1272
+ export interface GetContactResponse {
1273
+ /** The requested contact. */
1274
+ contact?: Contact;
1275
+ /** Contact response type. */
1276
+ responseType?: GetContactResponseType;
1277
+ }
1278
+ export declare enum GetContactResponseType {
1279
+ /** The specified contact was returned. */
1280
+ REGULAR = "REGULAR",
1281
+ /** Not used. */
1282
+ IMPLICIT = "IMPLICIT",
1283
+ /** The specified contact was previously merged with another contact and the new contact was returned. */
1284
+ MERGED = "MERGED"
1285
+ }
1286
+ export interface SyncSubmitContactRequest {
1287
+ contactInfo?: ContactInfo;
1288
+ activity?: ContactActivity;
1289
+ passThroughData?: string | null;
1290
+ contactId?: string;
1291
+ submitOperation?: SubmitOperation;
1292
+ /** Need to resolve source in allocator, because of server sign */
1293
+ sourceType?: ContactSourceType;
1294
+ sourceId?: string | null;
1295
+ hideFromContactList?: boolean;
1296
+ }
1297
+ export declare enum SubmitOperation {
1298
+ UNKNOWN = "UNKNOWN",
1299
+ CREATE = "CREATE",
1300
+ UPDATE = "UPDATE"
1301
+ }
1302
+ export interface SyncSubmitContactResponse {
1303
+ }
1304
+ export interface CountContactsRequest {
1305
+ }
1306
+ export interface CountContactsResponse {
1307
+ count?: number;
1308
+ }
1309
+ export interface SearchContactsRequest {
1310
+ /** Search object. Encapsulates filter, sorting, paging and other details */
1311
+ search?: Search;
1312
+ }
1313
+ export interface Search extends SearchPagingMethodOneOf {
1314
+ /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */
1315
+ cursorPaging?: CursorPaging;
1316
+ /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
1317
+ filter?: Record<string, any> | null;
1318
+ /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
1319
+ sort?: Sorting[];
1320
+ /**
1321
+ * List of projected fields to return.
1322
+ *
1323
+ * If used in the request,
1324
+ * all the fields contained in `fields` and `fieldsets` are returned.
1325
+ * If left blank, `fieldsets` is used to determine which fields to return.
1326
+ *
1327
+ * For a list of valid projected fields, see
1328
+ * [Valid Contact Projection Fields](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_valid-contact-projection-fields).
1329
+ */
1330
+ fields?: string[];
1331
+ /**
1332
+ * Predefined sets of fields to return.
1333
+ *
1334
+ * Defaults to `FULL`.
1335
+ * Ignored if left empty when `fields` is used in the request.
1336
+ *
1337
+ * For more information,
1338
+ * see [Contact Fieldsets](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_contact-fieldsets).
1339
+ */
1340
+ fieldsets?: string[];
1341
+ /** free text to match in searchable fields */
1342
+ search?: SearchDetails;
1343
+ }
1344
+ /** @oneof */
1345
+ export interface SearchPagingMethodOneOf {
1346
+ /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */
1347
+ cursorPaging?: CursorPaging;
1348
+ }
1349
+ export interface SearchDetails {
1350
+ /** boolean search mode. Default is `OR` */
1351
+ mode?: Mode;
1352
+ /** search term or expression */
1353
+ expression?: string | null;
1354
+ /**
1355
+ * fields to search in. if empty - server will search in own default fieldsDefault searchable fields:
1356
+ *
1357
+ * - `info.name.first`
1358
+ * - `info.name.last`
1359
+ * - `info.emails.email`
1360
+ * - `info.phones.phone`
1361
+ */
1362
+ fields?: string[];
1363
+ /** flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
1364
+ fuzzy?: boolean;
1365
+ }
1366
+ export declare enum Mode {
1367
+ /** any */
1368
+ OR = "OR",
1369
+ /** all */
1370
+ AND = "AND"
1371
+ }
1372
+ export interface CursorPaging {
1373
+ /** The number of contacts to load (default = 50, max = 1000) */
1374
+ limit?: number | null;
1375
+ /** Cursor returned in last query response. Should not be provided on first page request */
1376
+ cursor?: string | null;
1377
+ }
1378
+ export interface SearchContactsResponse {
1379
+ /** List of contacts. */
1380
+ contacts?: Contact[];
1381
+ /** Details on the paged set of results returned. */
1382
+ cursorPagingMetadata?: CursorPagingMetadata;
1383
+ }
1384
+ /** This is the preferred message for cursor-paging enabled services */
1385
+ export interface CursorPagingMetadata {
1386
+ /** Number of items returned in the response. */
1387
+ count?: number | null;
1388
+ /** Cursor strings that point to the next page, previous page, or both. */
1389
+ cursors?: Cursors;
1390
+ /**
1391
+ * Whether there are more pages to retrieve following the current page.
1392
+ *
1393
+ * + `true`: Another page of results can be retrieved.
1394
+ * + `false`: This is the last page.
1395
+ */
1396
+ hasNext?: boolean | null;
1397
+ }
1398
+ export interface Cursors {
1399
+ /** Cursor pointing to next result page */
1400
+ next?: string | null;
1401
+ /** Cursor pointing to previous result page */
1402
+ prev?: string | null;
1403
+ }
1404
+ export interface BulkAddSegmentToContactsRequest {
1405
+ /** Segment id */
1406
+ segmentId?: string;
1407
+ /** List of Contact ids */
1408
+ contactIds?: string[];
1409
+ /** List of existing segment ids */
1410
+ existsSegmentIds?: string[];
1411
+ }
1412
+ export interface BulkAddSegmentToContactsResponse {
1413
+ /** List of action results */
1414
+ results?: ItemMetadata[];
1415
+ /** Metadata on the bulk action */
1416
+ bulkActionMetadata?: BulkActionMetadata;
1417
+ }
1418
+ export interface ItemMetadata {
1419
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1420
+ id?: string | null;
1421
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1422
+ originalIndex?: number;
1423
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1424
+ success?: boolean;
1425
+ /** Details about the error in case of failure. */
1426
+ error?: ApplicationError;
1427
+ }
1428
+ export interface ApplicationError {
1429
+ /** Error code. */
1430
+ code?: string;
1431
+ /** Description of the error. */
1432
+ description?: string;
1433
+ /** Data related to the error. */
1434
+ data?: Record<string, any> | null;
1435
+ }
1436
+ export interface BulkActionMetadata {
1437
+ /** Number of items that were successfully processed. */
1438
+ totalSuccesses?: number;
1439
+ /** Number of items that couldn't be processed. */
1440
+ totalFailures?: number;
1441
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1442
+ undetailedFailures?: number;
1443
+ }
1444
+ export interface ContactAddedToSegment {
1445
+ /** Id of the segment to which the contact was added */
1446
+ segmentId?: string;
1447
+ /** The contact that was added */
1448
+ contact?: Contact;
1449
+ }
1450
+ export interface BulkRemoveSegmentFromContactsRequest {
1451
+ /** Segment id */
1452
+ segmentId?: string;
1453
+ /** List of Contact ids */
1454
+ contactIds?: string[];
1455
+ }
1456
+ export interface BulkRemoveSegmentFromContactsResponse {
1457
+ /** List of action results */
1458
+ results?: ItemMetadata[];
1459
+ /** Metadata on the bulk action */
1460
+ bulkActionMetadata?: BulkActionMetadata;
1461
+ }
1462
+ export interface ContactRemovedFromSegment {
1463
+ /** Id of the segment from which the contact was removed */
1464
+ segmentId?: string;
1465
+ /** The contact that was removed */
1466
+ contact?: Contact;
1467
+ }
1468
+ export interface ListContactIdsBySegmentRequest {
1469
+ /** Segment id */
1470
+ segmentId?: string;
1471
+ /** Cursor paging. */
1472
+ cursorPaging?: CursorPaging;
1473
+ }
1474
+ export interface ListContactIdsBySegmentResponse {
1475
+ /** List of contact IDs */
1476
+ contactIds?: string[];
1477
+ /** Paging metadata */
1478
+ cursorPagingMetadata?: CursorPagingMetadata;
1479
+ }
1480
+ export interface DomainEvent extends DomainEventBodyOneOf {
1481
+ createdEvent?: EntityCreatedEvent;
1482
+ updatedEvent?: EntityUpdatedEvent;
1483
+ deletedEvent?: EntityDeletedEvent;
1484
+ actionEvent?: ActionEvent;
1485
+ /**
1486
+ * Unique event ID.
1487
+ * Allows clients to ignore duplicate webhooks.
1488
+ */
1489
+ id?: string;
1490
+ /**
1491
+ * Assumes actions are also always typed to an entity_type
1492
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1493
+ */
1494
+ entityFqdn?: string;
1495
+ /**
1496
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1497
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1498
+ * Example: created/updated/deleted/started/completed/email_opened
1499
+ */
1500
+ slug?: string;
1501
+ /** ID of the entity associated with the event. */
1502
+ entityId?: string;
1503
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1504
+ eventTime?: Date | null;
1505
+ /**
1506
+ * Whether the event was triggered as a result of a privacy regulation application
1507
+ * (for example, GDPR).
1508
+ */
1509
+ triggeredByAnonymizeRequest?: boolean | null;
1510
+ /** If present, indicates the action that triggered the event. */
1511
+ originatedFrom?: string | null;
1512
+ /**
1513
+ * A sequence number defining the order of updates to the underlying entity.
1514
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1515
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1516
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1517
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1518
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1519
+ */
1520
+ entityEventSequence?: string | null;
1521
+ }
1522
+ /** @oneof */
1523
+ export interface DomainEventBodyOneOf {
1524
+ createdEvent?: EntityCreatedEvent;
1525
+ updatedEvent?: EntityUpdatedEvent;
1526
+ deletedEvent?: EntityDeletedEvent;
1527
+ actionEvent?: ActionEvent;
1528
+ }
1529
+ export interface EntityCreatedEvent {
1530
+ entityAsJson?: string;
1531
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
1532
+ restoreInfo?: RestoreInfo;
1533
+ }
1534
+ export interface RestoreInfo {
1535
+ deletedDate?: Date | null;
1536
+ }
1537
+ export interface EntityUpdatedEvent {
1538
+ /**
1539
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1540
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1541
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1542
+ */
1543
+ currentEntityAsJson?: string;
1544
+ }
1545
+ export interface EntityDeletedEvent {
1546
+ /** Entity that was deleted */
1547
+ deletedEntityAsJson?: string | null;
1548
+ }
1549
+ export interface ActionEvent {
1550
+ bodyAsJson?: string;
1551
+ }
1552
+ export interface MessageEnvelope {
1553
+ /** App instance ID. */
1554
+ instanceId?: string | null;
1555
+ /** Event type. */
1556
+ eventType?: string;
1557
+ /** The identification type and identity data. */
1558
+ identity?: IdentificationData;
1559
+ /** Stringify payload. */
1560
+ data?: string;
1561
+ }
1562
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1563
+ /** ID of a site visitor that has not logged in to the site. */
1564
+ anonymousVisitorId?: string;
1565
+ /** ID of a site visitor that has logged in to the site. */
1566
+ memberId?: string;
1567
+ /** ID of a Wix user (site owner, contributor, etc.). */
1568
+ wixUserId?: string;
1569
+ /** ID of an app. */
1570
+ appId?: string;
1571
+ /** @readonly */
1572
+ identityType?: WebhookIdentityType;
1573
+ }
1574
+ /** @oneof */
1575
+ export interface IdentificationDataIdOneOf {
1576
+ /** ID of a site visitor that has not logged in to the site. */
1577
+ anonymousVisitorId?: string;
1578
+ /** ID of a site visitor that has logged in to the site. */
1579
+ memberId?: string;
1580
+ /** ID of a Wix user (site owner, contributor, etc.). */
1581
+ wixUserId?: string;
1582
+ /** ID of an app. */
1583
+ appId?: string;
1584
+ }
1585
+ export declare enum WebhookIdentityType {
1586
+ UNKNOWN = "UNKNOWN",
1587
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1588
+ MEMBER = "MEMBER",
1589
+ WIX_USER = "WIX_USER",
1590
+ APP = "APP"
1591
+ }
1592
+ interface ContactSourceNonNullableFields {
1593
+ sourceType: ContactSourceType;
1594
+ }
1595
+ interface ContactActivityNonNullableFields {
1596
+ activityType: ContactActivityType;
1597
+ }
1598
+ interface ImageNonNullableFields {
1599
+ id: string;
1600
+ url: string;
1601
+ height: number;
1602
+ width: number;
1603
+ }
1604
+ interface ContactEmailNonNullableFields {
1605
+ tag: EmailTag;
1606
+ email: string;
1607
+ }
1608
+ interface ContactEmailsWrapperNonNullableFields {
1609
+ items: ContactEmailNonNullableFields[];
1610
+ }
1611
+ interface ContactPhoneNonNullableFields {
1612
+ tag: PhoneTag;
1613
+ phone: string;
1614
+ }
1615
+ interface ContactPhonesWrapperNonNullableFields {
1616
+ items: ContactPhoneNonNullableFields[];
1617
+ }
1618
+ interface StreetAddressNonNullableFields {
1619
+ number: string;
1620
+ name: string;
1621
+ apt: string;
1622
+ }
1623
+ interface SubdivisionNonNullableFields {
1624
+ code: string;
1625
+ name: string;
1626
+ type: SubdivisionType;
1627
+ }
1628
+ interface AddressNonNullableFields {
1629
+ streetAddress?: StreetAddressNonNullableFields;
1630
+ subdivisions: SubdivisionNonNullableFields[];
1631
+ }
1632
+ interface ContactAddressNonNullableFields {
1633
+ tag: AddressTag;
1634
+ address?: AddressNonNullableFields;
1635
+ }
1636
+ interface ContactAddressesWrapperNonNullableFields {
1637
+ items: ContactAddressNonNullableFields[];
1638
+ }
1639
+ interface AssigneesWrapperNonNullableFields {
1640
+ items: string[];
1641
+ }
1642
+ interface LabelsWrapperNonNullableFields {
1643
+ items: string[];
1644
+ }
1645
+ interface LocationsWrapperNonNullableFields {
1646
+ items: string[];
1647
+ }
1648
+ interface ContactPictureNonNullableFields {
1649
+ image?: ImageNonNullableFields;
1650
+ imageProvider: ImageProvider;
1651
+ }
1652
+ interface ContactInfoNonNullableFields {
1653
+ emails?: ContactEmailsWrapperNonNullableFields;
1654
+ phones?: ContactPhonesWrapperNonNullableFields;
1655
+ addresses?: ContactAddressesWrapperNonNullableFields;
1656
+ assignedUserIds?: AssigneesWrapperNonNullableFields;
1657
+ labelKeys?: LabelsWrapperNonNullableFields;
1658
+ locations?: LocationsWrapperNonNullableFields;
1659
+ picture?: ContactPictureNonNullableFields;
1660
+ }
1661
+ interface PrimaryEmailNonNullableFields {
1662
+ subscriptionStatus: SubscriptionStatus;
1663
+ deliverabilityStatus: EmailDeliverabilityStatus;
1664
+ }
1665
+ interface PrimaryPhoneNonNullableFields {
1666
+ subscriptionStatus: SubscriptionStatus;
1667
+ deliverabilityStatus: PhoneDeliverabilityStatus;
1668
+ }
1669
+ interface ContactNonNullableFields {
1670
+ id: string;
1671
+ revision: number;
1672
+ source?: ContactSourceNonNullableFields;
1673
+ lastActivity?: ContactActivityNonNullableFields;
1674
+ picture?: ImageNonNullableFields;
1675
+ info?: ContactInfoNonNullableFields;
1676
+ primaryEmail?: PrimaryEmailNonNullableFields;
1677
+ primaryPhone?: PrimaryPhoneNonNullableFields;
1678
+ }
1679
+ export interface CreateContactResponseNonNullableFields {
1680
+ contact?: ContactNonNullableFields;
1681
+ }
1682
+ export interface UpdateContactResponseNonNullableFields {
1683
+ contact?: ContactNonNullableFields;
1684
+ }
1685
+ export interface MergeContactsResponseNonNullableFields {
1686
+ contact?: ContactNonNullableFields;
1687
+ }
1688
+ export interface LabelContactResponseNonNullableFields {
1689
+ contact?: ContactNonNullableFields;
1690
+ }
1691
+ export interface UnlabelContactResponseNonNullableFields {
1692
+ contact?: ContactNonNullableFields;
1693
+ }
1694
+ export interface QueryContactsResponseNonNullableFields {
1695
+ contacts: ContactNonNullableFields[];
1696
+ }
1697
+ export interface GetContactResponseNonNullableFields {
1698
+ contact?: ContactNonNullableFields;
1699
+ responseType: GetContactResponseType;
1700
+ }
1701
+ export {};