@wix/crm 1.0.80 → 1.0.82
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.
- package/build/cjs/context.d.ts +5 -0
- package/build/cjs/context.js +32 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +7 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +7 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +7 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.context.d.ts +9 -0
- package/build/cjs/src/contacts-v4-contact.context.js +82 -0
- package/build/cjs/src/contacts-v4-contact.context.js.map +1 -0
- package/build/cjs/src/contacts-v4-contact.http.d.ts +20 -94
- package/build/cjs/src/contacts-v4-contact.http.js +211 -249
- package/build/cjs/src/contacts-v4-contact.http.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.meta.d.ts +1 -1
- package/build/cjs/src/contacts-v4-contact.meta.js +5 -1
- package/build/cjs/src/contacts-v4-contact.meta.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.public.d.ts +7 -6
- package/build/cjs/src/contacts-v4-contact.public.js +10 -2
- package/build/cjs/src/contacts-v4-contact.public.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.types.d.ts +265 -5
- package/build/cjs/src/contacts-v4-contact.types.js +40 -19
- package/build/cjs/src/contacts-v4-contact.types.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.universal.d.ts +234 -155
- package/build/cjs/src/contacts-v4-contact.universal.js +145 -168
- package/build/cjs/src/contacts-v4-contact.universal.js.map +1 -1
- package/build/cjs/src/contacts-v4-extended-field.context.d.ts +7 -0
- package/build/cjs/src/contacts-v4-extended-field.context.js +60 -0
- package/build/cjs/src/contacts-v4-extended-field.context.js.map +1 -0
- package/build/cjs/src/contacts-v4-extended-field.http.d.ts +7 -14
- package/build/cjs/src/contacts-v4-extended-field.http.js +60 -70
- package/build/cjs/src/contacts-v4-extended-field.http.js.map +1 -1
- package/build/cjs/src/contacts-v4-extended-field.meta.d.ts +1 -1
- package/build/cjs/src/contacts-v4-extended-field.meta.js +5 -1
- package/build/cjs/src/contacts-v4-extended-field.meta.js.map +1 -1
- package/build/cjs/src/contacts-v4-extended-field.public.d.ts +2 -1
- package/build/cjs/src/contacts-v4-extended-field.public.js +5 -1
- package/build/cjs/src/contacts-v4-extended-field.public.js.map +1 -1
- package/build/cjs/src/contacts-v4-extended-field.types.d.ts +68 -1
- package/build/cjs/src/contacts-v4-extended-field.types.js +3 -3
- package/build/cjs/src/contacts-v4-extended-field.types.js.map +1 -1
- package/build/cjs/src/contacts-v4-extended-field.universal.d.ts +116 -30
- package/build/cjs/src/contacts-v4-extended-field.universal.js +62 -51
- package/build/cjs/src/contacts-v4-extended-field.universal.js.map +1 -1
- package/build/cjs/src/contacts-v4-label.context.d.ts +7 -0
- package/build/cjs/src/contacts-v4-label.context.js +60 -0
- package/build/cjs/src/contacts-v4-label.context.js.map +1 -0
- package/build/cjs/src/contacts-v4-label.http.d.ts +13 -14
- package/build/cjs/src/contacts-v4-label.http.js +66 -72
- package/build/cjs/src/contacts-v4-label.http.js.map +1 -1
- package/build/cjs/src/contacts-v4-label.meta.d.ts +1 -1
- package/build/cjs/src/contacts-v4-label.meta.js +5 -1
- package/build/cjs/src/contacts-v4-label.meta.js.map +1 -1
- package/build/cjs/src/contacts-v4-label.public.d.ts +6 -5
- package/build/cjs/src/contacts-v4-label.public.js +5 -1
- package/build/cjs/src/contacts-v4-label.public.js.map +1 -1
- package/build/cjs/src/contacts-v4-label.types.d.ts +76 -9
- package/build/cjs/src/contacts-v4-label.types.js +2 -2
- package/build/cjs/src/contacts-v4-label.types.js.map +1 -1
- package/build/cjs/src/contacts-v4-label.universal.d.ts +125 -40
- package/build/cjs/src/contacts-v4-label.universal.js +76 -62
- package/build/cjs/src/contacts-v4-label.universal.js.map +1 -1
- package/build/cjs/src/contacts-v4-submit-contact.context.d.ts +3 -0
- package/build/cjs/src/contacts-v4-submit-contact.context.js +16 -0
- package/build/cjs/src/contacts-v4-submit-contact.context.js.map +1 -0
- package/build/cjs/src/contacts-v4-submit-contact.http.js +20 -34
- package/build/cjs/src/contacts-v4-submit-contact.http.js.map +1 -1
- package/build/cjs/src/contacts-v4-submit-contact.meta.d.ts +1 -1
- package/build/cjs/src/contacts-v4-submit-contact.meta.js +5 -1
- package/build/cjs/src/contacts-v4-submit-contact.meta.js.map +1 -1
- package/build/cjs/src/contacts-v4-submit-contact.public.d.ts +2 -2
- package/build/cjs/src/contacts-v4-submit-contact.types.d.ts +8 -3
- package/build/cjs/src/contacts-v4-submit-contact.types.js +9 -9
- package/build/cjs/src/contacts-v4-submit-contact.types.js.map +1 -1
- package/build/cjs/src/contacts-v4-submit-contact.universal.d.ts +8 -9
- package/build/cjs/src/contacts-v4-submit-contact.universal.js +25 -28
- package/build/cjs/src/contacts-v4-submit-contact.universal.js.map +1 -1
- package/build/cjs/src/crm-tasks-v2-task.context.d.ts +9 -0
- package/build/cjs/src/crm-tasks-v2-task.context.js +82 -0
- package/build/cjs/src/crm-tasks-v2-task.context.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task.http.d.ts +60 -0
- package/build/cjs/src/crm-tasks-v2-task.http.js +268 -0
- package/build/cjs/src/crm-tasks-v2-task.http.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task.meta.d.ts +27 -0
- package/build/cjs/src/crm-tasks-v2-task.meta.js +161 -0
- package/build/cjs/src/crm-tasks-v2-task.meta.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task.public.d.ts +30 -0
- package/build/cjs/src/crm-tasks-v2-task.public.js +58 -0
- package/build/cjs/src/crm-tasks-v2-task.public.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task.types.d.ts +430 -0
- package/build/cjs/src/crm-tasks-v2-task.types.js +29 -0
- package/build/cjs/src/crm-tasks-v2-task.types.js.map +1 -0
- package/build/cjs/src/crm-tasks-v2-task.universal.d.ts +678 -0
- package/build/cjs/src/crm-tasks-v2-task.universal.js +520 -0
- package/build/cjs/src/crm-tasks-v2-task.universal.js.map +1 -0
- package/build/cjs/src/ping-notifications-v3-notification.public.d.ts +1 -1
- package/build/cjs/src/ping-notifications-v3-notification.types.js +1 -1
- package/build/cjs/src/ping-notifications-v3-notification.types.js.map +1 -1
- package/build/cjs/src/ping-notifications-v3-notification.universal.js +6 -2
- package/build/cjs/src/ping-notifications-v3-notification.universal.js.map +1 -1
- package/build/es/context.d.ts +5 -0
- package/build/es/context.js +6 -0
- package/build/es/context.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +1 -0
- package/build/es/index.typings.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +1 -0
- package/build/es/meta.js.map +1 -1
- package/build/es/src/contacts-v4-contact.context.d.ts +9 -0
- package/build/es/src/contacts-v4-contact.context.js +72 -0
- package/build/es/src/contacts-v4-contact.context.js.map +1 -0
- package/build/es/src/contacts-v4-contact.http.d.ts +20 -94
- package/build/es/src/contacts-v4-contact.http.js +211 -249
- package/build/es/src/contacts-v4-contact.http.js.map +1 -1
- package/build/es/src/contacts-v4-contact.meta.d.ts +1 -1
- package/build/es/src/contacts-v4-contact.public.d.ts +7 -6
- package/build/es/src/contacts-v4-contact.public.js +3 -2
- package/build/es/src/contacts-v4-contact.public.js.map +1 -1
- package/build/es/src/contacts-v4-contact.types.d.ts +265 -5
- package/build/es/src/contacts-v4-contact.types.js +21 -0
- package/build/es/src/contacts-v4-contact.types.js.map +1 -1
- package/build/es/src/contacts-v4-contact.universal.d.ts +234 -155
- package/build/es/src/contacts-v4-contact.universal.js +122 -149
- package/build/es/src/contacts-v4-contact.universal.js.map +1 -1
- package/build/es/src/contacts-v4-extended-field.context.d.ts +7 -0
- package/build/es/src/contacts-v4-extended-field.context.js +52 -0
- package/build/es/src/contacts-v4-extended-field.context.js.map +1 -0
- package/build/es/src/contacts-v4-extended-field.http.d.ts +7 -14
- package/build/es/src/contacts-v4-extended-field.http.js +60 -70
- package/build/es/src/contacts-v4-extended-field.http.js.map +1 -1
- package/build/es/src/contacts-v4-extended-field.meta.d.ts +1 -1
- package/build/es/src/contacts-v4-extended-field.public.d.ts +2 -1
- package/build/es/src/contacts-v4-extended-field.public.js +1 -0
- package/build/es/src/contacts-v4-extended-field.public.js.map +1 -1
- package/build/es/src/contacts-v4-extended-field.types.d.ts +68 -1
- package/build/es/src/contacts-v4-extended-field.universal.d.ts +116 -30
- package/build/es/src/contacts-v4-extended-field.universal.js +53 -46
- package/build/es/src/contacts-v4-extended-field.universal.js.map +1 -1
- package/build/es/src/contacts-v4-label.context.d.ts +7 -0
- package/build/es/src/contacts-v4-label.context.js +52 -0
- package/build/es/src/contacts-v4-label.context.js.map +1 -0
- package/build/es/src/contacts-v4-label.http.d.ts +13 -14
- package/build/es/src/contacts-v4-label.http.js +66 -72
- package/build/es/src/contacts-v4-label.http.js.map +1 -1
- package/build/es/src/contacts-v4-label.meta.d.ts +1 -1
- package/build/es/src/contacts-v4-label.public.d.ts +6 -5
- package/build/es/src/contacts-v4-label.public.js +1 -0
- package/build/es/src/contacts-v4-label.public.js.map +1 -1
- package/build/es/src/contacts-v4-label.types.d.ts +76 -9
- package/build/es/src/contacts-v4-label.universal.d.ts +125 -40
- package/build/es/src/contacts-v4-label.universal.js +68 -58
- package/build/es/src/contacts-v4-label.universal.js.map +1 -1
- package/build/es/src/contacts-v4-submit-contact.context.d.ts +3 -0
- package/build/es/src/contacts-v4-submit-contact.context.js +12 -0
- package/build/es/src/contacts-v4-submit-contact.context.js.map +1 -0
- package/build/es/src/contacts-v4-submit-contact.http.js +20 -34
- package/build/es/src/contacts-v4-submit-contact.http.js.map +1 -1
- package/build/es/src/contacts-v4-submit-contact.meta.d.ts +1 -1
- package/build/es/src/contacts-v4-submit-contact.public.d.ts +2 -2
- package/build/es/src/contacts-v4-submit-contact.types.d.ts +8 -3
- package/build/es/src/contacts-v4-submit-contact.types.js.map +1 -1
- package/build/es/src/contacts-v4-submit-contact.universal.d.ts +8 -9
- package/build/es/src/contacts-v4-submit-contact.universal.js +11 -18
- package/build/es/src/contacts-v4-submit-contact.universal.js.map +1 -1
- package/build/es/src/crm-tasks-v2-task.context.d.ts +9 -0
- package/build/es/src/crm-tasks-v2-task.context.js +72 -0
- package/build/es/src/crm-tasks-v2-task.context.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task.http.d.ts +60 -0
- package/build/es/src/crm-tasks-v2-task.http.js +258 -0
- package/build/es/src/crm-tasks-v2-task.http.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task.meta.d.ts +27 -0
- package/build/es/src/crm-tasks-v2-task.meta.js +128 -0
- package/build/es/src/crm-tasks-v2-task.meta.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task.public.d.ts +30 -0
- package/build/es/src/crm-tasks-v2-task.public.js +40 -0
- package/build/es/src/crm-tasks-v2-task.public.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task.types.d.ts +430 -0
- package/build/es/src/crm-tasks-v2-task.types.js +26 -0
- package/build/es/src/crm-tasks-v2-task.types.js.map +1 -0
- package/build/es/src/crm-tasks-v2-task.universal.d.ts +678 -0
- package/build/es/src/crm-tasks-v2-task.universal.js +487 -0
- package/build/es/src/crm-tasks-v2-task.universal.js.map +1 -0
- package/build/es/src/ping-notifications-v3-notification.public.d.ts +1 -1
- package/build/es/src/ping-notifications-v3-notification.universal.js.map +1 -1
- package/context/package.json +6 -0
- package/package.json +12 -6
|
@@ -3,7 +3,7 @@ export interface ContactLabel {
|
|
|
3
3
|
/**
|
|
4
4
|
* Label namespace.
|
|
5
5
|
*
|
|
6
|
-
* Labels created by site
|
|
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
|
-
*
|
|
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`:
|
|
31
|
-
* - `USER_DEFINED`:
|
|
32
|
-
* - `WIX_APP_DEFINED`:
|
|
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
|
-
*
|
|
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;
|
|
@@ -8,10 +8,10 @@ var LabelType;
|
|
|
8
8
|
LabelType["SYSTEM"] = "SYSTEM";
|
|
9
9
|
LabelType["USER_DEFINED"] = "USER_DEFINED";
|
|
10
10
|
LabelType["WIX_APP_DEFINED"] = "WIX_APP_DEFINED";
|
|
11
|
-
})(LabelType
|
|
11
|
+
})(LabelType || (exports.LabelType = LabelType = {}));
|
|
12
12
|
var SortOrder;
|
|
13
13
|
(function (SortOrder) {
|
|
14
14
|
SortOrder["ASC"] = "ASC";
|
|
15
15
|
SortOrder["DESC"] = "DESC";
|
|
16
|
-
})(SortOrder
|
|
16
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
17
17
|
//# sourceMappingURL=contacts-v4-label.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts-v4-label.types.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.types.ts"],"names":[],"mappings":";;;AA+CA,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,kDAAkD;IAClD,gCAAmB,CAAA;IACnB,8BAAiB,CAAA;IACjB,0CAA6B,CAAA;IAC7B,gDAAmC,CAAA;AACrC,CAAC,EANW,SAAS,
|
|
1
|
+
{"version":3,"file":"contacts-v4-label.types.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.types.ts"],"names":[],"mappings":";;;AA+CA,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,kDAAkD;IAClD,gCAAmB,CAAA;IACnB,8BAAiB,CAAA;IACjB,0CAA6B,CAAA;IAC7B,gDAAmC,CAAA;AACrC,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB;AA6BD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
verboseLogging: {
|
|
3
|
-
on: () => boolean;
|
|
4
|
-
off: () => boolean;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
1
|
+
import { EventDefinition } from '@wix/sdk-types';
|
|
7
2
|
/** Label that was found or created. */
|
|
8
3
|
export interface ContactLabel {
|
|
9
4
|
/**
|
|
10
5
|
* Label namespace.
|
|
11
6
|
*
|
|
12
|
-
* Labels created by site
|
|
7
|
+
* Labels created by site admins or 3rd-party apps
|
|
13
8
|
* are automatically assigned to the `custom` namespace.
|
|
14
9
|
* @readonly
|
|
15
10
|
*/
|
|
@@ -23,8 +18,8 @@ export interface ContactLabel {
|
|
|
23
18
|
/**
|
|
24
19
|
* Label key.
|
|
25
20
|
*
|
|
26
|
-
* `key` is generated when the label is created
|
|
27
|
-
*
|
|
21
|
+
* `key` is generated when the label is created.
|
|
22
|
+
* It cannot be modified, even if `displayName` is updated.
|
|
28
23
|
* @readonly
|
|
29
24
|
*/
|
|
30
25
|
key?: string;
|
|
@@ -170,8 +165,8 @@ export interface GetLabelRequest {
|
|
|
170
165
|
/**
|
|
171
166
|
* Label key.
|
|
172
167
|
*
|
|
173
|
-
* `key` is generated when the label is created
|
|
174
|
-
*
|
|
168
|
+
* `key` is generated when the label is created.
|
|
169
|
+
* It cannot be modified, even if `displayName` is updated.
|
|
175
170
|
*/
|
|
176
171
|
key: string;
|
|
177
172
|
/** Language for localization. */
|
|
@@ -257,6 +252,81 @@ export interface QueryLabelsResponse {
|
|
|
257
252
|
/** Details on the paged set of results returned. */
|
|
258
253
|
pagingMetadata?: PagingMetadata;
|
|
259
254
|
}
|
|
255
|
+
export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
|
|
256
|
+
createdEvent?: EntityCreatedEvent<T>;
|
|
257
|
+
updatedEvent?: EntityUpdatedEvent<T>;
|
|
258
|
+
deletedEvent?: EntityDeletedEvent<T>;
|
|
259
|
+
actionEvent?: ActionEvent<T>;
|
|
260
|
+
/**
|
|
261
|
+
* Unique event ID.
|
|
262
|
+
* Allows clients to ignore duplicate webhooks.
|
|
263
|
+
*/
|
|
264
|
+
_id?: string;
|
|
265
|
+
/**
|
|
266
|
+
* Assumes actions are also always typed to an entity_type
|
|
267
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
268
|
+
*/
|
|
269
|
+
entityFqdn?: string;
|
|
270
|
+
/**
|
|
271
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
272
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
273
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
274
|
+
*/
|
|
275
|
+
slug?: string;
|
|
276
|
+
/** ID of the entity associated with the event. */
|
|
277
|
+
entityId?: string;
|
|
278
|
+
/** Event timestamp. */
|
|
279
|
+
eventTime?: Date;
|
|
280
|
+
/**
|
|
281
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
282
|
+
* (for example, GDPR).
|
|
283
|
+
*/
|
|
284
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
285
|
+
/** If present, indicates the action that triggered the event. */
|
|
286
|
+
originatedFrom?: string | null;
|
|
287
|
+
/**
|
|
288
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
289
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
290
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
291
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
292
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
293
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
294
|
+
*/
|
|
295
|
+
entityEventSequence?: string | null;
|
|
296
|
+
}
|
|
297
|
+
export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
298
|
+
}
|
|
299
|
+
export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
300
|
+
}
|
|
301
|
+
export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
|
|
302
|
+
}
|
|
303
|
+
export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
|
|
304
|
+
}
|
|
305
|
+
/** @oneof */
|
|
306
|
+
export interface DomainEventBodyOneOf<T> {
|
|
307
|
+
createdEvent?: EntityCreatedEvent<T>;
|
|
308
|
+
updatedEvent?: EntityUpdatedEvent<T>;
|
|
309
|
+
deletedEvent?: EntityDeletedEvent<T>;
|
|
310
|
+
actionEvent?: ActionEvent<T>;
|
|
311
|
+
}
|
|
312
|
+
export interface EntityCreatedEvent<T> {
|
|
313
|
+
entity?: T;
|
|
314
|
+
}
|
|
315
|
+
export interface EntityUpdatedEvent<T> {
|
|
316
|
+
/**
|
|
317
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
318
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
319
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
320
|
+
*/
|
|
321
|
+
currentEntity?: T;
|
|
322
|
+
}
|
|
323
|
+
export interface EntityDeletedEvent<T> {
|
|
324
|
+
/** Entity that was deleted */
|
|
325
|
+
deletedEntity?: T | null;
|
|
326
|
+
}
|
|
327
|
+
export interface ActionEvent<T> {
|
|
328
|
+
body?: T;
|
|
329
|
+
}
|
|
260
330
|
export interface FindOrCreateLabelResponseNonNullableFields {
|
|
261
331
|
label?: {
|
|
262
332
|
key: string;
|
|
@@ -286,6 +356,9 @@ export interface QueryLabelsResponseNonNullableFields {
|
|
|
286
356
|
labelType: LabelType;
|
|
287
357
|
}[];
|
|
288
358
|
}
|
|
359
|
+
export declare const onLabelCreated: EventDefinition<DomainCreatedEvent<ContactLabel>, "wix.contacts.v4.label_created">;
|
|
360
|
+
export declare const onLabelUpdated: EventDefinition<DomainUpdatedEvent<ContactLabel>, "wix.contacts.v4.label_updated">;
|
|
361
|
+
export declare const onLabelDeleted: EventDefinition<DomainDeletedEvent<ContactLabel>, "wix.contacts.v4.label_deleted">;
|
|
289
362
|
/**
|
|
290
363
|
* Retrieves a label with a given name, or creates one if it doesn't exist.
|
|
291
364
|
*
|
|
@@ -293,10 +366,8 @@ export interface QueryLabelsResponseNonNullableFields {
|
|
|
293
366
|
*
|
|
294
367
|
* Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
|
|
295
368
|
*
|
|
296
|
-
* To find an existing label without potentially creating a new one, use
|
|
369
|
+
* To find an existing label without potentially creating a new one, use `getLabel()` or `queryLabels()`.
|
|
297
370
|
*
|
|
298
|
-
* > **Note:**
|
|
299
|
-
* > Only visitors with **Manage Contacts** permissions can run this function.
|
|
300
371
|
*
|
|
301
372
|
* @param displayName - Display name to retrieve or create.
|
|
302
373
|
*
|
|
@@ -305,9 +376,13 @@ export interface QueryLabelsResponseNonNullableFields {
|
|
|
305
376
|
* the existing label is returned.
|
|
306
377
|
* If not, a new label is created and returned.
|
|
307
378
|
* @public
|
|
379
|
+
* @documentationMaturity preview
|
|
308
380
|
* @requiredField displayName
|
|
309
381
|
* @param options - Language options.
|
|
310
382
|
* @permissionScope Manage Contact Labels
|
|
383
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
|
|
384
|
+
* @permissionScope Manage Members and Contacts - all permissions
|
|
385
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
311
386
|
* @applicableIdentity APP
|
|
312
387
|
* @returns Label that was found or created.
|
|
313
388
|
*/
|
|
@@ -327,13 +402,18 @@ export interface FindOrCreateLabelOptions {
|
|
|
327
402
|
* The `getLabel()` function returns a Promise that resolves when the specified label is retrieved.
|
|
328
403
|
* @param key - Label key.
|
|
329
404
|
*
|
|
330
|
-
* `key` is generated when the label is created
|
|
331
|
-
*
|
|
405
|
+
* `key` is generated when the label is created.
|
|
406
|
+
* It cannot be modified, even if `displayName` is updated.
|
|
332
407
|
* @public
|
|
333
408
|
* @documentationMaturity preview
|
|
334
409
|
* @requiredField key
|
|
335
410
|
* @param options - Language options.
|
|
411
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
412
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
336
413
|
* @permissionScope Manage Contact Labels
|
|
414
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
|
|
415
|
+
* @permissionScope Manage Members and Contacts - all permissions
|
|
416
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
337
417
|
* @applicableIdentity APP
|
|
338
418
|
* @returns The specified label.
|
|
339
419
|
*/
|
|
@@ -348,33 +428,34 @@ export interface GetLabelOptions {
|
|
|
348
428
|
language?: string | null;
|
|
349
429
|
}
|
|
350
430
|
/**
|
|
351
|
-
*
|
|
431
|
+
* Renames a label.
|
|
432
|
+
*
|
|
433
|
+
* The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.
|
|
434
|
+
*
|
|
352
435
|
* @param key - Label key.
|
|
353
436
|
*
|
|
354
|
-
* `key` is generated when the label is created
|
|
355
|
-
*
|
|
437
|
+
* `key` is generated when the label is created.
|
|
438
|
+
* It cannot be modified, even if `displayName` is updated.
|
|
356
439
|
* @public
|
|
357
440
|
* @documentationMaturity preview
|
|
358
441
|
* @requiredField key
|
|
359
442
|
* @requiredField label
|
|
360
443
|
* @requiredField label.displayName
|
|
361
444
|
* @param options - Language options.
|
|
362
|
-
* @param label - Label
|
|
445
|
+
* @param label - Label to rename.
|
|
363
446
|
* @permissionScope Manage Contact Labels
|
|
447
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
|
|
448
|
+
* @permissionScope Manage Members and Contacts - all permissions
|
|
449
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
364
450
|
* @applicableIdentity APP
|
|
365
|
-
* @returns
|
|
366
|
-
*
|
|
367
|
-
* The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.
|
|
368
|
-
*
|
|
369
|
-
* >**Note:**
|
|
370
|
-
* > Only visitors with **Manage Contacts** permissions can rename a label.
|
|
451
|
+
* @returns
|
|
371
452
|
*/
|
|
372
453
|
export declare function renameLabel(key: string, label: RenameLabel, options?: RenameLabelOptions): Promise<ContactLabel & NonNullable<UpdateLabelResponseNonNullableFields>['label']>;
|
|
373
454
|
export interface RenameLabel {
|
|
374
455
|
/**
|
|
375
456
|
* Label namespace.
|
|
376
457
|
*
|
|
377
|
-
* Labels created by site
|
|
458
|
+
* Labels created by site admins or 3rd-party apps
|
|
378
459
|
* are automatically assigned to the `custom` namespace.
|
|
379
460
|
* @readonly
|
|
380
461
|
*/
|
|
@@ -421,40 +502,44 @@ export interface RenameLabelOptions {
|
|
|
421
502
|
*
|
|
422
503
|
* The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
|
|
423
504
|
*
|
|
424
|
-
* > **Note:**
|
|
425
|
-
* > Only visitors with **Manage Contacts** permissions can run this function.
|
|
426
505
|
*
|
|
427
506
|
* @param key - Label key to delete.
|
|
428
507
|
* @public
|
|
429
508
|
* @documentationMaturity preview
|
|
430
509
|
* @requiredField key
|
|
431
510
|
* @permissionScope Manage Contact Labels
|
|
511
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
|
|
512
|
+
* @permissionScope Manage Members and Contacts - all permissions
|
|
513
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
432
514
|
* @applicableIdentity APP
|
|
433
515
|
*/
|
|
434
516
|
export declare function deleteLabel(key: string): Promise<void>;
|
|
435
517
|
/**
|
|
436
518
|
* Creates a query to retrieve a list of labels.
|
|
437
519
|
*
|
|
438
|
-
* The `queryLabels()` function builds a query to retrieve a list of labels and returns a
|
|
520
|
+
* The `queryLabels()` function builds a query to retrieve a list of labels and returns a `LabelsQueryBuilder` object.
|
|
439
521
|
*
|
|
440
|
-
* The returned object contains the query definition, which is used to run the query using the
|
|
522
|
+
* The returned object contains the query definition, which is used to run the query using the `find()` function.
|
|
441
523
|
*
|
|
442
524
|
* 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.
|
|
443
525
|
*
|
|
444
526
|
* `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:
|
|
445
|
-
* -
|
|
446
|
-
* -
|
|
447
|
-
* -
|
|
448
|
-
*
|
|
449
|
-
* >**Note:** Only visitors with **Manage Contacts** permissions can query labels.
|
|
527
|
+
* - `skip(0)`
|
|
528
|
+
* - `limit(50)`
|
|
529
|
+
* - `descending('_createdDate')`
|
|
450
530
|
*
|
|
451
|
-
* The following `LabelsQueryBuilder` functions are supported for `queryLabels()`. For a full description of the `Labels` object, see the object returned for the
|
|
531
|
+
* 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`.
|
|
452
532
|
*
|
|
453
533
|
*
|
|
454
534
|
* @public
|
|
455
535
|
* @documentationMaturity preview
|
|
456
536
|
* @param options - Language options.
|
|
537
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
538
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
457
539
|
* @permissionScope Manage Contact Labels
|
|
540
|
+
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
|
|
541
|
+
* @permissionScope Manage Members and Contacts - all permissions
|
|
542
|
+
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
458
543
|
* @applicableIdentity APP
|
|
459
544
|
*/
|
|
460
545
|
export declare function queryLabels(options?: QueryLabelsOptions): LabelsQueryBuilder;
|
|
@@ -468,9 +553,9 @@ export interface QueryLabelsOptions {
|
|
|
468
553
|
language?: string | null | undefined;
|
|
469
554
|
}
|
|
470
555
|
interface QueryOffsetResult {
|
|
471
|
-
currentPage: number;
|
|
472
|
-
totalPages: number;
|
|
473
|
-
totalCount: number;
|
|
556
|
+
currentPage: number | undefined;
|
|
557
|
+
totalPages: number | undefined;
|
|
558
|
+
totalCount: number | undefined;
|
|
474
559
|
hasNext: () => boolean;
|
|
475
560
|
hasPrev: () => boolean;
|
|
476
561
|
length: number;
|