@wix/bookings 1.0.211 → 1.0.213

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 (81) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +2 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +2 -2
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/src/bookings-availability-v1-slot-availability.types.d.ts +1 -0
  8. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.d.ts +1 -0
  9. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  10. package/build/cjs/src/bookings-reader-v2-extended-booking.public.d.ts +2 -2
  11. package/build/cjs/src/bookings-reader-v2-extended-booking.public.js +2 -1
  12. package/build/cjs/src/bookings-reader-v2-extended-booking.public.js.map +1 -1
  13. package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +17 -2
  14. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js +6 -1
  15. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js.map +1 -1
  16. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +17 -2
  17. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js +6 -1
  18. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
  19. package/build/cjs/src/bookings-services-v2-service.types.d.ts +2 -2
  20. package/build/cjs/src/bookings-services-v2-service.universal.d.ts +2 -2
  21. package/build/cjs/src/bookings-v2-booking.http.js +10 -0
  22. package/build/cjs/src/bookings-v2-booking.http.js.map +1 -1
  23. package/build/cjs/src/bookings-v2-booking.public.d.ts +2 -2
  24. package/build/cjs/src/bookings-v2-booking.public.js +3 -2
  25. package/build/cjs/src/bookings-v2-booking.public.js.map +1 -1
  26. package/build/cjs/src/bookings-v2-booking.types.d.ts +474 -240
  27. package/build/cjs/src/bookings-v2-booking.types.js +13 -8
  28. package/build/cjs/src/bookings-v2-booking.types.js.map +1 -1
  29. package/build/cjs/src/bookings-v2-booking.universal.d.ts +477 -241
  30. package/build/cjs/src/bookings-v2-booking.universal.js +15 -9
  31. package/build/cjs/src/bookings-v2-booking.universal.js.map +1 -1
  32. package/build/cjs/src/bookings-v2-price-info.public.d.ts +2 -2
  33. package/build/cjs/src/bookings-v2-price-info.public.js +2 -1
  34. package/build/cjs/src/bookings-v2-price-info.public.js.map +1 -1
  35. package/build/cjs/src/bookings-v2-price-info.types.d.ts +17 -2
  36. package/build/cjs/src/bookings-v2-price-info.types.js +6 -1
  37. package/build/cjs/src/bookings-v2-price-info.types.js.map +1 -1
  38. package/build/cjs/src/bookings-v2-price-info.universal.d.ts +15 -0
  39. package/build/cjs/src/bookings-v2-price-info.universal.js +6 -1
  40. package/build/cjs/src/bookings-v2-price-info.universal.js.map +1 -1
  41. package/build/es/index.d.ts +1 -1
  42. package/build/es/index.js +1 -1
  43. package/build/es/index.js.map +1 -1
  44. package/build/es/index.typings.d.ts +1 -1
  45. package/build/es/index.typings.js +1 -1
  46. package/build/es/index.typings.js.map +1 -1
  47. package/build/es/src/bookings-availability-v1-slot-availability.types.d.ts +1 -0
  48. package/build/es/src/bookings-availability-v1-slot-availability.universal.d.ts +1 -0
  49. package/build/es/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  50. package/build/es/src/bookings-reader-v2-extended-booking.public.d.ts +2 -2
  51. package/build/es/src/bookings-reader-v2-extended-booking.public.js +1 -1
  52. package/build/es/src/bookings-reader-v2-extended-booking.public.js.map +1 -1
  53. package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +17 -2
  54. package/build/es/src/bookings-reader-v2-extended-booking.types.js +5 -0
  55. package/build/es/src/bookings-reader-v2-extended-booking.types.js.map +1 -1
  56. package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +17 -2
  57. package/build/es/src/bookings-reader-v2-extended-booking.universal.js +5 -0
  58. package/build/es/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
  59. package/build/es/src/bookings-services-v2-service.types.d.ts +2 -2
  60. package/build/es/src/bookings-services-v2-service.universal.d.ts +2 -2
  61. package/build/es/src/bookings-v2-booking.http.js +10 -0
  62. package/build/es/src/bookings-v2-booking.http.js.map +1 -1
  63. package/build/es/src/bookings-v2-booking.public.d.ts +2 -2
  64. package/build/es/src/bookings-v2-booking.public.js +1 -1
  65. package/build/es/src/bookings-v2-booking.public.js.map +1 -1
  66. package/build/es/src/bookings-v2-booking.types.d.ts +474 -240
  67. package/build/es/src/bookings-v2-booking.types.js +12 -7
  68. package/build/es/src/bookings-v2-booking.types.js.map +1 -1
  69. package/build/es/src/bookings-v2-booking.universal.d.ts +477 -241
  70. package/build/es/src/bookings-v2-booking.universal.js +14 -8
  71. package/build/es/src/bookings-v2-booking.universal.js.map +1 -1
  72. package/build/es/src/bookings-v2-price-info.public.d.ts +2 -2
  73. package/build/es/src/bookings-v2-price-info.public.js +1 -1
  74. package/build/es/src/bookings-v2-price-info.public.js.map +1 -1
  75. package/build/es/src/bookings-v2-price-info.types.d.ts +17 -2
  76. package/build/es/src/bookings-v2-price-info.types.js +5 -0
  77. package/build/es/src/bookings-v2-price-info.types.js.map +1 -1
  78. package/build/es/src/bookings-v2-price-info.universal.d.ts +15 -0
  79. package/build/es/src/bookings-v2-price-info.universal.js +5 -0
  80. package/build/es/src/bookings-v2-price-info.universal.js.map +1 -1
  81. package/package.json +2 -2
