@wix/auto_sdk_crm_contacts 1.0.353 → 1.0.355

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 (130) hide show
  1. package/build/{cjs/src/contacts-v4-contact-contacts.types.d.ts → contacts-v4-contact-contacts.universal-B8Y8hXy8.d.mts} +378 -218
  2. package/build/{internal/cjs/src/contacts-v4-contact-contacts.types.d.ts → contacts-v4-contact-contacts.universal-B8Y8hXy8.d.ts} +378 -218
  3. package/build/{cjs/src/contacts-v4-contact-contacts.public.d.ts → index.d.mts} +46 -18
  4. package/build/{es/src/contacts-v4-contact-contacts.public.d.ts → index.d.ts} +46 -18
  5. package/build/index.js +1338 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +1281 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{es/src/contacts-v4-contact-contacts.types.d.ts → contacts-v4-contact-contacts.universal-GFgRnaQp.d.mts} +385 -214
  10. package/build/{es/src/contacts-v4-contact-contacts.types.d.ts → internal/contacts-v4-contact-contacts.universal-GFgRnaQp.d.ts} +385 -214
  11. package/build/internal/{cjs/src/contacts-v4-contact-contacts.public.d.ts → index.d.mts} +46 -18
  12. package/build/internal/{es/src/contacts-v4-contact-contacts.public.d.ts → index.d.ts} +46 -18
  13. package/build/internal/index.js +1338 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +1281 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +934 -0
  18. package/build/internal/meta.d.ts +934 -0
  19. package/build/internal/meta.js +618 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +584 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +934 -0
  24. package/build/meta.d.ts +934 -0
  25. package/build/meta.js +618 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +584 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/contacts-v4-contact-contacts.context.d.ts +0 -36
  40. package/build/cjs/src/contacts-v4-contact-contacts.context.js +0 -61
  41. package/build/cjs/src/contacts-v4-contact-contacts.context.js.map +0 -1
  42. package/build/cjs/src/contacts-v4-contact-contacts.http.d.ts +0 -126
  43. package/build/cjs/src/contacts-v4-contact-contacts.http.js +0 -555
  44. package/build/cjs/src/contacts-v4-contact-contacts.http.js.map +0 -1
  45. package/build/cjs/src/contacts-v4-contact-contacts.meta.d.ts +0 -32
  46. package/build/cjs/src/contacts-v4-contact-contacts.meta.js +0 -180
  47. package/build/cjs/src/contacts-v4-contact-contacts.meta.js.map +0 -1
  48. package/build/cjs/src/contacts-v4-contact-contacts.public.js +0 -193
  49. package/build/cjs/src/contacts-v4-contact-contacts.public.js.map +0 -1
  50. package/build/cjs/src/contacts-v4-contact-contacts.types.js +0 -278
  51. package/build/cjs/src/contacts-v4-contact-contacts.types.js.map +0 -1
  52. package/build/cjs/src/contacts-v4-contact-contacts.universal.d.ts +0 -2434
  53. package/build/cjs/src/contacts-v4-contact-contacts.universal.js +0 -923
  54. package/build/cjs/src/contacts-v4-contact-contacts.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/package.json +0 -3
  65. package/build/es/src/contacts-v4-contact-contacts.context.d.ts +0 -36
  66. package/build/es/src/contacts-v4-contact-contacts.context.js +0 -36
  67. package/build/es/src/contacts-v4-contact-contacts.context.js.map +0 -1
  68. package/build/es/src/contacts-v4-contact-contacts.http.d.ts +0 -126
  69. package/build/es/src/contacts-v4-contact-contacts.http.js +0 -544
  70. package/build/es/src/contacts-v4-contact-contacts.http.js.map +0 -1
  71. package/build/es/src/contacts-v4-contact-contacts.meta.d.ts +0 -32
  72. package/build/es/src/contacts-v4-contact-contacts.meta.js +0 -146
  73. package/build/es/src/contacts-v4-contact-contacts.meta.js.map +0 -1
  74. package/build/es/src/contacts-v4-contact-contacts.public.js +0 -160
  75. package/build/es/src/contacts-v4-contact-contacts.public.js.map +0 -1
  76. package/build/es/src/contacts-v4-contact-contacts.types.js +0 -275
  77. package/build/es/src/contacts-v4-contact-contacts.types.js.map +0 -1
  78. package/build/es/src/contacts-v4-contact-contacts.universal.d.ts +0 -2434
  79. package/build/es/src/contacts-v4-contact-contacts.universal.js +0 -889
  80. package/build/es/src/contacts-v4-contact-contacts.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -1
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/contacts-v4-contact-contacts.context.d.ts +0 -36
  91. package/build/internal/cjs/src/contacts-v4-contact-contacts.context.js +0 -61
  92. package/build/internal/cjs/src/contacts-v4-contact-contacts.context.js.map +0 -1
  93. package/build/internal/cjs/src/contacts-v4-contact-contacts.http.d.ts +0 -126
  94. package/build/internal/cjs/src/contacts-v4-contact-contacts.http.js +0 -555
  95. package/build/internal/cjs/src/contacts-v4-contact-contacts.http.js.map +0 -1
  96. package/build/internal/cjs/src/contacts-v4-contact-contacts.meta.d.ts +0 -32
  97. package/build/internal/cjs/src/contacts-v4-contact-contacts.meta.js +0 -180
  98. package/build/internal/cjs/src/contacts-v4-contact-contacts.meta.js.map +0 -1
  99. package/build/internal/cjs/src/contacts-v4-contact-contacts.public.js +0 -193
  100. package/build/internal/cjs/src/contacts-v4-contact-contacts.public.js.map +0 -1
  101. package/build/internal/cjs/src/contacts-v4-contact-contacts.types.js +0 -278
  102. package/build/internal/cjs/src/contacts-v4-contact-contacts.types.js.map +0 -1
  103. package/build/internal/cjs/src/contacts-v4-contact-contacts.universal.d.ts +0 -2445
  104. package/build/internal/cjs/src/contacts-v4-contact-contacts.universal.js +0 -923
  105. package/build/internal/cjs/src/contacts-v4-contact-contacts.universal.js.map +0 -1
  106. package/build/internal/es/index.d.ts +0 -1
  107. package/build/internal/es/index.js +0 -2
  108. package/build/internal/es/index.js.map +0 -1
  109. package/build/internal/es/index.typings.d.ts +0 -1
  110. package/build/internal/es/index.typings.js +0 -2
  111. package/build/internal/es/index.typings.js.map +0 -1
  112. package/build/internal/es/meta.d.ts +0 -1
  113. package/build/internal/es/meta.js +0 -2
  114. package/build/internal/es/meta.js.map +0 -1
  115. package/build/internal/es/src/contacts-v4-contact-contacts.context.d.ts +0 -36
  116. package/build/internal/es/src/contacts-v4-contact-contacts.context.js +0 -36
  117. package/build/internal/es/src/contacts-v4-contact-contacts.context.js.map +0 -1
  118. package/build/internal/es/src/contacts-v4-contact-contacts.http.d.ts +0 -126
  119. package/build/internal/es/src/contacts-v4-contact-contacts.http.js +0 -544
  120. package/build/internal/es/src/contacts-v4-contact-contacts.http.js.map +0 -1
  121. package/build/internal/es/src/contacts-v4-contact-contacts.meta.d.ts +0 -32
  122. package/build/internal/es/src/contacts-v4-contact-contacts.meta.js +0 -146
  123. package/build/internal/es/src/contacts-v4-contact-contacts.meta.js.map +0 -1
  124. package/build/internal/es/src/contacts-v4-contact-contacts.public.js +0 -160
  125. package/build/internal/es/src/contacts-v4-contact-contacts.public.js.map +0 -1
  126. package/build/internal/es/src/contacts-v4-contact-contacts.types.js +0 -275
  127. package/build/internal/es/src/contacts-v4-contact-contacts.types.js.map +0 -1
  128. package/build/internal/es/src/contacts-v4-contact-contacts.universal.d.ts +0 -2445
  129. package/build/internal/es/src/contacts-v4-contact-contacts.universal.js +0 -889
  130. package/build/internal/es/src/contacts-v4-contact-contacts.universal.js.map +0 -1
