@wix/crm 1.0.80 → 1.0.81

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 (186) hide show
  1. package/build/cjs/context.d.ts +5 -0
  2. package/build/cjs/context.js +32 -0
  3. package/build/cjs/context.js.map +1 -0
  4. package/build/cjs/index.d.ts +1 -0
  5. package/build/cjs/index.js +7 -2
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/index.typings.d.ts +1 -0
  8. package/build/cjs/index.typings.js +7 -2
  9. package/build/cjs/index.typings.js.map +1 -1
  10. package/build/cjs/meta.d.ts +1 -0
  11. package/build/cjs/meta.js +7 -2
  12. package/build/cjs/meta.js.map +1 -1
  13. package/build/cjs/src/contacts-v4-contact.context.d.ts +9 -0
  14. package/build/cjs/src/contacts-v4-contact.context.js +82 -0
  15. package/build/cjs/src/contacts-v4-contact.context.js.map +1 -0
  16. package/build/cjs/src/contacts-v4-contact.http.d.ts +20 -94
  17. package/build/cjs/src/contacts-v4-contact.http.js +211 -249
  18. package/build/cjs/src/contacts-v4-contact.http.js.map +1 -1
  19. package/build/cjs/src/contacts-v4-contact.meta.d.ts +1 -1
  20. package/build/cjs/src/contacts-v4-contact.meta.js +5 -1
  21. package/build/cjs/src/contacts-v4-contact.meta.js.map +1 -1
  22. package/build/cjs/src/contacts-v4-contact.public.d.ts +6 -6
  23. package/build/cjs/src/contacts-v4-contact.public.js +5 -2
  24. package/build/cjs/src/contacts-v4-contact.public.js.map +1 -1
  25. package/build/cjs/src/contacts-v4-contact.types.d.ts +265 -5
  26. package/build/cjs/src/contacts-v4-contact.types.js +40 -19
  27. package/build/cjs/src/contacts-v4-contact.types.js.map +1 -1
  28. package/build/cjs/src/contacts-v4-contact.universal.d.ts +221 -155
  29. package/build/cjs/src/contacts-v4-contact.universal.js +140 -168
  30. package/build/cjs/src/contacts-v4-contact.universal.js.map +1 -1
  31. package/build/cjs/src/contacts-v4-extended-field.context.d.ts +7 -0
  32. package/build/cjs/src/contacts-v4-extended-field.context.js +60 -0
  33. package/build/cjs/src/contacts-v4-extended-field.context.js.map +1 -0
  34. package/build/cjs/src/contacts-v4-extended-field.http.d.ts +7 -14
  35. package/build/cjs/src/contacts-v4-extended-field.http.js +60 -70
  36. package/build/cjs/src/contacts-v4-extended-field.http.js.map +1 -1
  37. package/build/cjs/src/contacts-v4-extended-field.meta.d.ts +1 -1
  38. package/build/cjs/src/contacts-v4-extended-field.meta.js +5 -1
  39. package/build/cjs/src/contacts-v4-extended-field.meta.js.map +1 -1
  40. package/build/cjs/src/contacts-v4-extended-field.public.d.ts +1 -1
  41. package/build/cjs/src/contacts-v4-extended-field.types.d.ts +68 -1
  42. package/build/cjs/src/contacts-v4-extended-field.types.js +3 -3
  43. package/build/cjs/src/contacts-v4-extended-field.types.js.map +1 -1
  44. package/build/cjs/src/contacts-v4-extended-field.universal.d.ts +104 -30
  45. package/build/cjs/src/contacts-v4-extended-field.universal.js +58 -51
  46. package/build/cjs/src/contacts-v4-extended-field.universal.js.map +1 -1
  47. package/build/cjs/src/contacts-v4-label.context.d.ts +7 -0
  48. package/build/cjs/src/contacts-v4-label.context.js +60 -0
  49. package/build/cjs/src/contacts-v4-label.context.js.map +1 -0
  50. package/build/cjs/src/contacts-v4-label.http.d.ts +13 -14
  51. package/build/cjs/src/contacts-v4-label.http.js +66 -72
  52. package/build/cjs/src/contacts-v4-label.http.js.map +1 -1
  53. package/build/cjs/src/contacts-v4-label.meta.d.ts +1 -1
  54. package/build/cjs/src/contacts-v4-label.meta.js +5 -1
  55. package/build/cjs/src/contacts-v4-label.meta.js.map +1 -1
  56. package/build/cjs/src/contacts-v4-label.public.d.ts +5 -5
  57. package/build/cjs/src/contacts-v4-label.types.d.ts +76 -9
  58. package/build/cjs/src/contacts-v4-label.types.js +2 -2
  59. package/build/cjs/src/contacts-v4-label.types.js.map +1 -1
  60. package/build/cjs/src/contacts-v4-label.universal.d.ts +113 -40
  61. package/build/cjs/src/contacts-v4-label.universal.js +72 -62
  62. package/build/cjs/src/contacts-v4-label.universal.js.map +1 -1
  63. package/build/cjs/src/contacts-v4-submit-contact.context.d.ts +3 -0
  64. package/build/cjs/src/contacts-v4-submit-contact.context.js +16 -0
  65. package/build/cjs/src/contacts-v4-submit-contact.context.js.map +1 -0
  66. package/build/cjs/src/contacts-v4-submit-contact.http.js +20 -34
  67. package/build/cjs/src/contacts-v4-submit-contact.http.js.map +1 -1
  68. package/build/cjs/src/contacts-v4-submit-contact.meta.d.ts +1 -1
  69. package/build/cjs/src/contacts-v4-submit-contact.meta.js +5 -1
  70. package/build/cjs/src/contacts-v4-submit-contact.meta.js.map +1 -1
  71. package/build/cjs/src/contacts-v4-submit-contact.public.d.ts +2 -2
  72. package/build/cjs/src/contacts-v4-submit-contact.types.d.ts +8 -3
  73. package/build/cjs/src/contacts-v4-submit-contact.types.js +9 -9
  74. package/build/cjs/src/contacts-v4-submit-contact.types.js.map +1 -1
  75. package/build/cjs/src/contacts-v4-submit-contact.universal.d.ts +8 -9
  76. package/build/cjs/src/contacts-v4-submit-contact.universal.js +25 -28
  77. package/build/cjs/src/contacts-v4-submit-contact.universal.js.map +1 -1
  78. package/build/cjs/src/crm-tasks-v2-task.context.d.ts +9 -0
  79. package/build/cjs/src/crm-tasks-v2-task.context.js +82 -0
  80. package/build/cjs/src/crm-tasks-v2-task.context.js.map +1 -0
  81. package/build/cjs/src/crm-tasks-v2-task.http.d.ts +60 -0
  82. package/build/cjs/src/crm-tasks-v2-task.http.js +268 -0
  83. package/build/cjs/src/crm-tasks-v2-task.http.js.map +1 -0
  84. package/build/cjs/src/crm-tasks-v2-task.meta.d.ts +27 -0
  85. package/build/cjs/src/crm-tasks-v2-task.meta.js +161 -0
  86. package/build/cjs/src/crm-tasks-v2-task.meta.js.map +1 -0
  87. package/build/cjs/src/crm-tasks-v2-task.public.d.ts +29 -0
  88. package/build/cjs/src/crm-tasks-v2-task.public.js +53 -0
  89. package/build/cjs/src/crm-tasks-v2-task.public.js.map +1 -0
  90. package/build/cjs/src/crm-tasks-v2-task.types.d.ts +430 -0
  91. package/build/cjs/src/crm-tasks-v2-task.types.js +29 -0
  92. package/build/cjs/src/crm-tasks-v2-task.types.js.map +1 -0
  93. package/build/cjs/src/crm-tasks-v2-task.universal.d.ts +665 -0
  94. package/build/cjs/src/crm-tasks-v2-task.universal.js +515 -0
  95. package/build/cjs/src/crm-tasks-v2-task.universal.js.map +1 -0
  96. package/build/cjs/src/ping-notifications-v3-notification.public.d.ts +1 -1
  97. package/build/cjs/src/ping-notifications-v3-notification.types.js +1 -1
  98. package/build/cjs/src/ping-notifications-v3-notification.types.js.map +1 -1
  99. package/build/cjs/src/ping-notifications-v3-notification.universal.js +6 -2
  100. package/build/cjs/src/ping-notifications-v3-notification.universal.js.map +1 -1
  101. package/build/es/context.d.ts +5 -0
  102. package/build/es/context.js +6 -0
  103. package/build/es/context.js.map +1 -0
  104. package/build/es/index.d.ts +1 -0
  105. package/build/es/index.js +1 -0
  106. package/build/es/index.js.map +1 -1
  107. package/build/es/index.typings.d.ts +1 -0
  108. package/build/es/index.typings.js +1 -0
  109. package/build/es/index.typings.js.map +1 -1
  110. package/build/es/meta.d.ts +1 -0
  111. package/build/es/meta.js +1 -0
  112. package/build/es/meta.js.map +1 -1
  113. package/build/es/src/contacts-v4-contact.context.d.ts +9 -0
  114. package/build/es/src/contacts-v4-contact.context.js +72 -0
  115. package/build/es/src/contacts-v4-contact.context.js.map +1 -0
  116. package/build/es/src/contacts-v4-contact.http.d.ts +20 -94
  117. package/build/es/src/contacts-v4-contact.http.js +211 -249
  118. package/build/es/src/contacts-v4-contact.http.js.map +1 -1
  119. package/build/es/src/contacts-v4-contact.meta.d.ts +1 -1
  120. package/build/es/src/contacts-v4-contact.public.d.ts +6 -6
  121. package/build/es/src/contacts-v4-contact.public.js +2 -2
  122. package/build/es/src/contacts-v4-contact.public.js.map +1 -1
  123. package/build/es/src/contacts-v4-contact.types.d.ts +265 -5
  124. package/build/es/src/contacts-v4-contact.types.js +21 -0
  125. package/build/es/src/contacts-v4-contact.types.js.map +1 -1
  126. package/build/es/src/contacts-v4-contact.universal.d.ts +221 -155
  127. package/build/es/src/contacts-v4-contact.universal.js +117 -149
  128. package/build/es/src/contacts-v4-contact.universal.js.map +1 -1
  129. package/build/es/src/contacts-v4-extended-field.context.d.ts +7 -0
  130. package/build/es/src/contacts-v4-extended-field.context.js +52 -0
  131. package/build/es/src/contacts-v4-extended-field.context.js.map +1 -0
  132. package/build/es/src/contacts-v4-extended-field.http.d.ts +7 -14
  133. package/build/es/src/contacts-v4-extended-field.http.js +60 -70
  134. package/build/es/src/contacts-v4-extended-field.http.js.map +1 -1
  135. package/build/es/src/contacts-v4-extended-field.meta.d.ts +1 -1
  136. package/build/es/src/contacts-v4-extended-field.public.d.ts +1 -1
  137. package/build/es/src/contacts-v4-extended-field.types.d.ts +68 -1
  138. package/build/es/src/contacts-v4-extended-field.universal.d.ts +104 -30
  139. package/build/es/src/contacts-v4-extended-field.universal.js +49 -46
  140. package/build/es/src/contacts-v4-extended-field.universal.js.map +1 -1
  141. package/build/es/src/contacts-v4-label.context.d.ts +7 -0
  142. package/build/es/src/contacts-v4-label.context.js +52 -0
  143. package/build/es/src/contacts-v4-label.context.js.map +1 -0
  144. package/build/es/src/contacts-v4-label.http.d.ts +13 -14
  145. package/build/es/src/contacts-v4-label.http.js +66 -72
  146. package/build/es/src/contacts-v4-label.http.js.map +1 -1
  147. package/build/es/src/contacts-v4-label.meta.d.ts +1 -1
  148. package/build/es/src/contacts-v4-label.public.d.ts +5 -5
  149. package/build/es/src/contacts-v4-label.types.d.ts +76 -9
  150. package/build/es/src/contacts-v4-label.universal.d.ts +113 -40
  151. package/build/es/src/contacts-v4-label.universal.js +64 -58
  152. package/build/es/src/contacts-v4-label.universal.js.map +1 -1
  153. package/build/es/src/contacts-v4-submit-contact.context.d.ts +3 -0
  154. package/build/es/src/contacts-v4-submit-contact.context.js +12 -0
  155. package/build/es/src/contacts-v4-submit-contact.context.js.map +1 -0
  156. package/build/es/src/contacts-v4-submit-contact.http.js +20 -34
  157. package/build/es/src/contacts-v4-submit-contact.http.js.map +1 -1
  158. package/build/es/src/contacts-v4-submit-contact.meta.d.ts +1 -1
  159. package/build/es/src/contacts-v4-submit-contact.public.d.ts +2 -2
  160. package/build/es/src/contacts-v4-submit-contact.types.d.ts +8 -3
  161. package/build/es/src/contacts-v4-submit-contact.types.js.map +1 -1
  162. package/build/es/src/contacts-v4-submit-contact.universal.d.ts +8 -9
  163. package/build/es/src/contacts-v4-submit-contact.universal.js +11 -18
  164. package/build/es/src/contacts-v4-submit-contact.universal.js.map +1 -1
  165. package/build/es/src/crm-tasks-v2-task.context.d.ts +9 -0
  166. package/build/es/src/crm-tasks-v2-task.context.js +72 -0
  167. package/build/es/src/crm-tasks-v2-task.context.js.map +1 -0
  168. package/build/es/src/crm-tasks-v2-task.http.d.ts +60 -0
  169. package/build/es/src/crm-tasks-v2-task.http.js +258 -0
  170. package/build/es/src/crm-tasks-v2-task.http.js.map +1 -0
  171. package/build/es/src/crm-tasks-v2-task.meta.d.ts +27 -0
  172. package/build/es/src/crm-tasks-v2-task.meta.js +128 -0
  173. package/build/es/src/crm-tasks-v2-task.meta.js.map +1 -0
  174. package/build/es/src/crm-tasks-v2-task.public.d.ts +29 -0
  175. package/build/es/src/crm-tasks-v2-task.public.js +39 -0
  176. package/build/es/src/crm-tasks-v2-task.public.js.map +1 -0
  177. package/build/es/src/crm-tasks-v2-task.types.d.ts +430 -0
  178. package/build/es/src/crm-tasks-v2-task.types.js +26 -0
  179. package/build/es/src/crm-tasks-v2-task.types.js.map +1 -0
  180. package/build/es/src/crm-tasks-v2-task.universal.d.ts +665 -0
  181. package/build/es/src/crm-tasks-v2-task.universal.js +482 -0
  182. package/build/es/src/crm-tasks-v2-task.universal.js.map +1 -0
  183. package/build/es/src/ping-notifications-v3-notification.public.d.ts +1 -1
  184. package/build/es/src/ping-notifications-v3-notification.universal.js.map +1 -1
  185. package/context/package.json +6 -0
  186. package/package.json +12 -6
