@wix/bookings 1.0.499 → 1.0.501

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/bookings",
3
- "version": "1.0.499",
3
+ "version": "1.0.501",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -21,23 +21,23 @@
21
21
  "type-bundles"
22
22
  ],
23
23
  "dependencies": {
24
- "@wix/bookings_attendance": "1.0.57",
24
+ "@wix/bookings_attendance": "1.0.58",
25
25
  "@wix/bookings_availability-calendar": "1.0.46",
26
26
  "@wix/bookings_availability-time-slots": "1.0.37",
27
27
  "@wix/bookings_booking-fees": "1.0.11",
28
28
  "@wix/bookings_booking-policies": "1.0.9",
29
29
  "@wix/bookings_booking-policy-snapshots": "1.0.7",
30
- "@wix/bookings_bookings": "1.0.71",
30
+ "@wix/bookings_bookings": "1.0.72",
31
31
  "@wix/bookings_categories": "1.0.44",
32
- "@wix/bookings_extended-bookings": "1.0.59",
32
+ "@wix/bookings_extended-bookings": "1.0.61",
33
33
  "@wix/bookings_external-calendars": "1.0.41",
34
34
  "@wix/bookings_multi-service-availability-time-slots": "1.0.36",
35
- "@wix/bookings_pricing": "1.0.46",
35
+ "@wix/bookings_pricing": "1.0.47",
36
36
  "@wix/bookings_resource-types": "1.0.15",
37
37
  "@wix/bookings_resources": "1.0.56",
38
38
  "@wix/bookings_service-categories": "1.0.0",
39
- "@wix/bookings_service-options-and-variants": "1.0.56",
40
- "@wix/bookings_services": "1.0.80",
39
+ "@wix/bookings_service-options-and-variants": "1.0.57",
40
+ "@wix/bookings_services": "1.0.81",
41
41
  "@wix/bookings_staff-members": "1.0.17"
42
42
  },
43
43
  "devDependencies": {
@@ -63,5 +63,5 @@
63
63
  "fqdn": ""
64
64
  }
65
65
  },
66
- "falconPackageHash": "1c94e414132cbded0aff7e840d73eb50f4c69d096bd05c57abb146a7"
66
+ "falconPackageHash": "42133439e0d9e5f231a3c99d23479f926377976583647af8545ed64a"
67
67
  }
