@wix/bookings 1.0.249 → 1.0.250

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/build/cjs/src/bookings-reader-v2-extended-booking.public.d.ts +2 -2
  2. package/build/cjs/src/bookings-reader-v2-extended-booking.public.js +2 -1
  3. package/build/cjs/src/bookings-reader-v2-extended-booking.public.js.map +1 -1
  4. package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +27 -0
  5. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js +17 -1
  6. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js.map +1 -1
  7. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +24 -0
  8. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js +17 -1
  9. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
  10. package/build/cjs/src/bookings-v2-booking.public.d.ts +2 -2
  11. package/build/cjs/src/bookings-v2-booking.public.js +3 -2
  12. package/build/cjs/src/bookings-v2-booking.public.js.map +1 -1
  13. package/build/cjs/src/bookings-v2-booking.types.d.ts +621 -300
  14. package/build/cjs/src/bookings-v2-booking.types.js +24 -8
  15. package/build/cjs/src/bookings-v2-booking.types.js.map +1 -1
  16. package/build/cjs/src/bookings-v2-booking.universal.d.ts +512 -218
  17. package/build/cjs/src/bookings-v2-booking.universal.js +24 -8
  18. package/build/cjs/src/bookings-v2-booking.universal.js.map +1 -1
  19. package/build/cjs/src/bookings-v2-price-info.public.d.ts +2 -2
  20. package/build/cjs/src/bookings-v2-price-info.public.js +2 -1
  21. package/build/cjs/src/bookings-v2-price-info.public.js.map +1 -1
  22. package/build/cjs/src/bookings-v2-price-info.types.d.ts +24 -0
  23. package/build/cjs/src/bookings-v2-price-info.types.js +17 -1
  24. package/build/cjs/src/bookings-v2-price-info.types.js.map +1 -1
  25. package/build/cjs/src/bookings-v2-price-info.universal.d.ts +24 -0
  26. package/build/cjs/src/bookings-v2-price-info.universal.js +17 -1
  27. package/build/cjs/src/bookings-v2-price-info.universal.js.map +1 -1
  28. package/build/es/src/bookings-reader-v2-extended-booking.public.d.ts +2 -2
  29. package/build/es/src/bookings-reader-v2-extended-booking.public.js +1 -1
  30. package/build/es/src/bookings-reader-v2-extended-booking.public.js.map +1 -1
  31. package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +27 -0
  32. package/build/es/src/bookings-reader-v2-extended-booking.types.js +16 -0
  33. package/build/es/src/bookings-reader-v2-extended-booking.types.js.map +1 -1
  34. package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +24 -0
  35. package/build/es/src/bookings-reader-v2-extended-booking.universal.js +16 -0
  36. package/build/es/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
  37. package/build/es/src/bookings-v2-booking.public.d.ts +2 -2
  38. package/build/es/src/bookings-v2-booking.public.js +1 -1
  39. package/build/es/src/bookings-v2-booking.public.js.map +1 -1
  40. package/build/es/src/bookings-v2-booking.types.d.ts +621 -300
  41. package/build/es/src/bookings-v2-booking.types.js +23 -7
  42. package/build/es/src/bookings-v2-booking.types.js.map +1 -1
  43. package/build/es/src/bookings-v2-booking.universal.d.ts +512 -218
  44. package/build/es/src/bookings-v2-booking.universal.js +23 -7
  45. package/build/es/src/bookings-v2-booking.universal.js.map +1 -1
  46. package/build/es/src/bookings-v2-price-info.public.d.ts +2 -2
  47. package/build/es/src/bookings-v2-price-info.public.js +1 -1
  48. package/build/es/src/bookings-v2-price-info.public.js.map +1 -1
  49. package/build/es/src/bookings-v2-price-info.types.d.ts +24 -0
  50. package/build/es/src/bookings-v2-price-info.types.js +16 -0
  51. package/build/es/src/bookings-v2-price-info.types.js.map +1 -1
  52. package/build/es/src/bookings-v2-price-info.universal.d.ts +24 -0
  53. package/build/es/src/bookings-v2-price-info.universal.js +16 -0
  54. package/build/es/src/bookings-v2-price-info.universal.js.map +1 -1
  55. package/package.json +2 -2
@@ -112,6 +112,21 @@ export interface BookingParticipantsInfoOneOf {
112
112
  */
113
113
  participantsChoices?: ParticipantChoices;
114
114
  }