@@ -161,6 +161,11 @@ export interface BookedSlot {
161
161
  resource?: BookedResource;
162
162
  /** Location where the slot's session takes place. */
163
163
  location?: Location;
164
+ /**
165
+ * The selected grouped resources the UoU choose during book/reschedule flow, either specific resources or any resources in each group.
166
+ * When `DO_NOT_CARE` is provided, the given resources are ignored.
167
+ */
168
+ flowSelectedResources?: GroupedResources[];
164
169
  }
165
170
  export interface BookedResource {
166
171
  /** Booked resource ID. */
@@ -197,6 +202,16 @@ export declare enum LocationType {
197
202
  OWNER_CUSTOM = "OWNER_CUSTOM",
198
203
  CUSTOM = "CUSTOM"
199
204
  }
205
+ export interface GroupedResources {
206
+ resourceGroupId?: string | null;
207
+ type?: Type;
208
+ /** list of at most 10 resources, that can booked with this slot */
209
+ resourceIds?: string[];
210
+ }
211
+ export declare enum Type {
212
+ DO_NOT_CARE = "DO_NOT_CARE",
213
+ SPECIFIC_RESOURCES = "SPECIFIC_RESOURCES"
214
+ }
200
215
  export interface BookedSchedule {
201
216
  /** Schedule ID. */
202
217
  scheduleId?: string;
@@ -459,8 +474,8 @@ export interface FlowControlSettings {
459
474
  }
460
475
  export interface ExtendedFields {
461
476
  /**
462
- * Extended field data as key:object pairs. Each key corresponds to the namespace of the app that created the extended fields.
463
- * The value of each key is structured according to the schema defined when the extended fields were created.
477
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
478
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
464
479
  *
465
480
  * You can only access fields for which you have the appropriate permissions.
466
481
  */
@@ -574,17 +589,461 @@ export interface GetGroupedBookingsAvailabilityResponse {
574
589
  /** Booking policy settings */
575
590
  bookingPolicySettings?: BookingPolicySettings;
576
591
  }
577
- export interface BookingPolicyViolations {
578
- /** Bookings policy violation. Too early to book this slot. */
579
- tooEarlyToBook?: boolean | null;
580
- /** Bookings policy violation. Too late to book this slot. */
581
- tooLateToBook?: boolean | null;
582
- /** Bookings policy violation. Online booking is disabled for this slot. */
583
- bookOnlineDisabled?: boolean | null;
592
+ export interface BookingPolicyViolations {
593
+ /** Bookings policy violation. Too early to book this slot. */
594
+ tooEarlyToBook?: boolean | null;
595
+ /** Bookings policy violation. Too late to book this slot. */
596
+ tooLateToBook?: boolean | null;
597
+ /** Bookings policy violation. Online booking is disabled for this slot. */
598
+ bookOnlineDisabled?: boolean | null;
599
+ }
600
+ export interface BookingPolicySettings {
601
+ /** Booking policy settings for a given Slot/Schedule */
602
+ maxParticipantsPerBooking?: number | null;
603
+ }
604
+ export interface CancelGroupedBookingsRequest {
605
+ /** ID of the group to cancel it's related bookings. */
606
+ groupId?: string;
607
+ /**
608
+ * Information about whether to notify the customer about the cancelation and
609
+ * the message to send.
610
+ */
611
+ participantNotification?: ParticipantNotification;
612
+ /**
613
+ * Information about whether specific procedures of the standard Wix Bookings
614
+ * cancelation flow are changed. For example, whether the you can cancel
615
+ * a booking even though the cancelation policy doesn't allow it or whether
616
+ * to issue a refund.
617
+ */
618
+ flowControlSettings?: CancelBookingFlowControlSettings;
619
+ /** Whether to return the canceled grouped bookings entities. */
620
+ returnFullEntity?: boolean;
621
+ }
622
+ export interface CancelBookingFlowControlSettings {
623
+ /**
624
+ * Whether the cancelation policy applies when canceling the booking. When
625
+ * passing `false` you can only cancel a booking if the cancelation policy
626
+ * allows it.
627
+ * Default: `false`.
628
+ * <!--ONLY:VELO
629
+ * Requires "Manage Wix Bookings App" and "Manage Bookings' Calendar" [roles](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin).
630
+ * <!--END:ONLY:VELO-->
631
+ */
632
+ ignoreCancellationPolicy?: boolean | null;
633
+ /**
634
+ * Whether to issue a refund when canceling the booking.
635
+ * The refund will be issued only if the booking is refundable.
636
+ * Currently, booking is considered refundable when it was paid by membership.
637
+ * If passing `true`, the booking flow control settings will be set with refund,
638
+ * otherwise, either if `false` is passed or the field remains empty,
639
+ * the booking flow control settings will be set with no refund.
640
+ * Default: `false`.
641
+ */
642
+ withRefund?: boolean | null;
643
+ }
644
+ export interface CancelGroupedBookingsResponse {
645
+ /** Canceled grouped bookings. */
646
+ bookings?: BookingResult[];
647
+ }
648
+ export interface BookingCanceled {
649
+ /** The canceled booking object. */
650
+ booking?: Booking;
651
+ /** Information about whether to notify the customer about the cancelation and the message to send. */
652
+ participantNotification?: ParticipantNotification;
653
+ /**
654
+ * Information about whether specific procedures of the standard Wix Bookings
655
+ * cancelation flow are changed. For example, whether you can cancel
656
+ * a booking even though the cancelation policy doesn't allow it or whether
657
+ * to issue a refund.
658
+ */
659
+ flowControlSettings?: CancelBookingFlowControlSettings;
660
+ /** ID of the cancelation initiator. */
661
+ initiatedBy?: IdentificationData;
662
+ /** The previous status of the booking. */
663
+ previousStatus?: BookingStatus;
664
+ }
665
+ export interface IdentificationData extends IdentificationDataIdOneOf {
666
+ /** ID of a site visitor that has not logged in to the site. */
667
+ anonymousVisitorId?: string;
668
+ /** ID of a site visitor that has logged in to the site. */
669
+ memberId?: string;
670
+ /** ID of a Wix user (site owner, contributor, etc.). */
671
+ wixUserId?: string;
672
+ /** ID of an app. */
673
+ appId?: string;
674
+ /**
675
+ * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
676
+ * @readonly
677
+ */
678
+ contactId?: string | null;
679
+ }
680
+ /** @oneof */
681
+ export interface IdentificationDataIdOneOf {
682
+ /** ID of a site visitor that has not logged in to the site. */
683
+ anonymousVisitorId?: string;
684
+ /** ID of a site visitor that has logged in to the site. */
685
+ memberId?: string;
686
+ /** ID of a Wix user (site owner, contributor, etc.). */
687
+ wixUserId?: string;
688
+ /** ID of an app. */
689
+ appId?: string;
690
+ }
691
+ export declare enum IdentityType {
692
+ UNKNOWN = "UNKNOWN",
693
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
694
+ MEMBER = "MEMBER",
695
+ WIX_USER = "WIX_USER",
696
+ APP = "APP"
697
+ }
698
+ export interface RescheduleGroupedBookingsRequest {
699
+ /** ID of the group to reschedule it's related bookings. */
700
+ groupId?: string;
701
+ /** Grouped bookings to reschedule. */
702
+ rescheduleBookingsInfo?: RescheduleBookingInfo[];
703
+ /**
704
+ * Information about whether to notify the customer about the rescheduling and
705
+ * the message to send.
706
+ */
707
+ participantNotification?: ParticipantNotification;
708
+ /**
709
+ * Information about whether specific procedures of the standard Wix Bookings
710
+ * rescheduling flow are changed. For example, whether the availability of
711
+ * the new slot is checked before rescheduling the booking or if you can
712
+ * reschedule the booking even though the rescheduling policy doesn't allow it.
713
+ */
714
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
715
+ /** Whether to return the rescheduled grouped bookings entities. */
716
+ returnFullEntity?: boolean;
717
+ }
718
+ export interface V2Slot {
719
+ /** Identifier for underlying session when session is a single session or generated from a recurring session. Required. */
720
+ sessionId?: string | null;
721
+ /** Service identifier. Required. */
722
+ serviceId?: string;
723
+ /** Schedule identifier. Required. */
724
+ scheduleId?: string;
725
+ /** The start time of this Slot (formatted according to RFC3339). Required. */
726
+ startDate?: string | null;
727
+ /** The end time of this Slot (formatted according to RFC3339). Required. */
728
+ endDate?: string | null;
729
+ /** The timezone according to which the slot is calculated presented. */
730
+ timezone?: string | null;
731
+ /** The resource required for this slot. Currently, in Bookings, this is the relevant staff. Required. */
732
+ resource?: SlotSlotResource;
733
+ /** Geographic location of the slot. */
734
+ location?: SlotLocation;
735
+ }
736
+ export declare enum LocationLocationType {
737
+ UNDEFINED = "UNDEFINED",
738
+ OWNER_BUSINESS = "OWNER_BUSINESS",
739
+ OWNER_CUSTOM = "OWNER_CUSTOM",
740
+ CUSTOM = "CUSTOM"
741
+ }
742
+ export interface SlotSlotResource {
743
+ /**
744
+ * Resource ID
745
+ * @readonly
746
+ */
747
+ _id?: string | null;
748
+ /** Read only. Resource name. */
749
+ name?: string | null;
750
+ }
751
+ export interface SlotLocation {
752
+ /** Business Location ID. Present if the location is a business location. */
753
+ _id?: string | null;
754
+ /** Location name. */
755
+ name?: string | null;
756
+ /** A string containing the full address of this location. */
757
+ formattedAddress?: string | null;
758
+ /**
759
+ * Location type.
760
+ * One of:
761
+ * - `"OWNER_BUSINESS"` The business address as set in the site’s general settings.
762
+ * - `"OWNER_CUSTOM"` The address as set when creating the service.
763
+ * - `"CUSTOM"` The address set for the individual session.
764
+ */
765
+ locationType?: LocationLocationType;
766
+ }
767
+ export interface RescheduleBookingInfo extends RescheduleBookingInfoParticipantsInfoOneOf {
768
+ /**
769
+ * Total number of participants. Available only for services with
770
+ * variants.
771
+ * Pass when all participants book the same variant.
772
+ */
773
+ totalParticipants?: number;
774
+ /**
775
+ * Information about the service choices to book. Available only for services with
776
+ * variants.
777
+ * Pass when not all participants book the same variant.
778
+ */
779
+ participantsChoices?: ParticipantChoices;
780
+ /** ID of the booking to reschedule. */
781
+ bookingId?: string;
782
+ /** Information about the new slot. */
783
+ slot?: V2Slot;
784
+ /**
785
+ * Revision number, which increments by 1 each time the booking is updated.
786
+ * To prevent conflicting changes, the current revision must be passed when
787
+ * managing the booking.
788
+ */
789
+ revision?: string | null;
790
+ }
791
+ /** @oneof */
792
+ export interface RescheduleBookingInfoParticipantsInfoOneOf {
793
+ /**
794
+ * Total number of participants. Available only for services with
795
+ * variants.
796
+ * Pass when all participants book the same variant.
797
+ */
798
+ totalParticipants?: number;
799
+ /**
800
+ * Information about the service choices to book. Available only for services with
801
+ * variants.
802
+ * Pass when not all participants book the same variant.
803
+ */
804
+ participantsChoices?: ParticipantChoices;
805
+ }
806
+ export interface RescheduleBookingFlowControlSettings {
807
+ /**
808
+ * Whether the rescheduling policy applies when rescheduling the booking.
809
+ * When passing `false` you can only cancel a booking if the rescheduling
810
+ * policy allows it.
811
+ * Default: `false`.
812
+ * <!--ONLY:VELO
813
+ * Requires "Manage Wix Bookings App" and "Manage Bookings' Calendar" [roles](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin).
814
+ * <!--END:ONLY:VELO-->
815
+ */
816
+ ignoreReschedulePolicy?: boolean;
817
+ /**
818
+ * Whether the availability is checked before rescheduling the booking.
819
+ * When passing `false` a booking is only created when the slot or
820
+ * schedule is available.
821
+ * Default: `false`.
822
+ */
823
+ skipAvailabilityValidation?: boolean;
824
+ /**
825
+ * Whether the rescheduled booking's status is automatically set to
826
+ * `CONFIRMED` for services that normally require the owner's manual
827
+ * confirmation.
828
+ * Default: `false`.
829
+ */
830
+ skipBusinessConfirmation?: boolean;
831
+ }
832
+ export interface RescheduleGroupedBookingsResponse {
833
+ /** Rescheduled grouped bookings. */
834
+ bookings?: BookingResult[];
835
+ }
836
+ export interface BookingRescheduled extends BookingRescheduledPreviousParticipantsInfoOneOf {
837
+ /** The previous total number of participants. Available only when the booking includes a single service variant. */
838
+ previousTotalParticipants?: number;
839
+ /**
840
+ * Information about the previous booked service choices and participants.
841
+ * Available only when the booking includes multiple service variants.
842
+ */
843
+ previousParticipantsChoices?: ParticipantChoices;
844
+ /** The rescheduled booking object. */
845
+ booking?: Booking;
846
+ /** Information about whether to notify the customer about the rescheduling and the message to send. */
847
+ participantNotification?: ParticipantNotification;
848
+ /**
849
+ * Information about whether specific procedures of the standard Wix Bookings
850
+ * rescheduling flow are changed. For example, whether the availability of
851
+ * the new slot is checked before rescheduling the booking or if you can
852
+ * reschedule the booking even though the rescheduling policy doesn't allow it.
853
+ */
854
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
855
+ /** ID of the rescheduling initiator. */
856
+ initiatedBy?: IdentificationData;
857
+ /** The previous status of the booking. */
858
+ previousStatus?: BookingStatus;
859
+ /** An object describing the previous slot or schedule of the booking. */
860
+ previousBookedEntity?: BookedEntity;
861
+ /** The previous start date of the booking. For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session. */
862
+ previousStartDate?: Date;
863
+ /** The previous end date of the booking. For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session. */
864
+ previousEndDate?: Date;
865
+ }
866
+ /** @oneof */
867
+ export interface BookingRescheduledPreviousParticipantsInfoOneOf {
868
+ /** The previous total number of participants. Available only when the booking includes a single service variant. */
869
+ previousTotalParticipants?: number;
870
+ /**
871
+ * Information about the previous booked service choices and participants.
872
+ * Available only when the booking includes multiple service variants.
873
+ */
874
+ previousParticipantsChoices?: ParticipantChoices;
875
+ }
876
+ export interface ConfirmGroupedBookingsRequest {
877
+ /** ID of the group to confirm it's related bookings. */
878
+ groupId?: string;
879
+ /** Grouped bookings to confirm. */
880
+ confirmBookingsInfo?: ConfirmBookingInfo[];
881
+ /**
882
+ * Information about whether to notify the customer about the confirmation and
883
+ * the message to send.
884
+ */
885
+ participantNotification?: ParticipantNotification;
886
+ /**
887
+ * Whether to send an SMS reminder to the customer 24 hours before the
888
+ * session starts. The phone number is taken from `contactDetails.phone`.
889
+ */
890
+ sendSmsReminder?: boolean | null;
891
+ /** Whether this booking overlaps with another existing confirmed booking. */
892
+ doubleBooked?: boolean | null;
893
+ /** Whether to return the confirmed grouped bookings entities. */
894
+ returnFullEntity?: boolean;
895
+ }
896
+ export interface ConfirmBookingInfo {
897
+ /** ID of the booking to confirm. */
898
+ bookingId?: string;
899
+ /**
900
+ * Revision number, which increments by 1 each time the booking is updated.
901
+ * To prevent conflicting changes, the current revision must be passed when
902
+ * managing the booking.
903
+ */
904
+ revision?: string | null;
905
+ /**
906
+ * Payment status to set for the booking.
907
+ * One of:
908
+ * - `"NOT_PAID"` The booking is not paid for.
909
+ * - `"PAID"` The booking is fully paid.
910
+ * - `"PARTIALLY_PAID"` The booking is partially paid.
911
+ * - `"REFUNDED"` The booking is refunded.
912
+ * - `"EXEMPT"` The booking is free of charge.
913
+ */
914
+ paymentStatus?: PaymentStatus;
915
+ }
916
+ export interface ConfirmGroupedBookingsResponse {
917
+ /** Confirmed grouped bookings. */
918
+ bookings?: BookingResult[];
919
+ }
920
+ export interface BookingConfirmed {
921
+ /** The confirmed booking object. */
922
+ booking?: Booking;
923
+ /** Information about whether to notify the customer about the confirmation and the message to send. */
924
+ participantNotification?: ParticipantNotification;
925
+ /**
926
+ * Whether to send an SMS reminder to the customer 24 hours before the
927
+ * session starts. The phone number is taken from `contactDetails.phone`.
928
+ */
929
+ sendSmsReminder?: boolean | null;
930
+ /** Whether this booking overlaps with another existing confirmed booking. */
931
+ doubleBooked?: boolean | null;
932
+ /** ID of the confirmation initiator. */
933
+ initiatedBy?: IdentificationData;
934
+ /** The previous status of the booking. */
935
+ previousStatus?: BookingStatus;
936
+ /** The previous payment status of the booking. */
937
+ previousPaymentStatus?: PaymentStatus;
938
+ }
939
+ export interface DeclineGroupedBookingsRequest {
940
+ /** ID of the group to decline it's related bookings. */
941
+ groupId?: string;
942
+ /** Grouped bookings to confirm. */
943
+ declineBookingsInfo?: DeclineBookingInfo[];
944
+ /**
945
+ * Information about whether to notify the customer about the decline and
946
+ * the message to send.
947
+ */
948
+ participantNotification?: ParticipantNotification;
949
+ /** Whether this booking overlaps with another existing confirmed booking. */
950
+ doubleBooked?: boolean | null;
951
+ /** Whether to return the declined grouped bookings entities. */
952
+ returnFullEntity?: boolean;
953
+ }
954
+ export interface DeclineBookingInfo {
955
+ /** ID of the booking to decline. */
956
+ bookingId?: string;
957
+ /**
958
+ * Revision number, which increments by 1 each time the booking is updated.
959
+ * To prevent conflicting changes, the current revision must be passed when
960
+ * managing the booking.
961
+ */
962
+ revision?: string | null;
963
+ /**
964
+ * Payment status to set on the booking.
965
+ * One of:
966
+ * - `"NOT_PAID"` The booking is not paid for.
967
+ * - `"PAID"` The booking is fully paid.
968
+ * - `"PARTIALLY_PAID"` The booking is partially paid.
969
+ * - `"REFUNDED"` The booking is refunded.
970
+ * - `"EXEMPT"` The booking is free of charge.
971
+ */
972
+ paymentStatus?: PaymentStatus;
973
+ }
974
+ export interface DeclineGroupedBookingsResponse {
975
+ /** Declined grouped bookings. */
976
+ bookings?: BookingResult[];
977
+ }
978
+ export interface BookingDeclined {
979
+ /** The declined booking object. */
980
+ booking?: Booking;
981
+ /** Information about whether to notify the customer about the decline and the message to send. */
982
+ participantNotification?: ParticipantNotification;
983
+ /** Whether this booking overlaps with another existing confirmed booking. */
984
+ doubleBooked?: boolean | null;
985
+ /** ID of the decline initiator. */
986
+ initiatedBy?: IdentificationData;
987
+ /** The previous status of the booking. */
988
+ previousStatus?: BookingStatus;
989
+ /** The previous payment status of the booking. */
990
+ previousPaymentStatus?: PaymentStatus;
991
+ }
992
+ export interface CalculateGroupedBookingsAllowedActionsRequest {
993
+ /** ID of the group */
994
+ groupId?: string;
995
+ }
996
+ export interface CalculateGroupedBookingsAllowedActionsResponse {
997
+ allowedActions?: AllowedActions;
998
+ }
999
+ /** Possible allowed actions for a Booking */
1000
+ export interface AllowedActions {
1001
+ /** Is cancel booking allowed */
1002
+ cancel?: boolean;
1003
+ /** Is reschedule booking allowed */
1004
+ reschedule?: boolean;
1005
+ }
1006
+ export interface SplitGroupedBookingsRequest {
1007
+ /** ID of the group. */
1008
+ groupId?: string;
1009
+ /** Whether to return the declined grouped bookings entities. */
1010
+ returnFullEntity?: boolean;
1011
+ }
1012
+ export interface SplitGroupedBookingsResponse {
1013
+ /** The separated bookings. */
1014
+ bookings?: BookingResult[];
1015
+ }
1016
+ export interface AddToGroupRequest {
1017
+ /** ID of the group. */
1018
+ groupId?: string;
1019
+ /** ID of the booking to add to the group. */
1020
+ bookingId?: string;
1021
+ /**
1022
+ * Revision number, which increments by 1 each time the booking is updated.
1023
+ * To prevent conflicting changes, the current revision must be passed when
1024
+ * managing the booking.
1025
+ */
1026
+ revision?: string | null;
584
1027
  }
585
- export interface BookingPolicySettings {
586
- /** Booking policy settings for a given Slot/Schedule */
587
- maxParticipantsPerBooking?: number | null;
1028
+ export interface AddToGroupResponse {
1029
+ /** The booking added to the group. */
1030
+ booking?: Booking;
1031
+ }
1032
+ export interface RemoveFromGroupRequest {
1033
+ /** ID of the group. */
1034
+ groupId?: string;
1035
+ /** ID of the booking to remove from the group. */
1036
+ bookingId?: string;
1037
+ /**
1038
+ * Revision number, which increments by 1 each time the booking is updated.
1039
+ * To prevent conflicting changes, the current revision must be passed when
1040
+ * managing the booking.
1041
+ */
1042
+ revision?: string | null;
1043
+ }
1044
+ export interface RemoveFromGroupResponse {
1045
+ /** The booking removed from the group. */
1046
+ booking?: Booking;
588
1047
  }
589
1048
  export interface BookingChanged {
590
1049
  /** The booking before the changes. */
@@ -765,158 +1224,10 @@ export interface RescheduleBookingRequestParticipantsInfoOneOf {
765
1224
  */
766
1225
  participantsChoices?: ParticipantChoices;
767
1226
  }
768
- export interface V2Slot {
769
- /** Identifier for underlying session when session is a single session or generated from a recurring session. Required. */
770
- sessionId?: string | null;
771
- /** Service identifier. Required. */
772
- serviceId?: string;
773
- /** Schedule identifier. Required. */
774
- scheduleId?: string;
775
- /** The start time of this Slot (formatted according to RFC3339). Required. */
776
- startDate?: string | null;
777
- /** The end time of this Slot (formatted according to RFC3339). Required. */
778
- endDate?: string | null;
779
- /** The timezone according to which the slot is calculated presented. */
780
- timezone?: string | null;
781
- /** The resource required for this slot. Currently, in Bookings, this is the relevant staff. Required. */
782
- resource?: SlotSlotResource;
783
- /** Geographic location of the slot. */
784
- location?: SlotLocation;
785
- }
786
- export declare enum LocationLocationType {
787
- UNDEFINED = "UNDEFINED",
788
- OWNER_BUSINESS = "OWNER_BUSINESS",
789
- OWNER_CUSTOM = "OWNER_CUSTOM",
790
- CUSTOM = "CUSTOM"
791
- }
792
- export interface SlotSlotResource {
793
- /**
794
- * Resource ID
795
- * @readonly
796
- */
797
- _id?: string | null;
798
- /** Read only. Resource name. */
799
- name?: string | null;
800
- }
801
- export interface SlotLocation {
802
- /** Business Location ID. Present if the location is a business location. */
803
- _id?: string | null;
804
- /** Location name. */
805
- name?: string | null;
806
- /** A string containing the full address of this location. */
807
- formattedAddress?: string | null;
808
- /**
809
- * Location type.
810
- * One of:
811
- * - `"OWNER_BUSINESS"` The business address as set in the site’s general settings.
812
- * - `"OWNER_CUSTOM"` The address as set when creating the service.
813
- * - `"CUSTOM"` The address set for the individual session.
814
- */
815
- locationType?: LocationLocationType;
816
- }
817
- export interface RescheduleBookingFlowControlSettings {
818
- /**
819
- * Whether the rescheduling policy applies when rescheduling the booking.
820
- * When passing `false` you can only cancel a booking if the rescheduling
821
- * policy allows it.
822
- * Default: `false`.
823
- * <!--ONLY:VELO
824
- * Requires "Manage Wix Bookings App" and "Manage Bookings' Calendar" [roles](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin).
825
- * <!--END:ONLY:VELO-->
826
- */
827
- ignoreReschedulePolicy?: boolean;
828
- /**
829
- * Whether the availability is checked before rescheduling the booking.
830
- * When passing `false` a booking is only created when the slot or
831
- * schedule is available.
832
- * Default: `false`.
833
- */
834
- skipAvailabilityValidation?: boolean;
835
- /**
836
- * Whether the rescheduled booking's status is automatically set to
837
- * `CONFIRMED` for services that normally require the owner's manual
838
- * confirmation.
839
- * Default: `false`.
840
- */
841
- skipBusinessConfirmation?: boolean;
842
- }
843
1227
  export interface RescheduleBookingResponse {
844
1228
  /** Rescheduled booking. */
845
1229
  booking?: Booking;
846
1230
  }
847
- export interface BookingRescheduled extends BookingRescheduledPreviousParticipantsInfoOneOf {
848
- /** The previous total number of participants. Available only when the booking includes a single service variant. */
849
- previousTotalParticipants?: number;
850
- /**
851
- * Information about the previous booked service choices and participants.
852
- * Available only when the booking includes multiple service variants.
853
- */
854
- previousParticipantsChoices?: ParticipantChoices;
855
- /** The rescheduled booking object. */
856
- booking?: Booking;
857
- /** Information about whether to notify the customer about the rescheduling and the message to send. */
858
- participantNotification?: ParticipantNotification;
859
- /**
860
- * Information about whether specific procedures of the standard Wix Bookings
861
- * rescheduling flow are changed. For example, whether the availability of
862
- * the new slot is checked before rescheduling the booking or if you can
863
- * reschedule the booking even though the rescheduling policy doesn't allow it.
864
- */
865
- flowControlSettings?: RescheduleBookingFlowControlSettings;
866
- /** ID of the rescheduling initiator. */
867
- initiatedBy?: IdentificationData;
868
- /** The previous status of the booking. */
869
- previousStatus?: BookingStatus;
870
- /** An object describing the previous slot or schedule of the booking. */
871
- previousBookedEntity?: BookedEntity;
872
- /** The previous start date of the booking. For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session. */
873
- previousStartDate?: Date;
874
- /** The previous end date of the booking. For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session. */
875
- previousEndDate?: Date;
876
- }
877
- /** @oneof */
878
- export interface BookingRescheduledPreviousParticipantsInfoOneOf {
879
- /** The previous total number of participants. Available only when the booking includes a single service variant. */
880
- previousTotalParticipants?: number;
881
- /**
882
- * Information about the previous booked service choices and participants.
883
- * Available only when the booking includes multiple service variants.
884
- */
885
- previousParticipantsChoices?: ParticipantChoices;
886
- }
887
- export interface IdentificationData extends IdentificationDataIdOneOf {
888
- /** ID of a site visitor that has not logged in to the site. */
889
- anonymousVisitorId?: string;
890
- /** ID of a site visitor that has logged in to the site. */
891
- memberId?: string;
892
- /** ID of a Wix user (site owner, contributor, etc.). */
893
- wixUserId?: string;
894
- /** ID of an app. */
895
- appId?: string;
896
- /**
897
- * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
898
- * @readonly
899
- */
900
- contactId?: string | null;
901
- }
902
- /** @oneof */
903
- export interface IdentificationDataIdOneOf {
904
- /** ID of a site visitor that has not logged in to the site. */
905
- anonymousVisitorId?: string;
906
- /** ID of a site visitor that has logged in to the site. */
907
- memberId?: string;
908
- /** ID of a Wix user (site owner, contributor, etc.). */
909
- wixUserId?: string;
910
- /** ID of an app. */
911
- appId?: string;
912
- }
913
- export declare enum IdentityType {
914
- UNKNOWN = "UNKNOWN",
915
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
916
- MEMBER = "MEMBER",
917
- WIX_USER = "WIX_USER",
918
- APP = "APP"
919
- }
920
1231
  export interface BulkRescheduleBookingRequest {
921
1232
  /** Reschedule multiple bookings to multiple slots. */
922
1233
  slotsBookings?: SlotBookings[];
@@ -1093,25 +1404,6 @@ export interface ConfirmBookingRequest {
1093
1404
  export interface ConfirmBookingResponse {
1094
1405
  booking?: Booking;
1095
1406
  }
1096
- export interface BookingConfirmed {
1097
- /** The confirmed booking object. */
1098
- booking?: Booking;
1099
- /** Information about whether to notify the customer about the confirmation and the message to send. */
1100
- participantNotification?: ParticipantNotification;
1101
- /**
1102
- * Whether to send an SMS reminder to the customer 24 hours before the
1103
- * session starts. The phone number is taken from `contactDetails.phone`.
1104
- */
1105
- sendSmsReminder?: boolean | null;
1106
- /** Whether this booking overlaps with another existing confirmed booking. */
1107
- doubleBooked?: boolean | null;
1108
- /** ID of the confirmation initiator. */
1109
- initiatedBy?: IdentificationData;
1110
- /** The previous status of the booking. */
1111
- previousStatus?: BookingStatus;
1112
- /** The previous payment status of the booking. */
1113
- previousPaymentStatus?: PaymentStatus;
1114
- }
1115
1407
  export interface PartySizeRequest extends PartySizeRequestPartySizeForOneOf {
1116
1408
  sessionId?: string | null;
1117
1409
  scheduleId?: string | null;
@@ -1142,9 +1434,11 @@ export interface SetBookingSessionIdResponse {
1142
1434
  booking?: Booking;
1143
1435
  }
1144
1436
  export interface UpdateExtendedFieldsRequest {
1145
- /** entity_id */
1437
+ /** ID of the entity to update. */
1146
1438
  _id: string;
1439
+ /** Identifier for the app whose extended fields are being updated. */
1147
1440
  namespace: string;
1441
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
1148
1442
  namespaceData: Record<string, any> | null;
1149
1443
  }
1150
1444
  export interface UpdateExtendedFieldsResponse {
@@ -1184,20 +1478,6 @@ export interface DeclineBookingResponse {
1184
1478
  /** eclined booking */
1185
1479
  booking?: Booking;
1186
1480
  }
1187
- export interface BookingDeclined {
1188
- /** The declined booking object. */
1189
- booking?: Booking;
1190
- /** Information about whether to notify the customer about the decline and the message to send. */
1191
- participantNotification?: ParticipantNotification;
1192
- /** Whether this booking overlaps with another existing confirmed booking. */
1193
- doubleBooked?: boolean | null;
1194
- /** ID of the decline initiator. */
1195
- initiatedBy?: IdentificationData;
1196
- /** The previous status of the booking. */
1197
- previousStatus?: BookingStatus;
1198
- /** The previous payment status of the booking. */
1199
- previousPaymentStatus?: PaymentStatus;
1200
- }
1201
1481
  export interface CancelBookingRequest {
1202
1482
  /** ID of the booking to cancel. */
1203
1483
  bookingId: string;
@@ -1220,49 +1500,10 @@ export interface CancelBookingRequest {
1220
1500
  */
1221
1501
  revision: string | null;
1222
1502
  }
1223
- export interface CancelBookingFlowControlSettings {
1224
- /**
1225
- * Whether the cancelation policy applies when canceling the booking. When
1226
- * passing `false` you can only cancel a booking if the cancelation policy
1227
- * allows it.
1228
- * Default: `false`.
1229
- * <!--ONLY:VELO
1230
- * Requires "Manage Wix Bookings App" and "Manage Bookings' Calendar" [roles](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin).
1231
- * <!--END:ONLY:VELO-->
1232
- */
1233
- ignoreCancellationPolicy?: boolean | null;
1234
- /**
1235
- * Whether to issue a refund when canceling the booking.
1236
- * The refund will be issued only if the booking is refundable.
1237
- * Currently, booking is considered refundable when it was paid by membership.
1238
- * If passing `true`, the booking flow control settings will be set with refund,
1239
- * otherwise, either if `false` is passed or the field remains empty,
1240
- * the booking flow control settings will be set with no refund.
1241
- * Default: `false`.
1242
- */
1243
- withRefund?: boolean | null;
1244
- }
1245
1503
  export interface CancelBookingResponse {
1246
1504
  /** Canceled booking. */
1247
1505
  booking?: Booking;
1248
1506
  }
1249
- export interface BookingCanceled {
1250
- /** The canceled booking object. */
1251
- booking?: Booking;
1252
- /** Information about whether to notify the customer about the cancelation and the message to send. */
1253
- participantNotification?: ParticipantNotification;
1254
- /**
1255
- * Information about whether specific procedures of the standard Wix Bookings
1256
- * cancelation flow are changed. For example, whether you can cancel
1257
- * a booking even though the cancelation policy doesn't allow it or whether
1258
- * to issue a refund.
1259
- */
1260
- flowControlSettings?: CancelBookingFlowControlSettings;
1261
- /** ID of the cancelation initiator. */
1262
- initiatedBy?: IdentificationData;
1263
- /** The previous status of the booking. */
1264
- previousStatus?: BookingStatus;
1265
- }
1266
1507
  export interface UpdateNumberOfParticipantsRequest extends UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
1267
1508
  /**
1268
1509
  * Total number of participants. Available only for services with
@@ -1334,13 +1575,6 @@ export interface CalculateAllowedActionsRequest {
1334
1575
  export interface CalculateAllowedActionsResponse {
1335
1576
  allowedActions?: AllowedActions;
1336
1577
  }
1337
- /** Possible allowed actions for a Booking */
1338
- export interface AllowedActions {
1339
- /** Is cancel booking allowed */
1340
- cancel?: boolean;
1341
- /** Is reschedule booking allowed */
1342
- reschedule?: boolean;
1343
- }
1344
1578
  export interface BulkCalculateAllowedActionsRequest {
1345
1579
  /** The booking id's that we want to calculate the allowedActions for */
1346
1580
  bookingIds?: string[] | null;
@@ -2010,7 +2244,8 @@ export interface ConfirmBookingOptions {
2010
2244
  *
2011
2245
  * Extended fields must first be configured in the Wix Developers Center.
2012
2246
  * Learn more about [extended fields](https://dev.wix.com/api/rest/getting-started/about-extended-fields) for more information.
2013
- * @param _id - entity_id
2247
+ * @param _id - ID of the entity to update.
2248
+ * @param namespace - Identifier for the app whose extended fields are being updated.
2014
2249
  * @public
2015
2250
  * @documentationMaturity preview
2016
2251
  * @requiredField _id
@@ -2022,6 +2257,7 @@ export interface ConfirmBookingOptions {
2022
2257
  */
2023
2258
  export declare function updateExtendedFields(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse>;
2024
2259
  export interface UpdateExtendedFieldsOptions {
2260
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
2025
2261
  namespaceData: Record<string, any> | null;
2026
2262
  }
2027
2263
  /**