@wix/crm 1.0.85 → 1.0.87

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