@@ -1,20 +1,8 @@
1
1
  import { toURLSearchParams } from '@wix/metro-runtime';
2
- import { serializer } from '@wix/metro-runtime/ambassador';
2
+ import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
3
+ import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
4
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
3
5
  import { resolveUrl } from '@wix/metro-runtime';
4
- const _contactLabel = {
5
- createdDate: 'google.protobuf.Timestamp',
6
- updatedDate: 'google.protobuf.Timestamp',
7
- };
8
- const _deleteLabelRequest = {};
9
- const _deleteLabelResponse = {};
10
- const _findOrCreateLabelRequest = {};
11
- const _findOrCreateLabelResponse = { label: '_contactLabel' };
12
- const _getLabelRequest = {};
13
- const _getLabelResponse = { label: '_contactLabel' };
14
- const _queryLabelsRequest = {};
15
- const _queryLabelsResponse = { labels: '_contactLabel' };
16
- const _updateLabelRequest = { label: '_contactLabel' };
17
- const _updateLabelResponse = { label: '_contactLabel' };
18
6
  function resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url(opts) {
19
7
  const domainToMappings = {
20
8
  'api._api_base_domain_': [
@@ -69,34 +57,34 @@ function resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url(opts) {
69
57
  *
70
58
  * Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
71
59
  *
72
- * To find an existing label without potentially creating a new one, use [`getLabel()`](#getlabel) or [`queryLabels()`](#querylabels).
60
+ * To find an existing label without potentially creating a new one, use `getLabel()` or `queryLabels()`.
73
61
  *
74
- * > **Note:**
75
- * > Only visitors with **Manage Contacts** permissions can run this function.
76
62
  *
77
63
  */
78
64
  export function findOrCreateLabel(payload) {
79
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_findOrCreateLabelRequest, {});
80
- const { fromJSON: fromRes } = serializer(_findOrCreateLabelResponse, {
81
- _contactLabel,
82
- });
83
65
  function __findOrCreateLabel({ host }) {
84
- const serializedData = toReq(payload);
85
66
  const metadata = {
86
67
  entityFqdn: 'wix.contacts.v4.label',
87
68
  method: 'POST',
88
69
  methodFqn: 'com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.FindOrCreateLabel',
89
70
  url: resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url({
90
71
  protoPath: '/v4/labels',
91
- data: serializedData,
72
+ data: payload,
92
73
  host,
93
74
  }),
94
- data: serializedData,
95
- transformResponse: fromRes,
75
+ data: payload,
76
+ transformResponse: (payload) => transformPaths(payload, [
77
+ {
78
+ transformFn: transformRESTTimestampToSDKTimestamp,
79
+ paths: [
80
+ { path: 'label.createdDate' },
81
+ { path: 'label.updatedDate' },
82
+ ],
83
+ },
84
+ ]),
96
85
  };
97
86
  return metadata;
98
87
  }
99
- __findOrCreateLabel.fromReq = fromReq;
100
88
  return __findOrCreateLabel;
101
89
  }
102
90
  /**
@@ -105,39 +93,45 @@ export function findOrCreateLabel(payload) {
105
93
  * The `getLabel()` function returns a Promise that resolves when the specified label is retrieved.
106
94
  */
107
95
  export function getLabel(payload) {
108
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_getLabelRequest, {});
109
- const { fromJSON: fromRes } = serializer(_getLabelResponse, {
110
- _contactLabel,
111
- });
112
96
  function __getLabel({ host }) {
113
- const serializedData = toReq(payload);
114
97
  const metadata = {
115
98
  entityFqdn: 'wix.contacts.v4.label',
116
99
  method: 'GET',
117
100
  methodFqn: 'com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.GetLabel',
118
101
  url: resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url({
119
102
  protoPath: '/v4/labels/{key}',
120
- data: serializedData,
103
+ data: payload,
121
104
  host,
122
105
  }),
123
- params: toURLSearchParams(serializedData),
124
- transformResponse: fromRes,
106
+ params: toURLSearchParams(payload),
107
+ transformResponse: (payload) => transformPaths(payload, [
108
+ {
109
+ transformFn: transformRESTTimestampToSDKTimestamp,
110
+ paths: [
111
+ { path: 'label.createdDate' },
112
+ { path: 'label.updatedDate' },
113
+ ],
114
+ },
115
+ ]),
125
116
  };
126
117
  return metadata;
127
118
  }
128
- __getLabel.fromReq = fromReq;
129
119
  return __getLabel;
130
120
  }
131
- /** Updates a label's specified properties. */
121
+ /**
122
+ * Renames a label.
123
+ *
124
+ * The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.
125
+ *
126
+ */
132
127
  export function updateLabel(payload) {
133
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateLabelRequest, {
134
- _contactLabel,
135
- });
136
- const { fromJSON: fromRes } = serializer(_updateLabelResponse, {
137
- _contactLabel,
138
- });
139
128
  function __updateLabel({ host }) {
140
- const serializedData = toReq(payload);
129
+ const serializedData = transformPaths(payload, [
130
+ {
131
+ transformFn: transformSDKTimestampToRESTTimestamp,
132
+ paths: [{ path: 'label.createdDate' }, { path: 'label.updatedDate' }],
133
+ },
134
+ ]);
141
135
  const metadata = {
142
136
  entityFqdn: 'wix.contacts.v4.label',
143
137
  method: 'PATCH',
@@ -148,11 +142,18 @@ export function updateLabel(payload) {
148
142
  host,
149
143
  }),
150
144
  data: serializedData,
151
- transformResponse: fromRes,
145
+ transformResponse: (payload) => transformPaths(payload, [
146
+ {
147
+ transformFn: transformRESTTimestampToSDKTimestamp,
148
+ paths: [
149
+ { path: 'label.createdDate' },
150
+ { path: 'label.updatedDate' },
151
+ ],
152
+ },
153
+ ]),
152
154
  };
153
155
  return metadata;
154
156
  }
155
- __updateLabel.fromReq = fromReq;
156
157
  return __updateLabel;
157
158
  }
158
159
  /**
@@ -160,74 +161,67 @@ export function updateLabel(payload) {
160
161
  *
161
162
  * The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
162
163
  *
163
- * > **Note:**
164
- * > Only visitors with **Manage Contacts** permissions can run this function.
165
164
  *
166
165
  */
167
166
  export function deleteLabel(payload) {
168
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteLabelRequest, {});
169
- const { fromJSON: fromRes } = serializer(_deleteLabelResponse, {});
170
167
  function __deleteLabel({ host }) {
171
- const serializedData = toReq(payload);
172
168
  const metadata = {
173
169
  entityFqdn: 'wix.contacts.v4.label',
174
170
  method: 'DELETE',
175
171
  methodFqn: 'com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.DeleteLabel',
176
172
  url: resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url({
177
173
  protoPath: '/v4/labels/{key}',
178
- data: serializedData,
174
+ data: payload,
179
175
  host,
180
176
  }),
181
- params: toURLSearchParams(serializedData),
182
- transformResponse: fromRes,
177
+ params: toURLSearchParams(payload),
183
178
  };
184
179
  return metadata;
185
180
  }
186
- __deleteLabel.fromReq = fromReq;
187
181
  return __deleteLabel;
188
182
  }
