@wix/motion 1.0.38 → 1.0.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/motion",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,9 +18,9 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/motion_alarms": "1.0.8",
21
+ "@wix/motion_alarms": "1.0.9",
22
22
  "@wix/motion_metroinspector": "1.0.5",
23
- "@wix/motion_products": "1.0.7"
23
+ "@wix/motion_products": "1.0.8"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
@@ -45,5 +45,5 @@
45
45
  "fqdn": ""
46
46
  }
47
47
  },
48
- "falconPackageHash": "78cfcfe8e6068b5eb38831eedc293de06d4d9f9ac014acff8c2da3d0"
48
+ "falconPackageHash": "d739a008ec8fde53fc7bfe180a1e14ae7e2abe27c306dc056b586bd6"
49
49
  }
@@ -153,7 +153,59 @@ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?
153
153
  type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
154
154
  type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
155
155
 
156
+ /**
157
+ * Creates a booking.
158
+ *
159
+ *
160
+ * To create a booking for an appointment or a session of a class, pass a booking with the relevant `slot`.
161
+ *
162
+ * To create a booking for the entire course, pass a booking with the relevant `schedule`.
163
+ * You can use Query Availability to check the availability beforehand.
164
+ *
165
+ * If you create a booking for an existing session, we recommend that you only pass `slot.sessionId`.
166
+ * Then, any specified slot details are calculated.
167
+ *
168
+ * If you create a booking for a new session, we recommend to call Query Availability first.
169
+ * Then, pass the retrieved `availability.slot` object as the BookedEntity.Slot of the booking in the request.
170
+ *
171
+ * Bookings are created with a status of `CREATED`.
172
+ * `CREATED` bookings don't appear on the business calendar and don't affect a related schedule's availability.
173
+ *
174
+ * To create a booking with a given status, pass a booking with the wanted status.
175
+ * This is only permitted for site Owners.
176
+ *
177
+ * You can pass a `participantNotification.message` to notify the customer of the booking with a message.
178
+ * It's also necessary to pass `participantNotification.notifyParticipants`as `true` to send the message.
179
+ *
180
+ * You can pass `sendSmsReminder` as `true`, if you want an SMS reminder to be sent to the phone number specified in the ContactDetails, 24 hours before the session starts.
181
+ *
182
+ * When creating a booking you must pass either `participantsChoices` or `totalParticipants`. If you pass `participantsChoices`, all the
183
+ * provided choices must exist for the service, otherwise the call returns an `INVALID_SERVICE_CHOICES` error.
184
+ *
185
+ * When creating a booking, you can pass `selectedPaymentOption`.
186
+ * This specifies which payment method the customer plans to use.
187
+ * But it's possible for them to later use another supported payment method.
188
+ *
189
+ * You can skip the checkout and payment flow if you call Confirm Or Decline Booking otherwise, after you create the booking, you can use the
190
+ * Wix eCommerce APIs (coming soon) for the checkout and payment flow or use a different service for checkout.
191
+ * @param booking - The booking to create.
192
+ * @public
193
+ * @documentationMaturity preview
194
+ * @requiredField booking
195
+ * @requiredField booking.additionalFields._id
196
+ * @requiredField booking.bookedEntity
197
+ * @permissionScope Manage Bookings
198
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
199
+ * @permissionScope Manage Bookings - all permissions
200
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
201
+ * @applicableIdentity APP
202
+ * @applicableIdentity MEMBER
203
+ * @applicableIdentity VISITOR
204
+ */
156
205
  declare function alarm$1(httpClient: HttpClient): (seconds: number, options?: AlarmOptions) => Promise<AlarmResponse>;
206
+ /**
207
+ * Another thing
208
+ */
157
209
  declare function updateAlarm$1(httpClient: HttpClient): (_id: string, alarm: UpdateAlarm) => Promise<UpdateAlarmResponse & UpdateAlarmResponseNonNullableFields>;
158
210
  declare const onAlarmTriggered$1: EventDefinition<AlarmTriggeredEnvelope, "wix.alarm.v1.alarm_alarm_triggered">;
159
211
  declare const onAlarmSnoozed$1: EventDefinition<AlarmSnoozedEnvelope, "wix.alarm.v1.alarm_alarm_snoozed">;
