@wix/crm 1.0.84 → 1.0.86

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 -82
  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 -95
  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 -2185
  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 -2055
  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 -60
  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 -53
  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 -60
  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 -54
  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 -16
  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 -9
  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 -82
  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 -60
  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 -72
  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 -95
  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 -2185
  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 -2055
  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 -52
  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 -53
  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 -52
  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 -54
  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 -12
  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 -9
  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 -72
  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 -60
  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,623 +0,0 @@
1
- import { EventDefinition } from '@wix/sdk-types';
2
- /** Extended field that was found or created. */
3
- export interface ExtendedField {
4
- /**
5
- * Extended field namespace.
6
- *
7
- * Extended fields created by site collaborators or 3rd-party apps
8
- * are automatically assigned to the `custom` namespace.
9
- * @readonly
10
- */
11
- namespace?: string | null;
12
- /**
13
- * Extended field key.
14
- *
15
- * When accessing contact data,
16
- * extended field data is available at `fields[key]`.
17
- * For example, if the key is "custom.notes",
18
- * the value can be accessed at `fields["custom.notes"]`.
19
- *
20
- * `key` is generated when the extended field is created
21
- * and cannot be modified, even if `displayName` changes.
22
- * @readonly
23
- */
24
- key?: string;
25
- /** Display name shown in the Contact List. */
26
- displayName?: string;
27
- /**
28
- * Type of data the field holds.
29
- *
30
- * One of:
31
- * - `"TEXT"`: Accepts strings.
32
- * - `"NUMBER"`: Accepts floats.
33
- * - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
34
- * - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
35
- * @readonly
36
- */
37
- dataType?: FieldDataType;
38
- /**
39
- * Indicates whether the extended field is a system field or custom field.
40
- *
41
- * One of:
42
- * - `"SYSTEM"`: System field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.
43
- * - `"USER_DEFINED"`: Custom field that can be modified by 3rd-party apps or site admins.
44
- * @readonly
45
- */
46
- fieldType?: FieldType;
47
- /**
48
- * Date and time the field was created.
49
- * @readonly
50
- */
51
- _createdDate?: Date;
52
- /**
53
- * Date and time the field was last updated.
54
- * @readonly
55
- */
56
- _updatedDate?: Date;
57
- /**
58
- * Field description, if the field is a system field.
59
- * @readonly
60
- */
61
- description?: string | null;
62
- }
63
- export declare enum FieldDataType {
64
- UNKNOWN_DATA_TYPE = "UNKNOWN_DATA_TYPE",
65
- TEXT = "TEXT",
66
- NUMBER = "NUMBER",
67
- DATE = "DATE",
68
- URL = "URL"
69
- }
70
- export declare enum FieldType {
71
- UNKNOWN = "UNKNOWN",
72
- SYSTEM = "SYSTEM",
73
- USER_DEFINED = "USER_DEFINED"
74
- }
75
- /** Extended field filter options. */
76
- export interface ListExtendedFieldsRequest {
77
- /** Filter for fields of the specified type. */
78
- fieldType?: FieldType;
79
- /**
80
- * Filter for fields in the specified namespace.
81
- * Fields created by site contributors or 3rd-party apps
82
- * are automatically assigned to the `custom` namespace.
83
- */
84
- namespace?: string | null;
85
- /** Filter for fields where `displayName` starts with the specified case-sensitive string. */
86
- startsWith?: string | null;
87
- /** Sorting options. */
88
- sort?: Sorting;
89
- /** Paging options. */
90
- paging?: Paging;
91
- }
92
- export interface Sorting {
93
- /** Name of the field to sort by. */
94
- fieldName?: string;
95
- /**
96
- * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
97
- *
98
- * Defaults to `ASC`.
99
- */
100
- order?: SortOrder;
101
- }
102
- export declare enum SortOrder {
103
- ASC = "ASC",
104
- DESC = "DESC"
105
- }
106
- export interface Paging {
107
- /**
108
- * Number of items to return.
109
- *
110
- * Defaults to `100`.
111
- */
112
- limit?: number | null;
113
- /**
114
- * Number of items to skip in the current sort order.
115
- *
116
- * Defaults to `0`.
117
- */
118
- offset?: number | null;
119
- }
120
- /** List of extended fields. */
121
- export interface ListExtendedFieldsResponse {
122
- /** List of extended fields. */
123
- fields?: ExtendedField[];
124
- /** Metadata for the page of results. */
125
- metadata?: PagingMetadata;
126
- }
127
- export interface PagingMetadata {
128
- /** Number of items returned. */
129
- count?: number | null;
130
- /** Requested offset. */
131
- offset?: number | null;
132
- /** Number of items that matched the query. */
133
- total?: number | null;
134
- /**
135
- * Indicates if `total` calculation timed out before the response was sent.
136
- * Typically this happens if there is a large set of results.
137
- */
138
- tooManyToCount?: boolean | null;
139
- }
140
- /** Custom field to find or create. */
141
- export interface FindOrCreateExtendedFieldRequest {
142
- /**
143
- * Display name to find or create.
144
- *
145
- * If an existing custom field is an exact match
146
- * for the specified `displayName`,
147
- * the existing field is returned.
148
- * If not, a new field is created and returned.
149
- */
150
- displayName: string;
151
- /**
152
- * Type of data the field holds.
153
- * Ignored if an existing field is an exact match
154
- * for the specified display name. One of:
155
- *
156
- * - `"TEXT"`: Accepts strings.
157
- * - `"NUMBER"`: Accepts floats.
158
- * - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
159
- * - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
160
- */
161
- dataType?: FieldDataType;
162
- }
163
- /** Extended field that was found or created. */
164
- export interface FindOrCreateExtendedFieldResponse {
165
- /** Extended field that was found or created. */
166
- field?: ExtendedField;
167
- /**
168
- * Indicates whether the extended field was just created or already existed.
169
- *
170
- * If the field was just created, returns `true`.
171
- * If the field already existed, returns `false`.
172
- */
173
- newField?: boolean;
174
- }
175
- export interface GetExtendedFieldRequest {
176
- /**
177
- * Extended field key.
178
- *
179
- * When accessing contact data,
180
- * extended field values are available at `fields[key]`.
181
- * For example, if the key is "custom.notes",
182
- * the value can be accessed at `fields["custom.notes"]`.
183
- *
184
- * Once set, `key` cannot be modified, even if `displayName` changes.
185
- */
186
- key: string;
187
- }
188
- /** The specified field. */
189
- export interface GetExtendedFieldResponse {
190
- /** The specified field. */
191
- field?: ExtendedField;
192
- }
193
- export interface GetExtendedFieldByLegacyIdRequest {
194
- legacyId?: string;
195
- }
196
- export interface GetExtendedFieldByLegacyIdResponse {
197
- field?: ExtendedField;
198
- }
199
- export interface UpdateExtendedFieldRequest {
200
- /** Field to update. */
201
- field?: ExtendedField;
202
- }
203
- /** Updated extended field. */
204
- export interface UpdateExtendedFieldResponse {
205
- /** Updated extended field. */
206
- field?: ExtendedField;
207
- }
208
- export interface DeleteExtendedFieldRequest {
209
- /** Extended field key. */
210
- key: string;
211
- }
212
- export interface DeleteExtendedFieldResponse {
213
- }
214
- export interface PurgeRequest {
215
- instanceId?: string;
216
- }
217
- export interface PurgeResponse {
218
- deletedItems?: number;
219
- }
220
- export interface GdprListRequest {
221
- instanceId?: string;
222
- }
223
- export interface GdprListResponse {
224
- fields?: ExtendedField[];
225
- }
226
- export interface QueryExtendedFieldsRequest {
227
- /** Query options. */
228
- query?: Query;
229
- }
230
- export interface Query {
231
- /**
232
- * ilter object.
233
- *
234
- * Possible filters: `$eq`, `$gt`, `$gte`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
235
- *
236
- * For a detailed list of supported filters, see [sorting and filtering for extended fields](https://dev.wix.com/api/rest/contacts/extended-fields/sort-and-filter).
237
- *
238
- * Example: `{ "filter": {
239
- * "displayName": {
240
- * "$startsWith": "Referral"
241
- * }
242
- * }
243
- * }`
244
- */
245
- filter?: Record<string, any> | null;
246
- /**
247
- * Sorting options. Currently supports sorting on one field only.
248
- *
249
- * Example: `{ "sort": [{"fieldName": "displayName", "order": "DESC"}] }`
250
- */
251
- sort?: Sorting[];
252
- /** Pagination options. */
253
- paging?: Paging;
254
- }
255
- export interface QueryExtendedFieldsResponse {
256
- /** List of extended fields. */
257
- fields?: ExtendedField[];
258
- /** Details on the paged set of results returned. */
259
- pagingMetadata?: PagingMetadata;
260
- }
261
- export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
262
- createdEvent?: EntityCreatedEvent<T>;
263
- updatedEvent?: EntityUpdatedEvent<T>;
264
- deletedEvent?: EntityDeletedEvent<T>;
265
- actionEvent?: ActionEvent<T>;
266
- /**
267
- * Unique event ID.
268
- * Allows clients to ignore duplicate webhooks.
269
- */
270
- _id?: string;
271
- /**
272
- * Assumes actions are also always typed to an entity_type
273
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
274
- */
275
- entityFqdn?: string;
276
- /**
277
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
278
- * This is although the created/updated/deleted notion is duplication of the oneof types
279
- * Example: created/updated/deleted/started/completed/email_opened
280
- */
281
- slug?: string;
282
- /** ID of the entity associated with the event. */
283
- entityId?: string;
284
- /** Event timestamp. */
285
- eventTime?: Date;
286
- /**
287
- * Whether the event was triggered as a result of a privacy regulation application
288
- * (for example, GDPR).
289
- */
290
- triggeredByAnonymizeRequest?: boolean | null;
291
- /** If present, indicates the action that triggered the event. */
292
- originatedFrom?: string | null;
293
- /**
294
- * A sequence number defining the order of updates to the underlying entity.
295
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
296
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
297
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
298
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
299
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
300
- */
301
- entityEventSequence?: string | null;
302
- }
303
- export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
304
- }
305
- export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
306
- }
307
- export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
308
- }
309
- export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
310
- }
311
- /** @oneof */
312
- export interface DomainEventBodyOneOf<T> {
313
- createdEvent?: EntityCreatedEvent<T>;
314
- updatedEvent?: EntityUpdatedEvent<T>;
315
- deletedEvent?: EntityDeletedEvent<T>;
316
- actionEvent?: ActionEvent<T>;
317
- }
318
- export interface EntityCreatedEvent<T> {
319
- entity?: T;
320
- }
321
- export interface EntityUpdatedEvent<T> {
322
- /**
323
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
324
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
325
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
326
- */
327
- currentEntity?: T;
328
- }
329
- export interface EntityDeletedEvent<T> {
330
- /** Entity that was deleted */
331
- deletedEntity?: T | null;
332
- }
333
- export interface ActionEvent<T> {
334
- body?: T;
335
- }
336
- export interface FindOrCreateExtendedFieldResponseNonNullableFields {
337
- field?: {
338
- key: string;
339
- displayName: string;
340
- dataType: FieldDataType;
341
- fieldType: FieldType;
342
- };
343
- newField: boolean;
344
- }
345
- export interface GetExtendedFieldResponseNonNullableFields {
346
- field?: {
347
- key: string;
348
- displayName: string;
349
- dataType: FieldDataType;
350
- fieldType: FieldType;
351
- };
352
- }
353
- export interface UpdateExtendedFieldResponseNonNullableFields {
354
- field?: {
355
- key: string;
356
- displayName: string;
357
- dataType: FieldDataType;
358
- fieldType: FieldType;
359
- };
360
- }
361
- export interface QueryExtendedFieldsResponseNonNullableFields {
362
- fields: {
363
- key: string;
364
- displayName: string;
365
- dataType: FieldDataType;
366
- fieldType: FieldType;
367
- }[];
368
- }
369
- export declare const onExtendedFieldCreated: EventDefinition<DomainCreatedEvent<ExtendedField>, "wix.contacts.v4.extended_field_created">;
370
- export declare const onExtendedFieldUpdated: EventDefinition<DomainUpdatedEvent<ExtendedField>, "wix.contacts.v4.extended_field_updated">;
371
- export declare const onExtendedFieldDeleted: EventDefinition<DomainDeletedEvent<ExtendedField>, "wix.contacts.v4.extended_field_deleted">;
372
- /**
373
- * Retrieves a custom field with a given name, or creates one if it doesn't exist.
374
- *
375
- * The `findOrCreateExtendedField()` function returns a Promise that resolves when the specified custom field is found or created.
376
- *
377
- * Successful calls to `findOrCreateExtendedField()` always return an extended field, which can be passed to subsequent function calls.
378
- *
379
- * To find an existing extended field without potentially creating a new one, use `getExtendedField()` or `queryExtendedFields()`.
380
- *
381
- * @param displayName - Display name to find or create.
382
- *
383
- * If an existing custom field is an exact match
384
- * for the specified `displayName`,
385
- * the existing field is returned.
386
- * If not, a new field is created and returned.
387
- * @param dataType - Type of data the field holds.
388
- * Ignored if an existing field is an exact match
389
- * for the specified display name. One of:
390
- *
391
- * - `"TEXT"`: Accepts strings.
392
- * - `"NUMBER"`: Accepts floats.
393
- * - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
394
- * - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
395
- * @public
396
- * @documentationMaturity preview
397
- * @requiredField dataType
398
- * @requiredField displayName
399
- * @permissionScope Manage Contact Extended Fields
400
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-EX-FIELDS
401
- * @permissionScope Manage Members and Contacts - all permissions
402
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
403
- * @applicableIdentity APP
404
- * @returns Extended field that was found or created.
405
- */
406
- export declare function findOrCreateExtendedField(displayName: string, dataType: FieldDataType): Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
407
- /**
408
- * Retrieves an extended field.
409
- *
410
- * The `getExtendedField()` function returns a Promise that resolves when the extended field is retrieved.
411
- *
412
- * @public
413
- * @documentationMaturity preview
414
- * @requiredField key
415
- * @param key - Extended field key.
416
- *
417
- * When accessing contact data,
418
- * extended field values are available at `fields[key]`.
419
- * For example, if the key is "custom.notes",
420
- * the value can be accessed at `fields["custom.notes"]`.
421
- *
422
- * Once set, `key` cannot be modified, even if `displayName` changes.
423
- * @permissionScope Manage Bookings Services and Settings
424
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
425
- * @permissionScope Manage Contact Extended Fields
426
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-EX-FIELDS
427
- * @permissionScope Manage Members and Contacts - all permissions
428
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
429
- * @applicableIdentity APP
430
- * @returns The specified field.
431
- */
432
- export declare function getExtendedField(key: string): Promise<ExtendedField & NonNullable<GetExtendedFieldResponseNonNullableFields>['field']>;
433
- /**
434
- * Renames an extended field.
435
- *
436
- * The `renameExtendedField()` function returns a Promise that resolves when the specified extended field's display name is changed
437
- *
438
- * @public
439
- * @documentationMaturity preview
440
- * @requiredField field
441
- * @requiredField field.displayName
442
- * @requiredField key
443
- * @param key - Extended field key.
444
- *
445
- * When accessing contact data,
446
- * extended field values are available at `fields[key]`.
447
- * For example, if the key is "custom.notes",
448
- * the value can be accessed at `fields["custom.notes"]`.
449
- *
450
- * Once set, `key` cannot be modified, even if `displayName` changes.
451
- * @param field - Extended field to rename.
452
- * @permissionScope Manage Contact Extended Fields
453
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-EX-FIELDS
454
- * @permissionScope Manage Members and Contacts - all permissions
455
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
456
- * @applicableIdentity APP
457
- * @returns Updated extended field.
458
- */
459
- export declare function renameExtendedField(key: string, field: RenameExtendedField): Promise<ExtendedField & NonNullable<UpdateExtendedFieldResponseNonNullableFields>['field']>;
460
- export interface RenameExtendedField {
461
- /**
462
- * Extended field namespace.
463
- *
464
- * Extended fields created by site collaborators or 3rd-party apps
465
- * are automatically assigned to the `custom` namespace.
466
- * @readonly
467
- */
468
- namespace?: string | null;
469
- /** Display name shown in the Contact List. */
470
- displayName?: string;
471
- /**
472
- * Type of data the field holds.
473
- *
474
- * One of:
475
- * - `"TEXT"`: Accepts strings.
476
- * - `"NUMBER"`: Accepts floats.
477
- * - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
478
- * - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
479
- * @readonly
480
- */
481
- dataType?: FieldDataType;
482
- /**
483
- * Indicates whether the extended field is a system field or custom field.
484
- *
485
- * One of:
486
- * - `"SYSTEM"`: System field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.
487
- * - `"USER_DEFINED"`: Custom field that can be modified by 3rd-party apps or site admins.
488
- * @readonly
489
- */
490
- fieldType?: FieldType;
491
- /**
492
- * Date and time the field was created.
493
- * @readonly
494
- */
495
- _createdDate?: Date;
496
- /**
497
- * Date and time the field was last updated.
498
- * @readonly
499
- */
500
- _updatedDate?: Date;
501
- /**
502
- * Field description, if the field is a system field.
503
- * @readonly
504
- */
505
- description?: string | null;
506
- }
507
- /**
508
- * Deletes an extended field.
509
- *
510
- * The `deleteExtendedField()` function returns a Promise that resolves when the specified extended field is deleted.
511
- *
512
- * When an extended field is deleted, any contact data stored in the field is permanently deleted as well.
513
- *
514
- * @param key - Extended field key.
515
- * @public
516
- * @documentationMaturity preview
517
- * @requiredField key
518
- * @permissionScope Manage Contact Extended Fields
519
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-EX-FIELDS
520
- * @permissionScope Manage Members and Contacts - all permissions
521
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
522
- * @applicableIdentity APP
523
- */
524
- export declare function deleteExtendedField(key: string): Promise<void>;
525
- /**
526
- * Creates a query to retrieve a list of extended fields.
527
- *
528
- * The `queryExtendedFields()` function builds a query to retrieve a list of extended fields and returns an `FieldsQueryBuilder` object.
529
- *
530
- * The returned object contains the query definition, which is used to run the query using the `find()` function.
531
- *
532
- * You can refine the query by chaining `FieldsQueryBuilder` functions onto the query. `FieldsQueryBuilder` functions enable you to filter, sort, and control the results that `queryExtendedFields()` returns.
533
- *
534
- * `queryExtendedFields()` runs with these `FieldsQueryBuilder` defaults, which you can override:
535
- * - `skip()`
536
- * - `limit(50)`
537
- * - `descending('_createdDate')`
538
- *
539
- * The following `FieldsQueryBuilder` functions are supported for `queryExtendedFields()`. For a full description of the `Extended Field` object, see the object returned for the `items` property in `FieldsQueryResult`.
540
- * @public
541
- * @documentationMaturity preview
542
- * @permissionScope Manage Bookings Services and Settings
543
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
544
- * @permissionScope Manage Contact Extended Fields
545
- * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-EX-FIELDS
546
- * @permissionScope Manage Members and Contacts - all permissions
547
- * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
548
- * @applicableIdentity APP
549
- */
550
- export declare function queryExtendedFields(): FieldsQueryBuilder;
551
- interface QueryOffsetResult {
552
- currentPage: number | undefined;
553
- totalPages: number | undefined;
554
- totalCount: number | undefined;
555
- hasNext: () => boolean;
556
- hasPrev: () => boolean;
557
- length: number;
558
- pageSize: number;
559
- }
560
- export interface FieldsQueryResult extends QueryOffsetResult {
561
- items: ExtendedField[];
562
- query: FieldsQueryBuilder;
563
- next: () => Promise<FieldsQueryResult>;
564
- prev: () => Promise<FieldsQueryResult>;
565
- }
566
- export interface FieldsQueryBuilder {
567
- /** @param propertyName - Property whose value is compared with `value`.
568
- * @param value - Value to compare against.
569
- * @documentationMaturity preview
570
- */
571
- eq: (propertyName: 'namespace' | 'key' | 'displayName' | 'dataType' | 'fieldType' | '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
572
- /** @param propertyName - Property whose value is compared with `value`.
573
- * @param value - Value to compare against.
574
- * @documentationMaturity preview
575
- */
576
- ne: (propertyName: 'namespace' | 'key' | 'displayName' | 'dataType' | '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
577
- /** @param propertyName - Property whose value is compared with `value`.
578
- * @param value - Value to compare against.
579
- * @documentationMaturity preview
580
- */
581
- ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
582
- /** @param propertyName - Property whose value is compared with `value`.
583
- * @param value - Value to compare against.
584
- * @documentationMaturity preview
585
- */
586
- gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
587
- /** @param propertyName - Property whose value is compared with `value`.
588
- * @param value - Value to compare against.
589
- * @documentationMaturity preview
590
- */
591
- le: (propertyName: '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
592
- /** @param propertyName - Property whose value is compared with `value`.
593
- * @param value - Value to compare against.
594
- * @documentationMaturity preview
595
- */
596
- lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
597
- /** @param propertyName - Property whose value is compared with `string`.
598
- * @param string - String to compare against. Case-insensitive.
599
- * @documentationMaturity preview
600
- */
601
- startsWith: (propertyName: 'displayName', value: string) => FieldsQueryBuilder;
602
- /** @documentationMaturity preview */
603
- in: (propertyName: 'key' | 'displayName', value: any) => FieldsQueryBuilder;
604
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
605
- * @documentationMaturity preview
606
- */
607
- ascending: (...propertyNames: Array<'displayName' | '_createdDate' | '_updatedDate'>) => FieldsQueryBuilder;
608
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
609
- * @documentationMaturity preview
610
- */
611
- descending: (...propertyNames: Array<'displayName' | '_createdDate' | '_updatedDate'>) => FieldsQueryBuilder;
612
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
613
- * @documentationMaturity preview
614
- */
615
- limit: (limit: number) => FieldsQueryBuilder;
616
- /** @param skip - Number of items to skip in the query results before returning the results.
617
- * @documentationMaturity preview
618
- */
619
- skip: (skip: number) => FieldsQueryBuilder;
620
- /** @documentationMaturity preview */
621
- find: () => Promise<FieldsQueryResult>;
622
- }
623
- export {};