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