189
183
  /**
190
184
  * Creates a query to retrieve a list of labels.
191
185
  *
192
- * The `queryLabels()` function builds a query to retrieve a list of labels and returns a [`LabelsQueryBuilder`](#labelsquerybuilder) object.
186
+ * The `queryLabels()` function builds a query to retrieve a list of labels and returns a `LabelsQueryBuilder` object.
193
187
  *
194
- * The returned object contains the query definition, which is used to run the query using the [`find()`](#labelsquerybuilder/find) function.
188
+ * The returned object contains the query definition, which is used to run the query using the `find()` function.
195
189
  *
196
190
  * You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns.
197
191
  *
198
192
  * `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:
199
- * - [`skip(0)`](#labelsquerybuilder/skip)
200
- * - [`limit(50)`](#labelsquerybuilder/limit)
201
- * - [`descending('_createdDate')`](#labelsquerybuilder/descending)
193
+ * - `skip(0)`
194
+ * - `limit(50)`
195
+ * - `descending('_createdDate')`
202
196
  *
203
- * >**Note:** Only visitors with **Manage Contacts** permissions can query labels.
204
- *
205
- * The following `LabelsQueryBuilder` functions are supported for `queryLabels()`. For a full description of the `Labels` object, see the object returned for the [`items`](#labelsqueryresult/items) property in [`LabelsQueryResult`](#labelsqueryresult).
197
+ * The following `LabelsQueryBuilder` functions are supported for `queryLabels()`. For a full description of the `Labels` object, see the object returned for the `items` property in `LabelsQueryResult`.
206
198
  *
207
199
  *
208
200
  */
