@wix/bookings 1.0.212 → 1.0.214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +2 -2
- package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +2 -2
- package/build/cjs/src/bookings-services-v2-service.types.d.ts +2 -2
- package/build/cjs/src/bookings-services-v2-service.universal.d.ts +2 -2
- package/build/cjs/src/bookings-v2-booking.http.d.ts +2 -1
- package/build/cjs/src/bookings-v2-booking.http.js +2 -1
- package/build/cjs/src/bookings-v2-booking.http.js.map +1 -1
- package/build/cjs/src/bookings-v2-booking.public.d.ts +2 -2
- package/build/cjs/src/bookings-v2-booking.public.js +2 -2
- package/build/cjs/src/bookings-v2-booking.public.js.map +1 -1
- package/build/cjs/src/bookings-v2-booking.types.d.ts +449 -230
- package/build/cjs/src/bookings-v2-booking.types.js +8 -8
- package/build/cjs/src/bookings-v2-booking.types.js.map +1 -1
- package/build/cjs/src/bookings-v2-booking.universal.d.ts +454 -232
- package/build/cjs/src/bookings-v2-booking.universal.js +12 -10
- package/build/cjs/src/bookings-v2-booking.universal.js.map +1 -1
- package/build/cjs/src/bookings-v2-price-info.types.d.ts +2 -2
- package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +2 -2
- package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +2 -2
- package/build/es/src/bookings-services-v2-service.types.d.ts +2 -2
- package/build/es/src/bookings-services-v2-service.universal.d.ts +2 -2
- package/build/es/src/bookings-v2-booking.http.d.ts +2 -1
- package/build/es/src/bookings-v2-booking.http.js +2 -1
- package/build/es/src/bookings-v2-booking.http.js.map +1 -1
- package/build/es/src/bookings-v2-booking.public.d.ts +2 -2
- package/build/es/src/bookings-v2-booking.public.js +1 -1
- package/build/es/src/bookings-v2-booking.public.js.map +1 -1
- package/build/es/src/bookings-v2-booking.types.d.ts +449 -230
- package/build/es/src/bookings-v2-booking.types.js +7 -7
- package/build/es/src/bookings-v2-booking.types.js.map +1 -1
- package/build/es/src/bookings-v2-booking.universal.d.ts +454 -232
- package/build/es/src/bookings-v2-booking.universal.js +11 -9
- package/build/es/src/bookings-v2-booking.universal.js.map +1 -1
- package/build/es/src/bookings-v2-price-info.types.d.ts +2 -2
- package/package.json +2 -2
|
@@ -459,8 +459,8 @@ export interface FlowControlSettings {
|
|
|
459
459
|
}
|
|
460
460
|
export interface ExtendedFields {
|
|
461
461
|
/**
|
|
462
|
-
* Extended field data
|
|
463
|
-
* The value of each key is structured according to the schema defined when the extended fields were
|
|
462
|
+
* Extended field data. 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 configured.
|
|
464
464
|
*
|
|
465
465
|
* You can only access fields for which you have the appropriate permissions.
|
|
466
466
|
*/
|
|
@@ -586,6 +586,450 @@ export interface BookingPolicySettings {
|
|
|
586
586
|
/** Booking policy settings for a given Slot/Schedule */
|
|
587
587
|
maxParticipantsPerBooking?: number | null;
|
|
588
588
|
}
|
|
589
|
+
export interface CancelGroupedBookingsRequest {
|
|
590
|
+
/** ID of the group to cancel it's related bookings. */
|
|
591
|
+
groupId?: string;
|
|
592
|
+
/**
|
|
593
|
+
* Information about whether to notify the customer about the cancelation and
|
|
594
|
+
* the message to send.
|
|
595
|
+
*/
|
|
596
|
+
participantNotification?: ParticipantNotification;
|
|
597
|
+
/**
|
|
598
|
+
* Information about whether specific procedures of the standard Wix Bookings
|
|
599
|
+
* cancelation flow are changed. For example, whether the you can cancel
|
|
600
|
+
* a booking even though the cancelation policy doesn't allow it or whether
|
|
601
|
+
* to issue a refund.
|
|
602
|
+
*/
|
|
603
|
+
flowControlSettings?: CancelBookingFlowControlSettings;
|
|
604
|
+
/** Whether to return the canceled grouped bookings entities. */
|
|
605
|
+
returnFullEntity?: boolean;
|
|
606
|
+
}
|
|
607
|
+
export interface CancelBookingFlowControlSettings {
|
|
608
|
+
/**
|
|
609
|
+
* Whether the cancelation policy applies when canceling the booking. When
|
|
610
|
+
* passing `false` you can only cancel a booking if the cancelation policy
|
|
611
|
+
* allows it.
|
|
612
|
+
* Default: `false`.
|
|
613
|
+
* <!--ONLY:VELO
|
|
614
|
+
* Requires "Manage Wix Bookings App" and "Manage Bookings' Calendar" [roles](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin).
|
|
615
|
+
* <!--END:ONLY:VELO-->
|
|
616
|
+
*/
|
|
617
|
+
ignoreCancellationPolicy?: boolean | null;
|
|
618
|
+
/**
|
|
619
|
+
* Whether to issue a refund when canceling the booking.
|
|
620
|
+
* The refund will be issued only if the booking is refundable.
|
|
621
|
+
* Currently, booking is considered refundable when it was paid by membership.
|
|
622
|
+
* If passing `true`, the booking flow control settings will be set with refund,
|
|
623
|
+
* otherwise, either if `false` is passed or the field remains empty,
|
|
624
|
+
* the booking flow control settings will be set with no refund.
|
|
625
|
+
* Default: `false`.
|
|
626
|
+
*/
|
|
627
|
+
withRefund?: boolean | null;
|
|
628
|
+
}
|
|
629
|
+
export interface CancelGroupedBookingsResponse {
|
|
630
|
+
/** Canceled grouped bookings. */
|
|
631
|
+
bookings?: BookingResult[];
|
|
632
|
+
}
|
|
633
|
+
export interface BookingCanceled {
|
|
634
|
+
/** The canceled booking object. */
|
|
635
|
+
booking?: Booking;
|
|
636
|
+
/** Information about whether to notify the customer about the cancelation and the message to send. */
|
|
637
|
+
participantNotification?: ParticipantNotification;
|
|
638
|
+
/**
|
|
639
|
+
* Information about whether specific procedures of the standard Wix Bookings
|
|
640
|
+
* cancelation flow are changed. For example, whether you can cancel
|
|
641
|
+
* a booking even though the cancelation policy doesn't allow it or whether
|
|
642
|
+
* to issue a refund.
|
|
643
|
+
*/
|
|
644
|
+
flowControlSettings?: CancelBookingFlowControlSettings;
|
|
645
|
+
/** ID of the cancelation initiator. */
|
|
646
|
+
initiatedBy?: IdentificationData;
|
|
647
|
+
/** The previous status of the booking. */
|
|
648
|
+
previousStatus?: BookingStatus;
|
|
649
|
+
}
|
|
650
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
651
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
652
|
+
anonymousVisitorId?: string;
|
|
653
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
654
|
+
memberId?: string;
|
|
655
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
656
|
+
wixUserId?: string;
|
|
657
|
+
/** ID of an app. */
|
|
658
|
+
appId?: string;
|
|
659
|
+
/**
|
|
660
|
+
* ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
|
|
661
|
+
* @readonly
|
|
662
|
+
*/
|
|
663
|
+
contactId?: string | null;
|
|
664
|
+
}
|
|
665
|
+
/** @oneof */
|
|
666
|
+
export interface 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
|
+
export declare enum IdentityType {
|
|
677
|
+
UNKNOWN = "UNKNOWN",
|
|
678
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
679
|
+
MEMBER = "MEMBER",
|
|
680
|
+
WIX_USER = "WIX_USER",
|
|
681
|
+
APP = "APP"
|
|
682
|
+
}
|
|
683
|
+
export interface RescheduleGroupedBookingsRequest {
|
|
684
|
+
/** ID of the group to reschedule it's related bookings. */
|
|
685
|
+
groupId?: string;
|
|
686
|
+
/** Grouped bookings to reschedule. */
|
|
687
|
+
rescheduleBookingsInfo?: RescheduleBookingInfo[];
|
|
688
|
+
/**
|
|
689
|
+
* Information about whether to notify the customer about the rescheduling and
|
|
690
|
+
* the message to send.
|
|
691
|
+
*/
|
|
692
|
+
participantNotification?: ParticipantNotification;
|
|
693
|
+
/**
|
|
694
|
+
* Information about whether specific procedures of the standard Wix Bookings
|
|
695
|
+
* rescheduling flow are changed. For example, whether the availability of
|
|
696
|
+
* the new slot is checked before rescheduling the booking or if you can
|
|
697
|
+
* reschedule the booking even though the rescheduling policy doesn't allow it.
|
|
698
|
+
*/
|
|
699
|
+
flowControlSettings?: RescheduleBookingFlowControlSettings;
|
|
700
|
+
/** Whether to return the rescheduled grouped bookings entities. */
|
|
701
|
+
returnFullEntity?: boolean;
|
|
702
|
+
}
|
|
703
|
+
export interface V2Slot {
|
|
704
|
+
/** Identifier for underlying session when session is a single session or generated from a recurring session. Required. */
|
|
705
|
+
sessionId?: string | null;
|
|
706
|
+
/** Service identifier. Required. */
|
|
707
|
+
serviceId?: string;
|
|
708
|
+
/** Schedule identifier. Required. */
|
|
709
|
+
scheduleId?: string;
|
|
710
|
+
/** The start time of this Slot (formatted according to RFC3339). Required. */
|
|
711
|
+
startDate?: string | null;
|
|
712
|
+
/** The end time of this Slot (formatted according to RFC3339). Required. */
|
|
713
|
+
endDate?: string | null;
|
|
714
|
+
/** The timezone according to which the slot is calculated presented. */
|
|
715
|
+
timezone?: string | null;
|
|
716
|
+
/** The resource required for this slot. Currently, in Bookings, this is the relevant staff. Required. */
|
|
717
|
+
resource?: SlotSlotResource;
|
|
718
|
+
/** Geographic location of the slot. */
|
|
719
|
+
location?: SlotLocation;
|
|
720
|
+
}
|
|
721
|
+
export declare enum LocationLocationType {
|
|
722
|
+
UNDEFINED = "UNDEFINED",
|
|
723
|
+
OWNER_BUSINESS = "OWNER_BUSINESS",
|
|
724
|
+
OWNER_CUSTOM = "OWNER_CUSTOM",
|
|
725
|
+
CUSTOM = "CUSTOM"
|
|
726
|
+
}
|
|
727
|
+
export interface SlotSlotResource {
|
|
728
|
+
/**
|
|
729
|
+
* Resource ID
|
|
730
|
+
* @readonly
|
|
731
|
+
*/
|
|
732
|
+
_id?: string | null;
|
|
733
|
+
/** Read only. Resource name. */
|
|
734
|
+
name?: string | null;
|
|
735
|
+
}
|
|
736
|
+
export interface SlotLocation {
|
|
737
|
+
/** Business Location ID. Present if the location is a business location. */
|
|
738
|
+
_id?: string | null;
|
|
739
|
+
/** Location name. */
|
|
740
|
+
name?: string | null;
|
|
741
|
+
/** A string containing the full address of this location. */
|
|
742
|
+
formattedAddress?: string | null;
|
|
743
|
+
/**
|
|
744
|
+
* Location type.
|
|
745
|
+
* One of:
|
|
746
|
+
* - `"OWNER_BUSINESS"` The business address as set in the site’s general settings.
|
|
747
|
+
* - `"OWNER_CUSTOM"` The address as set when creating the service.
|
|
748
|
+
* - `"CUSTOM"` The address set for the individual session.
|
|
749
|
+
*/
|
|
750
|
+
locationType?: LocationLocationType;
|
|
751
|
+
}
|
|
752
|
+
export interface RescheduleBookingInfo extends RescheduleBookingInfoParticipantsInfoOneOf {
|
|
753
|
+
/**
|
|
754
|
+
* Total number of participants. Available only for services with
|
|
755
|
+
* variants.
|
|
756
|
+
* Pass when all participants book the same variant.
|
|
757
|
+
*/
|
|
758
|
+
totalParticipants?: number;
|
|
759
|
+
/**
|
|
760
|
+
* Information about the service choices to book. Available only for services with
|
|
761
|
+
* variants.
|
|
762
|
+
* Pass when not all participants book the same variant.
|
|
763
|
+
*/
|
|
764
|
+
participantsChoices?: ParticipantChoices;
|
|
765
|
+
/** ID of the booking to reschedule. */
|
|
766
|
+
bookingId?: string;
|
|
767
|
+
/** Information about the new slot. */
|
|
768
|
+
slot?: V2Slot;
|
|
769
|
+
/**
|
|
770
|
+
* Revision number, which increments by 1 each time the booking is updated.
|
|
771
|
+
* To prevent conflicting changes, the current revision must be passed when
|
|
772
|
+
* managing the booking.
|
|
773
|
+
*/
|
|
774
|
+
revision?: string | null;
|
|
775
|
+
}
|
|
776
|
+
/** @oneof */
|
|
777
|
+
export interface RescheduleBookingInfoParticipantsInfoOneOf {
|
|
778
|
+
/**
|
|
779
|
+
* Total number of participants. Available only for services with
|
|
780
|
+
* variants.
|
|
781
|
+
* Pass when all participants book the same variant.
|
|
782
|
+
*/
|
|
783
|
+
totalParticipants?: number;
|
|
784
|
+
/**
|
|
785
|
+
* Information about the service choices to book. Available only for services with
|
|
786
|
+
* variants.
|
|
787
|
+
* Pass when not all participants book the same variant.
|
|
788
|
+
*/
|
|
789
|
+
participantsChoices?: ParticipantChoices;
|
|
790
|
+
}
|
|
791
|
+
export interface RescheduleBookingFlowControlSettings {
|
|
792
|
+
/**
|
|
793
|
+
* Whether the rescheduling policy applies when rescheduling the booking.
|
|
794
|
+
* When passing `false` you can only cancel a booking if the rescheduling
|
|
795
|
+
* policy allows it.
|
|
796
|
+
* Default: `false`.
|
|
797
|
+
* <!--ONLY:VELO
|
|
798
|
+
* Requires "Manage Wix Bookings App" and "Manage Bookings' Calendar" [roles](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin).
|
|
799
|
+
* <!--END:ONLY:VELO-->
|
|
800
|
+
*/
|
|
801
|
+
ignoreReschedulePolicy?: boolean;
|
|
802
|
+
/**
|
|
803
|
+
* Whether the availability is checked before rescheduling the booking.
|
|
804
|
+
* When passing `false` a booking is only created when the slot or
|
|
805
|
+
* schedule is available.
|
|
806
|
+
* Default: `false`.
|
|
807
|
+
*/
|
|
808
|
+
skipAvailabilityValidation?: boolean;
|
|
809
|
+
/**
|
|
810
|
+
* Whether the rescheduled booking's status is automatically set to
|
|
811
|
+
* `CONFIRMED` for services that normally require the owner's manual
|
|
812
|
+
* confirmation.
|
|
813
|
+
* Default: `false`.
|
|
814
|
+
*/
|
|
815
|
+
skipBusinessConfirmation?: boolean;
|
|
816
|
+
}
|
|
817
|
+
export interface RescheduleGroupedBookingsResponse {
|
|
818
|
+
/** Rescheduled grouped bookings. */
|
|
819
|
+
bookings?: BookingResult[];
|
|
820
|
+
}
|
|
821
|
+
export interface BookingRescheduled extends BookingRescheduledPreviousParticipantsInfoOneOf {
|
|
822
|
+
/** The previous total number of participants. Available only when the booking includes a single service variant. */
|
|
823
|
+
previousTotalParticipants?: number;
|
|
824
|
+
/**
|
|
825
|
+
* Information about the previous booked service choices and participants.
|
|
826
|
+
* Available only when the booking includes multiple service variants.
|
|
827
|
+
*/
|
|
828
|
+
previousParticipantsChoices?: ParticipantChoices;
|
|
829
|
+
/** The rescheduled booking object. */
|
|
830
|
+
booking?: Booking;
|
|
831
|
+
/** Information about whether to notify the customer about the rescheduling and the message to send. */
|
|
832
|
+
participantNotification?: ParticipantNotification;
|
|
833
|
+
/**
|
|
834
|
+
* Information about whether specific procedures of the standard Wix Bookings
|
|
835
|
+
* rescheduling flow are changed. For example, whether the availability of
|
|
836
|
+
* the new slot is checked before rescheduling the booking or if you can
|
|
837
|
+
* reschedule the booking even though the rescheduling policy doesn't allow it.
|
|
838
|
+
*/
|
|
839
|
+
flowControlSettings?: RescheduleBookingFlowControlSettings;
|
|
840
|
+
/** ID of the rescheduling initiator. */
|
|
841
|
+
initiatedBy?: IdentificationData;
|
|
842
|
+
/** The previous status of the booking. */
|
|
843
|
+
previousStatus?: BookingStatus;
|
|
844
|
+
/** An object describing the previous slot or schedule of the booking. */
|
|
845
|
+
previousBookedEntity?: BookedEntity;
|
|
846
|
+
/** 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. */
|
|
847
|
+
previousStartDate?: Date;
|
|
848
|
+
/** 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. */
|
|
849
|
+
previousEndDate?: Date;
|
|
850
|
+
}
|
|
851
|
+
/** @oneof */
|
|
852
|
+
export interface BookingRescheduledPreviousParticipantsInfoOneOf {
|
|
853
|
+
/** The previous total number of participants. Available only when the booking includes a single service variant. */
|
|
854
|
+
previousTotalParticipants?: number;
|
|
855
|
+
/**
|
|
856
|
+
* Information about the previous booked service choices and participants.
|
|
857
|
+
* Available only when the booking includes multiple service variants.
|
|
858
|
+
*/
|
|
859
|
+
previousParticipantsChoices?: ParticipantChoices;
|
|
860
|
+
}
|
|
861
|
+
export interface ConfirmGroupedBookingsRequest {
|
|
862
|
+
/** ID of the group to confirm it's related bookings. */
|
|
863
|
+
groupId?: string;
|
|
864
|
+
/** Grouped bookings to confirm. */
|
|
865
|
+
confirmBookingsInfo?: ConfirmBookingInfo[];
|
|
866
|
+
/**
|
|
867
|
+
* Information about whether to notify the customer about the confirmation and
|
|
868
|
+
* the message to send.
|
|
869
|
+
*/
|
|
870
|
+
participantNotification?: ParticipantNotification;
|
|
871
|
+
/**
|
|
872
|
+
* Whether to send an SMS reminder to the customer 24 hours before the
|
|
873
|
+
* session starts. The phone number is taken from `contactDetails.phone`.
|
|
874
|
+
*/
|
|
875
|
+
sendSmsReminder?: boolean | null;
|
|
876
|
+
/** Whether this booking overlaps with another existing confirmed booking. */
|
|
877
|
+
doubleBooked?: boolean | null;
|
|
878
|
+
/** Whether to return the confirmed grouped bookings entities. */
|
|
879
|
+
returnFullEntity?: boolean;
|
|
880
|
+
}
|
|
881
|
+
export interface ConfirmBookingInfo {
|
|
882
|
+
/** ID of the booking to confirm. */
|
|
883
|
+
bookingId?: string;
|
|
884
|
+
/**
|
|
885
|
+
* Revision number, which increments by 1 each time the booking is updated.
|
|
886
|
+
* To prevent conflicting changes, the current revision must be passed when
|
|
887
|
+
* managing the booking.
|
|
888
|
+
*/
|
|
889
|
+
revision?: string | null;
|
|
890
|
+
/**
|
|
891
|
+
* Payment status to set for the booking.
|
|
892
|
+
* One of:
|
|
893
|
+
* - `"NOT_PAID"` The booking is not paid for.
|
|
894
|
+
* - `"PAID"` The booking is fully paid.
|
|
895
|
+
* - `"PARTIALLY_PAID"` The booking is partially paid.
|
|
896
|
+
* - `"REFUNDED"` The booking is refunded.
|
|
897
|
+
* - `"EXEMPT"` The booking is free of charge.
|
|
898
|
+
*/
|
|
899
|
+
paymentStatus?: PaymentStatus;
|
|
900
|
+
}
|
|
901
|
+
export interface ConfirmGroupedBookingsResponse {
|
|
902
|
+
/** Confirmed grouped bookings. */
|
|
903
|
+
bookings?: BookingResult[];
|
|
904
|
+
}
|
|
905
|
+
export interface BookingConfirmed {
|
|
906
|
+
/** The confirmed booking object. */
|
|
907
|
+
booking?: Booking;
|
|
908
|
+
/** Information about whether to notify the customer about the confirmation and the message to send. */
|
|
909
|
+
participantNotification?: ParticipantNotification;
|
|
910
|
+
/**
|
|
911
|
+
* Whether to send an SMS reminder to the customer 24 hours before the
|
|
912
|
+
* session starts. The phone number is taken from `contactDetails.phone`.
|
|
913
|
+
*/
|
|
914
|
+
sendSmsReminder?: boolean | null;
|
|
915
|
+
/** Whether this booking overlaps with another existing confirmed booking. */
|
|
916
|
+
doubleBooked?: boolean | null;
|
|
917
|
+
/** ID of the confirmation initiator. */
|
|
918
|
+
initiatedBy?: IdentificationData;
|
|
919
|
+
/** The previous status of the booking. */
|
|
920
|
+
previousStatus?: BookingStatus;
|
|
921
|
+
/** The previous payment status of the booking. */
|
|
922
|
+
previousPaymentStatus?: PaymentStatus;
|
|
923
|
+
}
|
|
924
|
+
export interface DeclineGroupedBookingsRequest {
|
|
925
|
+
/** ID of the group to decline it's related bookings. */
|
|
926
|
+
groupId?: string;
|
|
927
|
+
/** Grouped bookings to confirm. */
|
|
928
|
+
declineBookingsInfo?: DeclineBookingInfo[];
|
|
929
|
+
/**
|
|
930
|
+
* Information about whether to notify the customer about the decline and
|
|
931
|
+
* the message to send.
|
|
932
|
+
*/
|
|
933
|
+
participantNotification?: ParticipantNotification;
|
|
934
|
+
/** Whether this booking overlaps with another existing confirmed booking. */
|
|
935
|
+
doubleBooked?: boolean | null;
|
|
936
|
+
/** Whether to return the declined grouped bookings entities. */
|
|
937
|
+
returnFullEntity?: boolean;
|
|
938
|
+
}
|
|
939
|
+
export interface DeclineBookingInfo {
|
|
940
|
+
/** ID of the booking to decline. */
|
|
941
|
+
bookingId?: string;
|
|
942
|
+
/**
|
|
943
|
+
* Revision number, which increments by 1 each time the booking is updated.
|
|
944
|
+
* To prevent conflicting changes, the current revision must be passed when
|
|
945
|
+
* managing the booking.
|
|
946
|
+
*/
|
|
947
|
+
revision?: string | null;
|
|
948
|
+
/**
|
|
949
|
+
* Payment status to set on the booking.
|
|
950
|
+
* One of:
|
|
951
|
+
* - `"NOT_PAID"` The booking is not paid for.
|
|
952
|
+
* - `"PAID"` The booking is fully paid.
|
|
953
|
+
* - `"PARTIALLY_PAID"` The booking is partially paid.
|
|
954
|
+
* - `"REFUNDED"` The booking is refunded.
|
|
955
|
+
* - `"EXEMPT"` The booking is free of charge.
|
|
956
|
+
*/
|
|
957
|
+
paymentStatus?: PaymentStatus;
|
|
958
|
+
}
|
|
959
|
+
export interface DeclineGroupedBookingsResponse {
|
|
960
|
+
/** Declined grouped bookings. */
|
|
961
|
+
bookings?: BookingResult[];
|
|
962
|
+
}
|
|
963
|
+
export interface BookingDeclined {
|
|
964
|
+
/** The declined booking object. */
|
|
965
|
+
booking?: Booking;
|
|
966
|
+
/** Information about whether to notify the customer about the decline and the message to send. */
|
|
967
|
+
participantNotification?: ParticipantNotification;
|
|
968
|
+
/** Whether this booking overlaps with another existing confirmed booking. */
|
|
969
|
+
doubleBooked?: boolean | null;
|
|
970
|
+
/** ID of the decline initiator. */
|
|
971
|
+
initiatedBy?: IdentificationData;
|
|
972
|
+
/** The previous status of the booking. */
|
|
973
|
+
previousStatus?: BookingStatus;
|
|
974
|
+
/** The previous payment status of the booking. */
|
|
975
|
+
previousPaymentStatus?: PaymentStatus;
|
|
976
|
+
}
|
|
977
|
+
export interface CalculateGroupedBookingsAllowedActionsRequest {
|
|
978
|
+
/** ID of the group */
|
|
979
|
+
groupId?: string;
|
|
980
|
+
}
|
|
981
|
+
export interface CalculateGroupedBookingsAllowedActionsResponse {
|
|
982
|
+
allowedActions?: AllowedActions;
|
|
983
|
+
}
|
|
984
|
+
/** Possible allowed actions for a Booking */
|
|
985
|
+
export interface AllowedActions {
|
|
986
|
+
/** Is cancel booking allowed */
|
|
987
|
+
cancel?: boolean;
|
|
988
|
+
/** Is reschedule booking allowed */
|
|
989
|
+
reschedule?: boolean;
|
|
990
|
+
}
|
|
991
|
+
export interface SplitGroupedBookingsRequest {
|
|
992
|
+
/** ID of the group. */
|
|
993
|
+
groupId?: string;
|
|
994
|
+
/** Whether to return the declined grouped bookings entities. */
|
|
995
|
+
returnFullEntity?: boolean;
|
|
996
|
+
}
|
|
997
|
+
export interface SplitGroupedBookingsResponse {
|
|
998
|
+
/** The separated bookings. */
|
|
999
|
+
bookings?: BookingResult[];
|
|
1000
|
+
}
|
|
1001
|
+
export interface AddToGroupRequest {
|
|
1002
|
+
/** ID of the group. */
|
|
1003
|
+
groupId?: string;
|
|
1004
|
+
/** ID of the booking to add to the group. */
|
|
1005
|
+
bookingId?: string;
|
|
1006
|
+
/**
|
|
1007
|
+
* Revision number, which increments by 1 each time the booking is updated.
|
|
1008
|
+
* To prevent conflicting changes, the current revision must be passed when
|
|
1009
|
+
* managing the booking.
|
|
1010
|
+
*/
|
|
1011
|
+
revision?: string | null;
|
|
1012
|
+
}
|
|
1013
|
+
export interface AddToGroupResponse {
|
|
1014
|
+
/** The booking added to the group. */
|
|
1015
|
+
booking?: Booking;
|
|
1016
|
+
}
|
|
1017
|
+
export interface RemoveFromGroupRequest {
|
|
1018
|
+
/** ID of the group. */
|
|
1019
|
+
groupId?: string;
|
|
1020
|
+
/** ID of the booking to remove from the group. */
|
|
1021
|
+
bookingId?: string;
|
|
1022
|
+
/**
|
|
1023
|
+
* Revision number, which increments by 1 each time the booking is updated.
|
|
1024
|
+
* To prevent conflicting changes, the current revision must be passed when
|
|
1025
|
+
* managing the booking.
|
|
1026
|
+
*/
|
|
1027
|
+
revision?: string | null;
|
|
1028
|
+
}
|
|
1029
|
+
export interface RemoveFromGroupResponse {
|
|
1030
|
+
/** The booking removed from the group. */
|
|
1031
|
+
booking?: Booking;
|
|
1032
|
+
}
|
|
589
1033
|
export interface BookingChanged {
|
|
590
1034
|
/** The booking before the changes. */
|
|
591
1035
|
previousBooking?: Booking;
|
|
@@ -765,158 +1209,10 @@ export interface RescheduleBookingRequestParticipantsInfoOneOf {
|
|
|
765
1209
|
*/
|
|
766
1210
|
participantsChoices?: ParticipantChoices;
|
|
767
1211
|
}
|
|
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
1212
|
export interface RescheduleBookingResponse {
|
|
844
1213
|
/** Rescheduled booking. */
|
|
845
1214
|
booking?: Booking;
|
|
846
1215
|
}
|
|
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
1216
|
export interface BulkRescheduleBookingRequest {
|
|
921
1217
|
/** Reschedule multiple bookings to multiple slots. */
|
|
922
1218
|
slotsBookings?: SlotBookings[];
|
|
@@ -1093,25 +1389,6 @@ export interface ConfirmBookingRequest {
|
|
|
1093
1389
|
export interface ConfirmBookingResponse {
|
|
1094
1390
|
booking?: Booking;
|
|
1095
1391
|
}
|
|
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
1392
|
export interface PartySizeRequest extends PartySizeRequestPartySizeForOneOf {
|
|
1116
1393
|
sessionId?: string | null;
|
|
1117
1394
|
scheduleId?: string | null;
|
|
@@ -1142,9 +1419,11 @@ export interface SetBookingSessionIdResponse {
|
|
|
1142
1419
|
booking?: Booking;
|
|
1143
1420
|
}
|
|
1144
1421
|
export interface UpdateExtendedFieldsRequest {
|
|
1145
|
-
/**
|
|
1422
|
+
/** ID of the entity to update. */
|
|
1146
1423
|
_id: string;
|
|
1424
|
+
/** Identifier for the app whose extended fields are being updated. */
|
|
1147
1425
|
namespace: string;
|
|
1426
|
+
/** 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
1427
|
namespaceData: Record<string, any> | null;
|
|
1149
1428
|
}
|
|
1150
1429
|
export interface UpdateExtendedFieldsResponse {
|
|
@@ -1184,20 +1463,6 @@ export interface DeclineBookingResponse {
|
|
|
1184
1463
|
/** eclined booking */
|
|
1185
1464
|
booking?: Booking;
|
|
1186
1465
|
}
|
|
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
1466
|
export interface CancelBookingRequest {
|
|
1202
1467
|
/** ID of the booking to cancel. */
|
|
1203
1468
|
bookingId: string;
|
|
@@ -1220,49 +1485,10 @@ export interface CancelBookingRequest {
|
|
|
1220
1485
|
*/
|
|
1221
1486
|
revision: string | null;
|
|
1222
1487
|
}
|
|
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
1488
|
export interface CancelBookingResponse {
|
|
1246
1489
|
/** Canceled booking. */
|
|
1247
1490
|
booking?: Booking;
|
|
1248
1491
|
}
|
|
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
1492
|
export interface UpdateNumberOfParticipantsRequest extends UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
|
|
1267
1493
|
/**
|
|
1268
1494
|
* Total number of participants. Available only for services with
|
|
@@ -1334,13 +1560,6 @@ export interface CalculateAllowedActionsRequest {
|
|
|
1334
1560
|
export interface CalculateAllowedActionsResponse {
|
|
1335
1561
|
allowedActions?: AllowedActions;
|
|
1336
1562
|
}
|
|
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
1563
|
export interface BulkCalculateAllowedActionsRequest {
|
|
1345
1564
|
/** The booking id's that we want to calculate the allowedActions for */
|
|
1346
1565
|
bookingIds?: string[] | null;
|
|
@@ -2009,8 +2228,10 @@ export interface ConfirmBookingOptions {
|
|
|
2009
2228
|
*
|
|
2010
2229
|
*
|
|
2011
2230
|
* Extended fields must first be configured in the Wix Developers Center.
|
|
2012
|
-
*
|
|
2013
|
-
*
|
|
2231
|
+
*
|
|
2232
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
2233
|
+
* @param _id - ID of the entity to update.
|
|
2234
|
+
* @param namespace - Identifier for the app whose extended fields are being updated.
|
|
2014
2235
|
* @public
|
|
2015
2236
|
* @documentationMaturity preview
|
|
2016
2237
|
* @requiredField _id
|
|
@@ -2022,6 +2243,7 @@ export interface ConfirmBookingOptions {
|
|
|
2022
2243
|
*/
|
|
2023
2244
|
export declare function updateExtendedFields(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse>;
|
|
2024
2245
|
export interface UpdateExtendedFieldsOptions {
|
|
2246
|
+
/** 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
2247
|
namespaceData: Record<string, any> | null;
|
|
2026
2248
|
}
|
|
2027
2249
|
/**
|