@@ -5138,7 +5138,6 @@ interface ServiceOptionsAndVariants {
5138
5138
  interface ServiceOption extends ServiceOptionOptionSpecificDataOneOf {
5139
5139
  /** Details about the custom option. Available only for `CUSTOM` options. */
5140
5140
  customData?: CustomServiceOption;
5141
- durationData?: DurationServiceOption;
5142
5141
  /** ID of the service option. */
5143
5142
  _id?: string;
5144
5143
  /** Type of the service option. */
@@ -5148,7 +5147,6 @@ interface ServiceOption extends ServiceOptionOptionSpecificDataOneOf {
5148
5147
  interface ServiceOptionOptionSpecificDataOneOf {
5149
5148
  /** Details about the custom option. Available only for `CUSTOM` options. */
5150
5149
  customData?: CustomServiceOption;
5151
- durationData?: DurationServiceOption;
5152
5150
  }
5153
5151
  declare enum ServiceOptionType {
5154
5152
  UNKNOWN = "UNKNOWN",
@@ -5198,8 +5196,6 @@ interface ServiceChoice$3 extends ServiceChoiceChoiceOneOf$3 {
5198
5196
  * `availability.linkedSchedules`.
5199
5197
  */
5200
5198
  staffMemberId?: string;
5201
- /** Duration and an optional name */
5202
- duration?: Duration$4;
5203
5199
  /** ID of the service option. */
5204
5200
  optionId?: string;
5205
5201
  }
@@ -5214,8 +5210,6 @@ interface ServiceChoiceChoiceOneOf$3 {
5214
5210
  * `availability.linkedSchedules`.
5215
5211
  */
5216
5212
  staffMemberId?: string;
5217
- /** Duration and an optional name */
5218
- duration?: Duration$4;
5219
5213
  }
5220
5214
  interface Duration$4 {
5221
5215
  /**
@@ -6863,11 +6857,11 @@ interface ServiceOptionsAndVariantsCreatedEnvelope {
6863
6857
  entity: ServiceOptionsAndVariants;
6864
6858
  metadata: EventMetadata$7;
6865
6859
  }
6866
- interface ServiceOptionsAndVariantsUpdatedEnvelope {
6860
+ interface ServiceOptionsAndVariantsDeletedEnvelope {
6867
6861
  entity: ServiceOptionsAndVariants;
6868
6862
  metadata: EventMetadata$7;
6869
6863
  }
6870
- interface ServiceOptionsAndVariantsDeletedEnvelope {
6864
+ interface ServiceOptionsAndVariantsUpdatedEnvelope {
6871
6865
  entity: ServiceOptionsAndVariants;
6872
6866
  metadata: EventMetadata$7;
6873
6867
  }
@@ -7083,8 +7077,8 @@ interface QueryServiceOptionsAndVariantsSignature {
7083
7077
  (): ServiceOptionsAndVariantsListQueryBuilder;
7084
7078
  }
7085
7079
  declare const onServiceOptionsAndVariantsCreated$1: EventDefinition<ServiceOptionsAndVariantsCreatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_created">;
7086
- declare const onServiceOptionsAndVariantsUpdated$1: EventDefinition<ServiceOptionsAndVariantsUpdatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_updated">;
7087
7080
  declare const onServiceOptionsAndVariantsDeleted$1: EventDefinition<ServiceOptionsAndVariantsDeletedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_deleted">;
7081
+ declare const onServiceOptionsAndVariantsUpdated$1: EventDefinition<ServiceOptionsAndVariantsUpdatedEnvelope, "wix.bookings.catalog.v1.service_options_and_variants_updated">;
7088
7082
 
7089
7083
  declare function createEventModule$8<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
7090
7084
 
@@ -7100,14 +7094,14 @@ type _publicOnServiceOptionsAndVariantsCreatedType = typeof onServiceOptionsAndV
7100
7094
  /** */
7101
7095
  declare const onServiceOptionsAndVariantsCreated: ReturnType<typeof createEventModule$8<_publicOnServiceOptionsAndVariantsCreatedType>>;
7102
7096
 
7103
- type _publicOnServiceOptionsAndVariantsUpdatedType = typeof onServiceOptionsAndVariantsUpdated$1;
7104
- /** */
7105
- declare const onServiceOptionsAndVariantsUpdated: ReturnType<typeof createEventModule$8<_publicOnServiceOptionsAndVariantsUpdatedType>>;
7106
-
7107
7097
  type _publicOnServiceOptionsAndVariantsDeletedType = typeof onServiceOptionsAndVariantsDeleted$1;
7108
7098
  /** */
7109
7099
  declare const onServiceOptionsAndVariantsDeleted: ReturnType<typeof createEventModule$8<_publicOnServiceOptionsAndVariantsDeletedType>>;
7110
7100
 
7101
+ type _publicOnServiceOptionsAndVariantsUpdatedType = typeof onServiceOptionsAndVariantsUpdated$1;
7102
+ /** */
7103
+ declare const onServiceOptionsAndVariantsUpdated: ReturnType<typeof createEventModule$8<_publicOnServiceOptionsAndVariantsUpdatedType>>;
7104
+
7111
7105
  type context$d_CloneServiceOptionsAndVariantsRequest = CloneServiceOptionsAndVariantsRequest;
7112
7106
  type context$d_CloneServiceOptionsAndVariantsResponse = CloneServiceOptionsAndVariantsResponse;
7113
7107
  type context$d_CloneServiceOptionsAndVariantsResponseNonNullableFields = CloneServiceOptionsAndVariantsResponseNonNullableFields;
@@ -8726,6 +8720,20 @@ interface ExtendedBooking {
8726
8720
  * `withBookingConferencingDetails` as `true`.
8727
8721
  */
8728
8722
  conferencingDetails?: ConferencingDetails;
8723
+ /**
8724
+ * Information about the booking's policy settings according to the relevant
8725
+ * [booking policy snapshot](https://dev.wix.com/docs/rest/business-solutions/bookings/services/booking-policy-snapshots/introduction).
8726
+ * Available only when passing `withBookingPolicySettings` as `true`.
8727
+ */
8728
+ bookingPolicySettings?: BookingPolicySettings$1;
8729
+ /**
8730
+ * Information about the booking fee statuses. Available only when passing
8731
+ * `withBookingFeeDetailsBooking` as `true`. No details are returned when there
8732
+ * is no booking fee for the booking. For example, when a booking was canceled
8733
+ * before the start of the earliest cancellation window or the customer hasn't
8734
+ * canceled the booking yet.
8735
+ */
8736
+ bookingFeeDetails?: BookingFeeDetails;
8729
8737
  }
8730
8738
  declare enum AttendanceStatus$1 {
8731
8739
  /** There is no available attendance information. */
@@ -9222,7 +9230,6 @@ interface ServiceChoice$2 extends ServiceChoiceChoiceOneOf$2 {
9222
9230
  * Each choice may have a different price.
9223
9231
  */
9224
9232
  custom?: string;
9225
- duration?: Duration$3;
9226
9233
  /**
9227
9234
  * ID of the corresponding option for the choice. For example, the choice `child`
9228
9235
  * could correspond to the option `ageGroup`. In this case, `optionId` is the ID
@@ -9239,7 +9246,6 @@ interface ServiceChoiceChoiceOneOf$2 {
9239
9246
  * Each choice may have a different price.
9240
9247
  */
9241
9248
  custom?: string;
9242
- duration?: Duration$3;
9243
9249
  }
9244
9250
  interface Duration$3 {
9245
9251
  /**
@@ -9431,6 +9437,25 @@ interface QueryExtendedBookingsRequest {
9431
9437
  withBookingAttendanceInfo?: boolean;
9432
9438
  /** Whether information about the online conferencing details for the bookings is returned. */
9433
9439
  withBookingConferencingDetails?: boolean;
9440
+ /**
9441
+ * Whether to retrieve information about booking policy settings.
9442
+ * You must have the `BOOKINGS.BOOKING_POLICY_SNAPSHOT_READ` permission scope
9443
+ * when passing `true`.
9444
+ *
9445
+ * Default: `false`.
9446
+ */
9447
+ withBookingPolicySettings?: boolean;
9448
+ /**
9449
+ * Whether to retrieve information about the booking fee statuses.
9450
+ * Information about booking fees with a status of `PREVIEW` isn't returned.
9451
+ * You must have the `BOOKINGS.BOOKING_FEES_READ` permission scope when passing
9452
+ * `true`. In order to retrieve complete booking fee objects or to get information
9453
+ * about `PREVIEW` fees, use [List Booking Fees By Booking Ids](https://dev.wix.com/docs/rest/business-solutions/bookings/booking-fees/list-booking-fees-by-booking-ids)
9454
+ * instead.
9455
+ *
9456
+ * Default: `false`.
9457
+ */
9458
+ withBookingFeeDetails?: boolean;
9434
9459
  }
9435
9460
  interface CommonQueryV2 extends CommonQueryV2PagingMethodOneOf {
9436
9461
  /** Paging options to limit and skip the number of items. */
@@ -9637,6 +9662,25 @@ interface QueryExtendedBookingsOptions {
9637
9662
  withBookingAttendanceInfo?: boolean;
9638
9663
  /** Whether information about the online conferencing details for the bookings is returned. */
9639
9664
  withBookingConferencingDetails?: boolean;
9665
+ /**
9666
+ * Whether to retrieve information about booking policy settings.
9667
+ * You must have the `BOOKINGS.BOOKING_POLICY_SNAPSHOT_READ` permission scope
9668
+ * when passing `true`.
9669
+ *
9670
+ * Default: `false`.
9671
+ */
9672
+ withBookingPolicySettings?: boolean;
9673
+ /**
9674
+ * Whether to retrieve information about the booking fee statuses.
9675
+ * Information about booking fees with a status of `PREVIEW` isn't returned.
9676
+ * You must have the `BOOKINGS.BOOKING_FEES_READ` permission scope when passing
9677
+ * `true`. In order to retrieve complete booking fee objects or to get information
9678
+ * about `PREVIEW` fees, use [List Booking Fees By Booking Ids](https://dev.wix.com/docs/rest/business-solutions/bookings/booking-fees/list-booking-fees-by-booking-ids)
9679
+ * instead.
9680
+ *
9681
+ * Default: `false`.
9682
+ */
9683
+ withBookingFeeDetails?: boolean;
9640
9684
  }
9641
9685
 
9642
9686
  declare function query$1(httpClient: HttpClient): QuerySignature;
@@ -12770,16 +12814,6 @@ interface V2Schedule {
12770
12814
  availabilityConstraints?: V2AvailabilityConstraints;
12771
12815
  }
12772
12816
  interface V2AvailabilityConstraints {
12773
- /**
12774
- * A calculated list of all available durations for a service.
12775
- *
12776
- * If the service payment is of typed `Varied` with `Duration` option, this list will contain the durations of the variants.
12777
- * The durations order will reflect the order of the variants.
12778
- *
12779
- * For any other type of service or payment this list will mirror the durations specified in `session_durations`.
12780
- * @readonly
12781
- */
12782
- durations?: Duration$2[];
12783
12817
  /**
12784
12818
  * A list of durations for sessions, in minutes.
12785
12819
  *
@@ -15947,11 +15981,11 @@ interface ServiceCreatedEnvelope {
15947
15981
  entity: Service;
15948
15982
  metadata: EventMetadata$3;
15949
15983
  }
15950
- interface ServiceUpdatedEnvelope {
15984
+ interface ServiceDeletedEnvelope {
15951
15985
  entity: Service;
15952
15986
  metadata: EventMetadata$3;
15953
15987
  }
15954
- interface ServiceDeletedEnvelope {
15988
+ interface ServiceUpdatedEnvelope {
15955
15989
  entity: Service;
15956
15990
  metadata: EventMetadata$3;
15957
15991
  }
@@ -16427,8 +16461,8 @@ interface CloneServiceSignature {
16427
16461
  (sourceServiceId: string, options?: CloneServiceOptions | undefined): Promise<CloneServiceResponse & CloneServiceResponseNonNullableFields>;
16428
16462
  }
16429
16463
  declare const onServiceCreated$1: EventDefinition<ServiceCreatedEnvelope, "wix.bookings.services.v2.service_created">;
16430
- declare const onServiceUpdated$1: EventDefinition<ServiceUpdatedEnvelope, "wix.bookings.services.v2.service_updated">;
16431
16464
  declare const onServiceDeleted$1: EventDefinition<ServiceDeletedEnvelope, "wix.bookings.services.v2.service_deleted">;
16465
+ declare const onServiceUpdated$1: EventDefinition<ServiceUpdatedEnvelope, "wix.bookings.services.v2.service_updated">;
16432
16466
 
16433
16467
  declare function createEventModule$4<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
16434
16468
 
@@ -16457,14 +16491,14 @@ type _publicOnServiceCreatedType = typeof onServiceCreated$1;
16457
16491
  /** */
16458
16492
  declare const onServiceCreated: ReturnType<typeof createEventModule$4<_publicOnServiceCreatedType>>;
16459
16493
 
16460
- type _publicOnServiceUpdatedType = typeof onServiceUpdated$1;
16461
- /** */
16462
- declare const onServiceUpdated: ReturnType<typeof createEventModule$4<_publicOnServiceUpdatedType>>;
16463
-
16464
16494
  type _publicOnServiceDeletedType = typeof onServiceDeleted$1;
16465
16495
  /** */
16466
16496
  declare const onServiceDeleted: ReturnType<typeof createEventModule$4<_publicOnServiceDeletedType>>;
16467
16497
 
16498
+ type _publicOnServiceUpdatedType = typeof onServiceUpdated$1;
16499
+ /** */
16500
+ declare const onServiceUpdated: ReturnType<typeof createEventModule$4<_publicOnServiceUpdatedType>>;
16501
+
16468
16502
  type context$6_Action = Action;
16469
16503
  declare const context$6_Action: typeof Action;
16470
16504
  type context$6_Aggregation = Aggregation;
@@ -21145,20 +21179,20 @@ declare namespace context$3 {
21145
21179
  }
21146
21180
 
21147
21181
  /**
21148
- * The `Attendance` object represents the attendance information
21182
+ * The `attendance` object represents the attendance information
21149
21183
  * for a booked session, such as:
21150
21184
  *
21151
21185
  * + Did anyone attend the session?
21152
21186
  * + How many people attended the session?
21153
21187
  *
21154
- * The number of session `Attendance` objects available depends on the booking type:
21155
- * + Appointment bookings have 1 `Attendance` object per appointment session.
21156
- * + Class bookings have 1 `Attendance` object for each session of the class. The number of sessions for a class is defined in Schedule and Sessions [`schedule.capacity`](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object) property.
21157
- * + Course bookings have an `Attendance` object for each session of the course. For example, if there are 12 sessions in a course, there are 12 `Attendance` objects. The number of sessions for a class is defined in Schedule and Sessions [`schedule.capacity`](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object) property.
21188
+ * The number of session `attendance` objects available depends on the booking type:
21189
+ * + Appointment bookings have 1 `attendance` object per appointment session.
21190
+ * + Class bookings have 1 `attendance` object for each session of the class. The number of sessions for a class is defined in Schedule and Sessions `schedule.capacity` property.
21191
+ * + Course bookings have an `attendance` object for each session of the course. For example, if there are 12 sessions in a course, there are 12 `attendance` objects. The number of sessions for a class is defined in Schedule and Sessions `schedule.capacity` property.
21158
21192
  */
21159
21193
  interface Attendance {
21160
21194
  /**
21161
- * ID of the `Attendance` object.
21195
+ * ID of the `attendance` object.
21162
21196
  * @readonly
21163
21197
  */
21164
21198
  _id?: string | null;
@@ -21188,30 +21222,31 @@ declare enum AttendanceStatus {
21188
21222
  NOT_ATTENDED = "NOT_ATTENDED"
21189
21223
  }
21190
21224
  interface GetAttendanceRequest {
21191
- /** ID of the object that contains the attendance information that you want to retrieve. */
21225
+ /** ID of the attendance object to retrieve. */
21192
21226
  attendanceId: string;
21193
21227
  }
21194
21228
  interface GetAttendanceResponse {
21195
- /** The retrieved attendance information for the booked session. */
21229
+ /** Retrieved attendance. */
21196
21230
  attendance?: Attendance;
21197
21231
  }
21198
21232
  interface SetAttendanceRequest {
21199
- /** The attendance information for a booked session that you want to create or update. */
21233
+ /** Attendance to create or update. */
21200
21234
  attendance: Attendance;
21201
21235
  /** Information about whether to send a message to a customer after their attendance was set. */
21202
21236
  participantNotification?: ParticipantNotification$2;
21203
21237
  }
21204
21238
  interface ParticipantNotification$2 {
21205
21239
  /**
21206
- * Whether to send the message about the changes to the customer.
21207
- * Default is false.
21240
+ * Specify whether to send the message about the changes to the customer.
21241
+ *
21242
+ * Default: `false`
21208
21243
  */
21209
21244
  notifyParticipants?: boolean | null;
21210
21245
  /** Optional custom message to send to the participants about the changes to the booking. */
21211
21246
  message?: string | null;
21212
21247
  }
21213
21248
  interface SetAttendanceResponse {
21214
- /** The created or updated attendance information for the booked session. */
21249
+ /** Created or updated attendance. */
21215
21250
  attendance?: Attendance;
21216
21251
  }
21217
21252
  interface AttendanceMarkedAsNotAttended {
@@ -21222,23 +21257,25 @@ interface AttendanceMarkedAsNotAttended {
21222
21257
  }
21223
21258
  interface BulkSetAttendanceRequest {
21224
21259
  returnFullEntity?: boolean;
21225
- /** The attendance information for a booked sessions that you want to create or update. Min size 1. */
21260
+ /** List of attendance details for booking sessions to create or update. */
21226
21261
  attendanceDetails?: AttendanceDetails[];
21227
21262
  }
21228
21263
  interface AttendanceDetails {
21229
- /** The created or updated attendance information for the booked session. */
21264
+ /** Created or updated attendance information for a booking session. */
21230
21265
  attendance?: Attendance;
21231
- /** Information about whether to send a message to a customer after their attendance was set. */
21266
+ /** Information about whether to send a message to the customer after their attendance was set. */
21232
21267
  participantNotification?: ParticipantNotification$2;
21233
21268
  }
21234
21269
  interface BulkSetAttendanceResponse {
21235
- /** The created or updated attendance information for the booked sessions. */
21270
+ /** List of created or updated `attendance` objects. */
21236
21271
  results?: BulkAttendanceResult[];
21237
- /** Total successes and failures of the bulk set attendance action. */
21272
+ /** Information about the total number of successes and failures for the Bulk Set Attendance call. */
21238
21273
  bulkActionMetadata?: BulkActionMetadata$1;
21239
21274
  }
21240
21275
  interface BulkAttendanceResult {
21276
+ /** Created or updated `attendance` object. */
21241
21277
  item?: Attendance;
21278
+ /** Metadata for the created or updated `attendance` object. */
21242
21279
  itemMetadata?: ItemMetadata$1;
21243
21280
  }
21244
21281
  interface ItemMetadata$1 {
@@ -21336,9 +21373,9 @@ interface CursorPaging$1 {
21336
21373
  }
21337
21374
  /** List of objects that contain attendance information. */
21338
21375
  interface QueryAttendanceResponse {
21339
- /** List of objects that contain attendance information for a booked session. */
21376
+ /** List of `attendance` objects that contain attendance information for a booked session. */
21340
21377
  attendances?: Attendance[];
21341
- /** Details on the paged set of results returned. */
21378
+ /** Metadata for the paged set of results. */
21342
21379
  pagingMetadata?: CursorPagingMetadata;
21343
21380
  }
21344
21381
  /** This is the preferred message for cursor-paging enabled services */
@@ -21513,7 +21550,7 @@ interface SetAttendanceOptions {
21513
21550
  }
21514
21551
  interface BulkSetAttendanceOptions {
21515
21552
  returnFullEntity?: boolean;
21516
- /** The attendance information for a booked sessions that you want to create or update. Min size 1. */
21553
+ /** List of attendance details for booking sessions to create or update. */
21517
21554
  attendanceDetails?: AttendanceDetails[];
21518
21555
  }
21519
21556
  interface QueryCursorResult {
@@ -21585,79 +21622,76 @@ interface AttendancesQueryBuilder {
21585
21622
  declare function getAttendance$1(httpClient: HttpClient): GetAttendanceSignature;
21586
21623
  interface GetAttendanceSignature {
21587
21624
  /**
21588
- * Retrieves attendance information by ID.
21589
- * @param - ID of the object that contains the attendance information that you want to retrieve.
21590
- * @returns The retrieved attendance information for the booked session.
21625
+ * Retrieves attendance information.
21626
+ * @param - ID of the attendance object to retrieve.
21627
+ * @returns Retrieved attendance.
21591
21628
  */
21592
21629
  (attendanceId: string): Promise<Attendance & AttendanceNonNullableFields>;
21593
21630
  }
21594
21631
  declare function setAttendance$1(httpClient: HttpClient): SetAttendanceSignature;
21595
21632
  interface SetAttendanceSignature {
21596
21633
  /**
21597
- * Sets information about whether a booking's session was attended. This information
21598
- * is saved in an `Attendance` object.
21634
+ * Sets or updates attendance information for a booking session. This
21635
+ * information is stored in an `attendance` object.
21599
21636
  *
21637
+ * If an `attendance` object already exists for the session, it's updated.
21638
+ * Otherwise, a new object is created.
21600
21639
  *
21601
- * If attendance was already set, meaning the `Attendance` object already exists, the
21602
- * existing attendance information is updated. Otherwise, a new `Attendance` object
21603
- * is created.
21640
+ * By default, `numberOfAttendees` is set to `1`, but you can specify a higher
21641
+ * number if multiple participants attended. Do not set `numberOfAttendees` to
21642
+ * `0` to indicate no attendance, instead specify `{"status": "NOT_ATTENDED"}`.
21604
21643
  *
21605
- * By default, the number
21606
- * of attendees is set to `1`, but you can set a number to greater than `1` if multiple
21607
- * participants attended. Do not set to `0` to indicate that no one attended the session.
21608
- * Instead, set the `status` field to `NOT_ATTENDED`.
21644
+ * Validation guidelines:
21609
21645
  *
21610
- * > __Note:__ Make sure your code validates that:
21611
- * > + There is no mismatch between `numberOfAttendees` and `attendanceStatus` to make sure, for example, that `attendanceStatus` is not `NOT_ATTENDED` while `numberOfAttendees` is `5`.
21612
- * > + The attendance's `numberOfAttendees` and the booking's `numberOfParticipants` correspond. For example, the number of attendees usually should not exceed the booking's intended number of participants (unless perhaps you allow walk-ins that did not sign up in advance).
21613
- * @param - The attendance information for a booked session that you want to create or update.
21646
+ * + The call succeeds for mismatches between `numberOfAttendees`
21647
+ * and `status`. For example, make sure that your code doesn't specify
21648
+ * `{"status": "NOT_ATTENDED"}` with `{"numberOfAttendees": 5}`.
21649
+ * + The API also allows `numberOfAttendees` to exceed the booking's
21650
+ * `numberOfParticipants`. Use higher values only when scenarios like
21651
+ * walk-ins justify the exception.
21652
+ * @param - Attendance to create or update.
21653
+ * @param - Options to use when setting an attendance.
21614
21654
  */
21615
21655
  (attendance: Attendance, options?: SetAttendanceOptions | undefined): Promise<SetAttendanceResponse & SetAttendanceResponseNonNullableFields>;
21616
21656
  }
21617
21657
  declare function bulkSetAttendance$1(httpClient: HttpClient): BulkSetAttendanceSignature;
21618
21658
  interface BulkSetAttendanceSignature {
21619
21659
  /**
21620
- * Sets information about whether a booking's session was attended for multiple bookings
21660
+ * Sets or updates attendance information for multiple booking sessions.
21661
+ *
21621
21662
  *
21663
+ * Refer to Set Attendance for detailed behavior of individual attendance
21664
+ * entries.
21622
21665
  *
21623
- * See [SetAttendance](https://dev.wix.com/docs/rest/api-reference/wix-bookings/attendance/set-attendance) documentation for more information.
21666
+ * The call fails entirely if any entry in `attendanceDetails` is missing a
21667
+ * required field.
21624
21668
  *
21625
- * If any of the attendance list required fields were not passed on the request or if the caller doesn't have the required permissions to set the attendance, the call fails.
21626
- * If the request contains attendance info for unavailable sessions, the call completes successfully but the attendance info for the unavailable sessions are not created and are not considered as failures in the response.
21669
+ * If attendance details are provided for a non-existent session, the call
21670
+ * succeeds for valid sessions while marking the unavailable session as a
21671
+ * failure in the response.
21672
+ * @param - Options to use when setting multiple attendances in bulk.
21627
21673
  */
21628
21674
  (options?: BulkSetAttendanceOptions | undefined): Promise<BulkSetAttendanceResponse & BulkSetAttendanceResponseNonNullableFields>;
21629
21675
  }
21630
21676
  declare function queryAttendance$1(httpClient: HttpClient): QueryAttendanceSignature;
21631
21677
  interface QueryAttendanceSignature {
21632
21678
  /**
21633
- * Retrieves attendance information for booked sessions, given the provided paging, filtering, and sorting.
21679
+ * Creates a query to retrieve a list of attendances.
21634
21680
  *
21681
+ * The `queryAttendances()` function builds a query to retrieve a list of attendances and returns a `AttendancesQueryBuilder` object.
21635
21682
  *
21636
- * When querying attendance information, you can query from the perspective of:
21637
- * + **A booking.** Specify a booking ID to retrieve attendance information
21638
- * for all sessions related to that booking.
21639
- * + **A session.** Specify a session ID to retrieve attendance information
21640
- * for all bookings related to that session.
21683
+ * The returned object contains the query definition, which is typically used to call the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/attendance/attendances-query-builder/find) function.
21641
21684
  *
21642
- * For example, query by a course's `bookingId` and `status = "NOT_ATTENDED"` to
21643
- * retrieve the attendance of a given participant in a course. For example, this query
21644
- * helps you determine if a participant booked the course
21645
- * but did not attend most of its sessions, taking away spots for other potential participants.
21685
+ * You can refine the query by chaining `AttendancesQueryBuilder` functions onto the query. `AttendancesQueryBuilder` functions enable you to sort, filter, and control the results that `queryAttendances()` returns.
21646
21686
  *
21647
- * Query Attendance runs with the following defaults, which you can override:
21648
- *
21649
- * - `id` sorted in `ASC` order
21650
- * - `cursorPaging.limit` is `50`
21687
+ * `queryAttendances()` uses the following `AttendancesQueryBuilder` default values that you can override:
21651
21688
  *
21652
- * For field support, see [supported filters](https://dev.wix.com/api/rest/wix-bookings/attendance/supported-filters).
21689
+ * + `limit` is `50`.
21690
+ * + Sorted by `id` in ascending order.
21653
21691
  *
21654
- * > __Notes__:
21655
- * > + Another way to retrieve attendance information is to call Bookings Reader V2's [Query Extended Bookings](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings) with `withBookingAttendanceDetails` as `true`.
21656
- * > + Up to 100 results can be returned per request.
21657
- * > + Only 1 filter is supported per query. If you define multiple filters in the same query, only the first is processed.
21692
+ * The functions that are chained to `queryAttendances()` are applied in the order they are called. For example, if you apply `ascending("status")` and then `ascending("numberOfAttendees")`, the results are sorted first by the `"status"`, and then, if there are multiple results with the same `"status"`, the items are sorted by `"numberOfAttendees"`.
21658
21693
  *
21659
- * To learn about working with query endpoints, see
21660
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
21694
+ * The following `AttendancesQueryBuilder` functions are supported for the `queryAttendances()` function. For a full description of the tip settings object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/attendance/attendances-query-result/items) property in `AttendancesQueryResult`.
21661
21695
  */
21662
21696
  (): AttendancesQueryBuilder;
21663
21697
  }
@@ -22191,7 +22225,6 @@ interface ServiceChoice$1 extends ServiceChoiceChoiceOneOf$1 {
22191
22225
  * Each choice may have a different price.
22192
22226
  */
22193
22227
  custom?: string;
22194
- duration?: Duration$1;
22195
22228
  /**
22196
22229
  * ID of the corresponding option for the choice. For example, the choice `child`
22197
22230
  * could correspond to the option `ageGroup`. In this case, `optionId` is the ID
@@ -22208,7 +22241,6 @@ interface ServiceChoiceChoiceOneOf$1 {
22208
22241
  * Each choice may have a different price.
22209
22242
  */
22210
22243
  custom?: string;
22211
- duration?: Duration$1;
22212
22244
  }
22213
22245
  interface Duration$1 {
22214
22246
  /**
@@ -24288,30 +24320,30 @@ interface EventMetadata extends BaseEventMetadata {
24288
24320
  */
24289
24321
  entityEventSequence?: string | null;
24290
24322
  }
24291
- interface BookingCreatedEnvelope {
24292
- entity: Booking$1;
24293
- metadata: EventMetadata;
24294
- }
24295
- interface BookingRescheduledEnvelope {
24296
- data: BookingRescheduled;
24297
- metadata: EventMetadata;
24298
- }
24299
24323
  interface BookingCanceledEnvelope {
24300
24324
  data: BookingCanceled;
24301
24325
  metadata: EventMetadata;
24302
24326
  }
24303
- interface BookingUpdatedEnvelope {
24304
- entity: Booking$1;
24305
- metadata: EventMetadata;
24306
- }
24307
24327
  interface BookingConfirmedEnvelope {
24308
24328
  data: BookingConfirmed;
24309
24329
  metadata: EventMetadata;
24310
24330
  }
24331
+ interface BookingCreatedEnvelope {
24332
+ entity: Booking$1;
24333
+ metadata: EventMetadata;
24334
+ }
24311
24335
  interface BookingDeclinedEnvelope {
24312
24336
  data: BookingDeclined;
24313
24337
  metadata: EventMetadata;
24314
24338
  }
24339
+ interface BookingRescheduledEnvelope {
24340
+ data: BookingRescheduled;
24341
+ metadata: EventMetadata;
24342
+ }
24343
+ interface BookingUpdatedEnvelope {
24344
+ entity: Booking$1;
24345
+ metadata: EventMetadata;
24346
+ }
24315
24347
  interface BookingNumberOfParticipantsUpdatedEnvelope {
24316
24348
  data: NumberOfParticipantsUpdated;
24317
24349
  metadata: EventMetadata;
@@ -24967,12 +24999,12 @@ interface ConfirmOrDeclineBookingSignature {
24967
24999
  */
24968
25000
  (bookingId: string, options?: ConfirmOrDeclineBookingOptions | undefined): Promise<ConfirmOrDeclineBookingResponse & ConfirmOrDeclineBookingResponseNonNullableFields>;
24969
25001
  }
24970
- declare const onBookingCreated$1: EventDefinition<BookingCreatedEnvelope, "wix.bookings.v2.booking_created">;
24971
- declare const onBookingRescheduled$1: EventDefinition<BookingRescheduledEnvelope, "wix.bookings.v2.booking_rescheduled">;
24972
25002
  declare const onBookingCanceled$1: EventDefinition<BookingCanceledEnvelope, "wix.bookings.v2.booking_canceled">;
24973
- declare const onBookingUpdated$1: EventDefinition<BookingUpdatedEnvelope, "wix.bookings.v2.booking_updated">;
24974
25003
  declare const onBookingConfirmed$1: EventDefinition<BookingConfirmedEnvelope, "wix.bookings.v2.booking_confirmed">;
25004
+ declare const onBookingCreated$1: EventDefinition<BookingCreatedEnvelope, "wix.bookings.v2.booking_created">;
24975
25005
  declare const onBookingDeclined$1: EventDefinition<BookingDeclinedEnvelope, "wix.bookings.v2.booking_declined">;
25006
+ declare const onBookingRescheduled$1: EventDefinition<BookingRescheduledEnvelope, "wix.bookings.v2.booking_rescheduled">;
25007
+ declare const onBookingUpdated$1: EventDefinition<BookingUpdatedEnvelope, "wix.bookings.v2.booking_updated">;
24976
25008
  declare const onBookingNumberOfParticipantsUpdated$1: EventDefinition<BookingNumberOfParticipantsUpdatedEnvelope, "wix.bookings.v2.booking_number_of_participants_updated">;
24977
25009
 
24978
25010
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
@@ -24999,40 +25031,40 @@ declare const cancelBooking: MaybeContext<BuildRESTFunction<typeof cancelBooking
24999
25031
  declare const updateNumberOfParticipants: MaybeContext<BuildRESTFunction<typeof updateNumberOfParticipants$1> & typeof updateNumberOfParticipants$1>;
25000
25032
  declare const confirmOrDeclineBooking: MaybeContext<BuildRESTFunction<typeof confirmOrDeclineBooking$1> & typeof confirmOrDeclineBooking$1>;
25001
25033
 
25002
- type _publicOnBookingCreatedType = typeof onBookingCreated$1;
25003
- /**
25004
- * Triggered when a booking is created.
25005
- */
25006
- declare const onBookingCreated: ReturnType<typeof createEventModule<_publicOnBookingCreatedType>>;
25007
-
25008
- type _publicOnBookingRescheduledType = typeof onBookingRescheduled$1;
25009
- /**
25010
- * Triggered when a booking is rescheduled.
25011
- */
25012
- declare const onBookingRescheduled: ReturnType<typeof createEventModule<_publicOnBookingRescheduledType>>;
25013
-
25014
25034
  type _publicOnBookingCanceledType = typeof onBookingCanceled$1;
25015
25035
  /**
25016
25036
  * Triggered when a booking is canceled.
25017
25037
  */
25018
25038
  declare const onBookingCanceled: ReturnType<typeof createEventModule<_publicOnBookingCanceledType>>;
25019
25039
 
25020
- type _publicOnBookingUpdatedType = typeof onBookingUpdated$1;
25021
- /** */
25022
- declare const onBookingUpdated: ReturnType<typeof createEventModule<_publicOnBookingUpdatedType>>;
25023
-
25024
25040
  type _publicOnBookingConfirmedType = typeof onBookingConfirmed$1;
25025
25041
  /**
25026
25042
  * Triggered when a booking is confirmed.
25027
25043
  */
25028
25044
  declare const onBookingConfirmed: ReturnType<typeof createEventModule<_publicOnBookingConfirmedType>>;
25029
25045
 
25046
+ type _publicOnBookingCreatedType = typeof onBookingCreated$1;
25047
+ /**
25048
+ * Triggered when a booking is created.
25049
+ */
25050
+ declare const onBookingCreated: ReturnType<typeof createEventModule<_publicOnBookingCreatedType>>;
25051
+
25030
25052
  type _publicOnBookingDeclinedType = typeof onBookingDeclined$1;
25031
25053
  /**
25032
25054
  * Triggered when a booking is declined.
25033
25055
  */
25034
25056
  declare const onBookingDeclined: ReturnType<typeof createEventModule<_publicOnBookingDeclinedType>>;
25035
25057
 
25058
+ type _publicOnBookingRescheduledType = typeof onBookingRescheduled$1;
25059
+ /**
25060
+ * Triggered when a booking is rescheduled.
25061
+ */
25062
+ declare const onBookingRescheduled: ReturnType<typeof createEventModule<_publicOnBookingRescheduledType>>;
25063
+
25064
+ type _publicOnBookingUpdatedType = typeof onBookingUpdated$1;
25065
+ /** */
25066
+ declare const onBookingUpdated: ReturnType<typeof createEventModule<_publicOnBookingUpdatedType>>;
25067
+
25036
25068
  type _publicOnBookingNumberOfParticipantsUpdatedType = typeof onBookingNumberOfParticipantsUpdated$1;
25037
25069
  /**
25038
25070
  * Triggered when the number of participants is updated.
@@ -25392,7 +25424,6 @@ interface ServiceChoice extends ServiceChoiceChoiceOneOf {
25392
25424
  * Each choice may have a different price.
25393
25425
  */
25394
25426
  custom?: string;
25395
- duration?: Duration;
25396
25427
  /**
25397
25428
  * ID of the corresponding option for the choice. For example, the choice `child`
25398
25429
  * could correspond to the option `ageGroup`. In this case, `optionId` is the ID
@@ -25409,7 +25440,6 @@ interface ServiceChoiceChoiceOneOf {
25409
25440
  * Each choice may have a different price.
25410
25441
  */
25411
25442
  custom?: string;
25412
- duration?: Duration;
25413
25443
  }
25414
25444
  interface Duration {
25415
25445
  /**