209
201
  export function queryLabels(payload) {
210
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_queryLabelsRequest, {});
211
- const { fromJSON: fromRes } = serializer(_queryLabelsResponse, {
212
- _contactLabel,
213
- });
214
202
  function __queryLabels({ host }) {
215
- const serializedData = toReq(payload);
216
203
  const metadata = {
217
204
  entityFqdn: 'wix.contacts.v4.label',
218
205
  method: 'POST',
219
206
  methodFqn: 'com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.QueryLabels',
220
207
  url: resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url({
221
208
  protoPath: '/v4/labels/query',
222
- data: serializedData,
209
+ data: payload,
223
210
  host,
224
211
  }),
225
- data: serializedData,
226
- transformResponse: fromRes,
212
+ data: payload,
213
+ transformResponse: (payload) => transformPaths(payload, [
214
+ {
215
+ transformFn: transformRESTTimestampToSDKTimestamp,
216
+ paths: [
217
+ { path: 'labels.createdDate' },
218
+ { path: 'labels.updatedDate' },
219
+ ],
220
+ },
221
+ ]),
227
222
  };
228
223
  return metadata;
229
224
  }
230
- __queryLabels.fromReq = fromReq;
231
225
  return __queryLabels;
232
226
  }
233
227
  //# sourceMappingURL=contacts-v4-label.http.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contacts-v4-label.http.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAoBhD,MAAM,aAAa,GAAG;IACpB,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AACF,MA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AA2D,CAAC;gBAC/D,SAAS,EAAE,kBAAkB;gBAC7B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;IAEhC,OAAO,aAAa,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"contacts-v4-label.http.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAoBhD,SAAS,2DAA2D,CAClE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,qBAAqB;gBAC9B,QAAQ,EAAE,YAAY;aACvB;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY;aACvB;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY;aACvB;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY;aACvB;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY;aACvB;SACF;QACD,gBAAgB,E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AClC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,uBAAuB;YACnC,MAAM,EAAE,QAAe;YACvB,SAAS,EACP,oEAAoE;YACtE,GAAG,EAAE,2DAA2D,CAAC;gBAC/D,SAAS,EAAE,kBAAkB;gBAC7B,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC;SACnC,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,WAAW,CACzB,OAA2B;IAI3B,SAAS,aAAa,CAAC,EAAE,IAAI,EAAO;QAClC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,uBAAuB;YACnC,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,oEAAoE;YACtE,GAAG,EAAE,2DAA2D,CAAC;gBAC/D,SAAS,EAAE,kBAAkB;gBAC7B,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;YACb,iBAAiB,EAAE,CAAC,OAAY,EAAE,EAAE,CAClC,cAAc,CAAC,OAAO,EAAE;gBACtB;oBACE,WAAW,EAAE,oCAAoC;oBACjD,KAAK,EAAE;wBACL,EAAE,IAAI,EAAE,oBAAoB,EAAE;wBAC9B,EAAE,IAAI,EAAE,oBAAoB,EAAE;qBAC/B;iBACF;aACF,CAAC;SACL,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import * as ambassadorWixContactsV4LabelTypes from './contacts-v4-label.types';