115
+ export declare enum MultiServiceBookingType {
116
+ /**
117
+ * Multi service booking will be considered available if its bookings are
118
+ * available as returned from ListMultiServiceAvailabilityTimeSlots API.
119
+ * See [List Multi Service Availability Time Slots] (url) documentation // todo: complete url
120
+ */
121
+ SEQUENTIAL_BOOKINGS = "SEQUENTIAL_BOOKINGS",
122
+ /**
123
+ * Multi service booking will be considered available if each of its bookings is available separately.
124
+ * Not supported yet
125
+ */
126
+ SEPARATE_BOOKINGS = "SEPARATE_BOOKINGS",
127
+ /** Not supported yet */
128
+ PARALLEL_BOOKINGS = "PARALLEL_BOOKINGS"
129
+ }
115
130
  export interface BookedEntity extends BookedEntityItemOneOf {
116
131
  /** The booked slot, once booked becomes a session, The booking is automatically assigned to the session if it already exists, or creates a session if one doesn't already exist. */
117
132
  slot?: BookedSlot;
@@ -511,8 +526,17 @@ export interface ServiceChoiceChoiceOneOf {
511
526
  */
512
527
  custom?: string;
513
528
  }
514
- export interface CreateGroupedBookingsRequest {
515
- /** The grouped bookings to create. */
529
+ export interface MultiServiceBookingInfo {
530
+ /**
531
+ * Multi service booking ID.
532
+ * @readonly
533
+ */
534
+ _id?: string | null;
535
+ /** Multi service booking type. */
536
+ type?: MultiServiceBookingType;
537
+ }
538
+ export interface CreateMultiServiceBookingRequest {
539
+ /** The bookings to create as multi service booking. */
516
540
  bookings?: Booking[];
517
541
  /** Information about a message to send to the customer. */
518
542
  participantNotification?: ParticipantNotification;
@@ -529,8 +553,16 @@ export interface CreateGroupedBookingsRequest {
529
553
  * accepted.
530
554
  */
531
555
  flowControlSettings?: CreateBookingFlowControlSettings;
532
- /** Whether to return the created grouped bookings entities. */
556
+ /** Whether to return the created bookings entities. */
533
557
  returnFullEntity?: boolean;
558
+ /**
559
+ * Multi service booking type.
560
+ * One of:
561
+ * - `"SEQUENTIAL_BOOKINGS"` Multi service booking will be considered available if its bookings are available as returned from ListMultiServiceAvailabilityTimeSlots API.
562
+ * - `"SEPARATE_BOOKINGS"` Not supported yet.
563
+ * - `"PARALLEL_BOOKINGS"` Not supported yet.
564
+ */
565
+ multiServiceBookingType?: MultiServiceBookingType;
534
566
  }
535
567
  export interface CreateBookingFlowControlSettings {
536
568
  /**
@@ -557,154 +589,31 @@ export interface CreateBookingFlowControlSettings {
557
589
  */
558
590
  skipSelectedPaymentOptionValidation?: boolean;
559
591
  }
560
- export interface CreateGroupedBookingsResponse {
561
- /** Group ID. */
562
- groupId?: string | null;
563
- /** Created grouped bookings. */
592
+ export interface CreateMultiServiceBookingResponse {
593
+ /** Created multi service booking. */
594
+ multiServiceBooking?: MultiServiceBooking;
595
+ }
596
+ export interface MultiServiceBooking {
597
+ /** Multi service booking ID. */
598
+ _id?: string | null;
599
+ /** The created bookings which are part of the multi service booking */
564
600
  bookings?: BookingResult[];
565
601
  }
566
602
  export interface BookingResult {
567
603
  /** Booking ID. */
568
604
  bookingId?: string | null;
569
- /** Booking entity. */
570
- booking?: Booking;
571
- }
572
- export interface GetGroupedBookingsAvailabilityRequest {
573
- groupId?: string | null;
574
- }
575
- export interface GetGroupedBookingsAvailabilityResponse {
576
- /** Whether these grouped bookings are bookable. */
577
- bookable?: boolean;
578
- /** Total number of spots for this availability. */
579
- totalSpots?: number | null;
580
- /** Number of open spots for this availability. */
581
- openSpots?: number | null;
582
- /** Indicators for grouped bookings policy violations. */
583
- groupedBookingsPolicyViolations?: BookingPolicyViolations;
584
- /** Booking policy settings */
585
- bookingPolicySettings?: BookingPolicySettings;
586
- /** Info of the grouped bookings this availability was calculated for. */
587
- groupedBookingsInfo?: GroupedBookingInfo[];
588
- }
589
- export interface BookingPolicyViolations {
590
- /** Bookings policy violation. Too early to book this slot. */
591
- tooEarlyToBook?: boolean | null;
592
- /** Bookings policy violation. Too late to book this slot. */
593
- tooLateToBook?: boolean | null;
594
- /** Bookings policy violation. Online booking is disabled for this slot. */
595
- bookOnlineDisabled?: boolean | null;
596
- }
597
- export interface BookingPolicySettings {
598
- /** Booking policy settings for a given Slot/Schedule */
599
- maxParticipantsPerBooking?: number | null;
600
- }
601
- export interface GroupedBookingInfo {
602
- /** Grouped booking id */
603
- bookingId?: string | null;
604
- }
605
- export interface CancelGroupedBookingsRequest {
606
- /** ID of the group to cancel it's related bookings. */
607
- groupId?: string;
608
- /**
609
- * Information about whether to notify the customer about the cancelation and
610
- * the message to send.
611
- */
612
- participantNotification?: ParticipantNotification;
613
- /**
614
- * Information about whether specific procedures of the standard Wix Bookings
615
- * cancelation flow are changed. For example, whether the you can cancel
616
- * a booking even though the cancelation policy doesn't allow it or whether
617
- * to issue a refund.
618
- */
619
- flowControlSettings?: CancelBookingFlowControlSettings;
620
- /** Whether to return the canceled grouped bookings entities. */
621
- returnFullEntity?: boolean;
622
- }
623
- export interface CancelBookingFlowControlSettings {
624
- /**
625
- * Whether the cancelation policy applies when canceling the booking. When
626
- * passing `false` you can only cancel a booking if the cancelation policy
627
- * allows it.
628
- * Default: `false`.
629
- * <!--ONLY:VELO
630
- * Requires "Manage Wix Bookings App" and "Manage Bookings' Calendar" [roles](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin).
631
- * <!--END:ONLY:VELO-->
632
- */
633
- ignoreCancellationPolicy?: boolean | null;
634
605
  /**
635
- * Whether to issue a refund when canceling the booking.
636
- * The refund will be issued only if the booking is refundable.
637
- * Currently, booking is considered refundable when it was paid by membership.
638
- * If passing `true`, the booking flow control settings will be set with refund,
639
- * otherwise, either if `false` is passed or the field remains empty,
640
- * the booking flow control settings will be set with no refund.
641
- * Default: `false`.
606
+ * Booking entity.
607
+ * This field is not returned when returnFullEntity is false on request
642
608
  */
643
- withRefund?: boolean | null;
644
- }
645
- export interface CancelGroupedBookingsResponse {
646
- /** Canceled grouped bookings. */
647
- bookings?: BookingResult[];
648
- }
649
- export interface BookingCanceled {
650
- /** The canceled booking object. */
651
609
  booking?: Booking;
652
- /** Information about whether to notify the customer about the cancelation and the message to send. */
653
- participantNotification?: ParticipantNotification;
654
- /**
655
- * Information about whether specific procedures of the standard Wix Bookings
656
- * cancelation flow are changed. For example, whether you can cancel
657
- * a booking even though the cancelation policy doesn't allow it or whether
658
- * to issue a refund.
659
- */
660
- flowControlSettings?: CancelBookingFlowControlSettings;
661
- /** ID of the cancelation initiator. */
662
- initiatedBy?: IdentificationData;
663
- /** The previous status of the booking. */
664
- previousStatus?: BookingStatus;
665
- }
666
- export interface IdentificationData extends IdentificationDataIdOneOf {
667
- /** ID of a site visitor that has not logged in to the site. */
668
- anonymousVisitorId?: string;
669
- /** ID of a site visitor that has logged in to the site. */
670
- memberId?: string;
671
- /** ID of a Wix user (site owner, contributor, etc.). */
672
- wixUserId?: string;
673
- /** ID of an app. */
674
- appId?: string;
675
- /**
676
- * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
677
- * @readonly
678
- */
679
- contactId?: string | null;
680
- }
681
- /** @oneof */
682
- export interface IdentificationDataIdOneOf {
683
- /** ID of a site visitor that has not logged in to the site. */
684
- anonymousVisitorId?: string;
685
- /** ID of a site visitor that has logged in to the site. */
686
- memberId?: string;
687
- /** ID of a Wix user (site owner, contributor, etc.). */
688
- wixUserId?: string;
689
- /** ID of an app. */
690
- appId?: string;
691
- }
692
- export declare enum IdentityType {
693
- UNKNOWN = "UNKNOWN",
694
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
695
- MEMBER = "MEMBER",
696
- WIX_USER = "WIX_USER",
697
- APP = "APP"
698
610
  }
699
- export interface RescheduleGroupedBookingsRequest {
700
- /** ID of the group to reschedule it's related bookings. */
701
- groupId?: string;
702
- /** Grouped bookings to reschedule. */
703
- rescheduleBookingsInfo?: RescheduleBookingInfo[];
704
- /**
705
- * Information about whether to notify the customer about the rescheduling and
706
- * the message to send.
707
- */
611
+ export interface RescheduleMultiServiceBookingRequest {
612
+ /** ID of the multi service booking to reschedule it's related bookings. */
613
+ multiServiceBookingId?: string | null;
614
+ /** Bookings to reschedule. */
615
+ rescheduleBookingsInfo?: RescheduleMultiServiceBookingRequestRescheduleBookingInfo[];
616
+ /** Information about whether to notify the customer about the rescheduling and the message to send. */
708
617
  participantNotification?: ParticipantNotification;
709
618
  /**
710
619
  * Information about whether specific procedures of the standard Wix Bookings
@@ -713,7 +622,7 @@ export interface RescheduleGroupedBookingsRequest {
713
622
  * reschedule the booking even though the rescheduling policy doesn't allow it.
714
623
  */
715
624
  flowControlSettings?: RescheduleBookingFlowControlSettings;
716
- /** Whether to return the rescheduled grouped bookings entities. */
625
+ /** Whether to return the rescheduled bookings entities. */
717
626
  returnFullEntity?: boolean;
718
627
  }
719
628
  export interface V2Slot {
@@ -765,7 +674,7 @@ export interface SlotLocation {
765
674
  */
766
675
  locationType?: LocationLocationType;
767
676
  }
768
- export interface RescheduleBookingInfo extends RescheduleBookingInfoParticipantsInfoOneOf {
677
+ export interface RescheduleMultiServiceBookingRequestRescheduleBookingInfo extends RescheduleMultiServiceBookingRequestRescheduleBookingInfoParticipantsInfoOneOf {
769
678
  /**
770
679
  * Total number of participants. Available only for services with
771
680
  * variants.
@@ -779,7 +688,7 @@ export interface RescheduleBookingInfo extends RescheduleBookingInfoParticipants
779
688
  */
780
689
  participantsChoices?: ParticipantChoices;
781
690
  /** ID of the booking to reschedule. */
782
- bookingId?: string;
691
+ bookingId?: string | null;
783
692
  /** Information about the new slot. */
784
693
  slot?: V2Slot;
785
694
  /**
@@ -790,7 +699,7 @@ export interface RescheduleBookingInfo extends RescheduleBookingInfoParticipants
790
699
  revision?: string | null;
791
700
  }
792
701
  /** @oneof */
793
- export interface RescheduleBookingInfoParticipantsInfoOneOf {
702
+ export interface RescheduleMultiServiceBookingRequestRescheduleBookingInfoParticipantsInfoOneOf {
794
703
  /**
795
704
  * Total number of participants. Available only for services with
796
705
  * variants.
@@ -830,9 +739,9 @@ export interface RescheduleBookingFlowControlSettings {
830
739
  */
831
740
  skipBusinessConfirmation?: boolean;
832
741
  }
833
- export interface RescheduleGroupedBookingsResponse {
834
- /** Rescheduled grouped bookings. */
835
- bookings?: BookingResult[];
742
+ export interface RescheduleMultiServiceBookingResponse {
743
+ /** Rescheduled multi service booking. */
744
+ multiServiceBooking?: MultiServiceBooking;
836
745
  }
837
746
  export interface BookingRescheduled extends BookingRescheduledPreviousParticipantsInfoOneOf {
838
747
  /** The previous total number of participants. Available only when the booking includes a single service variant. */
@@ -874,41 +783,162 @@ export interface BookingRescheduledPreviousParticipantsInfoOneOf {
874
783
  */
875
784
  previousParticipantsChoices?: ParticipantChoices;
876
785
  }
877
- export interface ConfirmGroupedBookingsRequest {
878
- /** ID of the group to confirm it's related bookings. */
879
- groupId?: string;
880
- /** Grouped bookings to confirm. */
881
- confirmBookingsInfo?: BookingInfo[];
786
+ export interface IdentificationData extends IdentificationDataIdOneOf {
787
+ /** ID of a site visitor that has not logged in to the site. */
788
+ anonymousVisitorId?: string;
789
+ /** ID of a site visitor that has logged in to the site. */
790
+ memberId?: string;
791
+ /** ID of a Wix user (site owner, contributor, etc.). */
792
+ wixUserId?: string;
793
+ /** ID of an app. */
794
+ appId?: string;
882
795
  /**
883
- * Information about whether to notify the customer about the confirmation and
884
- * the message to send.
796
+ * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
797
+ * @readonly
885
798
  */
799
+ contactId?: string | null;
800
+ }
801
+ /** @oneof */
802
+ export interface IdentificationDataIdOneOf {
803
+ /** ID of a site visitor that has not logged in to the site. */
804
+ anonymousVisitorId?: string;
805
+ /** ID of a site visitor that has logged in to the site. */
806
+ memberId?: string;
807
+ /** ID of a Wix user (site owner, contributor, etc.). */
808
+ wixUserId?: string;
809
+ /** ID of an app. */
810
+ appId?: string;
811
+ }
812
+ export declare enum IdentityType {
813
+ UNKNOWN = "UNKNOWN",
814
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
815
+ MEMBER = "MEMBER",
816
+ WIX_USER = "WIX_USER",
817
+ APP = "APP"
818
+ }
819
+ export interface GetMultiServiceBookingAvailabilityRequest {
820
+ multiServiceBookingId?: string | null;
821
+ }
822
+ export interface GetMultiServiceBookingAvailabilityResponse {
823
+ /** Whether these bookings are bookable. */
824
+ bookable?: boolean;
825
+ /** Total number of spots for this availability. */
826
+ totalCapacity?: number | null;
827
+ /** Number of open spots for this availability. */
828
+ remainingCapacity?: number | null;
829
+ /** Indicators for policy violations of the multi service booking. */
830
+ policyViolations?: BookingPolicyViolations;
831
+ /** Multi service booking policy settings */
832
+ policySettings?: BookingPolicySettings;
833
+ /** Info of the bookings this availability was calculated for. */
834
+ multiServiceBookingInfo?: GetMultiServiceBookingAvailabilityResponseBookingInfo[];
835
+ }
836
+ export interface BookingPolicyViolations {
837
+ /** Bookings policy violation. Too early to book this slot. */
838
+ tooEarlyToBook?: boolean | null;
839
+ /** Bookings policy violation. Too late to book this slot. */
840
+ tooLateToBook?: boolean | null;
841
+ /** Bookings policy violation. Online booking is disabled for this slot. */
842
+ bookOnlineDisabled?: boolean | null;
843
+ }
844
+ export interface BookingPolicySettings {
845
+ /** Booking policy settings for a given Slot/Schedule */
846
+ maxParticipantsPerBooking?: number | null;
847
+ }
848
+ export interface GetMultiServiceBookingAvailabilityResponseBookingInfo {
849
+ /** Booking id */
850
+ bookingId?: string | null;
851
+ }
852
+ export interface CancelMultiServiceBookingRequest {
853
+ /** ID of the multi service booking to cancel it's related bookings. */
854
+ multiServiceBookingId?: string | null;
855
+ /** Information about whether to notify the customer about the cancelation and the message to send. */
886
856
  participantNotification?: ParticipantNotification;
887
- /**
888
- * Whether to send an SMS reminder to the customer 24 hours before the
889
- * session starts. The phone number is taken from `contactDetails.phone`.
890
- */
891
- sendSmsReminder?: boolean | null;
892
- /** Whether this booking overlaps with another existing confirmed booking. */
893
- doubleBooked?: boolean | null;
894
- /** Whether to return the confirmed grouped bookings entities. */
895
- returnFullEntity?: boolean;
896
857
  /**
897
858
  * Information about whether specific procedures of the standard Wix Bookings
898
- * confirmation flow are changed. For example, whether the availability is
899
- * checked before confirming the booking.
859
+ * cancelation flow are changed. For example, whether the you can cancel
860
+ * a booking even though the cancelation policy doesn't allow it or whether
861
+ * to issue a refund.
900
862
  */
901
- flowControlSettings?: ConfirmBookingFlowControlSettings;
863
+ flowControlSettings?: CancelBookingFlowControlSettings;
864
+ /** Whether to return the canceled bookings entities. */
865
+ returnFullEntity?: boolean;
902
866
  }
903
- export interface BookingInfo {
904
- /** ID of the booking. */
905
- bookingId?: string;
867
+ export interface CancelBookingFlowControlSettings {
906
868
  /**
907
- * Revision number, which increments by 1 each time the booking is updated.
908
- * To prevent conflicting changes, the current revision must be passed when
909
- * managing the booking.
869
+ * Whether the cancelation policy applies when canceling the booking. When
870
+ * passing `false` you can only cancel a booking if the cancelation policy
871
+ * allows it.
872
+ * Default: `false`.
873
+ * <!--ONLY:VELO
874
+ * Requires "Manage Wix Bookings App" and "Manage Bookings' Calendar" [roles](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin).
875
+ * <!--END:ONLY:VELO-->
910
876
  */
911
- revision?: string | null;
877
+ ignoreCancellationPolicy?: boolean | null;
878
+ /**
879
+ * Whether to issue a refund when canceling the booking.
880
+ * The refund will be issued only if the booking is refundable.
881
+ * Currently, booking is considered refundable when it was paid by membership.
882
+ * If passing `true`, the booking flow control settings will be set with refund,
883
+ * otherwise, either if `false` is passed or the field remains empty,
884
+ * the booking flow control settings will be set with no refund.
885
+ * Default: `false`.
886
+ */
887
+ withRefund?: boolean | null;
888
+ }
889
+ export interface CancelMultiServiceBookingResponse {
890
+ /** Canceled multi service booking. */
891
+ multiServiceBooking?: MultiServiceBooking;
892
+ }
893
+ export interface BookingCanceled {
894
+ /** The canceled booking object. */
895
+ booking?: Booking;
896
+ /** Information about whether to notify the customer about the cancelation and the message to send. */
897
+ participantNotification?: ParticipantNotification;
898
+ /**
899
+ * Information about whether specific procedures of the standard Wix Bookings
900
+ * cancelation flow are changed. For example, whether you can cancel
901
+ * a booking even though the cancelation policy doesn't allow it or whether
902
+ * to issue a refund.
903
+ */
904
+ flowControlSettings?: CancelBookingFlowControlSettings;
905
+ /** ID of the cancelation initiator. */
906
+ initiatedBy?: IdentificationData;
907
+ /** The previous status of the booking. */
908
+ previousStatus?: BookingStatus;
909
+ }
910
+ export interface MarkMultiServiceBookingAsPendingRequest {
911
+ /** ID of the multi service booking to mark as pending it's related bookings. */
912
+ multiServiceBookingId?: string | null;
913
+ /** Bookings to mark as pending. */
914
+ markAsPendingBookingsInfo?: BookingInfo[];
915
+ /** Information about whether to notify the customer upon manual confirmation and the message to send. */
916
+ participantNotification?: ParticipantNotification;
917
+ /**
918
+ * Whether to send an SMS reminder to the customer 24 hours before the
919
+ * session starts. The phone number is taken from `contactDetails.phone`.
920
+ */
921
+ sendSmsReminder?: boolean | null;
922
+ /** Whether this booking overlaps with another existing confirmed booking. */
923
+ doubleBooked?: boolean | null;
924
+ /** Whether to return the pending bookings entities. */
925
+ returnFullEntity?: boolean;
926
+ /**
927
+ * Information about whether specific procedures of the standard Wix Bookings
928
+ * creation flow are changed. For example, whether the availability is
929
+ * checked before updating the booking.
930
+ */
931
+ flowControlSettings?: MarkBookingAsPendingFlowControlSettings;
932
+ }
933
+ export interface BookingInfo {
934
+ /** ID of the booking. */
935
+ bookingId?: string | null;
936
+ /**
937
+ * Revision number, which increments by 1 each time the booking is updated.
938
+ * To prevent conflicting changes, the current revision must be passed when
939
+ * managing the booking.
940
+ */
941
+ revision?: string | null;
912
942
  /**
913
943
  * Payment status to set for the booking.
914
944
  * One of:
@@ -920,6 +950,47 @@ export interface BookingInfo {
920
950
  */
921
951
  paymentStatus?: PaymentStatus;
922
952
  }
953
+ export interface MarkBookingAsPendingFlowControlSettings {
954
+ /**
955
+ * Whether should check for double bookings before updating the booking as pending.
956
+ * When passing `false` a booking is only being updated with status PENDING
957
+ * Default: `false`.
958
+ */
959
+ checkAvailabilityValidation?: boolean;
960
+ /**
961
+ * Whether should validate that the given booking to be marked as pending, has a booking.slot.serviceId
962
+ * of a pending approval service.
963
+ * Default: `false`.
964
+ */
965
+ skipPendingApprovalServiceValidation?: boolean;
966
+ }
967
+ export interface MarkMultiServiceBookingAsPendingResponse {
968
+ /** Pending multi service booking. */
969
+ multiServiceBooking?: MultiServiceBooking;
970
+ }
971
+ export interface ConfirmMultiServiceBookingRequest {
972
+ /** ID of the multi service booking to confirm it's related bookings. */
973
+ multiServiceBookingId?: string | null;
974
+ /** Bookings to confirm. */
975
+ confirmBookingsInfo?: BookingInfo[];
976
+ /** Information about whether to notify the customer about the confirmation and the message to send. */
977
+ participantNotification?: ParticipantNotification;
978
+ /**
979
+ * Whether to send an SMS reminder to the customer 24 hours before the
980
+ * session starts. The phone number is taken from `contactDetails.phone`.
981
+ */
982
+ sendSmsReminder?: boolean | null;
983
+ /** Whether this booking overlaps with another existing confirmed booking. */
984
+ doubleBooked?: boolean | null;
985
+ /** Whether to return the confirmed bookings entities. */
986
+ returnFullEntity?: boolean;
987
+ /**
988
+ * Information about whether specific procedures of the standard Wix Bookings
989
+ * confirmation flow are changed. For example, whether the availability is
990
+ * checked before confirming the booking.
991
+ */
992
+ flowControlSettings?: ConfirmBookingFlowControlSettings;
993
+ }
923
994
  export interface ConfirmBookingFlowControlSettings {
924
995
  /**
925
996
  * todo add notes regard any flow
@@ -929,9 +1000,9 @@ export interface ConfirmBookingFlowControlSettings {
929
1000
  */
930
1001
  checkAvailabilityValidation?: boolean;
931
1002
  }
932
- export interface ConfirmGroupedBookingsResponse {
933
- /** Confirmed grouped bookings. */
934
- bookings?: BookingResult[];
1003
+ export interface ConfirmMultiServiceBookingResponse {
1004
+ /** Confirmed multi service booking. */
1005
+ multiServiceBooking?: MultiServiceBooking;
935
1006
  }
936
1007
  export interface BookingConfirmed {
937
1008
  /** The confirmed booking object. */
@@ -952,24 +1023,21 @@ export interface BookingConfirmed {
952
1023
  /** The previous payment status of the booking. */
953
1024
  previousPaymentStatus?: PaymentStatus;
954
1025
  }
955
- export interface DeclineGroupedBookingsRequest {
956
- /** ID of the group to decline it's related bookings. */
957
- groupId?: string;
958
- /** Grouped bookings to decline. */
1026
+ export interface DeclineMultiServiceBookingRequest {
1027
+ /** ID of the multi service booking to decline it's related bookings. */
1028
+ multiServiceBookingId?: string | null;
1029
+ /** Bookings to decline. */
959
1030
  declineBookingsInfo?: BookingInfo[];
960
- /**
961
- * Information about whether to notify the customer about the decline and
962
- * the message to send.
963
- */
1031
+ /** Information about whether to notify the customer about the decline and the message to send. */
964
1032
  participantNotification?: ParticipantNotification;
965
1033
  /** Whether this booking overlaps with another existing confirmed booking. */
966
1034
  doubleBooked?: boolean | null;
967
- /** Whether to return the declined grouped bookings entities. */
1035
+ /** Whether to return the declined bookings entities. */
968
1036
  returnFullEntity?: boolean;
969
1037
  }
970
- export interface DeclineGroupedBookingsResponse {
971
- /** Declined grouped bookings. */
972
- bookings?: BookingResult[];
1038
+ export interface DeclineMultiServiceBookingResponse {
1039
+ /** Declined multi service booking. */
1040
+ multiServiceBooking?: MultiServiceBooking;
973
1041
  }
974
1042
  export interface BookingDeclined {
975
1043
  /** The declined booking object. */
@@ -985,11 +1053,11 @@ export interface BookingDeclined {
985
1053
  /** The previous payment status of the booking. */
986
1054
  previousPaymentStatus?: PaymentStatus;
987
1055
  }
988
- export interface BulkCalculateGroupedBookingsAllowedActionsRequest {
989
- /** The group ids to calculate the allowedActions for */
990
- groupIds?: string[] | null;
1056
+ export interface BulkGetMultiServiceBookingAllowedActionsRequest {
1057
+ /** The multi service booking ids to get the allowedActions for. */
1058
+ multiServiceBookingIds?: string[] | null;
991
1059
  }
992
- export interface BulkCalculateGroupedBookingsAllowedActionsResponse {
1060
+ export interface BulkGetMultiServiceBookingAllowedActionsResponse {
993
1061
  results?: BulkCalculateAllowedActionsResult[];
994
1062
  bulkActionMetadata?: BulkActionMetadata;
995
1063
  }
@@ -1031,6 +1099,256 @@ export interface BulkActionMetadata {
1031
1099
  /** Number of failures without details because detailed failure threshold was exceeded. */
1032
1100
  undetailedFailures?: number;
1033
1101
  }
1102
+ export interface MarkAsMultiServiceBookingRequest {
1103
+ /** IDs of the bookings to group together. */
1104
+ bookingIds?: string[] | null;
1105
+ /**
1106
+ * Multi service booking type.
1107
+ * One of:
1108
+ * - `"SEQUENTIAL_BOOKINGS"` Multi service booking will be considered available if its bookings are available as returned from ListMultiServiceAvailabilityTimeSlots API.
1109
+ * - `"SEPARATE_BOOKINGS"` Not supported yet.
1110
+ * - `"PARALLEL_BOOKINGS"` Not supported yet.
1111
+ */
1112
+ multiServiceBookingType?: MultiServiceBookingType;
1113
+ }
1114
+ export interface MarkAsMultiServiceBookingResponse {
1115
+ /** Multi service booking ID. */
1116
+ multiServiceBookingId?: string | null;
1117
+ }
1118
+ export interface GetMultiServiceBookingRequest {
1119
+ /** Multi service booking ID. */
1120
+ multiServiceBookingId?: string | null;
1121
+ }
1122
+ export interface GetMultiServiceBookingResponse {
1123
+ /** Multi service booking. */
1124
+ multiServiceBooking?: MultiServiceBooking;
1125
+ /** Total number of bookings within the multi service booking, including bookings which were not retrieved due to lack of read permissions. */
1126
+ multiServiceBookingSize?: number | null;
1127
+ }
1128
+ export interface AddBookingsToMultiServiceBookingRequest {
1129
+ /** ID of the multi service booking. */
1130
+ multiServiceBookingId?: string | null;
1131
+ /** List of bookings ids and their revisions to add to the multi service booking. */
1132
+ bookings?: BookingIdAndRevision[];
1133
+ /** Whether to return the bookings entities. */
1134
+ returnFullEntity?: boolean;
1135
+ }
1136
+ export interface BookingIdAndRevision {
1137
+ /** ID of the booking. */
1138
+ bookingId?: string | null;
1139
+ /**
1140
+ * Revision number, which increments by 1 each time the booking is updated.
1141
+ * To prevent conflicting changes, the current revision must be passed when
1142
+ * managing the booking.
1143
+ */
1144
+ revision?: string | null;
1145
+ }
1146
+ export interface AddBookingsToMultiServiceBookingResponse {
1147
+ /** The bookings that were added to the multi service booking. */
1148
+ bookings?: BookingResult[];
1149
+ }
1150
+ export interface RemoveBookingsFromMultiServiceBookingRequest {
1151
+ /** ID of the multi service booking. */
1152
+ multiServiceBookingId?: string | null;
1153
+ /** List of bookings ids and their revisions to remove from the multi service booking. */
1154
+ bookings?: BookingIdAndRevision[];
1155
+ /** Whether to return the bookings entities. */
1156
+ returnFullEntity?: boolean;
1157
+ }
1158
+ export interface RemoveBookingsFromMultiServiceBookingResponse {
1159
+ /** The bookings that were removed from the multi service booking. */
1160
+ bookings?: BookingResult[];
1161
+ }
1162
+ export interface CreateGroupedBookingsRequest {
1163
+ /** The grouped bookings to create. */
1164
+ bookings?: Booking[];
1165
+ /** Information about a message to send to the customer. */
1166
+ participantNotification?: ParticipantNotification;
1167
+ /**
1168
+ * Whether to send an SMS reminder to the customer 24 hours before the
1169
+ * session starts. The phone number is taken from `contactDetails.phone`.
1170
+ * Default: `true`.
1171
+ */
1172
+ sendSmsReminder?: boolean | null;
1173
+ /**
1174
+ * Information about whether specific procedures of the standard Wix Bookings
1175
+ * creation flow are changed. For example, whether the availability is
1176
+ * checked before creating the booking or if additional payment options are
1177
+ * accepted.
1178
+ */
1179
+ flowControlSettings?: CreateBookingFlowControlSettings;
1180
+ /** Whether to return the created grouped bookings entities. */
1181
+ returnFullEntity?: boolean;
1182
+ }
1183
+ export interface CreateGroupedBookingsResponse {
1184
+ /** Group ID. */
1185
+ groupId?: string | null;
1186
+ /** Created grouped bookings. */
1187
+ bookings?: BookingResult[];
1188
+ }
1189
+ export interface GetGroupedBookingsAvailabilityRequest {
1190
+ groupId?: string | null;
1191
+ }
1192
+ export interface GetGroupedBookingsAvailabilityResponse {
1193
+ /** Whether these grouped bookings are bookable. */
1194
+ bookable?: boolean;
1195
+ /** Total number of spots for this availability. */
1196
+ totalSpots?: number | null;
1197
+ /** Number of open spots for this availability. */
1198
+ openSpots?: number | null;
1199
+ /** Indicators for grouped bookings policy violations. */
1200
+ groupedBookingsPolicyViolations?: BookingPolicyViolations;
1201
+ /** Booking policy settings */
1202
+ bookingPolicySettings?: BookingPolicySettings;
1203
+ /** Info of the grouped bookings this availability was calculated for. */
1204
+ groupedBookingsInfo?: GroupedBookingInfo[];
1205
+ }
1206
+ export interface GroupedBookingInfo {
1207
+ /** Grouped booking id */
1208
+ bookingId?: string | null;
1209
+ }
1210
+ export interface CancelGroupedBookingsRequest {
1211
+ /** ID of the group to cancel it's related bookings. */
1212
+ groupId?: string;
1213
+ /**
1214
+ * Information about whether to notify the customer about the cancelation and
1215
+ * the message to send.
1216
+ */
1217
+ participantNotification?: ParticipantNotification;
1218
+ /**
1219
+ * Information about whether specific procedures of the standard Wix Bookings
1220
+ * cancelation flow are changed. For example, whether the you can cancel
1221
+ * a booking even though the cancelation policy doesn't allow it or whether
1222
+ * to issue a refund.
1223
+ */
1224
+ flowControlSettings?: CancelBookingFlowControlSettings;
1225
+ /** Whether to return the canceled grouped bookings entities. */
1226
+ returnFullEntity?: boolean;
1227
+ }
1228
+ export interface CancelGroupedBookingsResponse {
1229
+ /** Canceled grouped bookings. */
1230
+ bookings?: BookingResult[];
1231
+ }
1232
+ export interface RescheduleGroupedBookingsRequest {
1233
+ /** ID of the group to reschedule it's related bookings. */
1234
+ groupId?: string;
1235
+ /** Grouped bookings to reschedule. */
1236
+ rescheduleBookingsInfo?: RescheduleBookingInfo[];
1237
+ /**
1238
+ * Information about whether to notify the customer about the rescheduling and
1239
+ * the message to send.
1240
+ */
1241
+ participantNotification?: ParticipantNotification;
1242
+ /**
1243
+ * Information about whether specific procedures of the standard Wix Bookings
1244
+ * rescheduling flow are changed. For example, whether the availability of
1245
+ * the new slot is checked before rescheduling the booking or if you can
1246
+ * reschedule the booking even though the rescheduling policy doesn't allow it.
1247
+ */
1248
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
1249
+ /** Whether to return the rescheduled grouped bookings entities. */
1250
+ returnFullEntity?: boolean;
1251
+ }
1252
+ export interface RescheduleBookingInfo extends RescheduleBookingInfoParticipantsInfoOneOf {
1253
+ /**
1254
+ * Total number of participants. Available only for services with
1255
+ * variants.
1256
+ * Pass when all participants book the same variant.
1257
+ */
1258
+ totalParticipants?: number;
1259
+ /**
1260
+ * Information about the service choices to book. Available only for services with
1261
+ * variants.
1262
+ * Pass when not all participants book the same variant.
1263
+ */
1264
+ participantsChoices?: ParticipantChoices;
1265
+ /** ID of the booking to reschedule. */
1266
+ bookingId?: string;
1267
+ /** Information about the new slot. */
1268
+ slot?: V2Slot;
1269
+ /**
1270
+ * Revision number, which increments by 1 each time the booking is updated.
1271
+ * To prevent conflicting changes, the current revision must be passed when
1272
+ * managing the booking.
1273
+ */
1274
+ revision?: string | null;
1275
+ }
1276
+ /** @oneof */
1277
+ export interface RescheduleBookingInfoParticipantsInfoOneOf {
1278
+ /**
1279
+ * Total number of participants. Available only for services with
1280
+ * variants.
1281
+ * Pass when all participants book the same variant.
1282
+ */
1283
+ totalParticipants?: number;
1284
+ /**
1285
+ * Information about the service choices to book. Available only for services with
1286
+ * variants.
1287
+ * Pass when not all participants book the same variant.
1288
+ */
1289
+ participantsChoices?: ParticipantChoices;
1290
+ }
1291
+ export interface RescheduleGroupedBookingsResponse {
1292
+ /** Rescheduled grouped bookings. */
1293
+ bookings?: BookingResult[];
1294
+ }
1295
+ export interface ConfirmGroupedBookingsRequest {
1296
+ /** ID of the group to confirm it's related bookings. */
1297
+ groupId?: string;
1298
+ /** Grouped bookings to confirm. */
1299
+ confirmBookingsInfo?: BookingInfo[];
1300
+ /**
1301
+ * Information about whether to notify the customer about the confirmation and
1302
+ * the message to send.
1303
+ */
1304
+ participantNotification?: ParticipantNotification;
1305
+ /**
1306
+ * Whether to send an SMS reminder to the customer 24 hours before the
1307
+ * session starts. The phone number is taken from `contactDetails.phone`.
1308
+ */
1309
+ sendSmsReminder?: boolean | null;
1310
+ /** Whether this booking overlaps with another existing confirmed booking. */
1311
+ doubleBooked?: boolean | null;
1312
+ /** Whether to return the confirmed grouped bookings entities. */
1313
+ returnFullEntity?: boolean;
1314
+ /**
1315
+ * Information about whether specific procedures of the standard Wix Bookings
1316
+ * confirmation flow are changed. For example, whether the availability is
1317
+ * checked before confirming the booking.
1318
+ */
1319
+ flowControlSettings?: ConfirmBookingFlowControlSettings;
1320
+ }
1321
+ export interface ConfirmGroupedBookingsResponse {
1322
+ /** Confirmed grouped bookings. */
1323
+ bookings?: BookingResult[];
1324
+ }
1325
+ export interface DeclineGroupedBookingsRequest {
1326
+ /** ID of the group to decline it's related bookings. */
1327
+ groupId?: string;
1328
+ /** Grouped bookings to decline. */
1329
+ declineBookingsInfo?: BookingInfo[];
1330
+ /**
1331
+ * Information about whether to notify the customer about the decline and
1332
+ * the message to send.
1333
+ */
1334
+ participantNotification?: ParticipantNotification;
1335
+ /** Whether this booking overlaps with another existing confirmed booking. */
1336
+ doubleBooked?: boolean | null;
1337
+ /** Whether to return the declined grouped bookings entities. */
1338
+ returnFullEntity?: boolean;
1339
+ }
1340
+ export interface DeclineGroupedBookingsResponse {
1341
+ /** Declined grouped bookings. */
1342
+ bookings?: BookingResult[];
1343
+ }
1344
+ export interface BulkCalculateGroupedBookingsAllowedActionsRequest {
1345
+ /** The group ids to calculate the allowedActions for */
1346
+ groupIds?: string[] | null;
1347
+ }
1348
+ export interface BulkCalculateGroupedBookingsAllowedActionsResponse {
1349
+ results?: BulkCalculateAllowedActionsResult[];
1350
+ bulkActionMetadata?: BulkActionMetadata;
1351
+ }
1034
1352
  export interface SplitGroupedBookingsRequest {
1035
1353
  /** ID of the group. */
1036
1354
  groupId?: string;
@@ -1065,16 +1383,6 @@ export interface RemoveFromGroupRequest {
1065
1383
  /** Whether to return the declined grouped bookings entities. */
1066
1384
  returnFullEntity?: boolean;
1067
1385
  }
1068
- export interface BookingIdAndRevision {
1069
- /** ID of the booking. */
1070
- bookingId?: string;
1071
- /**
1072
- * Revision number, which increments by 1 each time the booking is updated.
1073
- * To prevent conflicting changes, the current revision must be passed when
1074
- * managing the booking.
1075
- */
1076
- revision?: string | null;
1077
- }
1078
1386
  export interface RemoveFromGroupResponse {
1079
1387
  /** The bookings that were removed from the group. */
1080
1388
  bookings?: BookingResult[];
@@ -1105,20 +1413,6 @@ export interface MarkGroupedBookingsAsPendingRequest {
1105
1413
  */
1106
1414
  flowControlSettings?: MarkBookingAsPendingFlowControlSettings;
1107
1415
  }
1108
- export interface MarkBookingAsPendingFlowControlSettings {
1109
- /**
1110
- * Whether should check for double bookings before updating the booking as pending.
1111
- * When passing `false` a booking is only being updated with status PENDING
1112
- * Default: `false`.
1113
- */
1114
- checkAvailabilityValidation?: boolean;
1115
- /**
1116
- * Whether should validate that the given booking to be marked as pending, has a booking.slot.serviceId
1117
- * of a pending approval service.
1118
- * Default: `false`.
1119
- */
1120
- skipPendingApprovalServiceValidation?: boolean;
1121
- }
1122
1416
  export interface MarkGroupedBookingsAsPendingResponse {
1123
1417
  /** Pending grouped bookings. */
1124
1418
  bookings?: BookingResult[];