@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,2434 +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
- /** Query options. */
1112
- query?: Query;
1113
- }
1114
- export interface Query {
1115
- /**
1116
- * Filter object.
1117
- * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
1118
- * for more information.
1119
- *
1120
- * For a detailed list of supported filters, see
1121
- * [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters).
1122
- */
1123
- filter?: Record<string, any> | null;
1124
- /**
1125
- * Sorting options.
1126
- * See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)
1127
- * for more information.
1128
- *
1129
- * Max: 1 sort object
1130
- * @maxSize 1
1131
- */
1132
- sort?: Sorting[];
1133
- /** Pagination options. */
1134
- paging?: Paging;
1135
- /**
1136
- * List of projected fields to return.
1137
- * If both `fields` and `fieldsets` are sent in the request,
1138
- * the union of both lists is returned.
1139
- * `id` and `revision` are always returned.
1140
- *
1141
- * Supported properties:
1142
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
1143
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
1144
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
1145
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
1146
- * @maxLength 100
1147
- * @maxSize 100
1148
- */
1149
- fields?: string[];
1150
- /**
1151
- * Predefined sets of fields to return.
1152
- * If both `fields` and `fieldsets` are sent in the request,
1153
- * the union of both lists is returned.
1154
- *
1155
- * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
1156
- * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
1157
- * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
1158
- * - `FULL`: Returns all fields.
1159
- *
1160
- * Default: If `fields` is omitted from the request, `FULL`.
1161
- * @maxSize 10
1162
- */
1163
- fieldsets?: ContactFieldSetWithLiterals[];
1164
- }
1165
- /** List of contacts. */
1166
- export interface QueryContactsResponse {
1167
- /** List of contacts. */
1168
- contacts?: Contact[];
1169
- /** Details on the paged set of results returned. */
1170
- pagingMetadata?: PagingMetadata;
1171
- }
1172
- export interface ListFacetsRequest {
1173
- /** Pagination options. */
1174
- paging?: Paging;
1175
- /**
1176
- * Language for localization.
1177
- * @format LANGUAGE
1178
- */
1179
- language?: string | null;
1180
- }
1181
- export interface ListFacetsResponse {
1182
- /** List of facets. */
1183
- facets?: ContactsFacet[];
1184
- /** Details on the paged set of results returned. */
1185
- pagingMetadata?: PagingMetadata;
1186
- }
1187
- export interface ContactsFacet {
1188
- /** Type of facet. */
1189
- facetType?: ContactsFacetTypeWithLiterals;
1190
- /**
1191
- * Scope for facet keys.
1192
- * When a facet key exists in a namespace,
1193
- * each key is unique within that namespace.
1194
- *
1195
- * Currently, facets not created by Wix are in the `custom` namespace.
1196
- */
1197
- namespace?: string | null;
1198
- /** Human-readable display name. */
1199
- namespaceDisplayName?: string | null;
1200
- /** Facet key, automatically generated. */
1201
- facetKey?: string | null;
1202
- /** Human-readable name. Shown in the Wix UI. */
1203
- facetDisplayName?: string | null;
1204
- /** Number of contacts the facet applies to. */
1205
- count?: number | null;
1206
- /** Filter used to query contacts of this facet. */
1207
- queryFilter?: Record<string, any> | null;
1208
- }
1209
- export declare enum ContactsFacetType {
1210
- UNKNOWN = "UNKNOWN",
1211
- ALL_CONTACTS = "ALL_CONTACTS",
1212
- NOT_LABELED = "NOT_LABELED",
1213
- LABEL = "LABEL",
1214
- SUBSCRIPTION_STATUS = "SUBSCRIPTION_STATUS",
1215
- MEMBERSHIP_STATUS = "MEMBERSHIP_STATUS"
1216
- }
1217
- /** @enumType */
1218
- export type ContactsFacetTypeWithLiterals = ContactsFacetType | 'UNKNOWN' | 'ALL_CONTACTS' | 'NOT_LABELED' | 'LABEL' | 'SUBSCRIPTION_STATUS' | 'MEMBERSHIP_STATUS';
1219
- export interface QueryFacetsRequest {
1220
- /** Pagination options. */
1221
- paging?: Paging;
1222
- /**
1223
- * Language for localization.
1224
- * @format LANGUAGE
1225
- */
1226
- language?: string | null;
1227
- /**
1228
- * Filterable fields:
1229
- * - `'info.extendedFields.emailSubscriptions.effectiveEmail'` (`$exists`).
1230
- * - `'info.extendedFields.emailSubscriptions.subscriptionStatus'` (`$eq`, `$ne`, `$in`, `$nin`).
1231
- * - `'info.extendedFields.emailSubscriptions.deliverabilityStatus'` (`$eq`, `$ne`, `$in`, `$nin`).
1232
- */
1233
- filter?: Record<string, any> | null;
1234
- }
1235
- export interface QueryFacetsResponse {
1236
- /** List of facets. */
1237
- facets?: ContactsFacet[];
1238
- /** Details on the paged set of results returned. */
1239
- pagingMetadata?: PagingMetadata;
1240
- }
1241
- export interface BulkDeleteContactsRequest {
1242
- /**
1243
- * Filter object.
1244
- *
1245
- * Possible filters:
1246
- * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
1247
- *
1248
- * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1249
- * for a detailed list of supported filters for contact properties, extended fields, and custom fields.
1250
- *
1251
- *
1252
- * Example:
1253
- * `{ "filter": { "info.name.last": "Smith" } }`
1254
- */
1255
- filter?: Record<string, any> | null;
1256
- /**
1257
- * Plain text search for an exact match, up to 100 characters.
1258
- *
1259
- * Searchable fields:
1260
- *
1261
- * - `info.name.first`
1262
- * - `info.name.last`
1263
- * - `info.emails.email`
1264
- * - `info.phones.phone`
1265
- * @maxLength 100
1266
- */
1267
- search?: string | null;
1268
- }
1269
- export interface BulkDeleteContactsResponse {
1270
- /**
1271
- * Bulk job ID.
1272
- * The job's status can be retrieved with Get Bulk Job.
1273
- * @format GUID
1274
- */
1275
- jobId?: string;
1276
- }
1277
- export interface BulkUpdateContactsRequest {
1278
- /**
1279
- * Filter object.
1280
- *
1281
- * Possible filters:
1282
- * `$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
1283
- *
1284
- * See [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1285
- * for a detailed list of supported filters for contact properties, extended fields, and custom fields.
1286
- *
1287
- *
1288
- * Example:
1289
- * `{ "filter": { "info.name.last": "Smith" } }`
1290
- */
1291
- filter?: Record<string, any> | null;
1292
- /**
1293
- * Plain text search for an exact match, up to 100 characters.
1294
- *
1295
- * Searchable fields:
1296
- *
1297
- * - `info.name.first`
1298
- * - `info.name.last`
1299
- * - `info.emails.email`
1300
- * - `info.phones.phone`
1301
- * @maxLength 100
1302
- */
1303
- search?: string | null;
1304
- /** Contact info. */
1305
- info?: ContactInfo;
1306
- }
1307
- export interface BulkUpdateContactsResponse {
1308
- /**
1309
- * Bulk job ID.
1310
- * The job's status can be retrieved with Get Bulk Job.
1311
- * @format GUID
1312
- */
1313
- jobId?: string;
1314
- }
1315
- export interface BulkLabelAndUnlabelContactsRequest {
1316
- /**
1317
- * Filter options.
1318
- * Labels will be removed from contacts that meet the `filter` and `search` criteria.
1319
- *
1320
- * See
1321
- * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1322
- * for a list of supported filters and fields.
1323
- */
1324
- filter?: Record<string, any> | null;
1325
- /**
1326
- * Plain text search for an exact match, up to 100 characters.
1327
- * Labels will be removed from contacts that meet the `filter` and `search` criteria.
1328
- *
1329
- * See
1330
- * [Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)
1331
- * for a list of searchable fields.
1332
- * @maxLength 100
1333
- */
1334
- search?: string | null;
1335
- /**
1336
- * List of label keys to add to the contacts.
1337
- *
1338
- * Label keys must exist to be added to the contact.
1339
- * Contact labels can be created or retrieved with
1340
- * [Find or Create Label](https://dev.wix.com/api/rest/contacts/labels/find-or-create-label)
1341
- * or
1342
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels)
1343
- * @maxSize 100
1344
- */
1345
- labelKeysToAdd?: string[];
1346
- /**
1347
- * List of label keys to remove from the contacts.
1348
- * @maxSize 100
1349
- */
1350
- labelKeysToRemove?: string[];
1351
- }
1352
- export interface BulkLabelAndUnlabelContactsResponse {
1353
- /**
1354
- * Bulk job ID.
1355
- * The job's status can be retrieved with Get Bulk Job.
1356
- * @format GUID
1357
- */
1358
- jobId?: string;
1359
- }
1360
- export interface BulkUpsertContactsRequest {
1361
- /**
1362
- * @minSize 1
1363
- * @maxSize 100
1364
- */
1365
- info?: ContactInfo[];
1366
- returnFullEntity?: boolean;
1367
- }
1368
- export interface BulkUpsertContactsResponse {
1369
- results?: Item[];
1370
- metadata?: BulkUpsertContactsResponseMetadata;
1371
- }
1372
- export declare enum Action {
1373
- UNKNOWN = "UNKNOWN",
1374
- UPDATED = "UPDATED",
1375
- CREATED = "CREATED"
1376
- }
1377
- /** @enumType */
1378
- export type ActionWithLiterals = Action | 'UNKNOWN' | 'UPDATED' | 'CREATED';
1379
- export interface Error {
1380
- /** Error code. */
1381
- code?: string;
1382
- /** Error details. */
1383
- message?: string | null;
1384
- }
1385
- export interface Metadata {
1386
- _id?: string | null;
1387
- originalIndex?: number;
1388
- action?: ActionWithLiterals;
1389
- success?: boolean;
1390
- error?: Error;
1391
- }
1392
- export interface Item {
1393
- contact?: Contact;
1394
- metadata?: Metadata;
1395
- }
1396
- export interface BulkUpsertContactsResponseMetadata {
1397
- totalSuccess?: number;
1398
- totalFailure?: number;
1399
- totalCreated?: number;
1400
- totalUpdated?: number;
1401
- }
1402
- export interface UpsertContactRequest {
1403
- info?: ContactInfo;
1404
- }
1405
- export interface UpsertContactResponse {
1406
- /** Upserted contact. */
1407
- contact?: Contact;
1408
- action?: UpsertContactResponseActionWithLiterals;
1409
- }
1410
- export declare enum UpsertContactResponseAction {
1411
- UNKNOWN = "UNKNOWN",
1412
- UPDATED = "UPDATED",
1413
- CREATED = "CREATED"
1414
- }
1415
- /** @enumType */
1416
- export type UpsertContactResponseActionWithLiterals = UpsertContactResponseAction | 'UNKNOWN' | 'UPDATED' | 'CREATED';
1417
- export interface GeneratePictureUploadUrlRequest {
1418
- /**
1419
- * ID of the contact whose picture is being updated.
1420
- * @format GUID
1421
- */
1422
- contactId?: string;
1423
- /**
1424
- * Mime Type. Must be one of:
1425
- * `image/png`, `image/jpeg`.
1426
- * Defaults to `image/png`.
1427
- */
1428
- mimeType?: string | null;
1429
- }
1430
- export interface GeneratePictureUploadUrlResponse {
1431
- /**
1432
- * URL to upload the image
1433
- * @format WEB_URL
1434
- */
1435
- uploadUrl?: string;
1436
- }
1437
- export interface GetContactRequest {
1438
- /**
1439
- * ID of the contact to retrieve.
1440
- * @format GUID
1441
- */
1442
- _id: string;
1443
- /**
1444
- * List of projected fields to return.
1445
- * If both `fields` and `fieldsets` are sent in the request,
1446
- * the union of both lists is returned.
1447
- * `id` and `revision` are always returned.
1448
- *
1449
- * Supported properties:
1450
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
1451
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
1452
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
1453
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
1454
- * @maxLength 100
1455
- * @maxSize 100
1456
- */
1457
- fields?: string[];
1458
- /**
1459
- * Predefined sets of fields to return.
1460
- * If both `fields` and `fieldsets` are sent in the request,
1461
- * the union of both lists is returned.
1462
- *
1463
- * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
1464
- * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
1465
- * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
1466
- * - `FULL`: Returns all fields.
1467
- *
1468
- * Default: If `fields` is omitted from the request, `FULL`.
1469
- * @maxSize 10
1470
- */
1471
- fieldsets?: ContactFieldSetWithLiterals[];
1472
- }
1473
- /** The requested contact. */
1474
- export interface GetContactResponse {
1475
- /** The requested contact. */
1476
- contact?: Contact;
1477
- /** Contact response type. */
1478
- responseType?: GetContactResponseTypeWithLiterals;
1479
- }
1480
- export declare enum GetContactResponseType {
1481
- /** The specified contact was returned. */
1482
- REGULAR = "REGULAR",
1483
- /** Not used. */
1484
- IMPLICIT = "IMPLICIT",
1485
- /** The specified contact was previously merged with another contact and the new contact was returned. */
1486
- MERGED = "MERGED"
1487
- }
1488
- /** @enumType */
1489
- export type GetContactResponseTypeWithLiterals = GetContactResponseType | 'REGULAR' | 'IMPLICIT' | 'MERGED';
1490
- export interface SyncSubmitContactRequest {
1491
- contactInfo?: ContactInfo;
1492
- activity?: ContactActivity;
1493
- passThroughData?: string | null;
1494
- /** @format GUID */
1495
- contactId?: string;
1496
- submitOperation?: SubmitOperationWithLiterals;
1497
- /** Need to resolve source in allocator, because of server sign */
1498
- sourceType?: ContactSourceTypeWithLiterals;
1499
- sourceId?: string | null;
1500
- hideFromContactList?: boolean;
1501
- }
1502
- export declare enum SubmitOperation {
1503
- UNKNOWN = "UNKNOWN",
1504
- CREATE = "CREATE",
1505
- UPDATE = "UPDATE"
1506
- }
1507
- /** @enumType */
1508
- export type SubmitOperationWithLiterals = SubmitOperation | 'UNKNOWN' | 'CREATE' | 'UPDATE';
1509
- export interface SyncSubmitContactResponse {
1510
- }
1511
- export interface CountContactsRequest {
1512
- }
1513
- export interface CountContactsResponse {
1514
- count?: number;
1515
- }
1516
- export interface SearchContactsRequest {
1517
- /** Search object. Encapsulates filter, sorting, paging and other details */
1518
- search?: Search;
1519
- }
1520
- export interface Search extends SearchPagingMethodOneOf {
1521
- /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */
1522
- cursorPaging?: CursorPaging;
1523
- /** 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) */
1524
- filter?: Record<string, any> | null;
1525
- /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
1526
- sort?: Sorting[];
1527
- /**
1528
- * List of projected fields to return.
1529
- *
1530
- * If used in the request,
1531
- * all the fields contained in `fields` and `fieldsets` are returned.
1532
- * If left blank, `fieldsets` is used to determine which fields to return.
1533
- *
1534
- * For a list of valid projected fields, see
1535
- * [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).
1536
- * @maxLength 100
1537
- * @maxSize 100
1538
- */
1539
- fields?: string[];
1540
- /**
1541
- * Predefined sets of fields to return.
1542
- *
1543
- * Defaults to `FULL`.
1544
- * Ignored if left empty when `fields` is used in the request.
1545
- *
1546
- * For more information,
1547
- * see [Contact Fieldsets](https://dev.wix.com/api/rest/contacts/contacts/fieldsets-and-projected-fields#contacts_contacts_fieldsets-and-projected-fields_contact-fieldsets).
1548
- * @maxSize 10
1549
- */
1550
- fieldsets?: string[];
1551
- /** free text to match in searchable fields */
1552
- search?: SearchDetails;
1553
- }
1554
- /** @oneof */
1555
- export interface SearchPagingMethodOneOf {
1556
- /** Cursor pointing to page of results. 'cursorPaging.cursor' can not be used together with 'filter' or 'sort' */
1557
- cursorPaging?: CursorPaging;
1558
- }
1559
- export interface SearchDetails {
1560
- /** boolean search mode. Default is `OR` */
1561
- mode?: ModeWithLiterals;
1562
- /**
1563
- * search term or expression
1564
- * @maxLength 100
1565
- */
1566
- expression?: string | null;
1567
- /**
1568
- * fields to search in. if empty - server will search in own default fieldsDefault searchable fields:
1569
- *
1570
- * - `info.name.first`
1571
- * - `info.name.last`
1572
- * - `info.emails.email`
1573
- * - `info.phones.phone`
1574
- * @maxLength 100
1575
- * @maxSize 100
1576
- */
1577
- fields?: string[];
1578
- /** flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
1579
- fuzzy?: boolean;
1580
- }
1581
- export declare enum Mode {
1582
- /** any */
1583
- OR = "OR",
1584
- /** all */
1585
- AND = "AND"
1586
- }
1587
- /** @enumType */
1588
- export type ModeWithLiterals = Mode | 'OR' | 'AND';
1589
- export interface CursorPaging {
1590
- /**
1591
- * The number of contacts to load (default = 50, max = 1000)
1592
- * @max 1000
1593
- */
1594
- limit?: number | null;
1595
- /** Cursor returned in last query response. Should not be provided on first page request */
1596
- cursor?: string | null;
1597
- }
1598
- export interface SearchContactsResponse {
1599
- /** List of contacts. */
1600
- contacts?: Contact[];
1601
- /** Details on the paged set of results returned. */
1602
- cursorPagingMetadata?: CursorPagingMetadata;
1603
- }
1604
- /** This is the preferred message for cursor-paging enabled services */
1605
- export interface CursorPagingMetadata {
1606
- /** Number of items returned in the response. */
1607
- count?: number | null;
1608
- /** Cursor strings that point to the next page, previous page, or both. */
1609
- cursors?: Cursors;
1610
- /**
1611
- * Whether there are more pages to retrieve following the current page.
1612
- *
1613
- * + `true`: Another page of results can be retrieved.
1614
- * + `false`: This is the last page.
1615
- */
1616
- hasNext?: boolean | null;
1617
- }
1618
- export interface Cursors {
1619
- /** Cursor pointing to next result page */
1620
- next?: string | null;
1621
- /** Cursor pointing to previous result page */
1622
- prev?: string | null;
1623
- }
1624
- export interface BulkAddSegmentToContactsRequest {
1625
- /**
1626
- * Segment id
1627
- * @format GUID
1628
- */
1629
- segmentId?: string;
1630
- /**
1631
- * List of Contact ids
1632
- * @format GUID
1633
- * @minSize 1
1634
- * @maxSize 1000
1635
- */
1636
- contactIds?: string[];
1637
- /**
1638
- * List of existing segment ids
1639
- * @format GUID
1640
- * @maxSize 100
1641
- */
1642
- existsSegmentIds?: string[];
1643
- }
1644
- export interface BulkAddSegmentToContactsResponse {
1645
- /** List of action results */
1646
- results?: ItemMetadata[];
1647
- /** Metadata on the bulk action */
1648
- bulkActionMetadata?: BulkActionMetadata;
1649
- }
1650
- export interface ItemMetadata {
1651
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1652
- _id?: string | null;
1653
- /** Index of the item within the request array. Allows for correlation between request and response items. */
1654
- originalIndex?: number;
1655
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1656
- success?: boolean;
1657
- /** Details about the error in case of failure. */
1658
- error?: ApplicationError;
1659
- }
1660
- export interface ApplicationError {
1661
- /** Error code. */
1662
- code?: string;
1663
- /** Description of the error. */
1664
- description?: string;
1665
- /** Data related to the error. */
1666
- data?: Record<string, any> | null;
1667
- }
1668
- export interface BulkActionMetadata {
1669
- /** Number of items that were successfully processed. */
1670
- totalSuccesses?: number;
1671
- /** Number of items that couldn't be processed. */
1672
- totalFailures?: number;
1673
- /** Number of failures without details because detailed failure threshold was exceeded. */
1674
- undetailedFailures?: number;
1675
- }
1676
- export interface ContactAddedToSegment {
1677
- /** Id of the segment to which the contact was added */
1678
- segmentId?: string;
1679
- /** The contact that was added */
1680
- contact?: Contact;
1681
- }
1682
- export interface BulkRemoveSegmentFromContactsRequest {
1683
- /**
1684
- * Segment id
1685
- * @format GUID
1686
- */
1687
- segmentId?: string;
1688
- /**
1689
- * List of Contact ids
1690
- * @format GUID
1691
- * @minSize 1
1692
- * @maxSize 1000
1693
- */
1694
- contactIds?: string[];
1695
- }
1696
- export interface BulkRemoveSegmentFromContactsResponse {
1697
- /** List of action results */
1698
- results?: ItemMetadata[];
1699
- /** Metadata on the bulk action */
1700
- bulkActionMetadata?: BulkActionMetadata;
1701
- }
1702
- export interface ContactRemovedFromSegment {
1703
- /** Id of the segment from which the contact was removed */
1704
- segmentId?: string;
1705
- /** The contact that was removed */
1706
- contact?: Contact;
1707
- }
1708
- export interface ListContactIdsBySegmentRequest {
1709
- /**
1710
- * Segment id
1711
- * @format GUID
1712
- */
1713
- segmentId?: string;
1714
- /** Cursor paging. */
1715
- cursorPaging?: CursorPaging;
1716
- }
1717
- export interface ListContactIdsBySegmentResponse {
1718
- /**
1719
- * List of contact IDs
1720
- * @format GUID
1721
- * @maxSize 1000
1722
- */
1723
- contactIds?: string[];
1724
- /** Paging metadata */
1725
- cursorPagingMetadata?: CursorPagingMetadata;
1726
- }
1727
- export interface DomainEvent extends DomainEventBodyOneOf {
1728
- createdEvent?: EntityCreatedEvent;
1729
- updatedEvent?: EntityUpdatedEvent;
1730
- deletedEvent?: EntityDeletedEvent;
1731
- actionEvent?: ActionEvent;
1732
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1733
- _id?: string;
1734
- /**
1735
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1736
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1737
- */
1738
- entityFqdn?: string;
1739
- /**
1740
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
1741
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1742
- */
1743
- slug?: string;
1744
- /** ID of the entity associated with the event. */
1745
- entityId?: string;
1746
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1747
- eventTime?: Date | null;
1748
- /**
1749
- * Whether the event was triggered as a result of a privacy regulation application
1750
- * (for example, GDPR).
1751
- */
1752
- triggeredByAnonymizeRequest?: boolean | null;
1753
- /** If present, indicates the action that triggered the event. */
1754
- originatedFrom?: string | null;
1755
- /**
1756
- * 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.
1757
- * 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.
1758
- */
1759
- entityEventSequence?: string | null;
1760
- }
1761
- /** @oneof */
1762
- export interface DomainEventBodyOneOf {
1763
- createdEvent?: EntityCreatedEvent;
1764
- updatedEvent?: EntityUpdatedEvent;
1765
- deletedEvent?: EntityDeletedEvent;
1766
- actionEvent?: ActionEvent;
1767
- }
1768
- export interface EntityCreatedEvent {
1769
- entity?: string;
1770
- }
1771
- export interface RestoreInfo {
1772
- deletedDate?: Date | null;
1773
- }
1774
- export interface EntityUpdatedEvent {
1775
- /**
1776
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1777
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1778
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1779
- */
1780
- currentEntity?: string;
1781
- }
1782
- export interface EntityDeletedEvent {
1783
- /** Entity that was deleted. */
1784
- deletedEntity?: string | null;
1785
- }
1786
- export interface ActionEvent {
1787
- body?: string;
1788
- }
1789
- export interface MessageEnvelope {
1790
- /**
1791
- * App instance ID.
1792
- * @format GUID
1793
- */
1794
- instanceId?: string | null;
1795
- /**
1796
- * Event type.
1797
- * @maxLength 150
1798
- */
1799
- eventType?: string;
1800
- /** The identification type and identity data. */
1801
- identity?: IdentificationData;
1802
- /** Stringify payload. */
1803
- data?: string;
1804
- }
1805
- export interface IdentificationData extends IdentificationDataIdOneOf {
1806
- /**
1807
- * ID of a site visitor that has not logged in to the site.
1808
- * @format GUID
1809
- */
1810
- anonymousVisitorId?: string;
1811
- /**
1812
- * ID of a site visitor that has logged in to the site.
1813
- * @format GUID
1814
- */
1815
- memberId?: string;
1816
- /**
1817
- * ID of a Wix user (site owner, contributor, etc.).
1818
- * @format GUID
1819
- */
1820
- wixUserId?: string;
1821
- /**
1822
- * ID of an app.
1823
- * @format GUID
1824
- */
1825
- appId?: string;
1826
- /** @readonly */
1827
- identityType?: WebhookIdentityTypeWithLiterals;
1828
- }
1829
- /** @oneof */
1830
- export interface IdentificationDataIdOneOf {
1831
- /**
1832
- * ID of a site visitor that has not logged in to the site.
1833
- * @format GUID
1834
- */
1835
- anonymousVisitorId?: string;
1836
- /**
1837
- * ID of a site visitor that has logged in to the site.
1838
- * @format GUID
1839
- */
1840
- memberId?: string;
1841
- /**
1842
- * ID of a Wix user (site owner, contributor, etc.).
1843
- * @format GUID
1844
- */
1845
- wixUserId?: string;
1846
- /**
1847
- * ID of an app.
1848
- * @format GUID
1849
- */
1850
- appId?: string;
1851
- }
1852
- export declare enum WebhookIdentityType {
1853
- UNKNOWN = "UNKNOWN",
1854
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1855
- MEMBER = "MEMBER",
1856
- WIX_USER = "WIX_USER",
1857
- APP = "APP"
1858
- }
1859
- /** @enumType */
1860
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1861
- export interface BaseEventMetadata {
1862
- /**
1863
- * App instance ID.
1864
- * @format GUID
1865
- */
1866
- instanceId?: string | null;
1867
- /**
1868
- * Event type.
1869
- * @maxLength 150
1870
- */
1871
- eventType?: string;
1872
- /** The identification type and identity data. */
1873
- identity?: IdentificationData;
1874
- }
1875
- export interface EventMetadata extends BaseEventMetadata {
1876
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1877
- _id?: string;
1878
- /**
1879
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1880
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1881
- */
1882
- entityFqdn?: string;
1883
- /**
1884
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
1885
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1886
- */
1887
- slug?: string;
1888
- /** ID of the entity associated with the event. */
1889
- entityId?: string;
1890
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1891
- eventTime?: Date | null;
1892
- /**
1893
- * Whether the event was triggered as a result of a privacy regulation application
1894
- * (for example, GDPR).
1895
- */
1896
- triggeredByAnonymizeRequest?: boolean | null;
1897
- /** If present, indicates the action that triggered the event. */
1898
- originatedFrom?: string | null;
1899
- /**
1900
- * 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.
1901
- * 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.
1902
- */
1903
- entityEventSequence?: string | null;
1904
- }
1905
- export interface ContactCreatedEnvelope {
1906
- entity: Contact;
1907
- metadata: EventMetadata;
1908
- }
1909
- /**
1910
- * Triggered when a contact is created.
1911
- * @permissionScope Manage Stores
1912
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1913
- * @permissionScope Manage Events
1914
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1915
- * @permissionScope Manage Challenges
1916
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1917
- * @permissionScope Read Contacts
1918
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
1919
- * @permissionScope Read Members and Contacts - all read permissions
1920
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
1921
- * @permissionScope Manage Contacts
1922
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
1923
- * @permissionScope Set Up Automations
1924
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1925
- * @permissionScope Manage Members and Contacts - all permissions
1926
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
1927
- * @permissionId CONTACTS.VIEW
1928
- * @webhook
1929
- * @eventType wix.contacts.v4.contact_created
1930
- * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4
1931
- * @slug created
1932
- */
1933
- export declare function onContactCreated(handler: (event: ContactCreatedEnvelope) => void | Promise<void>): void;
1934
- export interface ContactDeletedEnvelope {
1935
- metadata: EventMetadata;
1936
- }
1937
- /**
1938
- * Triggered when a contact is deleted.
1939
- *
1940
- * If a contact is deleted as part of a merge, the `originatedFrom` property is sent as `merge`.
1941
- * Otherwise, `originatedFrom` isn't returned.
1942
- * @permissionScope Manage Stores
1943
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1944
- * @permissionScope Manage Events
1945
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1946
- * @permissionScope Manage Challenges
1947
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1948
- * @permissionScope Read Contacts
1949
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
1950
- * @permissionScope Read Members and Contacts - all read permissions
1951
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
1952
- * @permissionScope Manage Contacts
1953
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
1954
- * @permissionScope Set Up Automations
1955
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1956
- * @permissionScope Manage Members and Contacts - all permissions
1957
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
1958
- * @permissionId CONTACTS.VIEW
1959
- * @webhook
1960
- * @eventType wix.contacts.v4.contact_deleted
1961
- * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4
1962
- * @slug deleted
1963
- */
1964
- export declare function onContactDeleted(handler: (event: ContactDeletedEnvelope) => void | Promise<void>): void;
1965
- export interface ContactMergedEnvelope {
1966
- data: ContactMerged;
1967
- metadata: EventMetadata;
1968
- }
1969
- /**
1970
- * Triggered when one or more source contacts are merged into a target contact.
1971
- * @permissionScope Manage Stores
1972
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1973
- * @permissionScope Manage Events
1974
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1975
- * @permissionScope Manage Challenges
1976
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1977
- * @permissionScope Read Contacts
1978
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
1979
- * @permissionScope Read Members and Contacts - all read permissions
1980
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
1981
- * @permissionScope Manage Contacts
1982
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
1983
- * @permissionScope Set Up Automations
1984
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1985
- * @permissionScope Manage Members and Contacts - all permissions
1986
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
1987
- * @permissionId CONTACTS.VIEW
1988
- * @webhook
1989
- * @eventType wix.contacts.v4.contact_merged
1990
- * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4
1991
- * @slug merged
1992
- */
1993
- export declare function onContactMerged(handler: (event: ContactMergedEnvelope) => void | Promise<void>): void;
1994
- export interface ContactUpdatedEnvelope {
1995
- entity: Contact;
1996
- metadata: EventMetadata;
1997
- }
1998
- /**
1999
- * Triggered when a contact is updated.
2000
- * @permissionScope Manage Stores
2001
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2002
- * @permissionScope Manage Events
2003
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2004
- * @permissionScope Manage Challenges
2005
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2006
- * @permissionScope Read Contacts
2007
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
2008
- * @permissionScope Read Members and Contacts - all read permissions
2009
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
2010
- * @permissionScope Manage Contacts
2011
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2012
- * @permissionScope Set Up Automations
2013
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2014
- * @permissionScope Manage Members and Contacts - all permissions
2015
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2016
- * @permissionId CONTACTS.VIEW
2017
- * @webhook
2018
- * @eventType wix.contacts.v4.contact_updated
2019
- * @serviceIdentifier com.wixpress.contacts.core.api.v4.ContactsServiceV4
2020
- * @slug updated
2021
- */
2022
- export declare function onContactUpdated(handler: (event: ContactUpdatedEnvelope) => void | Promise<void>): void;
2023
- 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`;
2024
- /**
2025
- * Creates a new contact.
2026
- *
2027
- * The `info` object must include at least one of the following:
2028
- * - Name
2029
- * - Phone number
2030
- * - Email address
2031
- *
2032
- * By default, if the call contains an email already in use by another contact,
2033
- * the new contact won't be created. To override this behavior, set `allowDuplicates` to `true`.
2034
- * @param info - Contact info.
2035
- * @public
2036
- * @requiredField info
2037
- * @param options - Create contact options.
2038
- * @permissionId CONTACTS.MODIFY
2039
- * @permissionScope Manage Stores
2040
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2041
- * @permissionScope Manage Contacts
2042
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2043
- * @permissionScope Manage Members and Contacts - all permissions
2044
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2045
- * @applicableIdentity APP
2046
- * @returns Contact.
2047
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.CreateContact
2048
- */
2049
- export declare function createContact(info: ContactInfo, options?: CreateContactOptions): Promise<NonNullablePaths<CreateContactResponse, {
2050
- [P in ContactNonNullablePaths]: `contact.${P}`;
2051
- }[ContactNonNullablePaths]>>;
2052
- export interface CreateContactOptions {
2053
- /**
2054
- * Controls whether the call will succeed
2055
- * if the new contact information contains an email or a phone number already used by another contact.
2056
- *
2057
- * If set to `true`,
2058
- * the call will succeed even if an email address or phone number is used by another contact.
2059
- * If set to `false`,
2060
- * the call will fail if the given email address is used by another contact or,
2061
- * if the email address is not given and the given phone number is used by another contact.
2062
- *
2063
- * Default: `false`
2064
- */
2065
- allowDuplicates?: boolean;
2066
- }
2067
- /**
2068
- * Updates a contact.
2069
- *
2070
- * Each time the contact is updated,
2071
- * `revision` increments by 1.
2072
- * The existing `revision` must be included when updating the contact.
2073
- * This ensures you're working with the latest contact information,
2074
- * and it prevents unintended overwrites.
2075
- *
2076
- * You can't call Update Contact to update the `primaryEmail` of a contact who is also a member.
2077
- * Instead, use the Members API to update the member's login email, which will also update the contact's primary email.
2078
- *
2079
- * 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.
2080
- * @param contactId - ID of the contact to update.
2081
- * @param info - Contact info.
2082
- * @param revision - Revision number.
2083
- * When updating, include the existing `revision`
2084
- * to prevent conflicting updates.
2085
- * @public
2086
- * @requiredField contactId
2087
- * @requiredField info
2088
- * @requiredField revision
2089
- * @param options - Contact update options.
2090
- * @permissionId CONTACTS.MODIFY
2091
- * @permissionId CONTACTS.MODIFY_MEMBERSHIP_STATUS
2092
- * @permissionId CONTACTS.MODIFY_MEMBER_PRIMARY_EMAIL_PERMISSION
2093
- * @permissionScope Manage Stores
2094
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2095
- * @permissionScope Manage Contacts
2096
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2097
- * @permissionScope Manage Members and Contacts - all permissions
2098
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2099
- * @applicableIdentity APP
2100
- * @returns Updated contact.
2101
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.UpdateContact
2102
- */
2103
- export declare function updateContact(contactId: string, info: ContactInfo, revision: number, options?: UpdateContactOptions): Promise<NonNullablePaths<UpdateContactResponse, {
2104
- [P in ContactNonNullablePaths]: `contact.${P}`;
2105
- }[ContactNonNullablePaths]>>;
2106
- export interface UpdateContactOptions {
2107
- /**
2108
- * Controls whether the call will succeed
2109
- * if the new contact information contains an email or a phone number already used by another contact.
2110
- *
2111
- * If set to `true`,
2112
- * the call will succeed even if an email address or phone number is used by another contact.
2113
- * If set to `false`,
2114
- * the call will fail if the given email address is used by another contact or,
2115
- * if the email address is not given and the given phone number is used by another contact.
2116
- *
2117
- * Default: `false`
2118
- */
2119
- allowDuplicates?: boolean;
2120
- }
2121
- /**
2122
- * Merges source contacts into a target contact.
2123
- *
2124
- * Merging contacts has the following effects on the target contact:
2125
- *
2126
- * - No target contact data is overwritten or deleted.
2127
- * - Arrays (emails, phone numbers, addresses, and labels) from the source contacts are added to the target contact's arrays.
2128
- * - If you merge more than one source contact, the 1st source contact specified is added first, then the 2nd, and so on.
2129
- * - If there is duplicate information between the target contact and the source contact, the information isn't duplicated in the target contact's arrays.
2130
- *
2131
- * <blockquote class="important">
2132
- *
2133
- * __Important:__
2134
- * Merges cannot be undone.
2135
- * In REST, call Preview Merge Contacts to test before merging.
2136
- *
2137
- * </blockquote>
2138
- *
2139
- * When you merge contacts, source contacts are typically deleted.
2140
- * However, if a source contact is a site member or a Wix user,
2141
- * the merge will fail because site members and Wix users can't be deleted.
2142
- * This means that site members and Wix users can only be specified as target contacts in a merge.
2143
- *
2144
- * After merging, calling Get Contact with a deleted source contact ID returns the target contact ID.
2145
- * Specifying a deleted source contact ID is not supported on any other method.
2146
- *
2147
- * When contacts are merged:
2148
- *
2149
- * - The Contact Merged event is triggered.
2150
- * - The Contact Updated event is triggered for the target contact. `originatedFrom` is set to `merge`.
2151
- * - The Contact Deleted event is triggered for each source contact. `originatedFrom` is set to `merge`.
2152
- * @param targetContactId - Target contact ID.
2153
- * @param targetContactRevision - Target contact revision number, which increments by 1 each time the contact is updated.
2154
- * To prevent conflicting changes,
2155
- * the target contact's current `revision` must be specified.
2156
- * @public
2157
- * @requiredField targetContactId
2158
- * @requiredField targetContactRevision
2159
- * @param options - Merge contacts options.
2160
- * @permissionId CONTACTS.MERGE
2161
- * @permissionScope Manage Stores
2162
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2163
- * @permissionScope Manage Contacts
2164
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2165
- * @permissionScope Manage Members and Contacts - all permissions
2166
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2167
- * @applicableIdentity APP
2168
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.MergeContacts
2169
- */
2170
- export declare function mergeContacts(targetContactId: string, targetContactRevision: number, options?: MergeContactsOptions): Promise<NonNullablePaths<MergeContactsResponse, {
2171
- [P in ContactNonNullablePaths]: `contact.${P}`;
2172
- }[ContactNonNullablePaths]>>;
2173
- export interface MergeContactsOptions {
2174
- /**
2175
- * IDs of up to 5 contacts to merge into the target contact.
2176
- * When you merge more than one source contact,
2177
- * the first source is given precedence, then the second, and so on.
2178
- * @minSize 1
2179
- * @maxSize 5
2180
- */
2181
- sourceContactIds?: string[];
2182
- }
2183
- /**
2184
- * Deletes a contact.
2185
- *
2186
- * Deleting a contact permanently removes it from the contact list.
2187
- * If a contact is also a site member or Wix user, or has a valid billing subscription,
2188
- * the contact can't be deleted. The related site member or Wix user must first be deleted
2189
- * and any valid billing subscriptions must be canceled, before the contact can be deleted.
2190
- *
2191
- * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.
2192
- * Make sure to specify the contact ID when calling Delete Contact.
2193
- * @param contactId - ID of the contact to delete.
2194
- * @public
2195
- * @requiredField contactId
2196
- * @permissionId CONTACTS.MODIFY
2197
- * @permissionId MEMBERS.MEMBER_DELETE
2198
- * @permissionScope Manage Stores
2199
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2200
- * @permissionScope Manage Contacts
2201
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2202
- * @permissionScope Manage Members and Contacts - all permissions
2203
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2204
- * @permissionScope Manage Members
2205
- * @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-MEMBERS
2206
- * @applicableIdentity APP
2207
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.DeleteContact
2208
- */
2209
- export declare function deleteContact(contactId: string): Promise<void>;
2210
- /**
2211
- * Adds labels to a contact.
2212
- *
2213
- * Use the Labels API to create or retrieve labels.
2214
- *
2215
- * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.
2216
- * Make sure to specify the contact ID when calling Label Contact.
2217
- * @param contactId - ID of the contact to add labels to.
2218
- * @param labelKeys - List of label keys to add to the contact.
2219
- *
2220
- * Label keys must exist to be added to the contact.
2221
- * Use the Labels API to create or retrieve labels.
2222
- * @public
2223
- * @requiredField contactId
2224
- * @requiredField labelKeys
2225
- * @permissionId CONTACTS.MODIFY
2226
- * @permissionScope Manage Stores
2227
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2228
- * @permissionScope Manage Contacts
2229
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2230
- * @permissionScope Manage Members and Contacts - all permissions
2231
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2232
- * @applicableIdentity APP
2233
- * @returns Updated contact.
2234
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.LabelContact
2235
- */
2236
- export declare function labelContact(contactId: string, labelKeys: string[]): Promise<NonNullablePaths<LabelContactResponse, {
2237
- [P in ContactNonNullablePaths]: `contact.${P}`;
2238
- }[ContactNonNullablePaths]>>;
2239
- /**
2240
- * Removes labels from a contact.
2241
- *
2242
- * If a label is no longer needed
2243
- * and you want to remove it from all contacts,
2244
- * you can delete by calling Delete Label from the Labels API.
2245
- *
2246
- * Members are typically linked to contacts, and while they share a relationship, the member ID and contact ID are distinct identifiers.
2247
- * Make sure to specify the contact ID when calling Unlabel Contact.
2248
- * @param contactId - ID of the contact to remove labels from.
2249
- * @param labelKeys - List of label keys to remove from the contact.
2250
- * @public
2251
- * @requiredField contactId
2252
- * @requiredField labelKeys
2253
- * @permissionId CONTACTS.MODIFY
2254
- * @permissionScope Manage Stores
2255
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2256
- * @permissionScope Manage Contacts
2257
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2258
- * @permissionScope Manage Members and Contacts - all permissions
2259
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2260
- * @applicableIdentity APP
2261
- * @returns Updated contact.
2262
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.UnlabelContact
2263
- */
2264
- export declare function unlabelContact(contactId: string, labelKeys: string[]): Promise<NonNullablePaths<UnlabelContactResponse, {
2265
- [P in ContactNonNullablePaths]: `contact.${P}`;
2266
- }[ContactNonNullablePaths]>>;
2267
- /**
2268
- * Creates a query to retrieve a list of contacts.
2269
- *
2270
- * The `queryContacts()` function builds a query to retrieve a list of contacts and returns a `ContactsQueryBuilder` object.
2271
- *
2272
- * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
2273
- *
2274
- * 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.
2275
- *
2276
- * `queryContacts()` runs with these `ContactsQueryBuilder` defaults, which you can override:
2277
- *
2278
- * - `skip(0)`
2279
- * - `limit(50)`
2280
- * - `descending("_createdDate")`
2281
- *
2282
- * 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.
2283
- * @public
2284
- * @param options - Query contact options.
2285
- * @permissionScope Manage Stores
2286
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2287
- * @permissionScope Manage Events
2288
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2289
- * @permissionScope Manage Challenges
2290
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2291
- * @permissionScope Read Contacts
2292
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
2293
- * @permissionScope Read Members and Contacts - all read permissions
2294
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
2295
- * @permissionScope Manage Contacts
2296
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2297
- * @permissionScope Set Up Automations
2298
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2299
- * @permissionScope Manage Members and Contacts - all permissions
2300
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2301
- * @permissionId CONTACTS.VIEW
2302
- * @applicableIdentity APP
2303
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts
2304
- */
2305
- export declare function queryContacts(options?: QueryContactsOptions): ContactsQueryBuilder;
2306
- export interface QueryContactsOptions {
2307
- }
2308
- interface QueryOffsetResult {
2309
- currentPage: number | undefined;
2310
- totalPages: number | undefined;
2311
- totalCount: number | undefined;
2312
- hasNext: () => boolean;
2313
- hasPrev: () => boolean;
2314
- length: number;
2315
- pageSize: number;
2316
- }
2317
- export interface ContactsQueryResult extends QueryOffsetResult {
2318
- items: Contact[];
2319
- query: ContactsQueryBuilder;
2320
- next: () => Promise<ContactsQueryResult>;
2321
- prev: () => Promise<ContactsQueryResult>;
2322
- }
2323
- export interface ContactsQueryBuilder {
2324
- /** @param propertyName - Property whose value is compared with `value`.
2325
- * @param value - Value to compare against.
2326
- */
2327
- 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;
2328
- /** @param propertyName - Property whose value is compared with `value`.
2329
- * @param value - Value to compare against.
2330
- */
2331
- 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;
2332
- /** @param propertyName - Property whose value is compared with `value`.
2333
- * @param value - Value to compare against.
2334
- */
2335
- ge: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate', value: any) => ContactsQueryBuilder;
2336
- /** @param propertyName - Property whose value is compared with `value`.
2337
- * @param value - Value to compare against.
2338
- */
2339
- gt: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate', value: any) => ContactsQueryBuilder;
2340
- /** @param propertyName - Property whose value is compared with `value`.
2341
- * @param value - Value to compare against.
2342
- */
2343
- le: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate', value: any) => ContactsQueryBuilder;
2344
- /** @param propertyName - Property whose value is compared with `value`.
2345
- * @param value - Value to compare against.
2346
- */
2347
- lt: (propertyName: '_createdDate' | '_updatedDate' | 'lastActivity.activityDate', value: any) => ContactsQueryBuilder;
2348
- /** @param propertyName - Property whose value is compared with `string`.
2349
- * @param string - String to compare against. Case-insensitive.
2350
- */
2351
- startsWith: (propertyName: 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle', value: string) => ContactsQueryBuilder;
2352
- in: (propertyName: '_id' | 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.locale', value: any) => ContactsQueryBuilder;
2353
- exists: (propertyName: '_id' | 'primaryInfo.email' | 'primaryInfo.phone' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.locale', value: boolean) => ContactsQueryBuilder;
2354
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
2355
- ascending: (...propertyNames: Array<'_createdDate' | 'lastActivity.activityDate' | 'primaryInfo.email' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.birthdate'>) => ContactsQueryBuilder;
2356
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
2357
- descending: (...propertyNames: Array<'_createdDate' | 'lastActivity.activityDate' | 'primaryInfo.email' | 'info.name.first' | 'info.name.last' | 'info.company' | 'info.jobTitle' | 'info.birthdate'>) => ContactsQueryBuilder;
2358
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
2359
- limit: (limit: number) => ContactsQueryBuilder;
2360
- /** @param skip - Number of items to skip in the query results before returning the results. */
2361
- skip: (skip: number) => ContactsQueryBuilder;
2362
- find: () => Promise<ContactsQueryResult>;
2363
- }
2364
- /**
2365
- * Retrieves a contact.
2366
- *
2367
- * #### Getting Merged Contacts
2368
- *
2369
- * When a source contact is merged
2370
- * with a target contact, the source contact is deleted.
2371
- * When calling Get Contact for a merged contact,
2372
- * you can use the source or target contact ID.
2373
- * In both bases, the target contact is returned.
2374
- *
2375
- * This is supported only when calling Get Contact on merged contacts.
2376
- * Previously deleted source contact IDs can't be used for any other method.
2377
- * @param _id - ID of the contact to retrieve.
2378
- * @public
2379
- * @requiredField _id
2380
- * @param options - Get contact options.
2381
- * @permissionId CONTACTS.VIEW
2382
- * @permissionScope Manage Stores
2383
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2384
- * @permissionScope Manage Events
2385
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2386
- * @permissionScope Manage Challenges
2387
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2388
- * @permissionScope Read Contacts
2389
- * @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
2390
- * @permissionScope Read Members and Contacts - all read permissions
2391
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
2392
- * @permissionScope Manage Contacts
2393
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
2394
- * @permissionScope Set Up Automations
2395
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2396
- * @permissionScope Manage Members and Contacts - all permissions
2397
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
2398
- * @applicableIdentity APP
2399
- * @returns The requested contact.
2400
- * @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.GetContact
2401
- */
2402
- export declare function getContact(_id: string, options?: GetContactOptions): Promise<NonNullablePaths<Contact, ContactNonNullablePaths>>;
2403
- export interface GetContactOptions {
2404
- /**
2405
- * List of projected fields to return.
2406
- * If both `fields` and `fieldsets` are sent in the request,
2407
- * the union of both lists is returned.
2408
- * `id` and `revision` are always returned.
2409
- *
2410
- * Supported properties:
2411
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
2412
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
2413
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
2414
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
2415
- * @maxLength 100
2416
- * @maxSize 100
2417
- */
2418
- fields?: string[];
2419
- /**
2420
- * Predefined sets of fields to return.
2421
- * If both `fields` and `fieldsets` are sent in the request,
2422
- * the union of both lists is returned.
2423
- *
2424
- * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
2425
- * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
2426
- * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
2427
- * - `FULL`: Returns all fields.
2428
- *
2429
- * Default: If `fields` is omitted from the request, `FULL`.
2430
- * @maxSize 10
2431
- */
2432
- fieldsets?: ContactFieldSetWithLiterals[];
2433
- }
2434
- export {};