2
2
  import * as ambassadorWixContactsV4LabelUniversalTypes from './contacts-v4-label.universal';
3
- export declare type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
3
+ export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
4
4
  getUrl: (context: any) => string;
5
5
  httpMethod: K;
6
6
  path: string;
@@ -3,18 +3,18 @@ import { RenameLabel, FindOrCreateLabelOptions, GetLabelOptions, QueryLabelsOpti
3
3
  export declare const __metadata: {
4
4
  PACKAGE_NAME: string;
5
5
  };
6
- export declare function findOrCreateLabel(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").FindOrCreateLabelResponse & import("./contacts-v4-label.universal").FindOrCreateLabelResponseNonNullableFields>;
7
- export declare function getLabel(httpClient: HttpClient): (key: string, options?: GetLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").ContactLabel & {
6
+ export declare function findOrCreateLabel(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<import("./contacts-v4-label.universal").FindOrCreateLabelResponse & import("./contacts-v4-label.universal").FindOrCreateLabelResponseNonNullableFields>;
7
+ export declare function getLabel(httpClient: HttpClient): (key: string, options?: GetLabelOptions) => Promise<import("./contacts-v4-label.universal").ContactLabel & {
8
8
  key: string;
9
9
  displayName: string;
10
10
  labelType: import("./contacts-v4-label.universal").LabelType;
11
11
  }>;
12
- export declare function renameLabel(httpClient: HttpClient): (key: string, label: RenameLabel, options?: RenameLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").ContactLabel & {
12
+ export declare function renameLabel(httpClient: HttpClient): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<import("./contacts-v4-label.universal").ContactLabel & {
13
13
  key: string;
14
14
  displayName: string;
15
15
  labelType: import("./contacts-v4-label.universal").LabelType;
16
16
  }>;
17
17
  export declare function deleteLabel(httpClient: HttpClient): (key: string) => Promise<void>;
18
- export declare function queryLabels(httpClient: HttpClient): (options?: QueryLabelsOptions | undefined) => import("./contacts-v4-label.universal").LabelsQueryBuilder;
18
+ export declare function queryLabels(httpClient: HttpClient): (options?: QueryLabelsOptions) => import("./contacts-v4-label.universal").LabelsQueryBuilder;
19
19
  export { LabelType, SortOrder } from './contacts-v4-label.universal';
20
- export { ContactLabel, ListLabelsRequest, Sorting, Paging, ListLabelsResponse, PagingMetadata, FindOrCreateLabelRequest, FindOrCreateLabelResponse, LabelsQuotaReached, ListLabelNamespacesRequest, ListLabelNamespacesResponse, ContactLabelNamespace, GetLabelRequest, GetLabelResponse, GetLabelByLegacyIdRequest, GetLabelByLegacyIdResponse, UpdateLabelRequest, UpdateLabelResponse, DeleteLabelRequest, DeleteLabelResponse, PurgeRequest, PurgeResponse, GdprListRequest, GdprListResponse, QueryLabelsRequest, Query, QueryLabelsResponse, FindOrCreateLabelResponseNonNullableFields, GetLabelResponseNonNullableFields, UpdateLabelResponseNonNullableFields, QueryLabelsResponseNonNullableFields, FindOrCreateLabelOptions, GetLabelOptions, RenameLabel, RenameLabelOptions, QueryLabelsOptions, LabelsQueryResult, LabelsQueryBuilder, } from './contacts-v4-label.universal';
20
+ export { ContactLabel, ListLabelsRequest, Sorting, Paging, ListLabelsResponse, PagingMetadata, FindOrCreateLabelRequest, FindOrCreateLabelResponse, LabelsQuotaReached, ListLabelNamespacesRequest, ListLabelNamespacesResponse, ContactLabelNamespace, GetLabelRequest, GetLabelResponse, GetLabelByLegacyIdRequest, GetLabelByLegacyIdResponse, UpdateLabelRequest, UpdateLabelResponse, DeleteLabelRequest, DeleteLabelResponse, PurgeRequest, PurgeResponse, GdprListRequest, GdprListResponse, QueryLabelsRequest, Query, QueryLabelsResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, FindOrCreateLabelResponseNonNullableFields, GetLabelResponseNonNullableFields, UpdateLabelResponseNonNullableFields, QueryLabelsResponseNonNullableFields, FindOrCreateLabelOptions, GetLabelOptions, RenameLabel, RenameLabelOptions, QueryLabelsOptions, LabelsQueryResult, LabelsQueryBuilder, } from './contacts-v4-label.universal';
@@ -3,7 +3,7 @@ export interface ContactLabel {
3
3
  /**
4
4
  * Label namespace.
5
5
  *
6
- * Labels created by site contributors or 3rd-party apps
6
+ * Labels created by site admins or 3rd-party apps
7
7
  * are automatically assigned to the `custom` namespace.
8
8
  * @readonly
9
9
  */
@@ -17,19 +17,19 @@ export interface ContactLabel {
17
17
  /**
18
18
  * Label key.
19
19
  *
20
- * `key` is generated when the label is created
21
- * and cannot be modified, even if `displayName` changes.
20
+ * `key` is generated when the label is created.
21
+ * It cannot be modified, even if `displayName` is updated.
22
22
  * @readonly
23
23
  */
24
24
  key?: string;
25
25
  /** Label display name shown in the Dashboard. */
26
26
  displayName?: string;
27
27
  /**
28
- * Label type.
28
+ * Label type indicating how the label was created.
29
29
  *
30
- * - `SYSTEM`: The label is a default system label for the Contact List.
31
- * - `USER_DEFINED`: The label was created by a site contributor or 3rd-party app.
32
- * - `WIX_APP_DEFINED`: The label was created by a Wix app.
30
+ * - `SYSTEM`: Default system label for the Contact List.
31
+ * - `USER_DEFINED`: Label created by a site contributor or 3rd-party app.
32
+ * - `WIX_APP_DEFINED`: Label created by a Wix app.
33
33
  * @readonly
34
34
  */
35
35
  labelType?: LabelType;
@@ -164,8 +164,8 @@ export interface GetLabelRequest {
164
164
  /**
165
165
  * Label key.
166
166
  *
167
- * `key` is generated when the label is created
168
- * and cannot be modified, even if `displayName` changes.
167
+ * `key` is generated when the label is created.
168
+ * It cannot be modified, even if `displayName` is updated.
169
169
  */
170
170
  key: string;
171
171
  /** Language for localization. */
@@ -251,6 +251,73 @@ export interface QueryLabelsResponse {
251
251
  /** Details on the paged set of results returned. */
252
252
  pagingMetadata?: PagingMetadata;
253
253
  }
254
+ export interface DomainEvent extends DomainEventBodyOneOf {
255
+ createdEvent?: EntityCreatedEvent;
256
+ updatedEvent?: EntityUpdatedEvent;
257
+ deletedEvent?: EntityDeletedEvent;
258
+ actionEvent?: ActionEvent;
259
+ /**
260
+ * Unique event ID.
261
+ * Allows clients to ignore duplicate webhooks.
262
+ */
263
+ id?: string;
264
+ /**
265
+ * Assumes actions are also always typed to an entity_type
266
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
267
+ */
268
+ entityFqdn?: string;
269
+ /**
270
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
271
+ * This is although the created/updated/deleted notion is duplication of the oneof types
272
+ * Example: created/updated/deleted/started/completed/email_opened
273
+ */
274
+ slug?: string;
275
+ /** ID of the entity associated with the event. */
276
+ entityId?: string;
277
+ /** Event timestamp. */
278
+ eventTime?: Date;
279
+ /**
280
+ * Whether the event was triggered as a result of a privacy regulation application
281
+ * (for example, GDPR).
282
+ */
283
+ triggeredByAnonymizeRequest?: boolean | null;
284
+ /** If present, indicates the action that triggered the event. */
285
+ originatedFrom?: string | null;
286
+ /**
287
+ * A sequence number defining the order of updates to the underlying entity.
288
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
289
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
290
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
291
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
292
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
293
+ */
294
+ entityEventSequence?: string | null;
295
+ }
296
+ /** @oneof */
297
+ export interface DomainEventBodyOneOf {
298
+ createdEvent?: EntityCreatedEvent;
299
+ updatedEvent?: EntityUpdatedEvent;
300
+ deletedEvent?: EntityDeletedEvent;
301
+ actionEvent?: ActionEvent;
302
+ }
303
+ export interface EntityCreatedEvent {
304
+ entityAsJson?: string;
305
+ }
306
+ export interface EntityUpdatedEvent {
307
+ /**
308
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
309
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
310
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
311
+ */
312
+ currentEntityAsJson?: string;
313
+ }
314
+ export interface EntityDeletedEvent {
315
+ /** Entity that was deleted */
316
+ deletedEntityAsJson?: string | null;
317
+ }
318
+ export interface ActionEvent {
319
+ bodyAsJson?: string;
320
+ }
254
321
  export interface FindOrCreateLabelResponseNonNullableFields {
255
322
  label?: {
256
323
  key: string;