@@ -23,11 +23,11 @@ interface UpdateAlarmRequest {
23
23
  interface UpdateAlarmResponse {
24
24
  alarm?: AlarmMessage;
25
25
  }
26
- interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
27
- createdEvent?: EntityCreatedEvent$1;
28
- updatedEvent?: EntityUpdatedEvent$1;
29
- deletedEvent?: EntityDeletedEvent$1;
30
- actionEvent?: ActionEvent$1;
26
+ interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
27
+ createdEvent?: EntityCreatedEvent$2;
28
+ updatedEvent?: EntityUpdatedEvent$2;
29
+ deletedEvent?: EntityDeletedEvent$2;
30
+ actionEvent?: ActionEvent$2;
31
31
  /**
32
32
  * Unique event ID.
33
33
  * Allows clients to ignore duplicate webhooks.
@@ -66,16 +66,16 @@ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
66
66
  entityEventSequence?: string | null;
67
67
  }
68
68
  /** @oneof */
69
- interface DomainEventBodyOneOf$1 {
70
- createdEvent?: EntityCreatedEvent$1;
71
- updatedEvent?: EntityUpdatedEvent$1;
72
- deletedEvent?: EntityDeletedEvent$1;
73
- actionEvent?: ActionEvent$1;
69
+ interface DomainEventBodyOneOf$2 {
70
+ createdEvent?: EntityCreatedEvent$2;
71
+ updatedEvent?: EntityUpdatedEvent$2;
72
+ deletedEvent?: EntityDeletedEvent$2;
73
+ actionEvent?: ActionEvent$2;
74
74
  }
75
- interface EntityCreatedEvent$1 {
75
+ interface EntityCreatedEvent$2 {
76
76
  entity?: string;
77
77
  }
78
- interface EntityUpdatedEvent$1 {
78
+ interface EntityUpdatedEvent$2 {
79
79
  /**
80
80
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
81
81
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -83,24 +83,24 @@ interface EntityUpdatedEvent$1 {
83
83
  */
84
84
  currentEntity?: string;
85
85
  }
86
- interface EntityDeletedEvent$1 {
86
+ interface EntityDeletedEvent$2 {
87
87
  /** Entity that was deleted */
88
88
  deletedEntity?: string | null;
89
89
  }
90
- interface ActionEvent$1 {
90
+ interface ActionEvent$2 {
91
91
  body?: string;
92
92
  }
93
- interface MessageEnvelope$1 {
93
+ interface MessageEnvelope$2 {
94
94
  /** App instance ID. */
95
95
  instanceId?: string | null;
96
96
  /** Event type. */
97
97
  eventType?: string;
98
98
  /** The identification type and identity data. */
99
- identity?: IdentificationData$1;
99
+ identity?: IdentificationData$2;
100
100
  /** Stringify payload. */
101
101
  data?: string;
102
102
  }
103
- interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
103
+ interface IdentificationData$2 extends IdentificationDataIdOneOf$2 {
104
104
  /** ID of a site visitor that has not logged in to the site. */
105
105
  anonymousVisitorId?: string;
106
106
  /** ID of a site visitor that has logged in to the site. */
@@ -110,10 +110,10 @@ interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
110
110
  /** ID of an app. */
111
111
  appId?: string;
112
112
  /** @readonly */
113
- identityType?: WebhookIdentityType$1;
113
+ identityType?: WebhookIdentityType$2;
114
114
  }
115
115
  /** @oneof */
116
- interface IdentificationDataIdOneOf$1 {
116
+ interface IdentificationDataIdOneOf$2 {
117
117
  /** ID of a site visitor that has not logged in to the site. */
118
118
  anonymousVisitorId?: string;
119
119
  /** ID of a site visitor that has logged in to the site. */
@@ -123,7 +123,7 @@ interface IdentificationDataIdOneOf$1 {
123
123
  /** ID of an app. */
124
124
  appId?: string;
125
125
  }
126
- declare enum WebhookIdentityType$1 {
126
+ declare enum WebhookIdentityType$2 {
127
127
  UNKNOWN = "UNKNOWN",
128
128
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
129
129
  MEMBER = "MEMBER",
@@ -150,7 +150,7 @@ interface BaseEventMetadata$1 {
150
150
  /** Event type. */
151
151
  eventType?: string;
152
152
  /** The identification type and identity data. */
153
- identity?: IdentificationData$1;
153
+ identity?: IdentificationData$2;
154
154
  }
155
155
  interface EventMetadata$1 extends BaseEventMetadata$1 {
156
156
  /**
@@ -246,7 +246,59 @@ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?
246
246
  declare const __metadata$2: {
247
247
  PACKAGE_NAME: string;
248
248
  };
249
+ /**
250
+ * Creates a booking.
251
+ *
252
+ *
253
+ * To create a booking for an appointment or a session of a class, pass a booking with the relevant `slot`.
254
+ *
255
+ * To create a booking for the entire course, pass a booking with the relevant `schedule`.
256
+ * You can use Query Availability to check the availability beforehand.
257
+ *
258
+ * If you create a booking for an existing session, we recommend that you only pass `slot.sessionId`.
259
+ * Then, any specified slot details are calculated.
260
+ *
261
+ * If you create a booking for a new session, we recommend to call Query Availability first.
262
+ * Then, pass the retrieved `availability.slot` object as the BookedEntity.Slot of the booking in the request.
263
+ *
264
+ * Bookings are created with a status of `CREATED`.
265
+ * `CREATED` bookings don't appear on the business calendar and don't affect a related schedule's availability.
266
+ *
267
+ * To create a booking with a given status, pass a booking with the wanted status.
268
+ * This is only permitted for site Owners.
269
+ *
270
+ * You can pass a `participantNotification.message` to notify the customer of the booking with a message.
271
+ * It's also necessary to pass `participantNotification.notifyParticipants`as `true` to send the message.
272
+ *
273
+ * You can pass `sendSmsReminder` as `true`, if you want an SMS reminder to be sent to the phone number specified in the ContactDetails, 24 hours before the session starts.
274
+ *
275
+ * When creating a booking you must pass either `participantsChoices` or `totalParticipants`. If you pass `participantsChoices`, all the
276
+ * provided choices must exist for the service, otherwise the call returns an `INVALID_SERVICE_CHOICES` error.
277
+ *
278
+ * When creating a booking, you can pass `selectedPaymentOption`.
279
+ * This specifies which payment method the customer plans to use.
280
+ * But it's possible for them to later use another supported payment method.
281
+ *
282
+ * You can skip the checkout and payment flow if you call Confirm Or Decline Booking otherwise, after you create the booking, you can use the
283
+ * Wix eCommerce APIs (coming soon) for the checkout and payment flow or use a different service for checkout.
284
+ * @param booking - The booking to create.
285
+ * @public
286
+ * @documentationMaturity preview
287
+ * @requiredField booking
288
+ * @requiredField booking.additionalFields._id
289
+ * @requiredField booking.bookedEntity
290
+ * @permissionScope Manage Bookings
291
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
292
+ * @permissionScope Manage Bookings - all permissions
293
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
294
+ * @applicableIdentity APP
295
+ * @applicableIdentity MEMBER
296
+ * @applicableIdentity VISITOR
297
+ */
249
298
  declare function alarm(httpClient: HttpClient): (seconds: number, options?: AlarmOptions) => Promise<AlarmResponse>;
299
+ /**
300
+ * Another thing
301
+ */
250
302
  declare function updateAlarm(httpClient: HttpClient): (_id: string, alarm: UpdateAlarm) => Promise<UpdateAlarmResponse & UpdateAlarmResponseNonNullableFields>;
251
303
  declare const onAlarmTriggered: EventDefinition<AlarmTriggeredEnvelope, "wix.alarm.v1.alarm_alarm_triggered">;
252
304
  declare const onAlarmSnoozed: EventDefinition<AlarmSnoozedEnvelope, "wix.alarm.v1.alarm_alarm_snoozed">;
@@ -274,7 +326,7 @@ declare const index_d$2_onAlarmSnoozed: typeof onAlarmSnoozed;
274
326
  declare const index_d$2_onAlarmTriggered: typeof onAlarmTriggered;
275
327
  declare const index_d$2_updateAlarm: typeof updateAlarm;
276
328
  declare namespace index_d$2 {
277
- export { type ActionEvent$1 as ActionEvent, type index_d$2_AlarmDeleted as AlarmDeleted, type index_d$2_AlarmDeletedEnvelope as AlarmDeletedEnvelope, type index_d$2_AlarmMessage as AlarmMessage, type index_d$2_AlarmOptions as AlarmOptions, type index_d$2_AlarmRequest as AlarmRequest, type index_d$2_AlarmRequestRequiredFields as AlarmRequestRequiredFields, type index_d$2_AlarmResponse as AlarmResponse, type index_d$2_AlarmSnoozed as AlarmSnoozed, type index_d$2_AlarmSnoozedEnvelope as AlarmSnoozedEnvelope, type index_d$2_AlarmTriggered as AlarmTriggered, type index_d$2_AlarmTriggeredEnvelope as AlarmTriggeredEnvelope, type BaseEventMetadata$1 as BaseEventMetadata, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type index_d$2_UpdateAlarm as UpdateAlarm, type index_d$2_UpdateAlarmRequest as UpdateAlarmRequest, type index_d$2_UpdateAlarmRequestRequiredFields as UpdateAlarmRequestRequiredFields, type index_d$2_UpdateAlarmResponse as UpdateAlarmResponse, type index_d$2_UpdateAlarmResponseNonNullableFields as UpdateAlarmResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, __metadata$2 as __metadata, index_d$2_alarm as alarm, index_d$2_onAlarmDeleted as onAlarmDeleted, index_d$2_onAlarmSnoozed as onAlarmSnoozed, index_d$2_onAlarmTriggered as onAlarmTriggered, index_d$2_updateAlarm as updateAlarm };
329
+ export { type ActionEvent$2 as ActionEvent, type index_d$2_AlarmDeleted as AlarmDeleted, type index_d$2_AlarmDeletedEnvelope as AlarmDeletedEnvelope, type index_d$2_AlarmMessage as AlarmMessage, type index_d$2_AlarmOptions as AlarmOptions, type index_d$2_AlarmRequest as AlarmRequest, type index_d$2_AlarmRequestRequiredFields as AlarmRequestRequiredFields, type index_d$2_AlarmResponse as AlarmResponse, type index_d$2_AlarmSnoozed as AlarmSnoozed, type index_d$2_AlarmSnoozedEnvelope as AlarmSnoozedEnvelope, type index_d$2_AlarmTriggered as AlarmTriggered, type index_d$2_AlarmTriggeredEnvelope as AlarmTriggeredEnvelope, type BaseEventMetadata$1 as BaseEventMetadata, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type MessageEnvelope$2 as MessageEnvelope, type index_d$2_UpdateAlarm as UpdateAlarm, type index_d$2_UpdateAlarmRequest as UpdateAlarmRequest, type index_d$2_UpdateAlarmRequestRequiredFields as UpdateAlarmRequestRequiredFields, type index_d$2_UpdateAlarmResponse as UpdateAlarmResponse, type index_d$2_UpdateAlarmResponseNonNullableFields as UpdateAlarmResponseNonNullableFields, WebhookIdentityType$2 as WebhookIdentityType, __metadata$2 as __metadata, index_d$2_alarm as alarm, index_d$2_onAlarmDeleted as onAlarmDeleted, index_d$2_onAlarmSnoozed as onAlarmSnoozed, index_d$2_onAlarmTriggered as onAlarmTriggered, index_d$2_updateAlarm as updateAlarm };
278
330
  }
279
331
 
280
332
  interface MessageItem {
@@ -301,11 +353,11 @@ interface Dispatched {
301
353
  /** the message someone says */
302
354
  echo?: EchoMessage;
303
355
  }
304
- interface DomainEvent extends DomainEventBodyOneOf {
305
- createdEvent?: EntityCreatedEvent;
306
- updatedEvent?: EntityUpdatedEvent;
307
- deletedEvent?: EntityDeletedEvent;
308
- actionEvent?: ActionEvent;
356
+ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
357
+ createdEvent?: EntityCreatedEvent$1;
358
+ updatedEvent?: EntityUpdatedEvent$1;
359
+ deletedEvent?: EntityDeletedEvent$1;
360
+ actionEvent?: ActionEvent$1;
309
361
  /**
310
362
  * Unique event ID.
311
363
  * Allows clients to ignore duplicate webhooks.
@@ -344,16 +396,16 @@ interface DomainEvent extends DomainEventBodyOneOf {
344
396
  entityEventSequence?: string | null;
345
397
  }
346
398
  /** @oneof */
347
- interface DomainEventBodyOneOf {
348
- createdEvent?: EntityCreatedEvent;
349
- updatedEvent?: EntityUpdatedEvent;
350
- deletedEvent?: EntityDeletedEvent;
351
- actionEvent?: ActionEvent;
399
+ interface DomainEventBodyOneOf$1 {
400
+ createdEvent?: EntityCreatedEvent$1;
401
+ updatedEvent?: EntityUpdatedEvent$1;
402
+ deletedEvent?: EntityDeletedEvent$1;
403
+ actionEvent?: ActionEvent$1;
352
404
  }
353
- interface EntityCreatedEvent {
405
+ interface EntityCreatedEvent$1 {
354
406
  entity?: string;
355
407
  }
356
- interface EntityUpdatedEvent {
408
+ interface EntityUpdatedEvent$1 {
357
409
  /**
358
410
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
359
411
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -361,24 +413,24 @@ interface EntityUpdatedEvent {
361
413
  */
362
414
  currentEntity?: string;
363
415
  }
364
- interface EntityDeletedEvent {
416
+ interface EntityDeletedEvent$1 {
365
417
  /** Entity that was deleted */
366
418
  deletedEntity?: string | null;
367
419
  }
368
- interface ActionEvent {
420
+ interface ActionEvent$1 {
369
421
  body?: string;
370
422
  }
371
- interface MessageEnvelope {
423
+ interface MessageEnvelope$1 {
372
424
  /** App instance ID. */
373
425
  instanceId?: string | null;
374
426
  /** Event type. */
375
427
  eventType?: string;
376
428
  /** The identification type and identity data. */
377
- identity?: IdentificationData;
429
+ identity?: IdentificationData$1;
378
430
  /** Stringify payload. */
379
431
  data?: string;
380
432
  }
381
- interface IdentificationData extends IdentificationDataIdOneOf {
433
+ interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
382
434
  /** ID of a site visitor that has not logged in to the site. */
383
435
  anonymousVisitorId?: string;
384
436
  /** ID of a site visitor that has logged in to the site. */
@@ -388,10 +440,10 @@ interface IdentificationData extends IdentificationDataIdOneOf {
388
440
  /** ID of an app. */
389
441
  appId?: string;
390
442
  /** @readonly */
391
- identityType?: WebhookIdentityType;
443
+ identityType?: WebhookIdentityType$1;
392
444
  }
393
445
  /** @oneof */
394
- interface IdentificationDataIdOneOf {
446
+ interface IdentificationDataIdOneOf$1 {
395
447
  /** ID of a site visitor that has not logged in to the site. */
396
448
  anonymousVisitorId?: string;
397
449
  /** ID of a site visitor that has logged in to the site. */
@@ -401,7 +453,7 @@ interface IdentificationDataIdOneOf {
401
453
  /** ID of an app. */
402
454
  appId?: string;
403
455
  }
404
- declare enum WebhookIdentityType {
456
+ declare enum WebhookIdentityType$1 {
405
457
  UNKNOWN = "UNKNOWN",
406
458
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
407
459
  MEMBER = "MEMBER",
@@ -431,7 +483,7 @@ interface BaseEventMetadata {
431
483
  /** Event type. */
432
484
  eventType?: string;
433
485
  /** The identification type and identity data. */
434
- identity?: IdentificationData;
486
+ identity?: IdentificationData$1;
435
487
  }
436
488
  interface EventMetadata extends BaseEventMetadata {
437
489
  /**
@@ -490,11 +542,8 @@ declare const __metadata$1: {
490
542
  declare function echo(httpClient: HttpClient): (arg1: string, options?: EchoOptions) => Promise<string>;
491
543
  declare const onEchoDispatched: EventDefinition<EchoDispatchedEnvelope, "wix.metroinspector.v1.echo_dispatched">;
492
544
 
493
- type index_d$1_ActionEvent = ActionEvent;
494
545
  type index_d$1_BaseEventMetadata = BaseEventMetadata;
495
546
  type index_d$1_Dispatched = Dispatched;
496
- type index_d$1_DomainEvent = DomainEvent;
497
- type index_d$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
498
547
  type index_d$1_EchoDispatchedEnvelope = EchoDispatchedEnvelope;
499
548
  type index_d$1_EchoMessage = EchoMessage;
500
549
  type index_d$1_EchoOptions = EchoOptions;
@@ -502,20 +551,12 @@ type index_d$1_EchoRequest = EchoRequest;
502
551
  type index_d$1_EchoRequestRequiredFields = EchoRequestRequiredFields;
503
552
  type index_d$1_EchoResponse = EchoResponse;
504
553
  type index_d$1_EchoResponseNonNullableFields = EchoResponseNonNullableFields;
505
- type index_d$1_EntityCreatedEvent = EntityCreatedEvent;
506
- type index_d$1_EntityDeletedEvent = EntityDeletedEvent;
507
- type index_d$1_EntityUpdatedEvent = EntityUpdatedEvent;
508
554
  type index_d$1_EventMetadata = EventMetadata;
509
- type index_d$1_IdentificationData = IdentificationData;
510
- type index_d$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
511
- type index_d$1_MessageEnvelope = MessageEnvelope;
512
555
  type index_d$1_MessageItem = MessageItem;
513
- type index_d$1_WebhookIdentityType = WebhookIdentityType;
514
- declare const index_d$1_WebhookIdentityType: typeof WebhookIdentityType;
515
556
  declare const index_d$1_echo: typeof echo;
516
557
  declare const index_d$1_onEchoDispatched: typeof onEchoDispatched;
517
558
  declare namespace index_d$1 {
518
- export { type index_d$1_ActionEvent as ActionEvent, type index_d$1_BaseEventMetadata as BaseEventMetadata, type index_d$1_Dispatched as Dispatched, type index_d$1_DomainEvent as DomainEvent, type index_d$1_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d$1_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type index_d$1_EchoMessage as EchoMessage, type index_d$1_EchoOptions as EchoOptions, type index_d$1_EchoRequest as EchoRequest, type index_d$1_EchoRequestRequiredFields as EchoRequestRequiredFields, type index_d$1_EchoResponse as EchoResponse, type index_d$1_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type index_d$1_EntityCreatedEvent as EntityCreatedEvent, type index_d$1_EntityDeletedEvent as EntityDeletedEvent, type index_d$1_EntityUpdatedEvent as EntityUpdatedEvent, type index_d$1_EventMetadata as EventMetadata, type index_d$1_IdentificationData as IdentificationData, type index_d$1_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d$1_MessageEnvelope as MessageEnvelope, type index_d$1_MessageItem as MessageItem, index_d$1_WebhookIdentityType as WebhookIdentityType, __metadata$1 as __metadata, index_d$1_echo as echo, index_d$1_onEchoDispatched as onEchoDispatched };
559
+ export { type ActionEvent$1 as ActionEvent, type index_d$1_BaseEventMetadata as BaseEventMetadata, type index_d$1_Dispatched as Dispatched, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type index_d$1_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type index_d$1_EchoMessage as EchoMessage, type index_d$1_EchoOptions as EchoOptions, type index_d$1_EchoRequest as EchoRequest, type index_d$1_EchoRequestRequiredFields as EchoRequestRequiredFields, type index_d$1_EchoResponse as EchoResponse, type index_d$1_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type index_d$1_EventMetadata as EventMetadata, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type index_d$1_MessageItem as MessageItem, WebhookIdentityType$1 as WebhookIdentityType, __metadata$1 as __metadata, index_d$1_echo as echo, index_d$1_onEchoDispatched as onEchoDispatched };
519
560
  }
520
561
 
521
562
  /** Physical address */
@@ -820,6 +861,113 @@ interface ResetProductsDbRequest {
820
861
  }
821
862
  interface ResetProductsDbResponse {
822
863
  }
864
+ interface DomainEvent extends DomainEventBodyOneOf {
865
+ createdEvent?: EntityCreatedEvent;
866
+ updatedEvent?: EntityUpdatedEvent;
867
+ deletedEvent?: EntityDeletedEvent;
868
+ actionEvent?: ActionEvent;
869
+ /**
870
+ * Unique event ID.
871
+ * Allows clients to ignore duplicate webhooks.
872
+ */
873
+ _id?: string;
874
+ /**
875
+ * Assumes actions are also always typed to an entity_type
876
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
877
+ */
878
+ entityFqdn?: string;
879
+ /**
880
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
881
+ * This is although the created/updated/deleted notion is duplication of the oneof types
882
+ * Example: created/updated/deleted/started/completed/email_opened
883
+ */
884
+ slug?: string;
885
+ /** ID of the entity associated with the event. */
886
+ entityId?: string;
887
+ /** Event timestamp. */
888
+ eventTime?: Date;
889
+ /**
890
+ * Whether the event was triggered as a result of a privacy regulation application
891
+ * (for example, GDPR).
892
+ */
893
+ triggeredByAnonymizeRequest?: boolean | null;
894
+ /** If present, indicates the action that triggered the event. */
895
+ originatedFrom?: string | null;
896
+ /**
897
+ * A sequence number defining the order of updates to the underlying entity.
898
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
899
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
900
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
901
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
902
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
903
+ */
904
+ entityEventSequence?: string | null;
905
+ }
906
+ /** @oneof */
907
+ interface DomainEventBodyOneOf {
908
+ createdEvent?: EntityCreatedEvent;
909
+ updatedEvent?: EntityUpdatedEvent;
910
+ deletedEvent?: EntityDeletedEvent;
911
+ actionEvent?: ActionEvent;
912
+ }
913
+ interface EntityCreatedEvent {
914
+ entity?: string;
915
+ }
916
+ interface EntityUpdatedEvent {
917
+ /**
918
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
919
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
920
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
921
+ */
922
+ currentEntity?: string;
923
+ }
924
+ interface EntityDeletedEvent {
925
+ /** Entity that was deleted */
926
+ deletedEntity?: string | null;
927
+ }
928
+ interface ActionEvent {
929
+ body?: string;
930
+ }
931
+ interface MessageEnvelope {
932
+ /** App instance ID. */
933
+ instanceId?: string | null;
934
+ /** Event type. */
935
+ eventType?: string;
936
+ /** The identification type and identity data. */
937
+ identity?: IdentificationData;
938
+ /** Stringify payload. */
939
+ data?: string;
940
+ }
941
+ interface IdentificationData extends IdentificationDataIdOneOf {
942
+ /** ID of a site visitor that has not logged in to the site. */
943
+ anonymousVisitorId?: string;
944
+ /** ID of a site visitor that has logged in to the site. */
945
+ memberId?: string;
946
+ /** ID of a Wix user (site owner, contributor, etc.). */
947
+ wixUserId?: string;
948
+ /** ID of an app. */
949
+ appId?: string;
950
+ /** @readonly */
951
+ identityType?: WebhookIdentityType;
952
+ }
953
+ /** @oneof */
954
+ interface IdentificationDataIdOneOf {
955
+ /** ID of a site visitor that has not logged in to the site. */
956
+ anonymousVisitorId?: string;
957
+ /** ID of a site visitor that has logged in to the site. */
958
+ memberId?: string;
959
+ /** ID of a Wix user (site owner, contributor, etc.). */
960
+ wixUserId?: string;
961
+ /** ID of an app. */
962
+ appId?: string;
963
+ }
964
+ declare enum WebhookIdentityType {
965
+ UNKNOWN = "UNKNOWN",
966
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
967
+ MEMBER = "MEMBER",
968
+ WIX_USER = "WIX_USER",
969
+ APP = "APP"
970
+ }
823
971
  interface CreateProductRequestRequiredFields {
824
972
  product?: {
825
973
  title: string;
@@ -1264,6 +1412,7 @@ declare function bulkCreateProducts(httpClient: HttpClient): (products: Product[
1264
1412
  declare function bulkUpdateProducts(httpClient: HttpClient): (products: MaskedProduct[], options?: BulkUpdateProductsOptions) => Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
1265
1413
  declare function bulkDeleteProducts(httpClient: HttpClient): (productIds: string[]) => Promise<BulkDeleteProductsResponse & BulkDeleteProductsResponseNonNullableFields>;
1266
1414
 
1415
+ type index_d_ActionEvent = ActionEvent;
1267
1416
  type index_d_Address = Address;
1268
1417
  type index_d_AddressLocation = AddressLocation;
1269
1418
  type index_d_AddressStreetOneOf = AddressStreetOneOf;
@@ -1297,6 +1446,11 @@ type index_d_Cursors = Cursors;
1297
1446
  type index_d_DeleteProductRequest = DeleteProductRequest;
1298
1447
  type index_d_DeleteProductRequestRequiredFields = DeleteProductRequestRequiredFields;
1299
1448
  type index_d_DeleteProductResponse = DeleteProductResponse;
1449
+ type index_d_DomainEvent = DomainEvent;
1450
+ type index_d_DomainEventBodyOneOf = DomainEventBodyOneOf;
1451
+ type index_d_EntityCreatedEvent = EntityCreatedEvent;
1452
+ type index_d_EntityDeletedEvent = EntityDeletedEvent;
1453
+ type index_d_EntityUpdatedEvent = EntityUpdatedEvent;
1300
1454
  type index_d_GetProductRequest = GetProductRequest;
1301
1455
  type index_d_GetProductRequestRequiredFields = GetProductRequestRequiredFields;
1302
1456
  type index_d_GetProductResponse = GetProductResponse;
@@ -1306,10 +1460,13 @@ type index_d_GetProductsStartWithRequest = GetProductsStartWithRequest;
1306
1460
  type index_d_GetProductsStartWithRequestRequiredFields = GetProductsStartWithRequestRequiredFields;
1307
1461
  type index_d_GetProductsStartWithResponse = GetProductsStartWithResponse;
1308
1462
  type index_d_GetProductsStartWithResponseNonNullableFields = GetProductsStartWithResponseNonNullableFields;
1463
+ type index_d_IdentificationData = IdentificationData;
1464
+ type index_d_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
1309
1465
  type index_d_ItemMetadata = ItemMetadata;
1310
1466
  type index_d_LinkRel = LinkRel;
1311
1467
  declare const index_d_LinkRel: typeof LinkRel;
1312
1468
  type index_d_MaskedProduct = MaskedProduct;
1469
+ type index_d_MessageEnvelope = MessageEnvelope;
1313
1470
  type index_d_MyAddress = MyAddress;
1314
1471
  type index_d_PageLink = PageLink;
1315
1472
  type index_d_Paging = Paging;
@@ -1341,6 +1498,8 @@ type index_d_UpdateProductResponse = UpdateProductResponse;
1341
1498
  type index_d_UpdateProductResponseNonNullableFields = UpdateProductResponseNonNullableFields;
1342
1499
  type index_d_Variant = Variant;
1343
1500
  type index_d_VideoResolution = VideoResolution;
1501
+ type index_d_WebhookIdentityType = WebhookIdentityType;
1502
+ declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
1344
1503
  declare const index_d___metadata: typeof __metadata;
1345
1504
  declare const index_d_bulkCreateProducts: typeof bulkCreateProducts;
1346
1505
  declare const index_d_bulkDeleteProducts: typeof bulkDeleteProducts;
@@ -1352,7 +1511,7 @@ declare const index_d_getProductsStartWith: typeof getProductsStartWith;
1352
1511
  declare const index_d_queryProducts: typeof queryProducts;
1353
1512
  declare const index_d_updateProduct: typeof updateProduct;
1354
1513
  declare namespace index_d {
1355
- export { type index_d_Address as Address, type index_d_AddressLocation as AddressLocation, type index_d_AddressStreetOneOf as AddressStreetOneOf, type index_d_ApplicationError as ApplicationError, type index_d_BulkActionMetadata as BulkActionMetadata, type index_d_BulkCreateProductsOptions as BulkCreateProductsOptions, type index_d_BulkCreateProductsRequest as BulkCreateProductsRequest, type index_d_BulkCreateProductsRequestRequiredFields as BulkCreateProductsRequestRequiredFields, type index_d_BulkCreateProductsResponse as BulkCreateProductsResponse, type index_d_BulkCreateProductsResponseNonNullableFields as BulkCreateProductsResponseNonNullableFields, type index_d_BulkDeleteProductsRequest as BulkDeleteProductsRequest, type index_d_BulkDeleteProductsRequestRequiredFields as BulkDeleteProductsRequestRequiredFields, type index_d_BulkDeleteProductsResponse as BulkDeleteProductsResponse, type index_d_BulkDeleteProductsResponseBulkProductResult as BulkDeleteProductsResponseBulkProductResult, type index_d_BulkDeleteProductsResponseNonNullableFields as BulkDeleteProductsResponseNonNullableFields, type index_d_BulkProductResult as BulkProductResult, type index_d_BulkUpdateProductsOptions as BulkUpdateProductsOptions, type index_d_BulkUpdateProductsRequest as BulkUpdateProductsRequest, type index_d_BulkUpdateProductsRequestRequiredFields as BulkUpdateProductsRequestRequiredFields, type index_d_BulkUpdateProductsResponse as BulkUpdateProductsResponse, type index_d_BulkUpdateProductsResponseBulkProductResult as BulkUpdateProductsResponseBulkProductResult, type index_d_BulkUpdateProductsResponseNonNullableFields as BulkUpdateProductsResponseNonNullableFields, type index_d_CreateProductOptions as CreateProductOptions, type index_d_CreateProductOptionsRequiredFields as CreateProductOptionsRequiredFields, type index_d_CreateProductRequest as CreateProductRequest, type index_d_CreateProductRequestRequiredFields as CreateProductRequestRequiredFields, type index_d_CreateProductResponse as CreateProductResponse, type index_d_CreateProductResponseNonNullableFields as CreateProductResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_Cursors as Cursors, type index_d_DeleteProductRequest as DeleteProductRequest, type index_d_DeleteProductRequestRequiredFields as DeleteProductRequestRequiredFields, type index_d_DeleteProductResponse as DeleteProductResponse, type index_d_GetProductRequest as GetProductRequest, type index_d_GetProductRequestRequiredFields as GetProductRequestRequiredFields, type index_d_GetProductResponse as GetProductResponse, type index_d_GetProductResponseNonNullableFields as GetProductResponseNonNullableFields, type index_d_GetProductsStartWithOptions as GetProductsStartWithOptions, type index_d_GetProductsStartWithRequest as GetProductsStartWithRequest, type index_d_GetProductsStartWithRequestRequiredFields as GetProductsStartWithRequestRequiredFields, type index_d_GetProductsStartWithResponse as GetProductsStartWithResponse, type index_d_GetProductsStartWithResponseNonNullableFields as GetProductsStartWithResponseNonNullableFields, type index_d_ItemMetadata as ItemMetadata, index_d_LinkRel as LinkRel, type index_d_MaskedProduct as MaskedProduct, type index_d_MyAddress as MyAddress, type index_d_PageLink as PageLink, type index_d_Paging as Paging, type index_d_PagingMetadataV2 as PagingMetadataV2, type index_d_Product as Product, type index_d_ProductsQueryBuilder as ProductsQueryBuilder, type index_d_ProductsQueryResult as ProductsQueryResult, type index_d_QueryProductsOptions as QueryProductsOptions, type index_d_QueryProductsRequest as QueryProductsRequest, type index_d_QueryProductsResponse as QueryProductsResponse, type index_d_QueryProductsResponseNonNullableFields as QueryProductsResponseNonNullableFields, type index_d_QueryV2 as QueryV2, type index_d_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d_ResetProductsDbRequest as ResetProductsDbRequest, type index_d_ResetProductsDbResponse as ResetProductsDbResponse, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, type index_d_StandardDetails as StandardDetails, type index_d_StreetAddress as StreetAddress, type index_d_Subdivision as Subdivision, index_d_SubdivisionType as SubdivisionType, type index_d_UpdateProductOptions as UpdateProductOptions, type index_d_UpdateProductOptionsRequiredFields as UpdateProductOptionsRequiredFields, type index_d_UpdateProductRequest as UpdateProductRequest, type index_d_UpdateProductRequestRequiredFields as UpdateProductRequestRequiredFields, type index_d_UpdateProductResponse as UpdateProductResponse, type index_d_UpdateProductResponseNonNullableFields as UpdateProductResponseNonNullableFields, type index_d_Variant as Variant, type index_d_VideoResolution as VideoResolution, index_d___metadata as __metadata, index_d_bulkCreateProducts as bulkCreateProducts, index_d_bulkDeleteProducts as bulkDeleteProducts, index_d_bulkUpdateProducts as bulkUpdateProducts, index_d_createProduct as createProduct, index_d_deleteProduct as deleteProduct, index_d_getProduct as getProduct, index_d_getProductsStartWith as getProductsStartWith, index_d_queryProducts as queryProducts, index_d_updateProduct as updateProduct };
1514
+ export { type index_d_ActionEvent as ActionEvent, type index_d_Address as Address, type index_d_AddressLocation as AddressLocation, type index_d_AddressStreetOneOf as AddressStreetOneOf, type index_d_ApplicationError as ApplicationError, type index_d_BulkActionMetadata as BulkActionMetadata, type index_d_BulkCreateProductsOptions as BulkCreateProductsOptions, type index_d_BulkCreateProductsRequest as BulkCreateProductsRequest, type index_d_BulkCreateProductsRequestRequiredFields as BulkCreateProductsRequestRequiredFields, type index_d_BulkCreateProductsResponse as BulkCreateProductsResponse, type index_d_BulkCreateProductsResponseNonNullableFields as BulkCreateProductsResponseNonNullableFields, type index_d_BulkDeleteProductsRequest as BulkDeleteProductsRequest, type index_d_BulkDeleteProductsRequestRequiredFields as BulkDeleteProductsRequestRequiredFields, type index_d_BulkDeleteProductsResponse as BulkDeleteProductsResponse, type index_d_BulkDeleteProductsResponseBulkProductResult as BulkDeleteProductsResponseBulkProductResult, type index_d_BulkDeleteProductsResponseNonNullableFields as BulkDeleteProductsResponseNonNullableFields, type index_d_BulkProductResult as BulkProductResult, type index_d_BulkUpdateProductsOptions as BulkUpdateProductsOptions, type index_d_BulkUpdateProductsRequest as BulkUpdateProductsRequest, type index_d_BulkUpdateProductsRequestRequiredFields as BulkUpdateProductsRequestRequiredFields, type index_d_BulkUpdateProductsResponse as BulkUpdateProductsResponse, type index_d_BulkUpdateProductsResponseBulkProductResult as BulkUpdateProductsResponseBulkProductResult, type index_d_BulkUpdateProductsResponseNonNullableFields as BulkUpdateProductsResponseNonNullableFields, type index_d_CreateProductOptions as CreateProductOptions, type index_d_CreateProductOptionsRequiredFields as CreateProductOptionsRequiredFields, type index_d_CreateProductRequest as CreateProductRequest, type index_d_CreateProductRequestRequiredFields as CreateProductRequestRequiredFields, type index_d_CreateProductResponse as CreateProductResponse, type index_d_CreateProductResponseNonNullableFields as CreateProductResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_Cursors as Cursors, type index_d_DeleteProductRequest as DeleteProductRequest, type index_d_DeleteProductRequestRequiredFields as DeleteProductRequestRequiredFields, type index_d_DeleteProductResponse as DeleteProductResponse, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_GetProductRequest as GetProductRequest, type index_d_GetProductRequestRequiredFields as GetProductRequestRequiredFields, type index_d_GetProductResponse as GetProductResponse, type index_d_GetProductResponseNonNullableFields as GetProductResponseNonNullableFields, type index_d_GetProductsStartWithOptions as GetProductsStartWithOptions, type index_d_GetProductsStartWithRequest as GetProductsStartWithRequest, type index_d_GetProductsStartWithRequestRequiredFields as GetProductsStartWithRequestRequiredFields, type index_d_GetProductsStartWithResponse as GetProductsStartWithResponse, type index_d_GetProductsStartWithResponseNonNullableFields as GetProductsStartWithResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_ItemMetadata as ItemMetadata, index_d_LinkRel as LinkRel, type index_d_MaskedProduct as MaskedProduct, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MyAddress as MyAddress, type index_d_PageLink as PageLink, type index_d_Paging as Paging, type index_d_PagingMetadataV2 as PagingMetadataV2, type index_d_Product as Product, type index_d_ProductsQueryBuilder as ProductsQueryBuilder, type index_d_ProductsQueryResult as ProductsQueryResult, type index_d_QueryProductsOptions as QueryProductsOptions, type index_d_QueryProductsRequest as QueryProductsRequest, type index_d_QueryProductsResponse as QueryProductsResponse, type index_d_QueryProductsResponseNonNullableFields as QueryProductsResponseNonNullableFields, type index_d_QueryV2 as QueryV2, type index_d_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d_ResetProductsDbRequest as ResetProductsDbRequest, type index_d_ResetProductsDbResponse as ResetProductsDbResponse, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, type index_d_StandardDetails as StandardDetails, type index_d_StreetAddress as StreetAddress, type index_d_Subdivision as Subdivision, index_d_SubdivisionType as SubdivisionType, type index_d_UpdateProductOptions as UpdateProductOptions, type index_d_UpdateProductOptionsRequiredFields as UpdateProductOptionsRequiredFields, type index_d_UpdateProductRequest as UpdateProductRequest, type index_d_UpdateProductRequestRequiredFields as UpdateProductRequestRequiredFields, type index_d_UpdateProductResponse as UpdateProductResponse, type index_d_UpdateProductResponseNonNullableFields as UpdateProductResponseNonNullableFields, type index_d_Variant as Variant, type index_d_VideoResolution as VideoResolution, index_d_WebhookIdentityType as WebhookIdentityType, index_d___metadata as __metadata, index_d_bulkCreateProducts as bulkCreateProducts, index_d_bulkDeleteProducts as bulkDeleteProducts, index_d_bulkUpdateProducts as bulkUpdateProducts, index_d_createProduct as createProduct, index_d_deleteProduct as deleteProduct, index_d_getProduct as getProduct, index_d_getProductsStartWith as getProductsStartWith, index_d_queryProducts as queryProducts, index_d_updateProduct as updateProduct };
1356
1515
  }
1357
1516
 
1358
1517
  export { index_d$2 as alarms, index_d$1 as metroinspector, index_d as products };