@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,625 @@
|
|
|
1
|
+
import { EventDefinition, HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { AddBookingsToMultiServiceBookingOptions, AddBookingsToMultiServiceBookingResponse, AddBookingsToMultiServiceBookingResponseNonNullableFields, Booking, BookingCanceledEnvelope, BookingConfirmedEnvelope, BookingCreatedEnvelope, BookingDeclinedEnvelope, BookingNumberOfParticipantsUpdatedEnvelope, BookingRescheduledEnvelope, BookingUpdatedEnvelope, BulkConfirmOrDeclineBookingOptions, BulkConfirmOrDeclineBookingRequestBookingDetails, BulkConfirmOrDeclineBookingResponse, BulkConfirmOrDeclineBookingResponseNonNullableFields, BulkCreateBookingOptions, BulkCreateBookingResponse, BulkCreateBookingResponseNonNullableFields, BulkGetMultiServiceBookingAllowedActionsResponse, BulkGetMultiServiceBookingAllowedActionsResponseNonNullableFields, CancelBookingOptions, CancelBookingResponse, CancelBookingResponseNonNullableFields, CancelMultiServiceBookingOptions, CancelMultiServiceBookingResponse, CancelMultiServiceBookingResponseNonNullableFields, ConfirmBookingOptions, ConfirmBookingResponse, ConfirmBookingResponseNonNullableFields, ConfirmMultiServiceBookingOptions, ConfirmMultiServiceBookingResponse, ConfirmMultiServiceBookingResponseNonNullableFields, ConfirmOrDeclineBookingOptions, ConfirmOrDeclineBookingResponse, ConfirmOrDeclineBookingResponseNonNullableFields, CreateBookingInfo, CreateBookingOptions, CreateBookingResponse, CreateBookingResponseNonNullableFields, CreateMultiServiceBookingOptions, CreateMultiServiceBookingResponse, CreateMultiServiceBookingResponseNonNullableFields, DeclineBookingOptions, DeclineBookingResponse, DeclineBookingResponseNonNullableFields, DeclineMultiServiceBookingOptions, DeclineMultiServiceBookingResponse, DeclineMultiServiceBookingResponseNonNullableFields, GetMultiServiceBookingAvailabilityResponse, GetMultiServiceBookingAvailabilityResponseNonNullableFields, MarkMultiServiceBookingAsPendingOptions, MarkMultiServiceBookingAsPendingResponse, MarkMultiServiceBookingAsPendingResponseNonNullableFields, MultiServiceBooking, MultiServiceBookingNonNullableFields, RemoveBookingsFromMultiServiceBookingOptions, RemoveBookingsFromMultiServiceBookingResponse, RemoveBookingsFromMultiServiceBookingResponseNonNullableFields, RescheduleBookingInfo, RescheduleBookingOptions, RescheduleBookingResponse, RescheduleBookingResponseNonNullableFields, RescheduleMultiServiceBookingOptions, RescheduleMultiServiceBookingResponse, RescheduleMultiServiceBookingResponseNonNullableFields, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateExtendedFieldsResponseNonNullableFields, UpdateNumberOfParticipantsOptions, UpdateNumberOfParticipantsResponse, UpdateNumberOfParticipantsResponseNonNullableFields, V2Slot } from './bookings-v2-booking-bookings.universal.js';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function createMultiServiceBooking(httpClient: HttpClient): CreateMultiServiceBookingSignature;
|
|
7
|
+
interface CreateMultiServiceBookingSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a multi-service booking.
|
|
10
|
+
*
|
|
11
|
+
*
|
|
12
|
+
* See Create Booking for more information.
|
|
13
|
+
* @param - Single-service bookings to combine in a multi-service booking.
|
|
14
|
+
*/
|
|
15
|
+
(bookings: Booking[], options?: CreateMultiServiceBookingOptions | undefined): Promise<CreateMultiServiceBookingResponse & CreateMultiServiceBookingResponseNonNullableFields>;
|
|
16
|
+
}
|
|
17
|
+
export declare function rescheduleMultiServiceBooking(httpClient: HttpClient): RescheduleMultiServiceBookingSignature;
|
|
18
|
+
interface RescheduleMultiServiceBookingSignature {
|
|
19
|
+
/**
|
|
20
|
+
* Reschedules a multi-service booking.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* The call fails if at least 1 individual booking can't be rescheduled due
|
|
24
|
+
* the service being unavailable or a rescheduling policy violation.
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* See Reschedule Booking for more information.
|
|
28
|
+
* @param - ID of the multi service booking to reschedule.
|
|
29
|
+
* @param - Information about the single-service bookings to reschedule.
|
|
30
|
+
*/
|
|
31
|
+
(multiServiceBookingId: string | null, rescheduleBookingsInfo: RescheduleBookingInfo[], options?: RescheduleMultiServiceBookingOptions | undefined): Promise<RescheduleMultiServiceBookingResponse & RescheduleMultiServiceBookingResponseNonNullableFields>;
|
|
32
|
+
}
|
|
33
|
+
export declare function getMultiServiceBookingAvailability(httpClient: HttpClient): GetMultiServiceBookingAvailabilitySignature;
|
|
34
|
+
interface GetMultiServiceBookingAvailabilitySignature {
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves a multi-service booking's availability.
|
|
37
|
+
*
|
|
38
|
+
*
|
|
39
|
+
* Use List Multi Service Availability Time Slots to check availability for a
|
|
40
|
+
* `SEQUENTIAL_BOOKINGS` multi-service booking.
|
|
41
|
+
* @param - ID of the multi-service booking to retrieve.
|
|
42
|
+
*/
|
|
43
|
+
(multiServiceBookingId: string | null): Promise<GetMultiServiceBookingAvailabilityResponse & GetMultiServiceBookingAvailabilityResponseNonNullableFields>;
|
|
44
|
+
}
|
|
45
|
+
export declare function cancelMultiServiceBooking(httpClient: HttpClient): CancelMultiServiceBookingSignature;
|
|
46
|
+
interface CancelMultiServiceBookingSignature {
|
|
47
|
+
/**
|
|
48
|
+
* Cancels a multi-service booking and thus all its individual bookings.
|
|
49
|
+
* @param - ID of the multi-service booking to cancel.
|
|
50
|
+
*/
|
|
51
|
+
(multiServiceBookingId: string | null, options?: CancelMultiServiceBookingOptions | undefined): Promise<CancelMultiServiceBookingResponse & CancelMultiServiceBookingResponseNonNullableFields>;
|
|
52
|
+
}
|
|
53
|
+
export declare function markMultiServiceBookingAsPending(httpClient: HttpClient): MarkMultiServiceBookingAsPendingSignature;
|
|
54
|
+
interface MarkMultiServiceBookingAsPendingSignature {
|
|
55
|
+
/**
|
|
56
|
+
* Updates the status of a multi-service booking to `PENDING`.
|
|
57
|
+
*
|
|
58
|
+
*
|
|
59
|
+
* Also updates the status of each of individual bookings within the multi-service booking to `PENDING`.
|
|
60
|
+
*
|
|
61
|
+
* The call fails if the status for at least a single individual booking can't be updated.
|
|
62
|
+
*
|
|
63
|
+
* See Mark Booking as Pending for more information.
|
|
64
|
+
* @param - ID of the multi-service booking to mark as `PENDING`.
|
|
65
|
+
*/
|
|
66
|
+
(multiServiceBookingId: string | null, options?: MarkMultiServiceBookingAsPendingOptions | undefined): Promise<MarkMultiServiceBookingAsPendingResponse & MarkMultiServiceBookingAsPendingResponseNonNullableFields>;
|
|
67
|
+
}
|
|
68
|
+
export declare function confirmMultiServiceBooking(httpClient: HttpClient): ConfirmMultiServiceBookingSignature;
|
|
69
|
+
interface ConfirmMultiServiceBookingSignature {
|
|
70
|
+
/**
|
|
71
|
+
* Updates the status of a multi-service booking to `CONFIRMED`.
|
|
72
|
+
*
|
|
73
|
+
*
|
|
74
|
+
* Also updates the status of each of individual bookings within the multi-service booking to `CONFIRMED`.
|
|
75
|
+
*
|
|
76
|
+
* The call fails if the status for at least a single individual booking can't be updated.
|
|
77
|
+
*
|
|
78
|
+
* See Confirm Booking for more information.
|
|
79
|
+
* @param - ID of the multi-service booking to confirm its related bookings.
|
|
80
|
+
*/
|
|
81
|
+
(multiServiceBookingId: string | null, options?: ConfirmMultiServiceBookingOptions | undefined): Promise<ConfirmMultiServiceBookingResponse & ConfirmMultiServiceBookingResponseNonNullableFields>;
|
|
82
|
+
}
|
|
83
|
+
export declare function declineMultiServiceBooking(httpClient: HttpClient): DeclineMultiServiceBookingSignature;
|
|
84
|
+
interface DeclineMultiServiceBookingSignature {
|
|
85
|
+
/**
|
|
86
|
+
* Updates the status of a multi-service booking to `DECLINED`.
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
* Also updates the status of each of individual bookings within the multi-service booking to `DECLINED`.
|
|
90
|
+
*
|
|
91
|
+
* The call fails if the status for at least a single individual booking can't be updated.
|
|
92
|
+
*
|
|
93
|
+
* See Decline Booking for more information.
|
|
94
|
+
* @param - ID of the multi service booking to decline.
|
|
95
|
+
*/
|
|
96
|
+
(multiServiceBookingId: string | null, options?: DeclineMultiServiceBookingOptions | undefined): Promise<DeclineMultiServiceBookingResponse & DeclineMultiServiceBookingResponseNonNullableFields>;
|
|
97
|
+
}
|
|
98
|
+
export declare function bulkGetMultiServiceBookingAllowedActions(httpClient: HttpClient): BulkGetMultiServiceBookingAllowedActionsSignature;
|
|
99
|
+
interface BulkGetMultiServiceBookingAllowedActionsSignature {
|
|
100
|
+
/**
|
|
101
|
+
* Retrieves the allowed actions for a list of multi-service bookings.
|
|
102
|
+
* @param - IDs of the multi-service bookings to retrieve allowed actions for.
|
|
103
|
+
*/
|
|
104
|
+
(multiServiceBookingIds: string[] | null): Promise<BulkGetMultiServiceBookingAllowedActionsResponse & BulkGetMultiServiceBookingAllowedActionsResponseNonNullableFields>;
|
|
105
|
+
}
|
|
106
|
+
export declare function getMultiServiceBooking(httpClient: HttpClient): GetMultiServiceBookingSignature;
|
|
107
|
+
interface GetMultiServiceBookingSignature {
|
|
108
|
+
/**
|
|
109
|
+
* Retrieves all single-service bookings belonging to a multi-service booking.
|
|
110
|
+
*
|
|
111
|
+
*
|
|
112
|
+
* If you call as an [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities)
|
|
113
|
+
* who has permissions to read only part of the bookings,
|
|
114
|
+
* only the permitted bookings are retrieved. The returned total number of
|
|
115
|
+
* bookings includes also the bookings for which you don't have permissions.
|
|
116
|
+
* @param - ID of the multi-service booking.
|
|
117
|
+
* @returns Retrieved multi-service booking.
|
|
118
|
+
*/
|
|
119
|
+
(multiServiceBookingId: string | null): Promise<MultiServiceBooking & MultiServiceBookingNonNullableFields>;
|
|
120
|
+
}
|
|
121
|
+
export declare function addBookingsToMultiServiceBooking(httpClient: HttpClient): AddBookingsToMultiServiceBookingSignature;
|
|
122
|
+
interface AddBookingsToMultiServiceBookingSignature {
|
|
123
|
+
/**
|
|
124
|
+
* Adds a list of single-service bookings to a multi-service booking.
|
|
125
|
+
*
|
|
126
|
+
*
|
|
127
|
+
* The call fails, if at least 1 of the specified booking is already part of a
|
|
128
|
+
* multi-service booking.
|
|
129
|
+
* @param - ID of the multi-service booking.
|
|
130
|
+
*/
|
|
131
|
+
(multiServiceBookingId: string | null, options?: AddBookingsToMultiServiceBookingOptions | undefined): Promise<AddBookingsToMultiServiceBookingResponse & AddBookingsToMultiServiceBookingResponseNonNullableFields>;
|
|
132
|
+
}
|
|
133
|
+
export declare function removeBookingsFromMultiServiceBooking(httpClient: HttpClient): RemoveBookingsFromMultiServiceBookingSignature;
|
|
134
|
+
interface RemoveBookingsFromMultiServiceBookingSignature {
|
|
135
|
+
/**
|
|
136
|
+
* Removes single-service bookings from a multi-service booking and returns the
|
|
137
|
+
* removed bookings.
|
|
138
|
+
*
|
|
139
|
+
*
|
|
140
|
+
* If you specify an empty `bookings` array, all single-service bookings for which
|
|
141
|
+
* the call's [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities)
|
|
142
|
+
* has read permissions are removed from the multi-service booking.
|
|
143
|
+
*
|
|
144
|
+
* If the call would create a multi-service booking including only 1 single-service
|
|
145
|
+
* booking, the multi-service booking is also deleted.
|
|
146
|
+
* @param - ID of the multi-service booking.
|
|
147
|
+
*/
|
|
148
|
+
(multiServiceBookingId: string | null, options?: RemoveBookingsFromMultiServiceBookingOptions | undefined): Promise<RemoveBookingsFromMultiServiceBookingResponse & RemoveBookingsFromMultiServiceBookingResponseNonNullableFields>;
|
|
149
|
+
}
|
|
150
|
+
export declare function createBooking(httpClient: HttpClient): CreateBookingSignature;
|
|
151
|
+
interface CreateBookingSignature {
|
|
152
|
+
/**
|
|
153
|
+
* Creates a booking.
|
|
154
|
+
*
|
|
155
|
+
*
|
|
156
|
+
* ## Appointment booking
|
|
157
|
+
*
|
|
158
|
+
* For appointment-based services, specify the relevant `slot` in
|
|
159
|
+
* `bookedEntity.slot`. We recommend specifying the complete
|
|
160
|
+
* `availabilityEntries.slot` returned in Query Availability
|
|
161
|
+
* ([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))
|
|
162
|
+
* in your call's request to avoid failed calls due to unavailability.
|
|
163
|
+
*
|
|
164
|
+
* ## Class session booking
|
|
165
|
+
*
|
|
166
|
+
* For class services, specify the relevant event ID
|
|
167
|
+
* ([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))
|
|
168
|
+
* as `bookedEntity.slot.eventId`.
|
|
169
|
+
* We recommend retrieving the event ID from Query Availability's
|
|
170
|
+
* ([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))
|
|
171
|
+
* `availabilityEntries.slot.eventId` to avoid failed calls due to unavailability.
|
|
172
|
+
* Specifying an event ID leads to automatic calculations of `slot.startDate`, `slot.endDate`,
|
|
173
|
+
* `slot.timezone`, `slot.resource`, and `slot.location`. All manually specified
|
|
174
|
+
* values are overridden.
|
|
175
|
+
*
|
|
176
|
+
* ## Course booking
|
|
177
|
+
*
|
|
178
|
+
* For course services, specify the course's schedule ID in `bookedEntity.schedule.scheduleId`.
|
|
179
|
+
* We recommend following [this sample flow](https://dev.wix.com/docs/rest/business-solutions/bookings/sample-booking-flows#book-a-course)
|
|
180
|
+
* to minimize failed calls due to unavailability.
|
|
181
|
+
*
|
|
182
|
+
* ## Related resources
|
|
183
|
+
*
|
|
184
|
+
* Specifying a `resource` triggers an availability check, resulting in a failed
|
|
185
|
+
* call if the resource is unavailable. Omitting a resource allows Wix Bookings
|
|
186
|
+
* to assign a resource belonging to the relevant type randomly when the merchant
|
|
187
|
+
* confirms the booking.
|
|
188
|
+
*
|
|
189
|
+
* ## Participant information
|
|
190
|
+
*
|
|
191
|
+
* You must specify either `participantsChoices` or `totalParticipants`.
|
|
192
|
+
* The call fails if the specified `participantsChoices` aren't among the supported
|
|
193
|
+
* service options and variants
|
|
194
|
+
* ([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)).
|
|
195
|
+
*
|
|
196
|
+
* ## Notify customers
|
|
197
|
+
*
|
|
198
|
+
* You can specify a `participantNotification.message` for the customer that's send
|
|
199
|
+
* immediately. Ensure `participantNotification.notifyParticipants` is set to `true`
|
|
200
|
+
* to send the message.
|
|
201
|
+
*
|
|
202
|
+
* If you specify `{"sendSmsReminder": true}`, the customer receives an SMS 24 hours
|
|
203
|
+
* before the session starts. The phone number is taken from `contactDetails.phone`.
|
|
204
|
+
*
|
|
205
|
+
* ## Booking status
|
|
206
|
+
*
|
|
207
|
+
* Bookings default to the `CREATED` status, not affecting the business calendar
|
|
208
|
+
* or resource availability. You can specify a different status when the calling
|
|
209
|
+
* [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities)
|
|
210
|
+
* has `Manage Bookings` permissions.
|
|
211
|
+
*
|
|
212
|
+
* ## Payment options
|
|
213
|
+
*
|
|
214
|
+
* The specified `selectedPaymentOption` indicates how the customer intends to
|
|
215
|
+
* pay, allowing for later changes to a different method supported by the service.
|
|
216
|
+
*
|
|
217
|
+
* ## Payment status
|
|
218
|
+
*
|
|
219
|
+
* A booking is initially created with `{"paymentStatus": "UNDEFINED"}` regardless
|
|
220
|
+
* of the payment status specified in Create Booking. If a customer uses an eCommerce
|
|
221
|
+
* 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)),
|
|
222
|
+
* Wix Bookings automatically syncs the booking's payment status from
|
|
223
|
+
* 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)).
|
|
224
|
+
*
|
|
225
|
+
* If a booking doesn't have a corresponding eCommerce order, for example, since
|
|
226
|
+
* the customer didn't use the eCommerce checkout, you can update the booking's
|
|
227
|
+
* payment status with Confirm Or Decline Booking
|
|
228
|
+
* ([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)).
|
|
229
|
+
*
|
|
230
|
+
* ## Booking form data
|
|
231
|
+
*
|
|
232
|
+
* When customers sign up for a service, they must fill out the booking form.
|
|
233
|
+
* To create a booking with a completed booking form, specify the relevant data in
|
|
234
|
+
* `formSubmission`. Ensure the values of the corresponding fields in
|
|
235
|
+
* `booking.contactDetails` and `formSubmission` are identical. If these values
|
|
236
|
+
* don't match, Create Booking fails. Therefore, we recommend specifying
|
|
237
|
+
* only `booking.contactDetails.contactId` when providing `formSubmission`.
|
|
238
|
+
*
|
|
239
|
+
* ## Admin overwrites
|
|
240
|
+
*
|
|
241
|
+
* There are small but important differences when you specify special
|
|
242
|
+
* `flowControlSettings`:
|
|
243
|
+
*
|
|
244
|
+
* - `{"skipAvailabilityValidation": true}`: The call succeeds
|
|
245
|
+
* regardless of availability. If you don't specify any resource, the call
|
|
246
|
+
* succeeds even if no resource of the relevant type is available.
|
|
247
|
+
* - `{"skipBusinessConfirmation": true}`: Automatically confirms `PENDING`
|
|
248
|
+
* bookings that require manual confirmation.
|
|
249
|
+
* - `{"skipSelectedPaymentOptionValidation": true}`: Allows customers to pay
|
|
250
|
+
* with payment methods that aren't supported for the service.
|
|
251
|
+
*
|
|
252
|
+
* When using special `flowControlSettings`, ensure you have sufficient
|
|
253
|
+
* permissions. If you encounter failed calls due to insufficient permissions,
|
|
254
|
+
* consider the following options:
|
|
255
|
+
*
|
|
256
|
+
* - **App developers** can use a higher
|
|
257
|
+
* [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),
|
|
258
|
+
* such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
|
|
259
|
+
* - **Site developers** can utilize
|
|
260
|
+
* [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
|
|
261
|
+
*
|
|
262
|
+
* Granting additional permissions and using elevation permits method calls that
|
|
263
|
+
* would typically fail due to authorization checks. Therefore, you should use
|
|
264
|
+
* them intentionally and securely.
|
|
265
|
+
* @param - The booking to create.
|
|
266
|
+
*/
|
|
267
|
+
(booking: Booking, options?: CreateBookingOptions | undefined): Promise<CreateBookingResponse & CreateBookingResponseNonNullableFields>;
|
|
268
|
+
}
|
|
269
|
+
export declare function bulkCreateBooking(httpClient: HttpClient): BulkCreateBookingSignature;
|
|
270
|
+
interface BulkCreateBookingSignature {
|
|
271
|
+
/**
|
|
272
|
+
* Creates up to 8 bookings.
|
|
273
|
+
*
|
|
274
|
+
*
|
|
275
|
+
* 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))
|
|
276
|
+
* for more information.
|
|
277
|
+
*
|
|
278
|
+
* If any of the specified bookings is missing a required field the entire call
|
|
279
|
+
* fails.
|
|
280
|
+
*
|
|
281
|
+
* If you specify 1 or more unavailable bookings, the call succeeds
|
|
282
|
+
* while the unavailable bookings aren't created. Instead, they're counted as
|
|
283
|
+
* failures in the returned `bulkActionMetadata`.
|
|
284
|
+
* @param - Bookings to create.
|
|
285
|
+
*
|
|
286
|
+
* Max: 8 bookings
|
|
287
|
+
*/
|
|
288
|
+
(createBookingsInfo: CreateBookingInfo[], options?: BulkCreateBookingOptions | undefined): Promise<BulkCreateBookingResponse & BulkCreateBookingResponseNonNullableFields>;
|
|
289
|
+
}
|
|
290
|
+
export declare function rescheduleBooking(httpClient: HttpClient): RescheduleBookingSignature;
|
|
291
|
+
interface RescheduleBookingSignature {
|
|
292
|
+
/**
|
|
293
|
+
* Reschedules an appointment booking to a different slot or a class booking to
|
|
294
|
+
* a different session.
|
|
295
|
+
*
|
|
296
|
+
*
|
|
297
|
+
* ## Course booking limitation
|
|
298
|
+
*
|
|
299
|
+
* You can't reschedule course bookings.
|
|
300
|
+
*
|
|
301
|
+
* ## Appointment sessions
|
|
302
|
+
*
|
|
303
|
+
* For appointments, the old session is removed from the business calendar
|
|
304
|
+
* while a new session is added. We recommend calling Query Availability
|
|
305
|
+
* ([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))
|
|
306
|
+
* first and specifying the entire retrieved `slot`.
|
|
307
|
+
*
|
|
308
|
+
* ## Class sessions
|
|
309
|
+
*
|
|
310
|
+
* For classes, the new session must be an existing session belonging to the
|
|
311
|
+
* same class. We recommend retrieving `availabilityEntries.slot.eventId`
|
|
312
|
+
* from Query Availability
|
|
313
|
+
* ([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))
|
|
314
|
+
* to avoid failed Reschedule Booking calls due to unavailability. Specify
|
|
315
|
+
* only `slot.eventId` instead of the entire `slot` object.
|
|
316
|
+
*
|
|
317
|
+
* ## Notify customers
|
|
318
|
+
*
|
|
319
|
+
* You can specify a `participantNotification.message` for the customer. To send
|
|
320
|
+
* the message, you must also specify `participantNotification.notifyParticipants`
|
|
321
|
+
* as `true`.
|
|
322
|
+
*
|
|
323
|
+
* ## Admin overwrites
|
|
324
|
+
*
|
|
325
|
+
* There are small but important differences when you specify special
|
|
326
|
+
* `flowControlSettings`:
|
|
327
|
+
*
|
|
328
|
+
* - `{"ignoreReschedulePolicy": true}`: The call succeeds even if the
|
|
329
|
+
* service's `reschedulePolicy` doesn't allow it.
|
|
330
|
+
* - `{"skipAvailabilityValidation": true}`: The call succeeds even if
|
|
331
|
+
* the specified session, slot, or resource isn't available. If you don't
|
|
332
|
+
* specify any resource, the call succeeds even if no resource of the relevant
|
|
333
|
+
* type is available.
|
|
334
|
+
* - `{"skipBusinessConfirmation": true}`: Any `PENDING` booking is
|
|
335
|
+
* automatically confirmed even if the services requires the merchants's
|
|
336
|
+
* manual confirmation.
|
|
337
|
+
*
|
|
338
|
+
* When using special `flowControlSettings`, ensure you have sufficient
|
|
339
|
+
* permissions. If you encounter failed calls due to insufficient permissions,
|
|
340
|
+
* consider the following options:
|
|
341
|
+
*
|
|
342
|
+
* - **App developers** can use a higher
|
|
343
|
+
* [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),
|
|
344
|
+
* such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
|
|
345
|
+
* - **Site developers** can utilize
|
|
346
|
+
* [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
|
|
347
|
+
*
|
|
348
|
+
* Granting additional permissions and using elevation permits method calls that
|
|
349
|
+
* would typically fail due to authorization checks. Therefore, you should use
|
|
350
|
+
* them intentionally and securely.
|
|
351
|
+
* @param - ID of the booking to reschedule.
|
|
352
|
+
* @param - New slot of the booking.
|
|
353
|
+
* @param - An object representing the available options for rescheduling a booking.
|
|
354
|
+
*/
|
|
355
|
+
(bookingId: string, slot: V2Slot, options?: RescheduleBookingOptions | undefined): Promise<RescheduleBookingResponse & RescheduleBookingResponseNonNullableFields>;
|
|
356
|
+
}
|
|
357
|
+
export declare function confirmBooking(httpClient: HttpClient): ConfirmBookingSignature;
|
|
358
|
+
interface ConfirmBookingSignature {
|
|
359
|
+
/**
|
|
360
|
+
* Updates the booking status to `CONFIRMED` and updates the relevant session's
|
|
361
|
+
* `participants.approvalStatus` to `APPROVED` without checking whether the relevant
|
|
362
|
+
* slot or schedule is still available.
|
|
363
|
+
*
|
|
364
|
+
* ## eCommerce checkout restriction
|
|
365
|
+
*
|
|
366
|
+
* Call this method only when using a custom checkout page. Don't
|
|
367
|
+
* call it when using a Wix eCommerce checkout
|
|
368
|
+
* ([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)).
|
|
369
|
+
* In such cases, Wix automatically updates the booking status based on
|
|
370
|
+
* the `paymentStatus` of the corresponding Wix eCommerce order
|
|
371
|
+
* ([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)).
|
|
372
|
+
*
|
|
373
|
+
* ## When to call Confirm Or Decline Booking instead
|
|
374
|
+
*
|
|
375
|
+
* Confirm Booking doesn't check whether a slot or schedule is still available. For
|
|
376
|
+
* these checks you can call Confirm or Decline Booking
|
|
377
|
+
* ([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)).
|
|
378
|
+
*
|
|
379
|
+
* ## Original status validation
|
|
380
|
+
*
|
|
381
|
+
* You can only confirm bookings with a status of `PENDING`, `CREATED`, or
|
|
382
|
+
* `WAITING_LIST`.
|
|
383
|
+
*
|
|
384
|
+
* ## Double bookings
|
|
385
|
+
*
|
|
386
|
+
* Confirm Booking doesn't check whether a slot or schedule is still available.
|
|
387
|
+
* You can specify
|
|
388
|
+
*
|
|
389
|
+
* ```json
|
|
390
|
+
* {
|
|
391
|
+
* "flowControlSettings": {
|
|
392
|
+
* "checkAvailabilityValidation": true
|
|
393
|
+
* },
|
|
394
|
+
* "doubleBooked": true
|
|
395
|
+
* }
|
|
396
|
+
* ```
|
|
397
|
+
* to forcefully set the booking's `doubleBooked` flag to `true`, regardless of
|
|
398
|
+
* a potential double booking conflict. You must call with `Manage Bookings`
|
|
399
|
+
* permissions to do so. For the default flow control settings
|
|
400
|
+
* `{"checkAvailabilityValidation": false}`, the specified `doubleBooked` value
|
|
401
|
+
* is ignored.
|
|
402
|
+
*
|
|
403
|
+
* ## Payment status
|
|
404
|
+
*
|
|
405
|
+
* Also updates the booking's `paymentStatus`, if you specify a new payment
|
|
406
|
+
* status.
|
|
407
|
+
*
|
|
408
|
+
* ## Notify customers
|
|
409
|
+
*
|
|
410
|
+
* You can specify a `participantNotification.message` for the customer. To send
|
|
411
|
+
* the message, you must also specify `participantNotification.notifyParticipants`
|
|
412
|
+
* as `true`.
|
|
413
|
+
* @param - ID of the booking to confirm.
|
|
414
|
+
* @param - Revision number, which increments by 1 each time the booking is updated.
|
|
415
|
+
* To prevent conflicting changes, the current revision must be passed when
|
|
416
|
+
* updating the booking.
|
|
417
|
+
* @param - An object representing the available options for canceling a booking.
|
|
418
|
+
*/
|
|
419
|
+
(bookingId: string, revision: string | null, options?: ConfirmBookingOptions | undefined): Promise<ConfirmBookingResponse & ConfirmBookingResponseNonNullableFields>;
|
|
420
|
+
}
|
|
421
|
+
export declare function updateExtendedFields(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
422
|
+
interface UpdateExtendedFieldsSignature {
|
|
423
|
+
/**
|
|
424
|
+
* Updates the extended fields for a booking.
|
|
425
|
+
*
|
|
426
|
+
*
|
|
427
|
+
* If you specify an extended field `namespace` that doesn't exist yet, it's
|
|
428
|
+
* created.
|
|
429
|
+
*
|
|
430
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/about-backend-extensions#schema-plugin-extensions).
|
|
431
|
+
* @param - ID of the booking for which to update extended fields.
|
|
432
|
+
* @param - [Namespace](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-reading-and-writing-schema-plugin-fields#namespaces) of the app for which to update extended fields.
|
|
433
|
+
* @param - Options for updating the booking's extended fields.
|
|
434
|
+
*/
|
|
435
|
+
(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
|
|
436
|
+
}
|
|
437
|
+
export declare function declineBooking(httpClient: HttpClient): DeclineBookingSignature;
|
|
438
|
+
interface DeclineBookingSignature {
|
|
439
|
+
/**
|
|
440
|
+
* Updates the booking status to `DECLINED` and updates the relevant session's
|
|
441
|
+
* `participants.approvalStatus` to `DECLINED` without checking whether the relevant
|
|
442
|
+
* slot or schedule is still available.
|
|
443
|
+
*
|
|
444
|
+
*
|
|
445
|
+
* ## eCommerce checkout restriction
|
|
446
|
+
*
|
|
447
|
+
* Call this method only when using a custom checkout page. Don't
|
|
448
|
+
* call it when using a Wix eCommerce checkout
|
|
449
|
+
* ([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)).
|
|
450
|
+
* In such cases, Wix automatically updates the booking status based on
|
|
451
|
+
* the `paymentStatus` of the corresponding Wix eCommerce order
|
|
452
|
+
* ([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)).
|
|
453
|
+
*
|
|
454
|
+
* ## When to call Confirm Or Decline Booking instead
|
|
455
|
+
*
|
|
456
|
+
* The method doesn't check whether a slot or schedule is still available. For
|
|
457
|
+
* these checks you can call Confirm or Decline Booking
|
|
458
|
+
* ([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)).
|
|
459
|
+
*
|
|
460
|
+
* ## Original status validation
|
|
461
|
+
*
|
|
462
|
+
* You can only decline bookings with a `status` of `PENDING`, `CREATED`, or
|
|
463
|
+
* `WAITING_LIST`.
|
|
464
|
+
*
|
|
465
|
+
* ## Payment status
|
|
466
|
+
*
|
|
467
|
+
* Also updates the booking's `paymentStatus`, if you specify a new payment
|
|
468
|
+
* status.
|
|
469
|
+
*
|
|
470
|
+
* ## Notify customers
|
|
471
|
+
*
|
|
472
|
+
* You can specify a `participantNotification.message` for the customer. To send
|
|
473
|
+
* the message, you must also specify `participantNotification.notifyParticipants`
|
|
474
|
+
* as `true`.
|
|
475
|
+
* @param - ID of the booking to decline.
|
|
476
|
+
* @param - Revision number, which increments by 1 each time the booking is updated.
|
|
477
|
+
*
|
|
478
|
+
* To prevent conflicting changes, the current revision must be specified when
|
|
479
|
+
* declining the booking.
|
|
480
|
+
* @param - An object representing the available options for declining a booking.
|
|
481
|
+
*/
|
|
482
|
+
(bookingId: string, revision: string | null, options?: DeclineBookingOptions | undefined): Promise<DeclineBookingResponse & DeclineBookingResponseNonNullableFields>;
|
|
483
|
+
}
|
|
484
|
+
export declare function cancelBooking(httpClient: HttpClient): CancelBookingSignature;
|
|
485
|
+
interface CancelBookingSignature {
|
|
486
|
+
/**
|
|
487
|
+
* Updates the booking status to `CANCELED`.
|
|
488
|
+
*
|
|
489
|
+
*
|
|
490
|
+
* ## Appointments
|
|
491
|
+
*
|
|
492
|
+
* For appointments, the corresponding event is removed from the Bookings
|
|
493
|
+
* calendar.
|
|
494
|
+
*
|
|
495
|
+
* ## Class and course bookings
|
|
496
|
+
*
|
|
497
|
+
* For class or course bookings, the relevant participants are removed
|
|
498
|
+
* from the class session or the course. However, the class session or course
|
|
499
|
+
* remain on the business calendar.
|
|
500
|
+
*
|
|
501
|
+
* ## Notify customers
|
|
502
|
+
*
|
|
503
|
+
* You can specify a `participantNotification.message` for the customer. To send
|
|
504
|
+
* the message, you must also specify `participantNotification.notifyParticipants`
|
|
505
|
+
* as `true`.
|
|
506
|
+
*
|
|
507
|
+
* ## Admin overwrites
|
|
508
|
+
*
|
|
509
|
+
* There are small but important differences when you specify special
|
|
510
|
+
* `flowControlSettings`:
|
|
511
|
+
*
|
|
512
|
+
* - `{"ignoreCancellationPolicy": true}`: The call succeeds even if the
|
|
513
|
+
* service's `cancellationPolicy` doesn't allow it.
|
|
514
|
+
* - `{"withRefund": true}`: The customer is refunded even if the service's
|
|
515
|
+
* `refundPolicy` doesn't allow it.
|
|
516
|
+
* - `{"waiveCancellationFee": true}`: The customer doesn't have to pay
|
|
517
|
+
* the cancellation fee, even if the service's `cancellationPolicy` requires it.
|
|
518
|
+
*
|
|
519
|
+
* When using special `flowControlSettings`, ensure you have sufficient
|
|
520
|
+
* permissions. If you encounter failed calls due to insufficient permissions,
|
|
521
|
+
* consider the following options:
|
|
522
|
+
*
|
|
523
|
+
* - **App developers** can use a higher
|
|
524
|
+
* [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),
|
|
525
|
+
* such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
|
|
526
|
+
* - **Site developers** can utilize
|
|
527
|
+
* [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
|
|
528
|
+
*
|
|
529
|
+
* Granting additional permissions and using elevation permits method calls that
|
|
530
|
+
* would typically fail due to authorization checks. Therefore, you should use
|
|
531
|
+
* them intentionally and securely.
|
|
532
|
+
* @param - ID of the booking to cancel.
|
|
533
|
+
* @param - An object representing the available options for canceling a booking.
|
|
534
|
+
*/
|
|
535
|
+
(bookingId: string, options?: CancelBookingOptions | undefined): Promise<CancelBookingResponse & CancelBookingResponseNonNullableFields>;
|
|
536
|
+
}
|
|
537
|
+
export declare function updateNumberOfParticipants(httpClient: HttpClient): UpdateNumberOfParticipantsSignature;
|
|
538
|
+
interface UpdateNumberOfParticipantsSignature {
|
|
539
|
+
/**
|
|
540
|
+
* Updates the number of participants for a class or course booking and changes
|
|
541
|
+
* the `totalNumberOfParticipants` for the relevant sessions.
|
|
542
|
+
*
|
|
543
|
+
*
|
|
544
|
+
* ## Appointment limitation
|
|
545
|
+
*
|
|
546
|
+
* You can't update the number of participants for appointment bookings.
|
|
547
|
+
*
|
|
548
|
+
* ## Participant information
|
|
549
|
+
*
|
|
550
|
+
* You must specify either `participantsChoices` or `totalParticipants`.
|
|
551
|
+
* The call fails if the specified `participantsChoices` aren't among the
|
|
552
|
+
* supported service options and variants
|
|
553
|
+
* ([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)).
|
|
554
|
+
* @param - ID of the booking to update the number of participants for.
|
|
555
|
+
*/
|
|
556
|
+
(bookingId: string, options?: UpdateNumberOfParticipantsOptions | undefined): Promise<UpdateNumberOfParticipantsResponse & UpdateNumberOfParticipantsResponseNonNullableFields>;
|
|
557
|
+
}
|
|
558
|
+
export declare function confirmOrDeclineBooking(httpClient: HttpClient): ConfirmOrDeclineBookingSignature;
|
|
559
|
+
interface ConfirmOrDeclineBookingSignature {
|
|
560
|
+
/**
|
|
561
|
+
* Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based
|
|
562
|
+
* on the `paymentStatus` you provide, double booking conflicts, and whether
|
|
563
|
+
* the service requires business approval.
|
|
564
|
+
*
|
|
565
|
+
* ## eCommerce checkout restriction
|
|
566
|
+
*
|
|
567
|
+
* Call this method only when using a custom checkout page. Don't
|
|
568
|
+
* call it when using a Wix eCommerce checkout
|
|
569
|
+
* ([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)).
|
|
570
|
+
* In such cases, Wix automatically updates the booking status based on
|
|
571
|
+
* the `paymentStatus` of the corresponding Wix eCommerce order
|
|
572
|
+
* ([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)).
|
|
573
|
+
*
|
|
574
|
+
* ## New booking status
|
|
575
|
+
*
|
|
576
|
+
* The booking `status` is set to `DECLINED` if both of the following conditions
|
|
577
|
+
* are met:
|
|
578
|
+
* + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status.
|
|
579
|
+
* + There is a double booking conflict.
|
|
580
|
+
*
|
|
581
|
+
* If only one or none of these conditions is met, `status` is set to `PENDING`
|
|
582
|
+
* or `CONFIRMED` depending on whether the service requires business approval.
|
|
583
|
+
*
|
|
584
|
+
* ## Double bookings
|
|
585
|
+
*
|
|
586
|
+
* If there is a double booking conflict, but the booking has already been at least
|
|
587
|
+
* partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`.
|
|
588
|
+
* Then, it also sets `doubleBooked` to `true`.
|
|
589
|
+
*
|
|
590
|
+
* ## Admin overwrites
|
|
591
|
+
*
|
|
592
|
+
* There are small but important differences in confirmation behavior if the
|
|
593
|
+
* booking was created with special `flowControlSettings`:
|
|
594
|
+
* + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to
|
|
595
|
+
* `true`, the booking is never declined regardless of double booking conflicts.
|
|
596
|
+
* Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the
|
|
597
|
+
* service requires business approval.
|
|
598
|
+
* + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to
|
|
599
|
+
* `true`, the booking skips `PENDING` status and is marked `CONFIRMED`
|
|
600
|
+
* immediately.
|
|
601
|
+
* @param - ID of the booking to confirm or decline.
|
|
602
|
+
*/
|
|
603
|
+
(bookingId: string, options?: ConfirmOrDeclineBookingOptions | undefined): Promise<ConfirmOrDeclineBookingResponse & ConfirmOrDeclineBookingResponseNonNullableFields>;
|
|
604
|
+
}
|
|
605
|
+
export declare function bulkConfirmOrDeclineBooking(httpClient: HttpClient): BulkConfirmOrDeclineBookingSignature;
|
|
606
|
+
interface BulkConfirmOrDeclineBookingSignature {
|
|
607
|
+
/**
|
|
608
|
+
* Confirms or declines up to 300 bookings.
|
|
609
|
+
*
|
|
610
|
+
*
|
|
611
|
+
* See Confirm Or Decline Booking
|
|
612
|
+
* ([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))
|
|
613
|
+
* for details about when a booking is confirmed or declined.
|
|
614
|
+
* @param - Bookings to confirm or decline.
|
|
615
|
+
*/
|
|
616
|
+
(details: BulkConfirmOrDeclineBookingRequestBookingDetails[], options?: BulkConfirmOrDeclineBookingOptions | undefined): Promise<BulkConfirmOrDeclineBookingResponse & BulkConfirmOrDeclineBookingResponseNonNullableFields>;
|
|
617
|
+
}
|
|
618
|
+
export declare const onBookingCanceled: EventDefinition<BookingCanceledEnvelope, "wix.bookings.v2.booking_canceled">;
|
|
619
|
+
export declare const onBookingConfirmed: EventDefinition<BookingConfirmedEnvelope, "wix.bookings.v2.booking_confirmed">;
|
|
620
|
+
export declare const onBookingCreated: EventDefinition<BookingCreatedEnvelope, "wix.bookings.v2.booking_created">;
|
|
621
|
+
export declare const onBookingDeclined: EventDefinition<BookingDeclinedEnvelope, "wix.bookings.v2.booking_declined">;
|
|
622
|
+
export declare const onBookingRescheduled: EventDefinition<BookingRescheduledEnvelope, "wix.bookings.v2.booking_rescheduled">;
|
|
623
|
+
export declare const onBookingUpdated: EventDefinition<BookingUpdatedEnvelope, "wix.bookings.v2.booking_updated">;
|
|
624
|
+
export declare const onBookingNumberOfParticipantsUpdated: EventDefinition<BookingNumberOfParticipantsUpdatedEnvelope, "wix.bookings.v2.booking_number_of_participants_updated">;
|
|
625
|
+
export { ActionEvent, Actor, AddBookingsToMultiServiceBookingOptions, AddBookingsToMultiServiceBookingRequest, AddBookingsToMultiServiceBookingResponse, AddBookingsToMultiServiceBookingResponseNonNullableFields, Address, AddressLocation, AddressStreetOneOf, AllowedActions, ApplicationError, AvailableResources, BaseEventMetadata, BookedEntity, BookedEntityItemOneOf, BookedResource, BookedSchedule, BookedSlot, Booking, BookingCanceled, BookingCanceledEnvelope, BookingChanged, BookingConfirmed, BookingConfirmedEnvelope, BookingCreatedEnvelope, BookingDeclined, BookingDeclinedEnvelope, BookingDetails, BookingFormFilled, BookingIdAndRevision, BookingInfo, BookingMarkedAsPending, BookingNumberOfParticipantsUpdatedEnvelope, BookingParticipantsInfoOneOf, BookingPolicySettings, BookingPolicyViolations, BookingRescheduled, BookingRescheduledEnvelope, BookingRescheduledPreviousParticipantsInfoOneOf, BookingResult, BookingSource, BookingStatus, BookingUpdatedEnvelope, BulkActionMetadata, BulkBookingResult, BulkCalculateAllowedActionsRequest, BulkCalculateAllowedActionsResponse, BulkCalculateAllowedActionsResult, BulkConfirmOrDeclineBookingOptions, BulkConfirmOrDeclineBookingRequest, BulkConfirmOrDeclineBookingRequestBookingDetails, BulkConfirmOrDeclineBookingResponse, BulkConfirmOrDeclineBookingResponseNonNullableFields, BulkCreateBookingOptions, BulkCreateBookingRequest, BulkCreateBookingResponse, BulkCreateBookingResponseNonNullableFields, BulkGetMultiServiceBookingAllowedActionsRequest, BulkGetMultiServiceBookingAllowedActionsResponse, BulkGetMultiServiceBookingAllowedActionsResponseNonNullableFields, BulkRescheduleBookingRequest, BulkRescheduleBookingRequestBooking, BulkRescheduleBookingResponse, BulkUpdateBookedScheduleRequest, BulkUpdateBookedScheduleResponse, BulkUpdateBookingRequest, BulkUpdateBookingResponse, CancelBookingFlowControlSettings, CancelBookingOptions, CancelBookingRequest, CancelBookingRequestFlowControlSettings, CancelBookingResponse, CancelBookingResponseNonNullableFields, CancelMultiServiceBookingOptions, CancelMultiServiceBookingRequest, CancelMultiServiceBookingResponse, CancelMultiServiceBookingResponseNonNullableFields, Clash, CommonIdentificationData, CommonIdentificationDataIdOneOf, ConfirmBookingFlowControlSettings, ConfirmBookingOptions, ConfirmBookingRequest, ConfirmBookingResponse, ConfirmBookingResponseNonNullableFields, ConfirmMultiServiceBookingOptions, ConfirmMultiServiceBookingRequest, ConfirmMultiServiceBookingResponse, ConfirmMultiServiceBookingResponseNonNullableFields, ConfirmOrDeclineBookingOptions, ConfirmOrDeclineBookingRequest, ConfirmOrDeclineBookingResponse, ConfirmOrDeclineBookingResponseNonNullableFields, ConfirmRequest, ConfirmResponse, ConsistentQueryBookingsRequest, ConsistentQueryBookingsResponse, ContactDetails, CountBookingsRequest, CountBookingsResponse, CreateBookingFlowControlSettings, CreateBookingInfo, CreateBookingOptions, CreateBookingRequest, CreateBookingRequestFlowControlSettings, CreateBookingResponse, CreateBookingResponseNonNullableFields, CreateMultiServiceBookingOptions, CreateMultiServiceBookingRequest, CreateMultiServiceBookingResponse, CreateMultiServiceBookingResponseNonNullableFields, CursorPaging, Cursors, CustomFormField, DeclineBookingFlowControlSettings, DeclineBookingOptions, DeclineBookingRequest, DeclineBookingResponse, DeclineBookingResponseNonNullableFields, DeclineMultiServiceBookingOptions, DeclineMultiServiceBookingRequest, DeclineMultiServiceBookingResponse, DeclineMultiServiceBookingResponseNonNullableFields, DomainEvent, DomainEventBodyOneOf, Duration, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, FlowControlSettings, GetMultiServiceBookingAvailabilityRequest, GetMultiServiceBookingAvailabilityResponse, GetMultiServiceBookingAvailabilityResponseBookingInfo, GetMultiServiceBookingAvailabilityResponseNonNullableFields, GetMultiServiceBookingRequest, GetMultiServiceBookingResponse, GetMultiServiceBookingResponseNonNullableFields, GetScheduleAvailabilityRequest, GetScheduleAvailabilityResponse, GetSlotAvailabilityRequest, GetSlotAvailabilityResponse, IdentificationData, IdentificationDataIdOneOf, IdentificationDataIdentityType, IdentityType, ItemMetadata, LegacyCreateBookingRequest, LegacyCreateBookingResponse, Location, LocationLocationType, LocationType, MarkBookingAsPendingFlowControlSettings, MarkBookingAsPendingRequest, MarkBookingAsPendingResponse, MarkMultiServiceBookingAsPendingOptions, MarkMultiServiceBookingAsPendingRequest, MarkMultiServiceBookingAsPendingResponse, MarkMultiServiceBookingAsPendingResponseNonNullableFields, MaskedBooking, MessageEnvelope, MigrationCheckIfClashesWithBlockedTimeRequest, MigrationCheckIfClashesWithBlockedTimeResponse, MsidAndBookingId, MultiServiceBooking, MultiServiceBookingInfo, MultiServiceBookingMetadata, MultiServiceBookingNonNullableFields, MultiServiceBookingType, NumberOfParticipantsUpdated, NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf, Paging, PagingMetadataV2, ParticipantChoices, ParticipantNotification, PaymentStatus, Platform, QueryBookingsRequest, QueryBookingsResponse, QueryV2, QueryV2PagingMethodOneOf, RemoveBookingsFromMultiServiceBookingOptions, RemoveBookingsFromMultiServiceBookingRequest, RemoveBookingsFromMultiServiceBookingResponse, RemoveBookingsFromMultiServiceBookingResponseNonNullableFields, RescheduleBookingFlowControlSettings, RescheduleBookingInfo, RescheduleBookingInfoParticipantsInfoOneOf, RescheduleBookingOptions, RescheduleBookingRequest, RescheduleBookingRequestFlowControlSettings, RescheduleBookingRequestParticipantsInfoOneOf, RescheduleBookingResponse, RescheduleBookingResponseNonNullableFields, RescheduleMultiServiceBookingOptions, RescheduleMultiServiceBookingRequest, RescheduleMultiServiceBookingResponse, RescheduleMultiServiceBookingResponseNonNullableFields, RestoreInfo, ScheduleAvailability, SelectedPaymentOption, ServiceChoice, ServiceChoiceChoiceOneOf, ServiceChoices, SetBookingFormAndSubmissionIdRequest, SetBookingFormAndSubmissionIdResponse, SetBookingSessionIdRequest, SetBookingSessionIdResponse, SetBookingSubmissionIdRequest, SetBookingSubmissionIdResponse, Slot, SlotAvailability, SlotBookings, SlotLocation, SlotResource, SlotSlotResource, SortOrder, Sorting, StreetAddress, Subdivision, UpdateBookingRequest, UpdateBookingResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse, UpdateExtendedFieldsResponseNonNullableFields, UpdateNumberOfParticipantsOptions, UpdateNumberOfParticipantsRequest, UpdateNumberOfParticipantsRequestParticipantsInfoOneOf, UpdateNumberOfParticipantsResponse, UpdateNumberOfParticipantsResponseNonNullableFields, V2CancelBookingRequest, V2CancelBookingResponse, V2ConfirmBookingRequest, V2ConfirmBookingResponse, V2CreateBookingRequest, V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf, V2CreateBookingResponse, V2DeclineBookingRequest, V2DeclineBookingResponse, V2RescheduleBookingRequest, V2RescheduleBookingRequestParticipantsInfoOneOf, V2RescheduleBookingResponse, V2Slot, V2UpdateNumberOfParticipantsRequest, V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf, V2UpdateNumberOfParticipantsResponse, ValueType, WaitingList, WebhookIdentityType, WebhooksIdentificationData, WebhooksIdentificationDataIdOneOf, } from './bookings-v2-booking-bookings.universal.js';
|