@@ -1,2445 +0,0 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- export interface Contact {
3
- /**
4
- * Contact ID.
5
- * @format GUID
6
- * @readonly
7
- */
8
- _id?: string;
9
- /**
10
- * Revision number, which increments by 1 each time the contact is updated.
11
- * To prevent conflicting changes,
12
- * the existing `revision` must be specified when updating a contact.
13
- * @readonly
14
- */
15
- revision?: number;
16
- /**
17
- * Details about the contact's source.
18
- * @readonly
19
- */
20
- source?: ContactSource;
21
- /**
22
- * Date and time the contact was created.
23
- * @readonly
24
- */
25
- _createdDate?: Date | null;
26
- /**
27
- * Date and time the contact was last updated.
28
- * @readonly
29
- */
30
- _updatedDate?: Date | null;
31
- /**
32
- * Details about the contact's last action in the site.
33
- * @readonly
34
- */
35
- lastActivity?: ContactActivity;
36
- /**
37
- * Contact's primary phone and email.
38
- * @readonly
39
- */
40
- primaryInfo?: PrimaryContactInfo;
41
- /** Contact's details. */
42
- info?: ContactInfo;
43
- /**
44
- * Contact's primary email details.
45
- * @readonly
46
- */
47
- primaryEmail?: PrimaryEmail;
48
- /**
49
- * Contact's primary phone details.
50
- * @readonly
51
- */
52
- primaryPhone?: PrimaryPhone;
53
- }
54
- export interface ContactSource {
55
- /**
56
- * Source type.
57
- * @readonly
58
- */
59
- sourceType?: ContactSourceTypeWithLiterals;
60
- /**
61
- * App ID, if the contact was created by an app.
62
- * @format GUID
63
- * @readonly
64
- */
65
- appId?: string | null;
66
- }
67
- export declare enum ContactSourceType {
68
- OTHER = "OTHER",
69
- ADMIN = "ADMIN",
70
- WIX_APP = "WIX_APP",
71
- IMPORT = "IMPORT",
72
- THIRD_PARTY = "THIRD_PARTY",
73
- WIX_BOOKINGS = "WIX_BOOKINGS",
74
- WIX_CHAT = "WIX_CHAT",
75
- WIX_EMAIL_MARKETING = "WIX_EMAIL_MARKETING",
76
- WIX_EVENTS = "WIX_EVENTS",
77
- WIX_FORMS = "WIX_FORMS",
78
- WIX_GROUPS = "WIX_GROUPS",
79
- WIX_HOTELS = "WIX_HOTELS",
80
- WIX_MARKET_PLACE = "WIX_MARKET_PLACE",
81
- WIX_MUSIC = "WIX_MUSIC",
82
- WIX_RESTAURANTS = "WIX_RESTAURANTS",
83
- WIX_SITE_MEMBERS = "WIX_SITE_MEMBERS",
84
- WIX_STORES = "WIX_STORES",
85
- WIX_CODE = "WIX_CODE",
86
- HOPP = "HOPP"
87
- }
88
- /** @enumType */
89
- export type ContactSourceTypeWithLiterals = ContactSourceType | 'OTHER' | 'ADMIN' | 'WIX_APP' | 'IMPORT' | 'THIRD_PARTY' | 'WIX_BOOKINGS' | 'WIX_CHAT' | 'WIX_EMAIL_MARKETING' | 'WIX_EVENTS' | 'WIX_FORMS' | 'WIX_GROUPS' | 'WIX_HOTELS' | 'WIX_MARKET_PLACE' | 'WIX_MUSIC' | 'WIX_RESTAURANTS' | 'WIX_SITE_MEMBERS' | 'WIX_STORES' | 'WIX_CODE' | 'HOPP';
90
- export interface ContactActivity {
91
- /** Date and time of the last action. */
92
- activityDate?: Date | null;
93
- /** Contact's last action in the site. */
94
- activityType?: ContactActivityTypeWithLiterals;
95
- }
96
- export declare enum ContactActivityType {
97
- /** Visited the site. */
98
- GENERAL = "GENERAL",
99
- /** Became a new contact. */
100
- CONTACT_CREATED = "CONTACT_CREATED",
101
- /** Logged in. */
102
- MEMBER_LOGIN = "MEMBER_LOGIN",
103
- /** Requested a site membership. */
104
- MEMBER_REGISTER = "MEMBER_REGISTER",
105
- /** Was approved, blocked, or unblocked. */
106
- MEMBER_STATUS_CHANGED = "MEMBER_STATUS_CHANGED",
107
- /** Submitted a form. */
108
- FORM_SUBMITTED = "FORM_SUBMITTED",
109
- /** Started a chat. */
110
- INBOX_FORM_SUBMITTED = "INBOX_FORM_SUBMITTED",
111
- /** Paid a payment request. */
112
- INBOX_PAYMENT_REQUEST_PAID = "INBOX_PAYMENT_REQUEST_PAID",
113
- /** Received a message from the site. */
114
- INBOX_MESSAGE_TO_CUSTOMER = "INBOX_MESSAGE_TO_CUSTOMER",
115
- /** Sent a new message to the site. */
116
- INBOX_MESSAGE_FROM_CUSTOMER = "INBOX_MESSAGE_FROM_CUSTOMER",
117
- /** Subscribed to a site newsletter through a form. */
118
- NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED = "NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED",
119
- /** Unsubscribed from a site newsletter. */
120
- NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE",
121
- /** Made a purchase. */
122
- ECOM_PURCHASE = "ECOM_PURCHASE",
123
- /** Abandoned a shopping cart. */
124
- ECOM_CART_ABANDON = "ECOM_CART_ABANDON",
125
- /** Checked out shopping cart and submitted buyer info (but didn’t complete the purchase yet). */
126
- ECOM_CHECKOUT_BUYER = "ECOM_CHECKOUT_BUYER",
127
- /** Booked an appointment. */
128
- BOOKINGS_APPOINTMENT = "BOOKINGS_APPOINTMENT",
129
- /** Made a Wix Hotels reservation. */
130
- HOTELS_RESERVATION = "HOTELS_RESERVATION",
131
- /** Paid for a Wix Hotels reservation. */
132
- HOTELS_PURCHASE = "HOTELS_PURCHASE",
133
- /** Confirmed a Wix Hotels reservation. */
134
- HOTELS_CONFIRMATION = "HOTELS_CONFIRMATION",
135
- /** Canceled a Wix Hotels reservation. */
136
- HOTELS_CANCEL = "HOTELS_CANCEL",
137
- /** Purchased a video. */
138
- VIDEO_PURCHASE = "VIDEO_PURCHASE",
139
- /** Rented a video. */
140
- VIDEO_RENT = "VIDEO_RENT",
141
- /** Made a purchase with a pay button. */
142
- CASHIER_BUTTON_PURCHASE = "CASHIER_BUTTON_PURCHASE",
143
- /** Became a new Wix Marketplace lead. */
144
- ARENA_NEW_LEAD = "ARENA_NEW_LEAD",
145
- /** RSVP'd to an event. */
146
- EVENTS_RSVP = "EVENTS_RSVP",
147
- /** Paid an invoice. */
148
- INVOICE_PAY = "INVOICE_PAY",
149
- /** An invoice is now overdue. */
150
- INVOICE_OVERDUE = "INVOICE_OVERDUE",
151
- /** Accepted a price quote. */
152
- PRICE_QUOTE_ACCEPT = "PRICE_QUOTE_ACCEPT",
153
- /** A price quote has expired. */
154
- PRICE_QUOTE_EXPIRE = "PRICE_QUOTE_EXPIRE",
155
- /** Ordered food with Wix Restaurants. */
156
- RESTAURANTS_ORDER = "RESTAURANTS_ORDER",
157
- /** Made a Wix Restaurants reservation. */
158
- RESTAURANTS_RESERVATION = "RESTAURANTS_RESERVATION",
159
- /** Opened an email from the site. */
160
- SHOUTOUT_OPEN = "SHOUTOUT_OPEN",
161
- /** Clicked a link in an email from the site. */
162
- SHOUTOUT_CLICK = "SHOUTOUT_CLICK",
163
- /** Merged with another contact. */
164
- CONTACT_MERGED = "CONTACT_MERGED",
165
- /** Subscribed to a site newsletter. */
166
- NEWSLETTER_SUBSCRIPTION_SUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_SUBSCRIBE",
167
- /** Subscription status to site newsletters is pending confirmation. */
168
- NEWSLETTER_SUBSCRIPTION_PENDING = "NEWSLETTER_SUBSCRIPTION_PENDING",
169
- /** Subscription status to site newsletters is not set. */
170
- NEWSLETTER_SUBSCRIPTION_NOT_SET = "NEWSLETTER_SUBSCRIPTION_NOT_SET",
171
- /** Subscribed to phone notifications. */
172
- PHONE_SUBSCRIPTION_SUBSCRIBE = "PHONE_SUBSCRIPTION_SUBSCRIBE",
173
- /** Subscription to phone notificatons is pending confirmation. */
174
- PHONE_SUBSCRIPTION_PENDING = "PHONE_SUBSCRIPTION_PENDING",
175
- /** Subscription to phone notificatons is not set. */
176
- PHONE_SUBSCRIPTION_NOT_SET = "PHONE_SUBSCRIPTION_NOT_SET",
177
- /** Subscribed to phone notifications. */
178
- PHONE_SUBSCRIPTION_UNSUBSCRIBE = "PHONE_SUBSCRIPTION_UNSUBSCRIBE"
179
- }
180
- /** @enumType */
181
- export type ContactActivityTypeWithLiterals = ContactActivityType | 'GENERAL' | 'CONTACT_CREATED' | 'MEMBER_LOGIN' | 'MEMBER_REGISTER' | 'MEMBER_STATUS_CHANGED' | 'FORM_SUBMITTED' | 'INBOX_FORM_SUBMITTED' | 'INBOX_PAYMENT_REQUEST_PAID' | 'INBOX_MESSAGE_TO_CUSTOMER' | 'INBOX_MESSAGE_FROM_CUSTOMER' | 'NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED' | 'NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE' | 'ECOM_PURCHASE' | 'ECOM_CART_ABANDON' | 'ECOM_CHECKOUT_BUYER' | 'BOOKINGS_APPOINTMENT' | 'HOTELS_RESERVATION' | 'HOTELS_PURCHASE' | 'HOTELS_CONFIRMATION' | 'HOTELS_CANCEL' | 'VIDEO_PURCHASE' | 'VIDEO_RENT' | 'CASHIER_BUTTON_PURCHASE' | 'ARENA_NEW_LEAD' | 'EVENTS_RSVP' | 'INVOICE_PAY' | 'INVOICE_OVERDUE' | 'PRICE_QUOTE_ACCEPT' | 'PRICE_QUOTE_EXPIRE' | 'RESTAURANTS_ORDER' | 'RESTAURANTS_RESERVATION' | 'SHOUTOUT_OPEN' | 'SHOUTOUT_CLICK' | 'CONTACT_MERGED' | 'NEWSLETTER_SUBSCRIPTION_SUBSCRIBE' | 'NEWSLETTER_SUBSCRIPTION_PENDING' | 'NEWSLETTER_SUBSCRIPTION_NOT_SET' | 'PHONE_SUBSCRIPTION_SUBSCRIBE' | 'PHONE_SUBSCRIPTION_PENDING' | 'PHONE_SUBSCRIPTION_NOT_SET' | 'PHONE_SUBSCRIPTION_UNSUBSCRIBE';
182
- export interface ActivityIcon {
183
- /**
184
- * Icon name
185
- * @maxLength 50
186
- */
187
- name?: string | null;
188
- /**
189
- * Icon url
190
- * @format WEB_URL
191
- */
192
- url?: string | null;
193
- }
194
- export interface PrimaryContactInfo {
195
- /**
196
- * Primary email address.
197
- *
198
- * This property reflects the email address in `info.emails`
199
- * where `primary` is `true`.
200
- * @format EMAIL
201
- * @readonly
202
- */
203
- email?: string | null;
204
- /**
205
- * Primary phone number.
206
- *
207
- * This property reflects the phone number in `info.phones`
208
- * where `primary` is `true`.
209
- * @readonly
210
- */
211
- phone?: string | null;
212
- }
213
- export interface ContactInfo {
214
- /** Contact's first and last name. */
215
- name?: ContactName;
216
- /** Contact's email addresses. */
217
- emails?: ContactEmailsWrapper;
218
- /** Contact's phone numbers. */
219
- phones?: ContactPhonesWrapper;
220
- /** Contact's street addresses. */
221
- addresses?: ContactAddressesWrapper;
222
- /**
223
- * Contact's company name.
224
- * @maxLength 1000
225
- */
226
- company?: string | null;
227
- /**
228
- * Contact's job title.
229
- * @maxLength 1000
230
- */
231
- jobTitle?: string | null;
232
- /**
233
- * Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.
234
- * @format LOCAL_DATE
235
- */
236
- birthdate?: string | null;
237
- /**
238
- * Locale in
239
- * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
240
- * Typically, this is a lowercase 2-letter language code,
241
- * followed by a hyphen, followed by an uppercase 2-letter country code.
242
- * For example, `en-US` for U.S. English, and `de-DE` for Germany German.
243
- * @format LANGUAGE_TAG
244
- */
245
- locale?: string | null;
246
- /**
247
- * List of contact's labels.
248
- *
249
- * Labels are used to organize contacts. Labels can be
250
- * added and removed using Label Contact and Unlabel Contact, respectively.
251
- *
252
- * To view or manage contact labels, use the Labels API.
253
- */
254
- labelKeys?: LabelsWrapper;
255
- /**
256
- * Additional custom fields.
257
- *
258
- * Empty fields are not returned.
259
- */
260
- extendedFields?: ExtendedFieldsWrapper;
261
- /** Contact's profile picture. */
262
- picture?: ContactPicture;
263
- }
264
- export interface ContactName {
265
- /**
266
- * Contact's first name.
267
- * @maxLength 1000
268
- */
269
- first?: string | null;
270
- /**
271
- * Contact's last name.
272
- * @maxLength 1000
273
- */
274
- last?: string | null;
275
- }
276
- export interface ContactEmailsWrapper {
277
- /**
278
- * List of up to 50 email addresses.
279
- * @maxSize 50
280
- */
281
- items?: ContactEmail[];
282
- }
283
- export interface ContactEmail {
284
- /**
285
- * Email ID.
286
- * @format GUID
287
- * @readonly
288
- */
289
- _id?: string | null;
290
- /**
291
- * Email type.
292
- *
293
- * `UNTAGGED` is shown as "Other" in the Contact List.
294
- */
295
- tag?: EmailTagWithLiterals;
296
- /**
297
- * Email address.
298
- * @minLength 1
299
- * @maxLength 320
300
- */
301
- email?: string;
302
- /**
303
- * Indicates whether this is the contact's primary email address.
304
- * When changing `primary` to `true` for an email,
305
- * the contact's other emails become `false`.
306
- * Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email.
307
- */
308
- primary?: boolean | null;
309
- }
310
- export declare enum EmailTag {
311
- UNTAGGED = "UNTAGGED",
312
- MAIN = "MAIN",
313
- HOME = "HOME",
314
- WORK = "WORK"
315
- }
316
- /** @enumType */
317
- export type EmailTagWithLiterals = EmailTag | 'UNTAGGED' | 'MAIN' | 'HOME' | 'WORK';
318
- export interface ContactPhonesWrapper {
319
- /**
320
- * List of up to 50 phone numbers.
321
- * @maxSize 50
322
- */
323
- items?: ContactPhone[];
324
- }
325
- export interface ContactPhone {
326
- /**
327
- * Phone ID.
328
- * @format GUID
329
- * @readonly
330
- */
331
- _id?: string | null;
332
- /**
333
- * Phone type.
334
- *
335
- * `UNTAGGED` is shown as "Other" in the Contact List.
336
- */
337
- tag?: PhoneTagWithLiterals;
338
- /**
339
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
340
- * @format COUNTRY
341
- */
342
- countryCode?: string | null;
343
- /**
344
- * Phone number.
345
- * @minLength 1
346
- * @maxLength 50
347
- */
348
- phone?: string;
349
- /**
350
- * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
351
- * phone number.
352
- * Automatically generated using `phone` and `countryCode`, pending both values are valid.
353
- * @readonly
354
- */
355
- e164Phone?: string | null;
356
- /**
357
- * Indicates whether this is the contact's primary phone number.
358
- * When changing `primary` to `true` for a phone,
359
- * the contact's `primary` field for other phones becomes `false`.
360
- * Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone.
361
- */
362
- primary?: boolean | null;
363
- }
364
- export declare enum PhoneTag {
365
- UNTAGGED = "UNTAGGED",
366
- MAIN = "MAIN",
367
- HOME = "HOME",
368
- MOBILE = "MOBILE",
369
- WORK = "WORK",
370
- FAX = "FAX"
371
- }
372
- /** @enumType */
373
- export type PhoneTagWithLiterals = PhoneTag | 'UNTAGGED' | 'MAIN' | 'HOME' | 'MOBILE' | 'WORK' | 'FAX';
374
- export interface ContactAddressesWrapper {
375
- /**
376
- * List of up to 50 addresses.
377
- * @maxSize 50
378
- */
379
- items?: ContactAddress[];
380
- }
381
- export interface ContactAddress {
382
- /**
383
- * Street address ID.
384
- * @format GUID
385
- * @readonly
386
- */
387
- _id?: string | null;
388
- /**
389
- * Address type.
390
- * `UNTAGGED` is shown as "Other" in the Contact List.
391
- */
392
- tag?: AddressTagWithLiterals;
393
- /** Street address. */
394
- address?: Address;
395
- }
396
- export declare enum AddressTag {
397
- UNTAGGED = "UNTAGGED",
398
- HOME = "HOME",
399
- WORK = "WORK",
400
- BILLING = "BILLING",
401
- SHIPPING = "SHIPPING"
402
- }
403
- /** @enumType */
404
- export type AddressTagWithLiterals = AddressTag | 'UNTAGGED' | 'HOME' | 'WORK' | 'BILLING' | 'SHIPPING';
405
- /** Physical address */
406
- export interface Address extends AddressStreetOneOf {
407
- /** Street address object, with number and name in separate fields. */
408
- streetAddress?: StreetAddress;
409
- /**
410
- * Main address line, usually street and number, as free text.
411
- * @maxLength 1000
412
- */
413
- addressLine1?: string | null;
414
- /**
415
- * 2-letter country code in an
416
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
417
- * @format COUNTRY
418
- */
419
- country?: string | null;
420
- /**
421
- * Code for a subdivision (such as state, prefecture, or province) in an
422
- * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
423
- * @maxLength 100
424
- */
425
- subdivision?: string | null;
426
- /**
427
- * City name.
428
- * @maxLength 1000
429
- */
430
- city?: string | null;
431
- /**
432
- * Postal or zip code.
433
- * @maxLength 100
434
- */
435
- postalCode?: string | null;
436
- /**
437
- * Free text providing more detailed address information,
438
- * such as apartment, suite, or floor.
439
- * @maxLength 1000
440
- */
441
- addressLine2?: string | null;
442
- }
443
- /** @oneof */
444
- export interface AddressStreetOneOf {
445
- /** Street address object, with number and name in separate fields. */
446
- streetAddress?: StreetAddress;
447
- /**
448
- * Main address line, usually street and number, as free text.
449
- * @maxLength 1000
450
- */
451
- addressLine?: string | null;
452
- }
453
- export interface StreetAddress {
454
- /**
455
- * Street number.
456
- * @maxLength 100
457
- */
458
- number?: string;
459
- /**
460
- * Street name.
461
- * @maxLength 1000
462
- */
463
- name?: string;
464
- }
465
- export interface AddressLocation {
466
- /** Address's latitude. */
467
- latitude?: number | null;
468
- /** Address's longitude. */
469
- longitude?: number | null;
470
- }
471
- export interface Subdivision {
472
- /** subdivision short code */
473
- code?: string;
474
- /** Full subdivision name. */
475
- name?: string;
476
- }
477
- export declare enum SubdivisionType {
478
- UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
479
- /** State */
480
- ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
481
- /** County */
482
- ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
483
- /** City/town */
484
- ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
485
- /** Neighborhood/quarter */
486
- ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
487
- /** Street/block */
488
- ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
489
- /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
490
- COUNTRY = "COUNTRY"
491
- }
492
- /** @enumType */
493
- export 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';
494
- export interface AssigneesWrapper {
495
- /**
496
- * List of site contributor user IDs.
497
- * @format GUID
498
- * @maxSize 50
499
- */
500
- items?: string[];
501
- }
502
- export interface LabelsWrapper {
503
- /**
504
- * List of contact label keys.
505
- *
506
- * Contact labels help categorize contacts. Label keys must exist to be added to the contact.
507
- * Contact labels can be created or retrieved with Find or Create Label or List Labels.
508
- * @maxSize 2000
509
- */
510
- items?: string[];
511
- }
512
- export interface ExtendedFieldsWrapper {
513
- /**
514
- * Contact's extended fields,
515
- * where each key is the field key,
516
- * and each value is the field's value for the contact.
517
- *
518
- * To view and manage extended fields, use the Extended Fields API.
519
- */
520
- items?: Record<string, any>;
521
- }
522
- export interface LocationsWrapper {
523
- /**
524
- * List of location ids.
525
- * @format GUID
526
- * @maxSize 50
527
- */
528
- items?: string[];
529
- }
530
- /** TEST contact picture description */
531
- export interface ContactPicture {
532
- /**
533
- * Image.
534
- * This can contain an image URL or a Wix Media image ID.
535
- */
536
- image?: string;
537
- }
538
- export declare enum ImageProvider {
539
- UNKNOWN = "UNKNOWN",
540
- /** Image stored outside Wix */
541
- EXTERNAL = "EXTERNAL",
542
- /** Stored in wix media platform, Must be uploaded by using `GeneratePictureUploadUrl` */
543
- WIX_MEDIA = "WIX_MEDIA"
544
- }
545
- /** @enumType */
546
- export type ImageProviderWithLiterals = ImageProvider | 'UNKNOWN' | 'EXTERNAL' | 'WIX_MEDIA';
547
- export interface SegmentsWrapper {
548
- /**
549
- * List of Contact segment IDs
550
- * @maxSize 60
551
- * @format GUID
552
- */
553
- items?: string[];
554
- }
555
- export interface PrimaryEmail {
556
- /**
557
- * Primary email address.
558
- *
559
- * This field reflects the email address in `info.emails`
560
- * where `primary` is `true`.
561
- * @format EMAIL
562
- * @readonly
563
- */
564
- email?: string | null;
565
- /**
566
- * Indicates the recipient's opt-in or opt-out status for marketing emails.
567
- *
568
- * Default: `NOT_SET`
569
- * @readonly
570
- */
571
- subscriptionStatus?: SubscriptionStatusWithLiterals;
572
- /**
573
- * Indicates last reported status of sent emails.
574
- *
575
- * Default: `NOT_SET`
576
- * @readonly
577
- */
578
- deliverabilityStatus?: EmailDeliverabilityStatusWithLiterals;
579
- }
580
- export declare enum SubscriptionStatus {
581
- /** No status exists. */
582
- NO_SUBSCRIPTION_STATUS = "NO_SUBSCRIPTION_STATUS",
583
- /** No status specified. */
584
- NOT_SET = "NOT_SET",
585
- /** Subscription confirmation was requested, but recipient hasn't confirmed yet. */
586
- PENDING = "PENDING",
587
- /** Recipient has opted in to marketing emails or SMS messages. */
588
- SUBSCRIBED = "SUBSCRIBED",
589
- /** Recipient has opted out of marketing emails or SMS messages. */
590
- UNSUBSCRIBED = "UNSUBSCRIBED"
591
- }
592
- /** @enumType */
593
- export type SubscriptionStatusWithLiterals = SubscriptionStatus | 'NO_SUBSCRIPTION_STATUS' | 'NOT_SET' | 'PENDING' | 'SUBSCRIBED' | 'UNSUBSCRIBED';
594
- export declare enum EmailDeliverabilityStatus {
595
- /** No status reported. */
596
- NOT_SET = "NOT_SET",
597
- /** Emails are being successfully delivered. */
598
- VALID = "VALID",
599
- /** The last email to the recipient bounced or was rejected. */
600
- BOUNCED = "BOUNCED",
601
- /** Recipient registered a spam complaint with their email provider. */
602
- SPAM_COMPLAINT = "SPAM_COMPLAINT",
603
- /** Multiple emails have been delivered without any kind of engagement from the recipient. */
604
- INACTIVE = "INACTIVE"
605
- }
606
- /** @enumType */
607
- export type EmailDeliverabilityStatusWithLiterals = EmailDeliverabilityStatus | 'NOT_SET' | 'VALID' | 'BOUNCED' | 'SPAM_COMPLAINT' | 'INACTIVE';
608
- export interface PrimaryPhone {
609
- /**
610
- * Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
611
- * @format COUNTRY
612
- */
613
- countryCode?: string | null;
614
- /**
615
- * Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.
616
- * Automatically generated using `phone` and `countryCode` when both values are valid.
617
- * @readonly
618
- */
619
- e164Phone?: string | null;
620
- /**
621
- * Formatted phone. Automatically generated using `phone` and `countryCode`.
622
- * @readonly
623
- */
624
- formattedPhone?: string | null;
625
- /**
626
- * Indicates the recipient's opt-in or opt-out status for SMS messages.
627
- *
628
- * Default:
629
- * - `NOT_SET` when the phone is a valid E164 phone.
630
- * - `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone.
631
- * @readonly
632
- */
633
- subscriptionStatus?: SubscriptionStatusWithLiterals;
634
- /**
635
- * Primary phone number.
636
- *
637
- * This field reflects the phone number in `info.phones`
638
- * where `primary` is `true`.
639
- * @readonly
640
- */
641
- phone?: string | null;
642
- }
643
- export declare enum PhoneDeliverabilityStatus {
644
- /** No status exists. */
645
- NO_PHONE_DELIVERABILITY_STATUS = "NO_PHONE_DELIVERABILITY_STATUS",
646
- /** No status reported. */
647
- NOT_SET = "NOT_SET"
648
- }
649
- /** @enumType */
650
- export type PhoneDeliverabilityStatusWithLiterals = PhoneDeliverabilityStatus | 'NO_PHONE_DELIVERABILITY_STATUS' | 'NOT_SET';
651
- export interface MemberInfo {
652
- /**
653
- * Member ID
654
- * @format GUID
655
- */
656
- memberId?: string | null;
657
- /** Signup date */
658
- signupDate?: Date | null;
659
- /**
660
- * Login email
661
- * @format EMAIL
662
- */
663
- email?: string | null;
664
- /** Indicate whether the email is verified */
665
- emailVerified?: boolean | null;
666
- /** Indicates whether the member is required to verify their email */
667
- emailVerificationRequired?: boolean | null;
668
- /**
669
- * Member status.
670
- * - `PENDING`: Member created and is waiting for approval by site owner.
671
- * - `ACTIVE`: Member can log in to the site.
672
- * - `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.
673
- * - `BLOCKED': Member is blocked and cannot log in to the site.
674
- */
675
- status?: MemberStatusWithLiterals;
676
- /** Profile info */
677
- profileInfo?: ProfileInfo;
678
- /** User info */
679
- userInfo?: UserInfo;
680
- /** Session info */
681
- sessionInfo?: SessionInfo;
682
- /** Group info */
683
- groupInfo?: GroupInfo;
684
- }
685
- export declare enum MemberStatus {
686
- PENDING = "PENDING",
687
- ACTIVE = "ACTIVE",
688
- DELETED = "DELETED",
689
- BLOCKED = "BLOCKED",
690
- OFFLINE = "OFFLINE"
691
- }
692
- /** @enumType */
693
- export type MemberStatusWithLiterals = MemberStatus | 'PENDING' | 'ACTIVE' | 'DELETED' | 'BLOCKED' | 'OFFLINE';
694
- export interface ProfileInfo {
695
- /**
696
- * Nickname
697
- * @maxLength 255
698
- */
699
- nickname?: string | null;
700
- /** Privacy status */
701
- privacyStatus?: PrivacyStatusWithLiterals;
702
- /** Indicate whether the member is reported */
703
- reported?: boolean | null;
704
- /** Indicate whether the member is muted */
705
- muted?: boolean | null;
706
- /** Profile photo */
707
- photo?: string;
708
- }
709
- export declare enum PrivacyStatus {
710
- PRIVATE = "PRIVATE",
711
- PUBLIC = "PUBLIC"
712
- }
713
- /** @enumType */
714
- export type PrivacyStatusWithLiterals = PrivacyStatus | 'PRIVATE' | 'PUBLIC';
715
- export interface UserInfo {
716
- /**
717
- * User ID
718
- * @format GUID
719
- */
720
- userId?: string;
721
- /** The user's role on the website */
722
- role?: RoleWithLiterals;
723
- }
724
- export declare enum Role {
725
- UNSPECIFIED_ROLE = "UNSPECIFIED_ROLE",
726
- OWNER = "OWNER",
727
- CONTRIBUTOR = "CONTRIBUTOR"
728
- }
729
- /** @enumType */
730
- export type RoleWithLiterals = Role | 'UNSPECIFIED_ROLE' | 'OWNER' | 'CONTRIBUTOR';
731
- export interface SessionInfo {
732
- /** Last time the member logged in to the website */
733
- lastWebLogin?: Date | null;
734
- /** Last time the member logged in to one of the mobile apps */
735
- lastMobileLogin?: Date | null;
736
- /**
737
- * List of mobile apps that the member has ever logged in to
738
- * @maxSize 50
739
- * @maxLength 50
740
- */
741
- mobileAppNames?: string[];
742
- }
743
- export interface GroupInfo {
744
- /**
745
- * Group IDs
746
- * @format GUID
747
- * @maxSize 1000
748
- */
749
- groupIds?: string[];
750
- }
751
- export interface ContactSubmitted {
752
- /** Pass through data, submitted with the contact */
753
- passThroughData?: string | null;
754
- /** Submitted activity */
755
- activity?: ContactActivity;
756
- /** Submitted Contact (after processing) */
757
- contact?: Contact;
758
- }
759
- export interface ContactChanged {
760
- /** The Contact before the changes */
761
- previousContact?: Contact;
762
- /** The Contact after the changes */
763
- currentContact?: Contact;
764
- }
765
- export interface ContactEmailSubscriptionUpdated {
766
- /** The updated contact ID. */
767
- contactId?: string;
768
- /** The revision of the contact. */
769
- revision?: number;
770
- /** The primary email of the contact with the updated subscription and deliverability status. */
771
- primaryEmail?: PrimaryEmail;
772
- /** Date and time the contact was updated with the email subscription or deliverability status. */
773
- _updatedDate?: Date | null;
774
- }
775
- export interface ContactPhoneSubscriptionUpdated {
776
- /** The updated contact ID. */
777
- contactId?: string;
778
- /** The revision of the contact. */
779
- revision?: number;
780
- /** The primary phone of the contact with the updated subscription status. */
781
- primaryPhone?: PrimaryPhone;
782
- /** Date and time the contact was updated with the SMS subscription status. */
783
- _updatedDate?: Date | null;
784
- }
785
- /**
786
- * This message is an internal message used by this app and it is used to trigger
787
- * the update of the subscription status of the contact asynchronously.
788
- * It is published after a contact is created/updated/merged.
789
- */
790
- export interface ContactPrimaryInfoUpdated {
791
- /** The updated contact ID. */
792
- contactId?: string;
793
- /** Indication whether the primary email was updated. */
794
- primaryEmailUpdated?: boolean;
795
- /** Indication whether primary phone was updated. */
796
- primaryPhoneUpdated?: boolean;
797
- /** previous primary email subscription status */
798
- previousPrimaryEmailSubscriptionStatus?: PrimarySubscriptionStatus;
799
- /** previous primary phone subscription status */
800
- previousPrimaryPhoneSubscriptionStatus?: PrimarySubscriptionStatus;
801
- }
802
- export interface PrimarySubscriptionStatus {
803
- /** subscription status */
804
- subscriptionStatus?: SubscriptionStatusWithLiterals;
805
- }
806
- /**
807
- * This message is an internal message used by this app and it is used to trigger
808
- * the update of the contact's last activity is done asynchronously.
809
- */
810
- export interface LastActivityUpdate {
811
- /**
812
- * The contact ID.
813
- * @format GUID
814
- */
815
- contactId?: string;
816
- /** Activity date. */
817
- activityDate?: Date | null;
818
- /**
819
- * Activity translation key.
820
- * @maxLength 100
821
- */
822
- activityTranslationKey?: string;
823
- /**
824
- * Activity icon.
825
- * @maxLength 100
826
- */
827
- icon?: string | null;
828
- }
829
- /** Contact creation options. */
830
- export interface CreateContactRequest {
831
- /** Contact info. */
832
- info: ContactInfo;
833
- /**
834
- * Controls whether the call will succeed
835
- * if the new contact information contains an email or a phone number already used by another contact.
836
- *
837
- * If set to `true`,
838
- * the call will succeed even if an email address or phone number is used by another contact.
839
- * If set to `false`,
840
- * the call will fail if the given email address is used by another contact or,
841
- * if the email address is not given and the given phone number is used by another contact.
842
- *
843
- * Default: `false`
844
- */
845
- allowDuplicates?: boolean;
846
- }
847
- /** Contact. */
848
- export interface CreateContactResponse {
849
- /** Contact. */
850
- contact?: Contact;
851
- }
852
- export interface DuplicateContactExists {
853
- /** @format GUID */
854
- duplicateContactId?: string | null;
855
- /** @format EMAIL */
856
- duplicateEmail?: string | null;
857
- /** @format PHONE */
858
- duplicatePhone?: string | null;
859
- }
860
- export interface UpdateContactRequest {
861
- /**
862
- * ID of the contact to update.
863
- * @format GUID
864
- */
865
- contactId: string;
866
- /**
867
- * Revision number.
868
- * When updating, include the existing `revision`
869
- * to prevent conflicting updates.
870
- */
871
- revision: number | null;
872
- /**
873
- * Controls whether the call will succeed
874
- * if the new contact information contains an email or a phone number already used by another contact.
875
- *
876
- * If set to `true`,
877
- * the call will succeed even if an email address or phone number is used by another contact.
878
- * If set to `false`,
879
- * the call will fail if the given email address is used by another contact or,
880
- * if the email address is not given and the given phone number is used by another contact.
881
- *
882
- * Default: `false`
883
- */
884
- allowDuplicates?: boolean;
885
- /** Contact info. */
886
- info: ContactInfo;
887
- }
888
- /** Updated contact. */
889
- export interface UpdateContactResponse {
890
- /** Updated contact. */
891
- contact?: Contact;
892
- }
893
- export interface MergeContactsRequest {
894
- /**
895
- * Target contact ID.
896
- * @format GUID
897
- */
898
- targetContactId: string;
899
- /**
900
- * Target contact revision number, which increments by 1 each time the contact is updated.
901
- * To prevent conflicting changes,
902
- * the target contact's current `revision` must be specified.
903
- */
904
- targetContactRevision: number | null;
905
- /**
906
- * IDs of up to 5 contacts to merge into the target contact.
907
- * When you merge more than one source contact,
908
- * the first source is given precedence, then the second, and so on.
909
- * @minSize 1
910
- * @maxSize 5
911
- */
912
- sourceContactIds?: string[];
913
- }
914
- export interface MergeContactsResponse {
915
- /** Updated target contact. */
916
- contact?: Contact;
917
- }
918
- export interface ContactMerged {
919
- /** ID of the contact the source contacts were merged into. */
920
- targetContactId?: string;
921
- /** IDs of contacts that were merged into the target contact. */
922
- sourceContactIds?: string[];
923
- /** Updated target contact. */
924
- targetContact?: Contact;
925
- }
926
- export interface PreviewMergeContactsRequest {
927
- /**
928
- * Target contact ID.
929
- * @format GUID
930
- */
931
- targetContactId?: string;
932
- /**
933
- * IDs of up to 5 contacts to merge into the target contact.
934
- * When you merge more than one source contact,
935
- * the first source is given precedence, then the second, and so on.
936
- * @minSize 1
937
- * @maxSize 5
938
- */
939
- sourceContactIds?: string[];
940
- }
941
- export interface PreviewMergeContactsResponse {
942
- /** Preview of the updated target contact. */
943
- contact?: Contact;
944
- }
945
- export interface DeleteContactRequest {
946
- /**
947
- * ID of the contact to delete.
948
- * @format GUID
949
- */
950
- contactId: string;
951
- }
952
- export interface DeleteContactResponse {
953
- }
954
- export interface LabelContactRequest {
955
- /**
956
- * ID of the contact to add labels to.
957
- * @format GUID
958
- */
959
- contactId: string;
960
- /**
961
- * List of label keys to add to the contact.
962
- *
963
- * Label keys must exist to be added to the contact.
964
- * Use the Labels API to create or retrieve labels.
965
- * @minSize 1
966
- * @maxSize 100
967
- */
968
- labelKeys: string[];
969
- }
970
- /** Updated contact. */
971
- export interface LabelContactResponse {
972
- /** Updated contact. */
973
- contact?: Contact;
974
- }
975
- export interface UnlabelContactRequest {
976
- /**
977
- * ID of the contact to remove labels from.
978
- * @format GUID
979
- */
980
- contactId: string;
981
- /**
982
- * List of label keys to remove from the contact.
983
- * @minSize 1
984
- * @maxSize 100
985
- */
986
- labelKeys: string[];
987
- }
988
- /** Updated contact. */
989
- export interface UnlabelContactResponse {
990
- /** Updated contact. */
991
- contact?: Contact;
992
- }
993
- export interface LabelAndUnlabelContactRequest {
994
- /**
995
- * Contact ID.
996
- * @format GUID
997
- */
998
- contactId?: string;
999
- /**
1000
- * List of label keys to add to the contact.
1001
- *
1002
- * Label keys must exist to be added to the contact.
1003
- * Contact labels can be created or retrieved with
1004
- * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)
1005
- * or
1006
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
1007
- * @minSize 1
1008
- * @maxSize 100
1009
- */
1010
- labelKeysToAdd?: string[];
1011
- /**
1012
- * List of label keys to remove from the contact.
1013
- * @minSize 1
1014
- * @maxSize 100
1015
- */
1016
- labelKeysToRemove?: string[];
1017
- }
1018
- export interface LabelAndUnlabelContactResponse {
1019
- /** Updated contact. */
1020
- contact?: Contact;
1021
- }
1022
- export interface ListContactsRequest {
1023
- /** [Sort order](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter). */
1024
- sort?: Sorting;
1025
- /** [Pagination](https://dev.wix.com/api/rest/getting-started/pagination), defaults to offset = 0 and limit = 50 (max limit 1,000). */
1026
- paging?: Paging;
1027
- /**
1028
- * List of projected fields to return.
1029
- * If both `fields` and `fieldsets` are sent in the request,
1030
- * the union of both lists is returned.
1031
- * `id` and `revision` are always returned.
1032
- *
1033
- * Supported properties:
1034
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
1035
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
1036
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
1037
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
1038
- * @maxLength 100
1039
- * @maxSize 100
1040
- */
1041
- fields?: string[];
1042
- /** @maxSize 10 */
1043
- fieldsets?: ContactFieldSetWithLiterals[];
1044
- }
1045
- export interface Sorting {
1046
- /**
1047
- * Field to sort by.
1048
- *
1049
- * Supported properties:
1050
- * `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,
1051
- * `info.jobTitle`, `info.birthdate`
1052
- * @maxLength 100
1053
- */
1054
- fieldName?: string;
1055
- /**
1056
- * Sort order.
1057
- * Use `ASC` for ascending order or `DESC` for descending order.
1058
- *
1059
- * Defaults to `ASC`.
1060
- */
1061
- order?: SortOrderWithLiterals;
1062
- }
1063
- export declare enum SortOrder {
1064
- ASC = "ASC",
1065
- DESC = "DESC"
1066
- }
1067
- /** @enumType */
1068
- export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
1069
- export interface Paging {
1070
- /**
1071
- * 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).
1072
- *
1073
- * Default: `50`. <br>
1074
- * Maximum: `1000`.
1075
- * @max 1000
1076
- */
1077
- limit?: number | null;
1078
- /** Number of items to skip in the current sort order. */
1079
- offset?: number | null;
1080
- }
1081
- export declare enum ContactFieldSet {
1082
- /** name, primaryEmail, primaryPhone */
1083
- BASIC = "BASIC",
1084
- /** name, phones, emails, addresses */
1085
- COMMUNICATION_DETAILS = "COMMUNICATION_DETAILS",
1086
- /** name, primaryInfo(email, phone), extendedFields */
1087
- EXTENDED = "EXTENDED",
1088
- /** Full contact object */
1089
- FULL = "FULL"
1090
- }
1091
- /** @enumType */
1092
- export type ContactFieldSetWithLiterals = ContactFieldSet | 'BASIC' | 'COMMUNICATION_DETAILS' | 'EXTENDED' | 'FULL';
1093
- /** List of contacts. */
1094
- export interface ListContactsResponse {
1095
- /** List of contacts. */
1096
- contacts?: Contact[];
1097
- /** Details on the paged set of results returned. */
1098
- pagingMetadata?: PagingMetadata;
1099
- }
1100
- export interface PagingMetadata {
1101
- /** The number of items returned in this response. */
1102
- count?: number | null;
1103
- /** The offset which was requested. */
1104
- offset?: number | null;
1105
- /** The total number of items that match the query. */
1106
- total?: number | null;
1107
- /** A flag that indicates the server failed to calculate 'total' field. */
1108
- tooManyToCount?: boolean | null;
1109
- }
1110
- export interface QueryContactsRequest {
1111
- /**
1112
- * @internal
1113
- * @internal
1114
- * @maxLength 100
1115
- */
1116
- search?: string | null;
1117
- /** Query options. */
1118
- query?: Query;
1119
- }
1120
- export interface Query {
1121
- /**
1122
- * Filter object.
1123
- * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
1124
- * for more information.
1125
- *
1126
- * For a detailed list of supported filters, see
1127
- * [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters).
1128
- */
1129
- filter?: Record<string, any> | null;
1130
- /**
1131
- * Sorting options.
1132
- * See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)
1133
- * for more information.
1134
- *
1135
- * Max: 1 sort object
1136
- * @maxSize 1
1137
- */
1138
- sort?: Sorting[];
1139
- /** Pagination options. */
1140
- paging?: Paging;
1141
- /**
1142
- * List of projected fields to return.
1143
- * If both `fields` and `fieldsets` are sent in the request,
1144
- * the union of both lists is returned.
1145
- * `id` and `revision` are always returned.
1146
- *
1147
- * Supported properties:
1148
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
1149
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
1150
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
1151
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
1152
- * @maxLength 100
1153
- * @maxSize 100
1154
- */
1155
- fields?: string[];
1156
- /**
1157
- * Predefined sets of fields to return.
1158
- * If both `fields` and `fieldsets` are sent in the request,
1159
- * the union of both lists is returned.
1160
- *
1161
- * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
1162
- * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
1163
- * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
1164
- * - `FULL`: Returns all fields.
1165
- *
1166
- * Default: If `fields` is omitted from the request, `FULL`.
1167
- * @maxSize 10
1168
- */
1169
- fieldsets?: ContactFieldSetWithLiterals[];
1170
- }
1171
- /** List of contacts. */
1172
- export interface QueryContactsResponse {
1173
- /** List of contacts. */
1174
- contacts?: Contact[];
1175
- /** Details on the paged set of results returned. */
1176
- pagingMetadata?: PagingMetadata;
1177
- }
1178
- export interface ListFacetsRequest {
1179
- /** Pagination options. */
1180
- paging?: Paging;
1181
- /**
1182
- * Language for localization.
1183
- * @format LANGUAGE
1184
- */
1185
- language?: string | null;
1186
- }
1187
- export interface ListFacetsResponse {
1188
- /** List of facets. */
1189
- facets?: ContactsFacet[];
1190
- /** Details on the paged set of results returned. */
1191
- pagingMetadata?: PagingMetadata;
1192
- }
1193
- export interface ContactsFacet {
1194
- /** Type of facet. */
1195
- facetType?: ContactsFacetTypeWithLiterals;
1196
- /**
1197
- * Scope for facet keys.
1198
- * When a facet key exists in a namespace,
1199
- * each key is unique within that namespace.
1200
- *
1201
- * Currently, facets not created by Wix are in the `custom` namespace.
1202
- */
1203
- namespace?: string | null;
1204
- /** Human-readable display name. */
1205
- namespaceDisplayName?: string | null;
1206
- /** Facet key, automatically generated. */
1207
- facetKey?: string | null;
1208
- /** Human-readable name. Shown in the Wix UI. */
1209
- facetDisplayName?: string | null;
1210
- /** Number of contacts the facet applies to. */
1211
- count?: number | null;
1212
- /** Filter used to query contacts of this facet. */
1213
- queryFilter?: Record<string, any> | null;
1214
- }
1215
- export declare enum ContactsFacetType {
1216
- UNKNOWN = "UNKNOWN",
1217
- ALL_CONTACTS = "ALL_CONTACTS",
1218
- NOT_LABELED = "NOT_LABELED",
1219
- LABEL = "LABEL",
1220
- SUBSCRIPTION_STATUS = "SUBSCRIPTION_STATUS",
1221
- MEMBERSHIP_STATUS = "MEMBERSHIP_STATUS"
1222
- }
1223
- /** @enumType */
1224
- export type ContactsFacetTypeWithLiterals = ContactsFacetType | 'UNKNOWN' | 'ALL_CONTACTS' | 'NOT_LABELED' | 'LABEL' | 'SUBSCRIPTION_STATUS' | 'MEMBERSHIP_STATUS';
1225
- export interface QueryFacetsRequest {
1226
- /** Pagination options. */
1227
- paging?: Paging;
1228
- /**
1229
- * Language for localization.
1230
- * @format LANGUAGE
1231
- */
1232
- language?: string | null;
1233
- /**
1234
- * Filterable fields:
1235
- * - `'info.extendedFields.emailSubscriptions.effectiveEmail'` (`$exists`).
1236
- * - `'info.extendedFields.emailSubscriptions.subscriptionStatus'` (`$eq`, `$ne`, `$in`, `$nin`).
1237
- * - `'info.extendedFields.emailSubscriptions.deliverabilityStatus'` (`$eq`, `$ne`, `$in`, `$nin`).
1238
- */
1239
- filter?: Record<string, any> | null;
1240
- }
1241
- export interface QueryFacetsResponse {
1242
- /** List of facets. */
1243
- facets?: ContactsFacet[];
1244
- /** Details on the paged set of results returned. */
1245
- pagingMetadata?: PagingMetadata;
1246
- }
1247
- export interface BulkDeleteContactsRequest {
1248
- /**
1249
- * Filter object.
1250
- *
1251
- * Possible filters:
1252
- * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
1253
- *
1254
- * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1255
- * for a detailed list of supported filters for contact properties, extended fields, and custom fields.
1256
- *
1257
- *
1258
- * Example:
1259
- * `{ "filter": { "info.name.last": "Smith" } }`
1260
- */
1261
- filter?: Record<string, any> | null;
1262
- /**
1263
- * Plain text search for an exact match, up to 100 characters.
1264
- *
1265
- * Searchable fields:
1266
- *
1267
- * - `info.name.first`
1268
- * - `info.name.last`
1269
- * - `info.emails.email`
1270
- * - `info.phones.phone`
1271
- * @maxLength 100
1272
- */
1273
- search?: string | null;
1274
- }
1275
- export interface BulkDeleteContactsResponse {
1276
- /**
1277
- * Bulk job ID.
1278
- * The job's status can be retrieved with Get Bulk Job.
1279
- * @format GUID
1280
- */
1281
- jobId?: string;
1282
- }
1283
- export interface BulkUpdateContactsRequest {
1284
- /**
1285
- * Filter object.
1286
- *
1287
- * Possible filters:
1288
- * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
1289
- *
1290
- * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1291
- * for a detailed list of supported filters for contact properties, extended fields, and custom fields.
1292
- *
1293
- *
1294
- * Example:
1295
- * `{ "filter": { "info.name.last": "Smith" } }`
1296
- */
1297
- filter?: Record<string, any> | null;
1298
- /**
1299
- * Plain text search for an exact match, up to 100 characters.
1300
- *
1301
- * Searchable fields:
1302
- *
1303
- * - `info.name.first`
1304
- * - `info.name.last`
1305
- * - `info.emails.email`
1306
- * - `info.phones.phone`
1307
- * @maxLength 100
1308
- */
1309
- search?: string | null;
1310
- /** Contact info. */
1311
- info?: ContactInfo;
1312
- }
1313
- export interface BulkUpdateContactsResponse {
1314
- /**
1315
- * Bulk job ID.
1316
- * The job's status can be retrieved with Get Bulk Job.
1317
- * @format GUID
1318
- */
1319
- jobId?: string;
1320
- }
1321
- export interface BulkLabelAndUnlabelContactsRequest {
1322
- /**
1323
- * Filter options.
1324
- * Labels will be removed from contacts that meet the `filter` and `search` criteria.
1325
- *
1326
- * See
1327
- * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1328
- * for a list of supported filters and fields.
1329
- */
1330
- filter?: Record<string, any> | null;
1331
- /**
1332
- * Plain text search for an exact match, up to 100 characters.
1333
- * Labels will be removed from contacts that meet the `filter` and `search` criteria.
1334
- *
1335
- * See
1336
- * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1337
- * for a list of searchable fields.
1338
- * @maxLength 100
1339
- */
1340
- search?: string | null;
1341
- /**
1342
- * List of label keys to add to the contacts.
1343
- *
1344
- * Label keys must exist to be added to the contact.
1345
- * Contact labels can be created or retrieved with
1346
- * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)
1347
- * or
1348
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels)
1349
- * @maxSize 100
1350
- */
1351
- labelKeysToAdd?: string[];
1352
- /**
1353
- * List of label keys to remove from the contacts.
1354
- * @maxSize 100
1355
- */
1356
- labelKeysToRemove?: string[];
1357
- }
1358
- export interface BulkLabelAndUnlabelContactsResponse {
1359
- /**
1360
- * Bulk job ID.
1361
- * The job's status can be retrieved with Get Bulk Job.
1362
- * @format GUID
1363
- */
1364
- jobId?: string;
1365
- }
1366
- export interface BulkUpsertContactsRequest {
1367
- /**
1368
- * @minSize 1
1369
- * @maxSize 100
1370
- */
1371
- info?: ContactInfo[];
1372
- returnFullEntity?: boolean;
1373
- }
1374
- export interface BulkUpsertContactsResponse {
1375
- results?: Item[];
1376
- metadata?: BulkUpsertContactsResponseMetadata;
1377
- }
1378
- export declare enum Action {
1379
- UNKNOWN = "UNKNOWN",
1380
- UPDATED = "UPDATED",
1381
- CREATED = "CREATED"
1382
- }
1383
- /** @enumType */
1384
- export type ActionWithLiterals = Action | 'UNKNOWN' | 'UPDATED' | 'CREATED';
1385
- export interface Error {
1386
- /** Error code. */
1387
- code?: string;
1388
- /** Error details. */
1389
- message?: string | null;
1390
- }
1391
- export interface Metadata {
1392
- _id?: string | null;
1393
- originalIndex?: number;
1394
- action?: ActionWithLiterals;
1395
- success?: boolean;
1396
- error?: Error;
1397
- }
1398
- export interface Item {
1399
- contact?: Contact;
1400
- metadata?: Metadata;
1401
- }
1402
- export interface BulkUpsertContactsResponseMetadata {
1403
- totalSuccess?: number;
1404
- totalFailure?: number;
1405
- totalCreated?: number;
1406
- totalUpdated?: number;
1407
- }
1408
- export interface UpsertContactRequest {
1409
- info?: ContactInfo;
1410
- }
1411
- export interface UpsertContactResponse {
1412
- /** Upserted contact. */
1413
- contact?: Contact;
1414
- action?: UpsertContactResponseActionWithLiterals;
1415
- }
1416
- export declare enum UpsertContactResponseAction {
1417
- UNKNOWN = "UNKNOWN",
1418
- UPDATED = "UPDATED",
1419
- CREATED = "CREATED"
1420
- }
1421
- /** @enumType */
1422
- export type UpsertContactResponseActionWithLiterals = UpsertContactResponseAction | 'UNKNOWN' | 'UPDATED' | 'CREATED';
1423
- export interface GeneratePictureUploadUrlRequest {
1424
- /**
1425
- * ID of the contact whose picture is being updated.
1426
- * @format GUID
1427
- */
1428
- contactId?: string;
1429
- /**
1430
- * Mime Type. Must be one of:
1431
- * `image/png`, `image/jpeg`.
1432
- * Defaults to `image/png`.
1433
- */
1434
- mimeType?: string | null;
1435
- }
1436
- export interface GeneratePictureUploadUrlResponse {
1437
- /**
1438
- * URL to upload the image
1439
- * @format WEB_URL
1440
- */
1441
- uploadUrl?: string;
1442
- }
1443
- export interface GetContactRequest {
1444
- /**
1445
- * ID of the contact to retrieve.
1446
- * @format GUID
1447
- */
1448
- _id: string;
1449
- /**
1450
- * List of projected fields to return.
1451
- * If both `fields` and `fieldsets` are sent in the request,
1452
- * the union of both lists is returned.
1453
- * `id` and `revision` are always returned.
1454
- *
1455
- * Supported properties:
1456
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
1457
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
1458
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
1459
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
1460
- * @maxLength 100
1461
- * @maxSize 100
1462
- */
1463
- fields?: string[];
1464
- /**
1465
- * Predefined sets of fields to return.
1466
- * If both `fields` and `fieldsets` are sent in the request,
1467
- * the union of both lists is returned.
1468
- *
1469
- * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
1470
- * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
1471
- * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
1472
- * - `FULL`: Returns all fields.
1473
- *
1474
- * Default: If `fields` is omitted from the request, `FULL`.
1475
- * @maxSize 10
1476
- */
1477
- fieldsets?: ContactFieldSetWithLiterals[];
1478
- }
1479
- /** The requested contact. */
1480
- export interface GetContactResponse {
1481
- /** The requested contact. */
1482
- contact?: Contact;
1483
- /** Contact response type. */
1484
- responseType?: GetContactResponseTypeWithLiterals;
1485
- }
1486
- export declare enum GetContactResponseType {
1487
- /** The specified contact was returned. */
1488
- REGULAR = "REGULAR",
1489
- /** Not used. */
1490
- IMPLICIT = "IMPLICIT",
1491
- /** The specified contact was previously merged with another contact and the new contact was returned. */
1492
- MERGED = "MERGED"
1493
- }
1494
- /** @enumType */
1495
- export type GetContactResponseTypeWithLiterals = GetContactResponseType | 'REGULAR' | 'IMPLICIT' | 'MERGED';
1496
- export interface SyncSubmitContactRequest {
1497
- contactInfo?: ContactInfo;
1498
- activity?: ContactActivity;
1499
- passThroughData?: string | null;
1500
- /** @format GUID */
1501
- contactId?: string;
1502
- submitOperation?: SubmitOperationWithLiterals;
1503
- /** Need to resolve source in allocator, because of server sign */
1504
- sourceType?: ContactSourceTypeWithLiterals;
1505
- sourceId?: string | null;
1506
- hideFromContactList?: boolean;
1507
- }
1508
- export declare enum SubmitOperation {
1509
- UNKNOWN = "UNKNOWN",
1510
- CREATE = "CREATE",
1511
- UPDATE = "UPDATE"
1512
- }
1513
- /** @enumType */
1514
- export type SubmitOperationWithLiterals = SubmitOperation | 'UNKNOWN' | 'CREATE' | 'UPDATE';
1515
- export interface SyncSubmitContactResponse {
1516
- }
1517
- export interface CountContactsRequest {
1518
- }
1519
- export interface CountContactsResponse {
1520
- count?: number;
1521
- }
1522
- export interface SearchContactsRequest {
1523
- /** Search object. Encapsulates filter, sorting, paging and other details */
1524
- search?: Search;
1525
- }
1526
- export interface Search extends SearchPagingMethodOneOf {
1527
- /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */
1528
- cursorPaging?: CursorPaging;
1529
- /** 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) */
1530
- filter?: Record<string, any> | null;
1531
- /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
1532
- sort?: Sorting[];
1533
- /**
1534
- * List of projected fields to return.
1535
- *
1536
- * If used in the request,
1537
- * all the fields contained in `fields` and `fieldsets` are returned.
1538
- * If left blank, `fieldsets` is used to determine which fields to return.
1539
- *
1540
- * For a list of valid projected fields, see
1541
- * [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).
1542
- * @maxLength 100
1543
- * @maxSize 100
1544
- */
1545
- fields?: string[];
1546
- /**
1547
- * Predefined sets of fields to return.
1548
- *
1549
- * Defaults to `FULL`.
1550
- * Ignored if left empty when `fields` is used in the request.
1551
- *
1552
- * For more information,
1553
- * see [Contact Fieldsets](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_contact-fieldsets).
1554
- * @maxSize 10
1555
- */
1556
- fieldsets?: string[];
1557
- /** free text to match in searchable fields */
1558
- search?: SearchDetails;
1559
- }
1560
- /** @oneof */
1561
- export interface SearchPagingMethodOneOf {
1562
- /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */
1563
- cursorPaging?: CursorPaging;
1564
- }
1565
- export interface SearchDetails {
1566
- /** boolean search mode. Default is `OR` */
1567
- mode?: ModeWithLiterals;
1568
- /**
1569
- * search term or expression
1570
- * @maxLength 100
1571
- */
1572
- expression?: string | null;
1573
- /**
1574
- * fields to search in. if empty - server will search in own default fieldsDefault searchable fields:
1575
- *
1576
- * - `info.name.first`
1577
- * - `info.name.last`
1578
- * - `info.emails.email`
1579
- * - `info.phones.phone`
1580
- * @maxLength 100
1581
- * @maxSize 100
1582
- */
1583
- fields?: string[];
1584
- /** flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
1585
- fuzzy?: boolean;
1586
- }
1587
- export declare enum Mode {
1588
- /** any */
1589
- OR = "OR",
1590
- /** all */
1591
- AND = "AND"
1592
- }
1593
- /** @enumType */
1594
- export type ModeWithLiterals = Mode | 'OR' | 'AND';
1595
- export interface CursorPaging {
1596
- /**
1597
- * The number of contacts to load (default = 50, max = 1000)
1598
- * @max 1000
1599
- */
1600
- limit?: number | null;
1601
- /** Cursor returned in last query response. Should not be provided on first page request */
1602
- cursor?: string | null;
1603
- }
1604
- export interface SearchContactsResponse {
1605
- /** List of contacts. */
1606
- contacts?: Contact[];
1607
- /** Details on the paged set of results returned. */
1608
- cursorPagingMetadata?: CursorPagingMetadata;
1609
- }
1610
- /** This is the preferred message for cursor-paging enabled services */
1611
- export interface CursorPagingMetadata {
1612
- /** Number of items returned in the response. */
1613
- count?: number | null;
1614
- /** Cursor strings that point to the next page, previous page, or both. */
1615
- cursors?: Cursors;
1616
- /**
1617
- * Whether there are more pages to retrieve following the current page.
1618
- *
1619
- * + `true`: Another page of results can be retrieved.
1620
- * + `false`: This is the last page.
1621
- */
1622
- hasNext?: boolean | null;
1623
- }
1624
- export interface Cursors {
1625
- /** Cursor pointing to next result page */
1626
- next?: string | null;
1627
- /** Cursor pointing to previous result page */
1628
- prev?: string | null;
1629
- }
1630
- export interface BulkAddSegmentToContactsRequest {
1631
- /**
1632
- * Segment id
1633
- * @format GUID
1634
- */
1635
- segmentId?: string;
1636
- /**
1637
- * List of Contact ids
1638
- * @format GUID
1639
- * @minSize 1
1640
- * @maxSize 1000
1641
- */
1642
- contactIds?: string[];
1643
- /**
1644
- * List of existing segment ids
1645
- * @format GUID
1646
- * @maxSize 100
1647
- */
1648
- existsSegmentIds?: string[];
1649
- }
1650
- export interface BulkAddSegmentToContactsResponse {
1651
- /** List of action results */
1652
- results?: ItemMetadata[];
1653
- /** Metadata on the bulk action */
1654
- bulkActionMetadata?: BulkActionMetadata;
1655
- }
1656
- export interface ItemMetadata {
1657
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1658
- _id?: string | null;
1659
- /** Index of the item within the request array. Allows for correlation between request and response items. */
1660
- originalIndex?: number;
1661
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1662
- success?: boolean;
1663
- /** Details about the error in case of failure. */
1664
- error?: ApplicationError;
1665
- }
1666
- export interface ApplicationError {
1667
- /** Error code. */
1668
- code?: string;
1669
- /** Description of the error. */
1670
- description?: string;
1671
- /** Data related to the error. */
1672
- data?: Record<string, any> | null;
1673
- }
1674
- export interface BulkActionMetadata {
1675
- /** Number of items that were successfully processed. */
1676
- totalSuccesses?: number;
1677
- /** Number of items that couldn't be processed. */
1678
- totalFailures?: number;
1679
- /** Number of failures without details because detailed failure threshold was exceeded. */
1680
- undetailedFailures?: number;
1681
- }
1682
- export interface ContactAddedToSegment {
1683
- /** Id of the segment to which the contact was added */
1684
- segmentId?: string;
1685
- /** The contact that was added */
1686
- contact?: Contact;
1687
- }
1688
- export interface BulkRemoveSegmentFromContactsRequest {
1689
- /**
1690
- * Segment id
1691
- * @format GUID
1692
- */
1693
- segmentId?: string;
1694
- /**
1695
- * List of Contact ids
1696
- * @format GUID
1697
- * @minSize 1
1698
- * @maxSize 1000
1699
- */
1700
- contactIds?: string[];
1701
- }
1702
- export interface BulkRemoveSegmentFromContactsResponse {
1703
- /** List of action results */
1704
- results?: ItemMetadata[];
1705
- /** Metadata on the bulk action */
1706
- bulkActionMetadata?: BulkActionMetadata;
1707
- }
1708
- export interface ContactRemovedFromSegment {
1709
- /** Id of the segment from which the contact was removed */
1710
- segmentId?: string;
1711
- /** The contact that was removed */
1712
- contact?: Contact;
1713
- }
1714
- export interface ListContactIdsBySegmentRequest {
1715
- /**
1716
- * Segment id
1717
- * @format GUID
1718
- */
1719
- segmentId?: string;
1720
- /** Cursor paging. */
1721
- cursorPaging?: CursorPaging;
1722
- }
1723
- export interface ListContactIdsBySegmentResponse {
1724
- /**
1725
- * List of contact IDs
1726
- * @format GUID
1727
- * @maxSize 1000
1728
- */
1729
- contactIds?: string[];
1730
- /** Paging metadata */
1731
- cursorPagingMetadata?: CursorPagingMetadata;
1732
- }
1733
- export interface DomainEvent extends DomainEventBodyOneOf {
1734
- createdEvent?: EntityCreatedEvent;
1735
- updatedEvent?: EntityUpdatedEvent;
1736
- deletedEvent?: EntityDeletedEvent;
1737
- actionEvent?: ActionEvent;
1738
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1739
- _id?: string;
1740
- /**
1741
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1742
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1743
- */
1744
- entityFqdn?: string;
1745
- /**
1746
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
1747
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1748
- */
1749
- slug?: string;
1750
- /** ID of the entity associated with the event. */
1751
- entityId?: string;
1752
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1753
- eventTime?: Date | null;
1754
- /**
1755
- * Whether the event was triggered as a result of a privacy regulation application
1756
- * (for example, GDPR).
1757
- */
1758
- triggeredByAnonymizeRequest?: boolean | null;
1759
- /** If present, indicates the action that triggered the event. */
1760
- originatedFrom?: string | null;
1761
- /**
1762
- * 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.
1763
- * 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.
1764
- */
1765
- entityEventSequence?: string | null;
1766
- }
1767
- /** @oneof */
1768
- export interface DomainEventBodyOneOf {
1769
- createdEvent?: EntityCreatedEvent;
1770
- updatedEvent?: EntityUpdatedEvent;
1771
- deletedEvent?: EntityDeletedEvent;
1772
- actionEvent?: ActionEvent;
1773
- }
1774
- export interface EntityCreatedEvent {
1775
- entity?: string;
1776
- }
1777
- export interface RestoreInfo {
1778
- deletedDate?: Date | null;
1779
- }
1780
- export interface EntityUpdatedEvent {
1781
- /**
1782
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1783
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1784
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1785
- */
1786
- currentEntity?: string;
1787
- }
1788
- export interface EntityDeletedEvent {
1789
- /** Entity that was deleted. */
1790
- deletedEntity?: string | null;
1791
- }
1792
- export interface ActionEvent {
1793
- body?: string;
1794
- }
1795
- export interface MessageEnvelope {
1796
- /**
1797
- * App instance ID.
1798
- * @format GUID
1799
- */
1800
- instanceId?: string | null;
1801
- /**
1802
- * Event type.
1803
- * @maxLength 150
1804
- */
1805
- eventType?: string;
1806
- /** The identification type and identity data. */
1807
- identity?: IdentificationData;
1808
- /** Stringify payload. */
1809
- data?: string;
1810
- }
1811
- export interface IdentificationData extends IdentificationDataIdOneOf {
1812
- /**
1813
- * ID of a site visitor that has not logged in to the site.
1814
- * @format GUID
1815
- */
1816
- anonymousVisitorId?: string;
1817
- /**
1818
- * ID of a site visitor that has logged in to the site.
1819
- * @format GUID
1820
- */
1821
- memberId?: string;
1822
- /**
1823
- * ID of a Wix user (site owner, contributor, etc.).
1824
- * @format GUID
1825
- */
1826
- wixUserId?: string;
1827
- /**
1828
- * ID of an app.
1829
- * @format GUID
1830
- */
1831
- appId?: string;
1832
- /** @readonly */
1833
- identityType?: WebhookIdentityTypeWithLiterals;
1834
- }
1835
- /** @oneof */
1836
- export interface IdentificationDataIdOneOf {
1837
- /**
1838
- * ID of a site visitor that has not logged in to the site.
1839
- * @format GUID
1840
- */
1841
- anonymousVisitorId?: string;
1842
- /**
1843
- * ID of a site visitor that has logged in to the site.
1844
- * @format GUID
1845
- */
1846
- memberId?: string;
1847
- /**
1848
- * ID of a Wix user (site owner, contributor, etc.).
1849
- * @format GUID
1850
- */
1851
- wixUserId?: string;
1852
- /**
1853
- * ID of an app.
1854
- * @format GUID
1855
- */
1856
- appId?: string;
1857
- }
1858
- export declare enum WebhookIdentityType {
1859
- UNKNOWN = "UNKNOWN",
1860
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1861
- MEMBER = "MEMBER",
1862
- WIX_USER = "WIX_USER",
1863
- APP = "APP"
1864
- }
1865
- /** @enumType */
1866
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1867
- export interface BaseEventMetadata {
1868
- /**
1869
- * App instance ID.
1870
- * @format GUID
1871
- */
1872
- instanceId?: string | null;
1873
- /**
1874
- * Event type.
1875
- * @maxLength 150
1876
- */
1877
- eventType?: string;
1878
- /** The identification type and identity data. */
1879
- identity?: IdentificationData;
1880
- }
1881
- export interface EventMetadata extends BaseEventMetadata {
1882
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1883
- _id?: string;
1884
- /**
1885
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1886
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1887
- */
1888
- entityFqdn?: string;
1889
- /**
1890
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
1891
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1892
- */
1893
- slug?: string;
1894
- /** ID of the entity associated with the event. */
1895
- entityId?: string;
1896
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1897
- eventTime?: Date | null;
1898
- /**
1899
- * Whether the event was triggered as a result of a privacy regulation application
1900
- * (for example, GDPR).
1901
- */
1902
- triggeredByAnonymizeRequest?: boolean | null;
1903
- /** If present, indicates the action that triggered the event. */
1904
- originatedFrom?: string | null;
1905
- /**
1906
- * 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.
1907
- * 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.
1908
- */
1909
- entityEventSequence?: string | null;
1910
- }
1911
- export interface ContactCreatedEnvelope {
1912
- entity: Contact;
1913
- metadata: EventMetadata;
1914
- }
1915
- /**
1916
- * Triggered when a contact is created.
1917
- * @permissionScope Manage Stores
1918
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1919
- * @permissionScope Manage Events
1920
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1921
- * @permissionScope Manage Challenges
1922
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1923
- * @permissionScope Read Contacts
1924
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
1925
- * @permissionScope Read Members and Contacts - all read permissions
1926
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
1927
- * @permissionScope Manage Contacts
1928
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
1929
- * @permissionScope Set Up Automations
1930
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1931
- * @permissionScope Manage Members and Contacts - all permissions
1932
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
1933
- * @permissionId CONTACTS.VIEW
1934
- * @webhook
1935
- * @eventType wix.contacts.v4.contact_created
1936
- * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4
1937
- * @slug created
1938
- */
1939
- export declare function onContactCreated(handler: (event: ContactCreatedEnvelope) => void | Promise<void>): void;
1940
- export interface ContactDeletedEnvelope {
1941
- metadata: EventMetadata;
1942
- }
1943
- /**
1944
- * Triggered when a contact is deleted.
1945
- *
1946
- * If a contact is deleted as part of a merge, the `originatedFrom` property is sent as `merge`.
1947
- * Otherwise, `originatedFrom` isn't returned.
1948
- * @permissionScope Manage Stores
1949
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1950
- * @permissionScope Manage Events
1951
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1952
- * @permissionScope Manage Challenges
1953
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1954
- * @permissionScope Read Contacts
1955
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
1956
- * @permissionScope Read Members and Contacts - all read permissions
1957
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
1958
- * @permissionScope Manage Contacts
1959
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
1960
- * @permissionScope Set Up Automations
1961
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1962
- * @permissionScope Manage Members and Contacts - all permissions
1963
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
1964
- * @permissionId CONTACTS.VIEW
1965
- * @webhook
1966
- * @eventType wix.contacts.v4.contact_deleted
1967
- * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4
1968
- * @slug deleted
1969
- */
1970
- export declare function onContactDeleted(handler: (event: ContactDeletedEnvelope) => void | Promise<void>): void;
1971
- export interface ContactMergedEnvelope {
1972
- data: ContactMerged;
1973
- metadata: EventMetadata;
1974
- }
1975
- /**
1976
- * Triggered when one or more source contacts are merged into a target contact.
1977
- * @permissionScope Manage Stores
1978
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1979
- * @permissionScope Manage Events
1980
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1981
- * @permissionScope Manage Challenges
1982
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1983
- * @permissionScope Read Contacts
1984
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
1985
- * @permissionScope Read Members and Contacts - all read permissions
1986
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
1987
- * @permissionScope Manage Contacts
1988
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
1989
- * @permissionScope Set Up Automations
1990
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1991
- * @permissionScope Manage Members and Contacts - all permissions
1992
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
1993
- * @permissionId CONTACTS.VIEW
1994
- * @webhook
1995
- * @eventType wix.contacts.v4.contact_merged
1996
- * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4
1997
- * @slug merged
1998
- */
1999
- export declare function onContactMerged(handler: (event: ContactMergedEnvelope) => void | Promise<void>): void;
2000
- export interface ContactUpdatedEnvelope {
2001
- entity: Contact;
2002
- metadata: EventMetadata;
2003
- }
2004
- /**
2005
- * Triggered when a contact is updated.
2006
- * @permissionScope Manage Stores
2007
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2008
- * @permissionScope Manage Events
2009
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2010
- * @permissionScope Manage Challenges
2011
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2012
- * @permissionScope Read Contacts
2013
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
2014
- * @permissionScope Read Members and Contacts - all read permissions
2015
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
2016
- * @permissionScope Manage Contacts
2017
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2018
- * @permissionScope Set Up Automations
2019
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2020
- * @permissionScope Manage Members and Contacts - all permissions
2021
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2022
- * @permissionId CONTACTS.VIEW
2023
- * @webhook
2024
- * @eventType wix.contacts.v4.contact_updated
2025
- * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4
2026
- * @slug updated
2027
- */
2028
- export declare function onContactUpdated(handler: (event: ContactUpdatedEnvelope) => void | Promise<void>): void;
2029
- type ContactNonNullablePaths = `_id` | `revision` | `source.sourceType` | `lastActivity.activityType` | `info.emails.items` | `info.emails.items.${number}.tag` | `info.emails.items.${number}.email` | `info.phones.items` | `info.phones.items.${number}.tag` | `info.phones.items.${number}.phone` | `info.addresses.items` | `info.addresses.items.${number}.tag` | `info.addresses.items.${number}.address.streetAddress.number` | `info.addresses.items.${number}.address.streetAddress.name` | `info.labelKeys.items` | `primaryEmail.subscriptionStatus` | `primaryEmail.deliverabilityStatus` | `primaryPhone.subscriptionStatus`;
2030
- /**
2031
- * Creates a new contact.
2032
- *
2033
- * The `info` object must include at least one of the following:
2034
- * - Name
2035
- * - Phone number
2036
- * - Email address
2037
- *
2038
- * By default, if the call contains an email already in use by another contact,
2039
- * the new contact won't be created. To override this behavior, set `allowDuplicates` to `true`.
2040
- * @param info - Contact info.
2041
- * @public
2042
- * @requiredField info
2043
- * @param options - Create contact options.
2044
- * @permissionId CONTACTS.MODIFY
2045
- * @permissionScope Manage Stores
2046
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2047
- * @permissionScope Manage Contacts
2048
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2049
- * @permissionScope Manage Members and Contacts - all permissions
2050
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2051
- * @applicableIdentity APP
2052
- * @returns Contact.
2053
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.CreateContact
2054
- */
2055
- export declare function createContact(info: ContactInfo, options?: CreateContactOptions): Promise<NonNullablePaths<CreateContactResponse, {
2056
- [P in ContactNonNullablePaths]: `contact.${P}`;
2057
- }[ContactNonNullablePaths]>>;
2058
- export interface CreateContactOptions {
2059
- /**
2060
- * Controls whether the call will succeed
2061
- * if the new contact information contains an email or a phone number already used by another contact.
2062
- *
2063
- * If set to `true`,
2064
- * the call will succeed even if an email address or phone number is used by another contact.
2065
- * If set to `false`,
2066
- * the call will fail if the given email address is used by another contact or,
2067
- * if the email address is not given and the given phone number is used by another contact.
2068
- *
2069
- * Default: `false`
2070
- */
2071
- allowDuplicates?: boolean;
2072
- }
2073
- /**
2074
- * Updates a contact.
2075
- *
2076
- * Each time the contact is updated,
2077
- * `revision` increments by 1.
2078
- * The existing `revision` must be included when updating the contact.
2079
- * This ensures you're working with the latest contact information,
2080
- * and it prevents unintended overwrites.
2081
- *
2082
- * You can't call Update Contact to update the `primaryEmail` of a contact who is also a member.
2083
- * Instead, use the Members API to update the member's login email, which will also update the contact's primary email.
2084
- *
2085
- * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers. Make sure to specify the contact ID when calling Update Contact.
2086
- * @param contactId - ID of the contact to update.
2087
- * @param info - Contact info.
2088
- * @param revision - Revision number.
2089
- * When updating, include the existing `revision`
2090
- * to prevent conflicting updates.
2091
- * @public
2092
- * @requiredField contactId
2093
- * @requiredField info
2094
- * @requiredField revision
2095
- * @param options - Contact update options.
2096
- * @permissionId CONTACTS.MODIFY
2097
- * @permissionId CONTACTS.MODIFY_MEMBERSHIP_STATUS
2098
- * @permissionId CONTACTS.MODIFY_MEMBER_PRIMARY_EMAIL_PERMISSION
2099
- * @permissionScope Manage Stores
2100
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2101
- * @permissionScope Manage Contacts
2102
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2103
- * @permissionScope Manage Members and Contacts - all permissions
2104
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2105
- * @applicableIdentity APP
2106
- * @returns Updated contact.
2107
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.UpdateContact
2108
- */
2109
- export declare function updateContact(contactId: string, info: ContactInfo, revision: number, options?: UpdateContactOptions): Promise<NonNullablePaths<UpdateContactResponse, {
2110
- [P in ContactNonNullablePaths]: `contact.${P}`;
2111
- }[ContactNonNullablePaths]>>;
2112
- export interface UpdateContactOptions {
2113
- /**
2114
- * Controls whether the call will succeed
2115
- * if the new contact information contains an email or a phone number already used by another contact.
2116
- *
2117
- * If set to `true`,
2118
- * the call will succeed even if an email address or phone number is used by another contact.
2119
- * If set to `false`,
2120
- * the call will fail if the given email address is used by another contact or,
2121
- * if the email address is not given and the given phone number is used by another contact.
2122
- *
2123
- * Default: `false`
2124
- */
2125
- allowDuplicates?: boolean;
2126
- }
2127
- /**
2128
- * Merges source contacts into a target contact.
2129
- *
2130
- * Merging contacts has the following effects on the target contact:
2131
- *
2132
- * - No target contact data is overwritten or deleted.
2133
- * - Arrays (emails, phone numbers, addresses, and labels) from the source contacts are added to the target contact's arrays.
2134
- * - If you merge more than one source contact, the 1st source contact specified is added first, then the 2nd, and so on.
2135
- * - If there is duplicate information between the target contact and the source contact, the information isn't duplicated in the target contact's arrays.
2136
- *
2137
- * <blockquote class="important">
2138
- *
2139
- * __Important:__
2140
- * Merges cannot be undone.
2141
- * In REST, call Preview Merge Contacts to test before merging.
2142
- *
2143
- * </blockquote>
2144
- *
2145
- * When you merge contacts, source contacts are typically deleted.
2146
- * However, if a source contact is a site member or a Wix user,
2147
- * the merge will fail because site members and Wix users can't be deleted.
2148
- * This means that site members and Wix users can only be specified as target contacts in a merge.
2149
- *
2150
- * After merging, calling Get Contact with a deleted source contact ID returns the target contact ID.
2151
- * Specifying a deleted source contact ID is not supported on any other method.
2152
- *
2153
- * When contacts are merged:
2154
- *
2155
- * - The Contact Merged event is triggered.
2156
- * - The Contact Updated event is triggered for the target contact. `originatedFrom` is set to `merge`.
2157
- * - The Contact Deleted event is triggered for each source contact. `originatedFrom` is set to `merge`.
2158
- * @param targetContactId - Target contact ID.
2159
- * @param targetContactRevision - Target contact revision number, which increments by 1 each time the contact is updated.
2160
- * To prevent conflicting changes,
2161
- * the target contact's current `revision` must be specified.
2162
- * @public
2163
- * @requiredField targetContactId
2164
- * @requiredField targetContactRevision
2165
- * @param options - Merge contacts options.
2166
- * @permissionId CONTACTS.MERGE
2167
- * @permissionScope Manage Stores
2168
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2169
- * @permissionScope Manage Contacts
2170
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2171
- * @permissionScope Manage Members and Contacts - all permissions
2172
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2173
- * @applicableIdentity APP
2174
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.MergeContacts
2175
- */
2176
- export declare function mergeContacts(targetContactId: string, targetContactRevision: number, options?: MergeContactsOptions): Promise<NonNullablePaths<MergeContactsResponse, {
2177
- [P in ContactNonNullablePaths]: `contact.${P}`;
2178
- }[ContactNonNullablePaths]>>;
2179
- export interface MergeContactsOptions {
2180
- /**
2181
- * IDs of up to 5 contacts to merge into the target contact.
2182
- * When you merge more than one source contact,
2183
- * the first source is given precedence, then the second, and so on.
2184
- * @minSize 1
2185
- * @maxSize 5
2186
- */
2187
- sourceContactIds?: string[];
2188
- }
2189
- /**
2190
- * Deletes a contact.
2191
- *
2192
- * Deleting a contact permanently removes it from the contact list.
2193
- * If a contact is also a site member or Wix user, or has a valid billing subscription,
2194
- * the contact can't be deleted. The related site member or Wix user must first be deleted
2195
- * and any valid billing subscriptions must be canceled, before the contact can be deleted.
2196
- *
2197
- * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.
2198
- * Make sure to specify the contact ID when calling Delete Contact.
2199
- * @param contactId - ID of the contact to delete.
2200
- * @public
2201
- * @requiredField contactId
2202
- * @permissionId CONTACTS.MODIFY
2203
- * @permissionId MEMBERS.MEMBER_DELETE
2204
- * @permissionScope Manage Stores
2205
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2206
- * @permissionScope Manage Contacts
2207
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2208
- * @permissionScope Manage Members and Contacts - all permissions
2209
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2210
- * @permissionScope Manage Members
2211
- * @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-MEMBERS
2212
- * @applicableIdentity APP
2213
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.DeleteContact
2214
- */
2215
- export declare function deleteContact(contactId: string): Promise<void>;
2216
- /**
2217
- * Adds labels to a contact.
2218
- *
2219
- * Use the Labels API to create or retrieve labels.
2220
- *
2221
- * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.
2222
- * Make sure to specify the contact ID when calling Label Contact.
2223
- * @param contactId - ID of the contact to add labels to.
2224
- * @param labelKeys - List of label keys to add to the contact.
2225
- *
2226
- * Label keys must exist to be added to the contact.
2227
- * Use the Labels API to create or retrieve labels.
2228
- * @public
2229
- * @requiredField contactId
2230
- * @requiredField labelKeys
2231
- * @permissionId CONTACTS.MODIFY
2232
- * @permissionScope Manage Stores
2233
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2234
- * @permissionScope Manage Contacts
2235
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2236
- * @permissionScope Manage Members and Contacts - all permissions
2237
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2238
- * @applicableIdentity APP
2239
- * @returns Updated contact.
2240
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.LabelContact
2241
- */
2242
- export declare function labelContact(contactId: string, labelKeys: string[]): Promise<NonNullablePaths<LabelContactResponse, {
2243
- [P in ContactNonNullablePaths]: `contact.${P}`;
2244
- }[ContactNonNullablePaths]>>;
2245
- /**
2246
- * Removes labels from a contact.
2247
- *
2248
- * If a label is no longer needed
2249
- * and you want to remove it from all contacts,
2250
- * you can delete by calling Delete Label from the Labels API.
2251
- *
2252
- * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.
2253
- * Make sure to specify the contact ID when calling Unlabel Contact.
2254
- * @param contactId - ID of the contact to remove labels from.
2255
- * @param labelKeys - List of label keys to remove from the contact.
2256
- * @public
2257
- * @requiredField contactId
2258
- * @requiredField labelKeys
2259
- * @permissionId CONTACTS.MODIFY
2260
- * @permissionScope Manage Stores
2261
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2262
- * @permissionScope Manage Contacts
2263
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2264
- * @permissionScope Manage Members and Contacts - all permissions
2265
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2266
- * @applicableIdentity APP
2267
- * @returns Updated contact.
2268
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.UnlabelContact
2269
- */
2270
- export declare function unlabelContact(contactId: string, labelKeys: string[]): Promise<NonNullablePaths<UnlabelContactResponse, {
2271
- [P in ContactNonNullablePaths]: `contact.${P}`;
2272
- }[ContactNonNullablePaths]>>;
2273
- /**
2274
- * Creates a query to retrieve a list of contacts.
2275
- *
2276
- * The `queryContacts()` function builds a query to retrieve a list of contacts and returns a `ContactsQueryBuilder` object.
2277
- *
2278
- * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
2279
- *
2280
- * You can refine the query by chaining `ContactsQueryBuilder` functions onto the query. `ContactsQueryBuilder` functions enable you to sort, filter, and control the results `queryContacts()` returns.
2281
- *
2282
- * `queryContacts()` runs with these `ContactsQueryBuilder` defaults, which you can override:
2283
- *
2284
- * - `skip(0)`
2285
- * - `limit(50)`
2286
- * - `descending("_createdDate")`
2287
- *
2288
- * The functions that are chained to `queryContacts()` are applied in the order they are called. For example, if you apply `ascending('info.company')` and then `descending('info.name.last')`, the results are sorted first by the company name, and then, if there are multiple results with the same company, the items are sorted by last name.
2289
- * @public
2290
- * @param options - Query contact options.
2291
- * @permissionScope Manage Stores
2292
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2293
- * @permissionScope Manage Events
2294
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2295
- * @permissionScope Manage Challenges
2296
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2297
- * @permissionScope Read Contacts
2298
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
2299
- * @permissionScope Read Members and Contacts - all read permissions
2300
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
2301
- * @permissionScope Manage Contacts
2302
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2303
- * @permissionScope Set Up Automations
2304
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2305
- * @permissionScope Manage Members and Contacts - all permissions
2306
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2307
- * @permissionId CONTACTS.VIEW
2308
- * @applicableIdentity APP
2309
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts
2310
- */
2311
- export declare function queryContacts(options?: QueryContactsOptions): ContactsQueryBuilder;
2312
- export interface QueryContactsOptions {
2313
- /**
2314
- * @internal
2315
- * @maxLength 100
2316
- */
2317
- search?: string | null | undefined;
2318
- }
2319
- interface QueryOffsetResult {
2320
- currentPage: number | undefined;
2321
- totalPages: number | undefined;
2322
- totalCount: number | undefined;
2323
- hasNext: () => boolean;
2324
- hasPrev: () => boolean;
2325
- length: number;
2326
- pageSize: number;
2327
- }
2328
- export interface ContactsQueryResult extends QueryOffsetResult {
2329
- items: Contact[];
2330
- query: ContactsQueryBuilder;
2331
- next: () => Promise<ContactsQueryResult>;
2332
- prev: () => Promise<ContactsQueryResult>;
2333
- }
2334
- export interface ContactsQueryBuilder {
2335
- /** @param propertyName - Property whose value is compared with `value`.
2336
- * @param value - Value to compare against.
2337
- */
2338
- eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'lastActivity.activityDate' | 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.birthdate' | 'info.locale', value: any) => ContactsQueryBuilder;
2339
- /** @param propertyName - Property whose value is compared with `value`.
2340
- * @param value - Value to compare against.
2341
- */
2342
- ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'lastActivity.activityDate' | 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.birthdate' | 'info.locale', value: any) => ContactsQueryBuilder;
2343
- /** @param propertyName - Property whose value is compared with `value`.
2344
- * @param value - Value to compare against.
2345
- */
2346
- ge: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate', value: any) => ContactsQueryBuilder;
2347
- /** @param propertyName - Property whose value is compared with `value`.
2348
- * @param value - Value to compare against.
2349
- */
2350
- gt: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate', value: any) => ContactsQueryBuilder;
2351
- /** @param propertyName - Property whose value is compared with `value`.
2352
- * @param value - Value to compare against.
2353
- */
2354
- le: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate', value: any) => ContactsQueryBuilder;
2355
- /** @param propertyName - Property whose value is compared with `value`.
2356
- * @param value - Value to compare against.
2357
- */
2358
- lt: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate', value: any) => ContactsQueryBuilder;
2359
- /** @param propertyName - Property whose value is compared with `string`.
2360
- * @param string - String to compare against. Case-insensitive.
2361
- */
2362
- startsWith: (propertyName: 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle', value: string) => ContactsQueryBuilder;
2363
- in: (propertyName: '_id' | 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.locale', value: any) => ContactsQueryBuilder;
2364
- exists: (propertyName: '_id' | 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.locale', value: boolean) => ContactsQueryBuilder;
2365
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
2366
- ascending: (...propertyNames: Array<'_createdDate' | 'lastActivity.activityDate' | 'primaryInfo.email' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.birthdate'>) => ContactsQueryBuilder;
2367
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
2368
- descending: (...propertyNames: Array<'_createdDate' | 'lastActivity.activityDate' | 'primaryInfo.email' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.birthdate'>) => ContactsQueryBuilder;
2369
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
2370
- limit: (limit: number) => ContactsQueryBuilder;
2371
- /** @param skip - Number of items to skip in the query results before returning the results. */
2372
- skip: (skip: number) => ContactsQueryBuilder;
2373
- find: () => Promise<ContactsQueryResult>;
2374
- }
2375
- /**
2376
- * Retrieves a contact.
2377
- *
2378
- * #### Getting Merged Contacts
2379
- *
2380
- * When a source contact is merged
2381
- * with a target contact, the source contact is deleted.
2382
- * When calling Get Contact for a merged contact,
2383
- * you can use the source or target contact ID.
2384
- * In both bases, the target contact is returned.
2385
- *
2386
- * This is supported only when calling Get Contact on merged contacts.
2387
- * Previously deleted source contact IDs can't be used for any other method.
2388
- * @param _id - ID of the contact to retrieve.
2389
- * @public
2390
- * @requiredField _id
2391
- * @param options - Get contact options.
2392
- * @permissionId CONTACTS.VIEW
2393
- * @permissionScope Manage Stores
2394
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2395
- * @permissionScope Manage Events
2396
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2397
- * @permissionScope Manage Challenges
2398
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2399
- * @permissionScope Read Contacts
2400
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
2401
- * @permissionScope Read Members and Contacts - all read permissions
2402
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
2403
- * @permissionScope Manage Contacts
2404
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2405
- * @permissionScope Set Up Automations
2406
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2407
- * @permissionScope Manage Members and Contacts - all permissions
2408
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2409
- * @applicableIdentity APP
2410
- * @returns The requested contact.
2411
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.GetContact
2412
- */
2413
- export declare function getContact(_id: string, options?: GetContactOptions): Promise<NonNullablePaths<Contact, ContactNonNullablePaths>>;
2414
- export interface GetContactOptions {
2415
- /**
2416
- * List of projected fields to return.
2417
- * If both `fields` and `fieldsets` are sent in the request,
2418
- * the union of both lists is returned.
2419
- * `id` and `revision` are always returned.
2420
- *
2421
- * Supported properties:
2422
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
2423
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
2424
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
2425
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
2426
- * @maxLength 100
2427
- * @maxSize 100
2428
- */
2429
- fields?: string[];
2430
- /**
2431
- * Predefined sets of fields to return.
2432
- * If both `fields` and `fieldsets` are sent in the request,
2433
- * the union of both lists is returned.
2434
- *
2435
- * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
2436
- * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
2437
- * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
2438
- * - `FULL`: Returns all fields.
2439
- *
2440
- * Default: If `fields` is omitted from the request, `FULL`.
2441
- * @maxSize 10
2442
- */
2443
- fieldsets?: ContactFieldSetWithLiterals[];
2444
- }
2445
- export {};