@wix/auto_sdk_bookings_bookings 1.0.0
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/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/bookings-v2-booking-bookings.context.d.ts +61 -0
- package/build/cjs/src/bookings-v2-booking-bookings.context.js +77 -0
- package/build/cjs/src/bookings-v2-booking-bookings.context.js.map +1 -0
- package/build/cjs/src/bookings-v2-booking-bookings.http.d.ts +507 -0
- package/build/cjs/src/bookings-v2-booking-bookings.http.js +1576 -0
- package/build/cjs/src/bookings-v2-booking-bookings.http.js.map +1 -0
- package/build/cjs/src/bookings-v2-booking-bookings.meta.d.ts +61 -0
- package/build/cjs/src/bookings-v2-booking-bookings.meta.js +427 -0
- package/build/cjs/src/bookings-v2-booking-bookings.meta.js.map +1 -0
- package/build/cjs/src/bookings-v2-booking-bookings.public.d.ts +625 -0
- package/build/cjs/src/bookings-v2-booking-bookings.public.js +313 -0
- package/build/cjs/src/bookings-v2-booking-bookings.public.js.map +1 -0
- package/build/cjs/src/bookings-v2-booking-bookings.types.d.ts +2736 -0
- package/build/cjs/src/bookings-v2-booking-bookings.types.js +165 -0
- package/build/cjs/src/bookings-v2-booking-bookings.types.js.map +1 -0
- package/build/cjs/src/bookings-v2-booking-bookings.universal.d.ts +4014 -0
- package/build/cjs/src/bookings-v2-booking-bookings.universal.js +1646 -0
- package/build/cjs/src/bookings-v2-booking-bookings.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/bookings-v2-booking-bookings.context.d.ts +61 -0
- package/build/es/src/bookings-v2-booking-bookings.context.js +61 -0
- package/build/es/src/bookings-v2-booking-bookings.context.js.map +1 -0
- package/build/es/src/bookings-v2-booking-bookings.http.d.ts +507 -0
- package/build/es/src/bookings-v2-booking-bookings.http.js +1552 -0
- package/build/es/src/bookings-v2-booking-bookings.http.js.map +1 -0
- package/build/es/src/bookings-v2-booking-bookings.meta.d.ts +61 -0
- package/build/es/src/bookings-v2-booking-bookings.meta.js +380 -0
- package/build/es/src/bookings-v2-booking-bookings.meta.js.map +1 -0
- package/build/es/src/bookings-v2-booking-bookings.public.d.ts +625 -0
- package/build/es/src/bookings-v2-booking-bookings.public.js +276 -0
- package/build/es/src/bookings-v2-booking-bookings.public.js.map +1 -0
- package/build/es/src/bookings-v2-booking-bookings.types.d.ts +2736 -0
- package/build/es/src/bookings-v2-booking-bookings.types.js +162 -0
- package/build/es/src/bookings-v2-booking-bookings.types.js.map +1 -0
- package/build/es/src/bookings-v2-booking-bookings.universal.d.ts +4014 -0
- package/build/es/src/bookings-v2-booking-bookings.universal.js +1599 -0
- package/build/es/src/bookings-v2-booking-bookings.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.context.d.ts +61 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.context.js +77 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.context.js.map +1 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.http.d.ts +507 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.http.js +1576 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.http.js.map +1 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.meta.d.ts +61 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.meta.js +427 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.public.d.ts +625 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.public.js +313 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.public.js.map +1 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.types.d.ts +2736 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.types.js +165 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.types.js.map +1 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.universal.d.ts +4014 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.universal.js +1646 -0
- package/build/internal/cjs/src/bookings-v2-booking-bookings.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.context.d.ts +61 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.context.js +61 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.context.js.map +1 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.http.d.ts +507 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.http.js +1552 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.http.js.map +1 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.meta.d.ts +61 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.meta.js +380 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.meta.js.map +1 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.public.d.ts +625 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.public.js +276 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.public.js.map +1 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.types.d.ts +2736 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.types.js +162 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.types.js.map +1 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.universal.d.ts +4014 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.universal.js +1599 -0
- package/build/internal/es/src/bookings-v2-booking-bookings.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a multi-service booking.
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* See Create Booking for more information.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createMultiServiceBooking(payload: object): RequestOptionsFactory<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Reschedules a multi-service booking.
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* The call fails if at least 1 individual booking can't be rescheduled due
|
|
14
|
+
* the service being unavailable or a rescheduling policy violation.
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* See Reschedule Booking for more information.
|
|
18
|
+
*/
|
|
19
|
+
export declare function rescheduleMultiServiceBooking(payload: object): RequestOptionsFactory<any>;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves a multi-service booking's availability.
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* Use List Multi Service Availability Time Slots to check availability for a
|
|
25
|
+
* `SEQUENTIAL_BOOKINGS` multi-service booking.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getMultiServiceBookingAvailability(payload: object): RequestOptionsFactory<any>;
|
|
28
|
+
/** Cancels a multi-service booking and thus all its individual bookings. */
|
|
29
|
+
export declare function cancelMultiServiceBooking(payload: object): RequestOptionsFactory<any>;
|
|
30
|
+
/**
|
|
31
|
+
* Updates the status of a multi-service booking to `PENDING`.
|
|
32
|
+
*
|
|
33
|
+
*
|
|
34
|
+
* Also updates the status of each of individual bookings within the multi-service booking to `PENDING`.
|
|
35
|
+
*
|
|
36
|
+
* The call fails if the status for at least a single individual booking can't be updated.
|
|
37
|
+
*
|
|
38
|
+
* See Mark Booking as Pending for more information.
|
|
39
|
+
*/
|
|
40
|
+
export declare function markMultiServiceBookingAsPending(payload: object): RequestOptionsFactory<any>;
|
|
41
|
+
/**
|
|
42
|
+
* Updates the status of a multi-service booking to `CONFIRMED`.
|
|
43
|
+
*
|
|
44
|
+
*
|
|
45
|
+
* Also updates the status of each of individual bookings within the multi-service booking to `CONFIRMED`.
|
|
46
|
+
*
|
|
47
|
+
* The call fails if the status for at least a single individual booking can't be updated.
|
|
48
|
+
*
|
|
49
|
+
* See Confirm Booking for more information.
|
|
50
|
+
*/
|
|
51
|
+
export declare function confirmMultiServiceBooking(payload: object): RequestOptionsFactory<any>;
|
|
52
|
+
/**
|
|
53
|
+
* Updates the status of a multi-service booking to `DECLINED`.
|
|
54
|
+
*
|
|
55
|
+
*
|
|
56
|
+
* Also updates the status of each of individual bookings within the multi-service booking to `DECLINED`.
|
|
57
|
+
*
|
|
58
|
+
* The call fails if the status for at least a single individual booking can't be updated.
|
|
59
|
+
*
|
|
60
|
+
* See Decline Booking for more information.
|
|
61
|
+
*/
|
|
62
|
+
export declare function declineMultiServiceBooking(payload: object): RequestOptionsFactory<any>;
|
|
63
|
+
/** Retrieves the allowed actions for a list of multi-service bookings. */
|
|
64
|
+
export declare function bulkGetMultiServiceBookingAllowedActions(payload: object): RequestOptionsFactory<any>;
|
|
65
|
+
/**
|
|
66
|
+
* Retrieves all single-service bookings belonging to a multi-service booking.
|
|
67
|
+
*
|
|
68
|
+
*
|
|
69
|
+
* If you call as an [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities)
|
|
70
|
+
* who has permissions to read only part of the bookings,
|
|
71
|
+
* only the permitted bookings are retrieved. The returned total number of
|
|
72
|
+
* bookings includes also the bookings for which you don't have permissions.
|
|
73
|
+
*/
|
|
74
|
+
export declare function getMultiServiceBooking(payload: object): RequestOptionsFactory<any>;
|
|
75
|
+
/**
|
|
76
|
+
* Adds a list of single-service bookings to a multi-service booking.
|
|
77
|
+
*
|
|
78
|
+
*
|
|
79
|
+
* The call fails, if at least 1 of the specified booking is already part of a
|
|
80
|
+
* multi-service booking.
|
|
81
|
+
*/
|
|
82
|
+
export declare function addBookingsToMultiServiceBooking(payload: object): RequestOptionsFactory<any>;
|
|
83
|
+
/**
|
|
84
|
+
* Removes single-service bookings from a multi-service booking and returns the
|
|
85
|
+
* removed bookings.
|
|
86
|
+
*
|
|
87
|
+
*
|
|
88
|
+
* If you specify an empty `bookings` array, all single-service bookings for which
|
|
89
|
+
* the call's [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities)
|
|
90
|
+
* has read permissions are removed from the multi-service booking.
|
|
91
|
+
*
|
|
92
|
+
* If the call would create a multi-service booking including only 1 single-service
|
|
93
|
+
* booking, the multi-service booking is also deleted.
|
|
94
|
+
*/
|
|
95
|
+
export declare function removeBookingsFromMultiServiceBooking(payload: object): RequestOptionsFactory<any>;
|
|
96
|
+
/**
|
|
97
|
+
* Creates a booking.
|
|
98
|
+
*
|
|
99
|
+
*
|
|
100
|
+
* ## Appointment booking
|
|
101
|
+
*
|
|
102
|
+
* For appointment-based services, specify the relevant `slot` in
|
|
103
|
+
* `bookedEntity.slot`. We recommend specifying the complete
|
|
104
|
+
* `availabilityEntries.slot` returned in Query Availability
|
|
105
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))
|
|
106
|
+
* in your call's request to avoid failed calls due to unavailability.
|
|
107
|
+
*
|
|
108
|
+
* ## Class session booking
|
|
109
|
+
*
|
|
110
|
+
* For class services, specify the relevant event ID
|
|
111
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
|
|
112
|
+
* as `bookedEntity.slot.eventId`.
|
|
113
|
+
* We recommend retrieving the event ID from Query Availability's
|
|
114
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))
|
|
115
|
+
* `availabilityEntries.slot.eventId` to avoid failed calls due to unavailability.
|
|
116
|
+
* Specifying an event ID leads to automatic calculations of `slot.startDate`, `slot.endDate`,
|
|
117
|
+
* `slot.timezone`, `slot.resource`, and `slot.location`. All manually specified
|
|
118
|
+
* values are overridden.
|
|
119
|
+
*
|
|
120
|
+
* ## Course booking
|
|
121
|
+
*
|
|
122
|
+
* For course services, specify the course's schedule ID in `bookedEntity.schedule.scheduleId`.
|
|
123
|
+
* We recommend following [this sample flow](https://dev.wix.com/docs/rest/business-solutions/bookings/sample-booking-flows#book-a-course)
|
|
124
|
+
* to minimize failed calls due to unavailability.
|
|
125
|
+
*
|
|
126
|
+
* ## Related resources
|
|
127
|
+
*
|
|
128
|
+
* Specifying a `resource` triggers an availability check, resulting in a failed
|
|
129
|
+
* call if the resource is unavailable. Omitting a resource allows Wix Bookings
|
|
130
|
+
* to assign a resource belonging to the relevant type randomly when the merchant
|
|
131
|
+
* confirms the booking.
|
|
132
|
+
*
|
|
133
|
+
* ## Participant information
|
|
134
|
+
*
|
|
135
|
+
* You must specify either `participantsChoices` or `totalParticipants`.
|
|
136
|
+
* The call fails if the specified `participantsChoices` aren't among the supported
|
|
137
|
+
* service options and variants
|
|
138
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
|
|
139
|
+
*
|
|
140
|
+
* ## Notify customers
|
|
141
|
+
*
|
|
142
|
+
* You can specify a `participantNotification.message` for the customer that's send
|
|
143
|
+
* immediately. Ensure `participantNotification.notifyParticipants` is set to `true`
|
|
144
|
+
* to send the message.
|
|
145
|
+
*
|
|
146
|
+
* If you specify `{"sendSmsReminder": true}`, the customer receives an SMS 24 hours
|
|
147
|
+
* before the session starts. The phone number is taken from `contactDetails.phone`.
|
|
148
|
+
*
|
|
149
|
+
* ## Booking status
|
|
150
|
+
*
|
|
151
|
+
* Bookings default to the `CREATED` status, not affecting the business calendar
|
|
152
|
+
* or resource availability. You can specify a different status when the calling
|
|
153
|
+
* [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities)
|
|
154
|
+
* has `Manage Bookings` permissions.
|
|
155
|
+
*
|
|
156
|
+
* ## Payment options
|
|
157
|
+
*
|
|
158
|
+
* The specified `selectedPaymentOption` indicates how the customer intends to
|
|
159
|
+
* pay, allowing for later changes to a different method supported by the service.
|
|
160
|
+
*
|
|
161
|
+
* ## Payment status
|
|
162
|
+
*
|
|
163
|
+
* A booking is initially created with `{"paymentStatus": "UNDEFINED"}` regardless
|
|
164
|
+
* of the payment status specified in Create Booking. If a customer uses an eCommerce
|
|
165
|
+
* checkout ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)),
|
|
166
|
+
* Wix Bookings automatically syncs the booking's payment status from
|
|
167
|
+
* the corresponding eCommerce order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).
|
|
168
|
+
*
|
|
169
|
+
* If a booking doesn't have a corresponding eCommerce order, for example, since
|
|
170
|
+
* the customer didn't use the eCommerce checkout, you can update the booking's
|
|
171
|
+
* payment status with Confirm Or Decline Booking
|
|
172
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)).
|
|
173
|
+
*
|
|
174
|
+
* ## Booking form data
|
|
175
|
+
*
|
|
176
|
+
* When customers sign up for a service, they must fill out the booking form.
|
|
177
|
+
* To create a booking with a completed booking form, specify the relevant data in
|
|
178
|
+
* `formSubmission`. Ensure the values of the corresponding fields in
|
|
179
|
+
* `booking.contactDetails` and `formSubmission` are identical. If these values
|
|
180
|
+
* don't match, Create Booking fails. Therefore, we recommend specifying
|
|
181
|
+
* only `booking.contactDetails.contactId` when providing `formSubmission`.
|
|
182
|
+
*
|
|
183
|
+
* ## Admin overwrites
|
|
184
|
+
*
|
|
185
|
+
* There are small but important differences when you specify special
|
|
186
|
+
* `flowControlSettings`:
|
|
187
|
+
*
|
|
188
|
+
* - `{"skipAvailabilityValidation": true}`: The call succeeds
|
|
189
|
+
* regardless of availability. If you don't specify any resource, the call
|
|
190
|
+
* succeeds even if no resource of the relevant type is available.
|
|
191
|
+
* - `{"skipBusinessConfirmation": true}`: Automatically confirms `PENDING`
|
|
192
|
+
* bookings that require manual confirmation.
|
|
193
|
+
* - `{"skipSelectedPaymentOptionValidation": true}`: Allows customers to pay
|
|
194
|
+
* with payment methods that aren't supported for the service.
|
|
195
|
+
*
|
|
196
|
+
* When using special `flowControlSettings`, ensure you have sufficient
|
|
197
|
+
* permissions. If you encounter failed calls due to insufficient permissions,
|
|
198
|
+
* consider the following options:
|
|
199
|
+
*
|
|
200
|
+
* - **App developers** can use a higher
|
|
201
|
+
* [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),
|
|
202
|
+
* such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
|
|
203
|
+
* - **Site developers** can utilize
|
|
204
|
+
* [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
|
|
205
|
+
*
|
|
206
|
+
* Granting additional permissions and using elevation permits method calls that
|
|
207
|
+
* would typically fail due to authorization checks. Therefore, you should use
|
|
208
|
+
* them intentionally and securely.
|
|
209
|
+
*/
|
|
210
|
+
export declare function createBooking(payload: object): RequestOptionsFactory<any>;
|
|
211
|
+
/**
|
|
212
|
+
* Creates up to 8 bookings.
|
|
213
|
+
*
|
|
214
|
+
*
|
|
215
|
+
* See Create Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/create-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/create-booking))
|
|
216
|
+
* for more information.
|
|
217
|
+
*
|
|
218
|
+
* If any of the specified bookings is missing a required field the entire call
|
|
219
|
+
* fails.
|
|
220
|
+
*
|
|
221
|
+
* If you specify 1 or more unavailable bookings, the call succeeds
|
|
222
|
+
* while the unavailable bookings aren't created. Instead, they're counted as
|
|
223
|
+
* failures in the returned `bulkActionMetadata`.
|
|
224
|
+
*/
|
|
225
|
+
export declare function bulkCreateBooking(payload: object): RequestOptionsFactory<any>;
|
|
226
|
+
/**
|
|
227
|
+
* Reschedules an appointment booking to a different slot or a class booking to
|
|
228
|
+
* a different session.
|
|
229
|
+
*
|
|
230
|
+
*
|
|
231
|
+
* ## Course booking limitation
|
|
232
|
+
*
|
|
233
|
+
* You can't reschedule course bookings.
|
|
234
|
+
*
|
|
235
|
+
* ## Appointment sessions
|
|
236
|
+
*
|
|
237
|
+
* For appointments, the old session is removed from the business calendar
|
|
238
|
+
* while a new session is added. We recommend calling Query Availability
|
|
239
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))
|
|
240
|
+
* first and specifying the entire retrieved `slot`.
|
|
241
|
+
*
|
|
242
|
+
* ## Class sessions
|
|
243
|
+
*
|
|
244
|
+
* For classes, the new session must be an existing session belonging to the
|
|
245
|
+
* same class. We recommend retrieving `availabilityEntries.slot.eventId`
|
|
246
|
+
* from Query Availability
|
|
247
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))
|
|
248
|
+
* to avoid failed Reschedule Booking calls due to unavailability. Specify
|
|
249
|
+
* only `slot.eventId` instead of the entire `slot` object.
|
|
250
|
+
*
|
|
251
|
+
* ## Notify customers
|
|
252
|
+
*
|
|
253
|
+
* You can specify a `participantNotification.message` for the customer. To send
|
|
254
|
+
* the message, you must also specify `participantNotification.notifyParticipants`
|
|
255
|
+
* as `true`.
|
|
256
|
+
*
|
|
257
|
+
* ## Admin overwrites
|
|
258
|
+
*
|
|
259
|
+
* There are small but important differences when you specify special
|
|
260
|
+
* `flowControlSettings`:
|
|
261
|
+
*
|
|
262
|
+
* - `{"ignoreReschedulePolicy": true}`: The call succeeds even if the
|
|
263
|
+
* service's `reschedulePolicy` doesn't allow it.
|
|
264
|
+
* - `{"skipAvailabilityValidation": true}`: The call succeeds even if
|
|
265
|
+
* the specified session, slot, or resource isn't available. If you don't
|
|
266
|
+
* specify any resource, the call succeeds even if no resource of the relevant
|
|
267
|
+
* type is available.
|
|
268
|
+
* - `{"skipBusinessConfirmation": true}`: Any `PENDING` booking is
|
|
269
|
+
* automatically confirmed even if the services requires the merchants's
|
|
270
|
+
* manual confirmation.
|
|
271
|
+
*
|
|
272
|
+
* When using special `flowControlSettings`, ensure you have sufficient
|
|
273
|
+
* permissions. If you encounter failed calls due to insufficient permissions,
|
|
274
|
+
* consider the following options:
|
|
275
|
+
*
|
|
276
|
+
* - **App developers** can use a higher
|
|
277
|
+
* [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),
|
|
278
|
+
* such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
|
|
279
|
+
* - **Site developers** can utilize
|
|
280
|
+
* [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
|
|
281
|
+
*
|
|
282
|
+
* Granting additional permissions and using elevation permits method calls that
|
|
283
|
+
* would typically fail due to authorization checks. Therefore, you should use
|
|
284
|
+
* them intentionally and securely.
|
|
285
|
+
*/
|
|
286
|
+
export declare function rescheduleBooking(payload: object): RequestOptionsFactory<any>;
|
|
287
|
+
/**
|
|
288
|
+
* Updates the booking status to `CONFIRMED` and updates the relevant session's
|
|
289
|
+
* `participants.approvalStatus` to `APPROVED` without checking whether the relevant
|
|
290
|
+
* slot or schedule is still available.
|
|
291
|
+
*
|
|
292
|
+
* ## eCommerce checkout restriction
|
|
293
|
+
*
|
|
294
|
+
* Call this method only when using a custom checkout page. Don't
|
|
295
|
+
* call it when using a Wix eCommerce checkout
|
|
296
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
|
|
297
|
+
* In such cases, Wix automatically updates the booking status based on
|
|
298
|
+
* the `paymentStatus` of the corresponding Wix eCommerce order
|
|
299
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).
|
|
300
|
+
*
|
|
301
|
+
* ## When to call Confirm Or Decline Booking instead
|
|
302
|
+
*
|
|
303
|
+
* Confirm Booking doesn't check whether a slot or schedule is still available. For
|
|
304
|
+
* these checks you can call Confirm or Decline Booking
|
|
305
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)).
|
|
306
|
+
*
|
|
307
|
+
* ## Original status validation
|
|
308
|
+
*
|
|
309
|
+
* You can only confirm bookings with a status of `PENDING`, `CREATED`, or
|
|
310
|
+
* `WAITING_LIST`.
|
|
311
|
+
*
|
|
312
|
+
* ## Double bookings
|
|
313
|
+
*
|
|
314
|
+
* Confirm Booking doesn't check whether a slot or schedule is still available.
|
|
315
|
+
* You can specify
|
|
316
|
+
*
|
|
317
|
+
* ```json
|
|
318
|
+
* {
|
|
319
|
+
* "flowControlSettings": {
|
|
320
|
+
* "checkAvailabilityValidation": true
|
|
321
|
+
* },
|
|
322
|
+
* "doubleBooked": true
|
|
323
|
+
* }
|
|
324
|
+
* ```
|
|
325
|
+
* to forcefully set the booking's `doubleBooked` flag to `true`, regardless of
|
|
326
|
+
* a potential double booking conflict. You must call with `Manage Bookings`
|
|
327
|
+
* permissions to do so. For the default flow control settings
|
|
328
|
+
* `{"checkAvailabilityValidation": false}`, the specified `doubleBooked` value
|
|
329
|
+
* is ignored.
|
|
330
|
+
*
|
|
331
|
+
* ## Payment status
|
|
332
|
+
*
|
|
333
|
+
* Also updates the booking's `paymentStatus`, if you specify a new payment
|
|
334
|
+
* status.
|
|
335
|
+
*
|
|
336
|
+
* ## Notify customers
|
|
337
|
+
*
|
|
338
|
+
* You can specify a `participantNotification.message` for the customer. To send
|
|
339
|
+
* the message, you must also specify `participantNotification.notifyParticipants`
|
|
340
|
+
* as `true`.
|
|
341
|
+
*/
|
|
342
|
+
export declare function bookingsConfirmBooking(payload: object): RequestOptionsFactory<any>;
|
|
343
|
+
/**
|
|
344
|
+
* Updates the extended fields for a booking.
|
|
345
|
+
*
|
|
346
|
+
*
|
|
347
|
+
* If you specify an extended field `namespace` that doesn't exist yet, it's
|
|
348
|
+
* created.
|
|
349
|
+
*
|
|
350
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/about-backend-extensions#schema-plugin-extensions).
|
|
351
|
+
*/
|
|
352
|
+
export declare function updateExtendedFields(payload: object): RequestOptionsFactory<any>;
|
|
353
|
+
/**
|
|
354
|
+
* Updates the booking status to `DECLINED` and updates the relevant session's
|
|
355
|
+
* `participants.approvalStatus` to `DECLINED` without checking whether the relevant
|
|
356
|
+
* slot or schedule is still available.
|
|
357
|
+
*
|
|
358
|
+
*
|
|
359
|
+
* ## eCommerce checkout restriction
|
|
360
|
+
*
|
|
361
|
+
* Call this method only when using a custom checkout page. Don't
|
|
362
|
+
* call it when using a Wix eCommerce checkout
|
|
363
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
|
|
364
|
+
* In such cases, Wix automatically updates the booking status based on
|
|
365
|
+
* the `paymentStatus` of the corresponding Wix eCommerce order
|
|
366
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).
|
|
367
|
+
*
|
|
368
|
+
* ## When to call Confirm Or Decline Booking instead
|
|
369
|
+
*
|
|
370
|
+
* The method doesn't check whether a slot or schedule is still available. For
|
|
371
|
+
* these checks you can call Confirm or Decline Booking
|
|
372
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)).
|
|
373
|
+
*
|
|
374
|
+
* ## Original status validation
|
|
375
|
+
*
|
|
376
|
+
* You can only decline bookings with a `status` of `PENDING`, `CREATED`, or
|
|
377
|
+
* `WAITING_LIST`.
|
|
378
|
+
*
|
|
379
|
+
* ## Payment status
|
|
380
|
+
*
|
|
381
|
+
* Also updates the booking's `paymentStatus`, if you specify a new payment
|
|
382
|
+
* status.
|
|
383
|
+
*
|
|
384
|
+
* ## Notify customers
|
|
385
|
+
*
|
|
386
|
+
* You can specify a `participantNotification.message` for the customer. To send
|
|
387
|
+
* the message, you must also specify `participantNotification.notifyParticipants`
|
|
388
|
+
* as `true`.
|
|
389
|
+
*/
|
|
390
|
+
export declare function bookingsDeclineBooking(payload: object): RequestOptionsFactory<any>;
|
|
391
|
+
/**
|
|
392
|
+
* Updates the booking status to `CANCELED`.
|
|
393
|
+
*
|
|
394
|
+
*
|
|
395
|
+
* ## Appointments
|
|
396
|
+
*
|
|
397
|
+
* For appointments, the corresponding event is removed from the Bookings
|
|
398
|
+
* calendar.
|
|
399
|
+
*
|
|
400
|
+
* ## Class and course bookings
|
|
401
|
+
*
|
|
402
|
+
* For class or course bookings, the relevant participants are removed
|
|
403
|
+
* from the class session or the course. However, the class session or course
|
|
404
|
+
* remain on the business calendar.
|
|
405
|
+
*
|
|
406
|
+
* ## Notify customers
|
|
407
|
+
*
|
|
408
|
+
* You can specify a `participantNotification.message` for the customer. To send
|
|
409
|
+
* the message, you must also specify `participantNotification.notifyParticipants`
|
|
410
|
+
* as `true`.
|
|
411
|
+
*
|
|
412
|
+
* ## Admin overwrites
|
|
413
|
+
*
|
|
414
|
+
* There are small but important differences when you specify special
|
|
415
|
+
* `flowControlSettings`:
|
|
416
|
+
*
|
|
417
|
+
* - `{"ignoreCancellationPolicy": true}`: The call succeeds even if the
|
|
418
|
+
* service's `cancellationPolicy` doesn't allow it.
|
|
419
|
+
* - `{"withRefund": true}`: The customer is refunded even if the service's
|
|
420
|
+
* `refundPolicy` doesn't allow it.
|
|
421
|
+
* - `{"waiveCancellationFee": true}`: The customer doesn't have to pay
|
|
422
|
+
* the cancellation fee, even if the service's `cancellationPolicy` requires it.
|
|
423
|
+
*
|
|
424
|
+
* When using special `flowControlSettings`, ensure you have sufficient
|
|
425
|
+
* permissions. If you encounter failed calls due to insufficient permissions,
|
|
426
|
+
* consider the following options:
|
|
427
|
+
*
|
|
428
|
+
* - **App developers** can use a higher
|
|
429
|
+
* [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),
|
|
430
|
+
* such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
|
|
431
|
+
* - **Site developers** can utilize
|
|
432
|
+
* [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
|
|
433
|
+
*
|
|
434
|
+
* Granting additional permissions and using elevation permits method calls that
|
|
435
|
+
* would typically fail due to authorization checks. Therefore, you should use
|
|
436
|
+
* them intentionally and securely.
|
|
437
|
+
*/
|
|
438
|
+
export declare function bookingsCancelBooking(payload: object): RequestOptionsFactory<any>;
|
|
439
|
+
/**
|
|
440
|
+
* Updates the number of participants for a class or course booking and changes
|
|
441
|
+
* the `totalNumberOfParticipants` for the relevant sessions.
|
|
442
|
+
*
|
|
443
|
+
*
|
|
444
|
+
* ## Appointment limitation
|
|
445
|
+
*
|
|
446
|
+
* You can't update the number of participants for appointment bookings.
|
|
447
|
+
*
|
|
448
|
+
* ## Participant information
|
|
449
|
+
*
|
|
450
|
+
* You must specify either `participantsChoices` or `totalParticipants`.
|
|
451
|
+
* The call fails if the specified `participantsChoices` aren't among the
|
|
452
|
+
* supported service options and variants
|
|
453
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
|
|
454
|
+
*/
|
|
455
|
+
export declare function bookingsUpdateNumberOfParticipants(payload: object): RequestOptionsFactory<any>;
|
|
456
|
+
/**
|
|
457
|
+
* Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based
|
|
458
|
+
* on the `paymentStatus` you provide, double booking conflicts, and whether
|
|
459
|
+
* the service requires business approval.
|
|
460
|
+
*
|
|
461
|
+
* ## eCommerce checkout restriction
|
|
462
|
+
*
|
|
463
|
+
* Call this method only when using a custom checkout page. Don't
|
|
464
|
+
* call it when using a Wix eCommerce checkout
|
|
465
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
|
|
466
|
+
* In such cases, Wix automatically updates the booking status based on
|
|
467
|
+
* the `paymentStatus` of the corresponding Wix eCommerce order
|
|
468
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).
|
|
469
|
+
*
|
|
470
|
+
* ## New booking status
|
|
471
|
+
*
|
|
472
|
+
* The booking `status` is set to `DECLINED` if both of the following conditions
|
|
473
|
+
* are met:
|
|
474
|
+
* + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status.
|
|
475
|
+
* + There is a double booking conflict.
|
|
476
|
+
*
|
|
477
|
+
* If only one or none of these conditions is met, `status` is set to `PENDING`
|
|
478
|
+
* or `CONFIRMED` depending on whether the service requires business approval.
|
|
479
|
+
*
|
|
480
|
+
* ## Double bookings
|
|
481
|
+
*
|
|
482
|
+
* If there is a double booking conflict, but the booking has already been at least
|
|
483
|
+
* partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`.
|
|
484
|
+
* Then, it also sets `doubleBooked` to `true`.
|
|
485
|
+
*
|
|
486
|
+
* ## Admin overwrites
|
|
487
|
+
*
|
|
488
|
+
* There are small but important differences in confirmation behavior if the
|
|
489
|
+
* booking was created with special `flowControlSettings`:
|
|
490
|
+
* + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to
|
|
491
|
+
* `true`, the booking is never declined regardless of double booking conflicts.
|
|
492
|
+
* Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the
|
|
493
|
+
* service requires business approval.
|
|
494
|
+
* + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to
|
|
495
|
+
* `true`, the booking skips `PENDING` status and is marked `CONFIRMED`
|
|
496
|
+
* immediately.
|
|
497
|
+
*/
|
|
498
|
+
export declare function confirmOrDeclineBooking(payload: object): RequestOptionsFactory<any>;
|
|
499
|
+
/**
|
|
500
|
+
* Confirms or declines up to 300 bookings.
|
|
501
|
+
*
|
|
502
|
+
*
|
|
503
|
+
* See Confirm Or Decline Booking
|
|
504
|
+
* ([SDK](https://dev.wix.com/docs/velo/api-reference/wix-bookings-v2/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking))
|
|
505
|
+
* for details about when a booking is confirmed or declined.
|
|
506
|
+
*/
|
|
507
|
+
export declare function bulkConfirmOrDeclineBooking(payload: object): RequestOptionsFactory<any>;
|