@wix/auto_sdk_bookings_pricing 1.0.53 → 1.0.55
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 +8 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +68 -76
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +60 -68
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +8 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +68 -76
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +60 -68
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -8
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +68 -76
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +60 -68
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -8
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +68 -76
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +60 -68
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
3
|
interface PriceInfo extends PriceInfoTotalPriceOneOf {
|
|
4
|
-
/** Calculated total price. Available if the service's
|
|
4
|
+
/** Calculated total price. Available if the [service's](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) `payment.rateType` is `FIXED`, `VARIED`, or `NO_FEE`. */
|
|
5
5
|
calculatedPrice?: number;
|
|
6
6
|
/**
|
|
7
7
|
* Description of the total price.
|
|
8
|
-
* Available if the service's
|
|
8
|
+
* Available if the [service's](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) `payment.rateType` is `CUSTOM`.
|
|
9
9
|
* @deprecated Description of the total price.
|
|
10
|
-
* Available if the service's
|
|
10
|
+
* Available if the [service's](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) `payment.rateType` is `CUSTOM`.
|
|
11
11
|
* @replacedBy price_description_info.original
|
|
12
12
|
* @targetRemovalDate 2025-01-10
|
|
13
13
|
*/
|
|
14
14
|
priceDescription?: string;
|
|
15
15
|
/**
|
|
16
16
|
* Description of the total price.
|
|
17
|
-
* Available if the service's
|
|
17
|
+
* Available if the [service's](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) `payment.rateType` is `CUSTOM`.
|
|
18
18
|
*/
|
|
19
19
|
priceDescriptionInfo?: PriceDescriptionInfo;
|
|
20
20
|
/**
|
|
@@ -24,52 +24,52 @@ interface PriceInfo extends PriceInfoTotalPriceOneOf {
|
|
|
24
24
|
bookingLineItems?: BookingLineItem[];
|
|
25
25
|
/**
|
|
26
26
|
* Total deposit the customer must pay when booking the service.
|
|
27
|
-
* Available if the service's
|
|
27
|
+
* Available if the [service's](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) `payment.options.deposit` is set to `true`.
|
|
28
28
|
*/
|
|
29
29
|
deposit?: number | null;
|
|
30
30
|
}
|
|
31
31
|
/** @oneof */
|
|
32
32
|
interface PriceInfoTotalPriceOneOf {
|
|
33
|
-
/** Calculated total price. Available if the service's
|
|
33
|
+
/** Calculated total price. Available if the [service's](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) `payment.rateType` is `FIXED`, `VARIED`, or `NO_FEE`. */
|
|
34
34
|
calculatedPrice?: number;
|
|
35
35
|
/**
|
|
36
36
|
* Description of the total price.
|
|
37
|
-
* Available if the service's
|
|
37
|
+
* Available if the [service's](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) `payment.rateType` is `CUSTOM`.
|
|
38
38
|
* @deprecated Description of the total price.
|
|
39
|
-
* Available if the service's
|
|
39
|
+
* Available if the [service's](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) `payment.rateType` is `CUSTOM`.
|
|
40
40
|
* @replacedBy price_description_info.original
|
|
41
41
|
* @targetRemovalDate 2025-01-10
|
|
42
42
|
*/
|
|
43
43
|
priceDescription?: string;
|
|
44
44
|
/**
|
|
45
45
|
* Description of the total price.
|
|
46
|
-
* Available if the service's
|
|
46
|
+
* Available if the [service's](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) `payment.rateType` is `CUSTOM`.
|
|
47
47
|
*/
|
|
48
48
|
priceDescriptionInfo?: PriceDescriptionInfo;
|
|
49
49
|
}
|
|
50
50
|
interface BookingLineItem {
|
|
51
51
|
/**
|
|
52
|
-
* Service ID
|
|
52
|
+
* [Service ID](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction).
|
|
53
53
|
*
|
|
54
54
|
* Required parameter in:
|
|
55
|
-
* - Preview Price
|
|
56
|
-
* - Calculate Price
|
|
55
|
+
* - [Preview Price](https://dev.wix.com/docs/api-reference/business-solutions/bookings/pricing/pricing-api/preview-price) for all service types. All line items must have the same service ID.
|
|
56
|
+
* - [Calculate Price](https://dev.wix.com/docs/api-reference/business-solutions/bookings/pricing/pricing-api/calculate-price) when using Wix Bookings' default pricing logic. Optional in Calculate Price when using a Pricing Service Provider Plugin.
|
|
57
57
|
* @format GUID
|
|
58
58
|
*/
|
|
59
59
|
serviceId?: string | null;
|
|
60
60
|
/**
|
|
61
|
-
* Resource ID
|
|
61
|
+
* [Resource ID](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction).
|
|
62
62
|
*
|
|
63
63
|
* Required parameter in:
|
|
64
|
-
* - Calculate Price
|
|
65
|
-
* - Preview Price
|
|
64
|
+
* - [Calculate Price](https://dev.wix.com/docs/api-reference/business-solutions/bookings/pricing/pricing-api/calculate-price) for all service types ([service types](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types)).
|
|
65
|
+
* - [Preview Price](https://dev.wix.com/docs/api-reference/business-solutions/bookings/pricing/pricing-api/preview-price) for appointment-based services and classes. Optional in Preview Price for courses.
|
|
66
66
|
* @format GUID
|
|
67
67
|
*/
|
|
68
68
|
resourceId?: string | null;
|
|
69
69
|
/**
|
|
70
70
|
* Service choices selected by the customer when booking.
|
|
71
71
|
* Choices are specific values for service options that may affect pricing. For example, the option `ageGroup` may have choices like `child`, `student`, `adult`, and `senior`, each with different pricing.
|
|
72
|
-
* Refer to the Service Options and Variants API
|
|
72
|
+
* Refer to the [Service Options and Variants API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction) for more details.
|
|
73
73
|
*/
|
|
74
74
|
choices?: ServiceChoice[];
|
|
75
75
|
/**
|
|
@@ -148,7 +148,7 @@ interface PricingServiceChoices {
|
|
|
148
148
|
interface PriceDescriptionInfo {
|
|
149
149
|
/**
|
|
150
150
|
* Price description in the site's main language.
|
|
151
|
-
* Refer to the Site Properties API
|
|
151
|
+
* Refer to the [Site Properties API](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/introduction) for more details.
|
|
152
152
|
* @maxLength 50
|
|
153
153
|
*/
|
|
154
154
|
original?: string;
|
|
@@ -162,7 +162,7 @@ interface PriceDescriptionInfo {
|
|
|
162
162
|
interface PreviewPriceRequest {
|
|
163
163
|
/**
|
|
164
164
|
* Booking line items to preview pricing for.
|
|
165
|
-
* All line items must belong to the same service
|
|
165
|
+
* All line items must belong to the same [service](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction).
|
|
166
166
|
* @minSize 1
|
|
167
167
|
* @maxSize 20
|
|
168
168
|
*/
|
|
@@ -174,7 +174,7 @@ interface PreviewPriceResponse {
|
|
|
174
174
|
}
|
|
175
175
|
interface CalculatePriceRequest {
|
|
176
176
|
/**
|
|
177
|
-
* Existing booking
|
|
177
|
+
* Existing [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/introduction) to calculate the base price for.
|
|
178
178
|
* Must include `bookedEntity` details and participant information.
|
|
179
179
|
*/
|
|
180
180
|
booking: Booking;
|
|
@@ -183,14 +183,13 @@ interface CalculatePriceRequest {
|
|
|
183
183
|
interface Booking extends BookingParticipantsInfoOneOf {
|
|
184
184
|
/**
|
|
185
185
|
* Total number of participants.
|
|
186
|
-
* When creating a booking, use this field only if the relevant service has fixed pricing and doesn't offer variants and options
|
|
186
|
+
* When creating a booking, use this field only if the relevant service has fixed pricing and doesn't offer [variants and options](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
|
|
187
187
|
* @min 1
|
|
188
188
|
*/
|
|
189
189
|
totalParticipants?: number;
|
|
190
190
|
/**
|
|
191
191
|
* Information about the booked service choices and participant count for each choice.
|
|
192
|
-
* When creating a booking, use this field only if the booking includes multiple service variants
|
|
193
|
-
* ([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)).
|
|
192
|
+
* When creating a booking, use this field only if the booking includes multiple [service variants](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
|
|
194
193
|
*
|
|
195
194
|
* For example, use this for a spa package booking that includes different service levels:
|
|
196
195
|
* - 2 participants chose "Standard Package".
|
|
@@ -221,8 +220,7 @@ interface Booking extends BookingParticipantsInfoOneOf {
|
|
|
221
220
|
*/
|
|
222
221
|
bookedEntity?: BookedEntity;
|
|
223
222
|
/**
|
|
224
|
-
* Contact details of the site visitor or member
|
|
225
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/members/members/introduction) | [REST](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/introduction))
|
|
223
|
+
* Contact details of the site visitor or [member](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/members/introduction))
|
|
226
224
|
* making the booking.
|
|
227
225
|
*/
|
|
228
226
|
contactDetails?: ContactDetails;
|
|
@@ -248,8 +246,7 @@ interface Booking extends BookingParticipantsInfoOneOf {
|
|
|
248
246
|
status?: BookingStatusWithLiterals;
|
|
249
247
|
/**
|
|
250
248
|
* The payment status of the booking. This field automatically syncs with the
|
|
251
|
-
* `paymentStatus` of the corresponding eCommerce order
|
|
252
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup)| [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction))
|
|
249
|
+
* `paymentStatus` of the corresponding [eCommerce order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/introduction)
|
|
253
250
|
* when customers use Wix eCommerce checkout.
|
|
254
251
|
*
|
|
255
252
|
* ### Integration patterns
|
|
@@ -257,17 +254,17 @@ interface Booking extends BookingParticipantsInfoOneOf {
|
|
|
257
254
|
* __When using Wix eCommerce checkout__: Wix Bookings automatically syncs the payment status based on the eCommerce order's payment status.
|
|
258
255
|
* Do not manually update this field.
|
|
259
256
|
*
|
|
260
|
-
* __When using custom payment flows__: You can manually update the payment status with Confirm Booking or Decline Booking
|
|
257
|
+
* __When using custom payment flows__: You can manually update the payment status with [Confirm Booking or Decline Booking](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking) to reflect the customer's payment state.
|
|
261
258
|
*
|
|
262
|
-
* __For membership/pricing plan payments__: Wix Bookings automatically manages the payment status when customers pay with an active pricing plan
|
|
259
|
+
* __For membership/pricing plan payments__: Wix Bookings automatically manages the payment status when customers pay with an active [pricing plan](https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/pricing-plans/introduction) subscription.
|
|
263
260
|
*
|
|
264
261
|
* All payment statuses are supported for every booking `status`.
|
|
265
262
|
*/
|
|
266
263
|
paymentStatus?: PaymentStatusWithLiterals;
|
|
267
264
|
/**
|
|
268
|
-
* Payment option selected by the customer. If the customer hasn't completed their checkout, they may still change the payment method. Must be one of the payment options offered by the service
|
|
265
|
+
* Payment option selected by the customer. If the customer hasn't completed their checkout, they may still change the payment method. Must be one of the payment options offered by the [service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction), unless `skipSelectedPaymentOptionValidation` is `true`.
|
|
269
266
|
*
|
|
270
|
-
* When undefined during an eCommerce checkout
|
|
267
|
+
* When undefined during an [eCommerce checkout](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/checkout/introduction), Wix Bookings uses the service's default payment option
|
|
271
268
|
*/
|
|
272
269
|
selectedPaymentOption?: SelectedPaymentOptionWithLiterals;
|
|
273
270
|
/**
|
|
@@ -317,15 +314,13 @@ interface Booking extends BookingParticipantsInfoOneOf {
|
|
|
317
314
|
*/
|
|
318
315
|
doubleBooked?: boolean | null;
|
|
319
316
|
/**
|
|
320
|
-
* ID of the form submission
|
|
321
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/forms/submissions/introduction) | [REST](https://dev.wix.com/docs/rest/crm/forms/form-submissions/introduction))
|
|
317
|
+
* ID of the [form submission](https://dev.wix.com/docs/rest/crm/forms/form-submissions/introduction)
|
|
322
318
|
* associated with this booking.
|
|
323
319
|
* @format GUID
|
|
324
320
|
*/
|
|
325
321
|
formSubmissionId?: string | null;
|
|
326
322
|
/**
|
|
327
|
-
* ID of the form
|
|
328
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/forms/introduction) | [REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object))
|
|
323
|
+
* ID of the [form](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)
|
|
329
324
|
* associated with this booking. The value depends on how the
|
|
330
325
|
* booking was created:
|
|
331
326
|
* - For bookings created with Create Booking or Bulk Create Booking, `formId`
|
|
@@ -342,14 +337,13 @@ interface Booking extends BookingParticipantsInfoOneOf {
|
|
|
342
337
|
interface BookingParticipantsInfoOneOf {
|
|
343
338
|
/**
|
|
344
339
|
* Total number of participants.
|
|
345
|
-
* When creating a booking, use this field only if the relevant service has fixed pricing and doesn't offer variants and options
|
|
340
|
+
* When creating a booking, use this field only if the relevant service has fixed pricing and doesn't offer [variants and options](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
|
|
346
341
|
* @min 1
|
|
347
342
|
*/
|
|
348
343
|
totalParticipants?: number;
|
|
349
344
|
/**
|
|
350
345
|
* Information about the booked service choices and participant count for each choice.
|
|
351
|
-
* When creating a booking, use this field only if the booking includes multiple service variants
|
|
352
|
-
* ([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)).
|
|
346
|
+
* When creating a booking, use this field only if the booking includes multiple [service variants](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
|
|
353
347
|
*
|
|
354
348
|
* For example, use this for a spa package booking that includes different service levels:
|
|
355
349
|
* - 2 participants chose "Standard Package".
|
|
@@ -375,8 +369,7 @@ declare enum MultiServiceBookingType {
|
|
|
375
369
|
type MultiServiceBookingTypeWithLiterals = MultiServiceBookingType | 'SEQUENTIAL_BOOKINGS' | 'SEPARATE_BOOKINGS' | 'PARALLEL_BOOKINGS';
|
|
376
370
|
interface BookedEntity extends BookedEntityItemOneOf {
|
|
377
371
|
/**
|
|
378
|
-
* Booked slot
|
|
379
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability)).
|
|
372
|
+
* [Booked slot](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability).
|
|
380
373
|
*
|
|
381
374
|
* Specify `slot` when creating bookings for:
|
|
382
375
|
* - __Appointment-based services__: Individual sessions with service providers (consultations, treatments).
|
|
@@ -388,8 +381,7 @@ interface BookedEntity extends BookedEntityItemOneOf {
|
|
|
388
381
|
*/
|
|
389
382
|
slot?: BookedSlot;
|
|
390
383
|
/**
|
|
391
|
-
* Booked schedule
|
|
392
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
|
|
384
|
+
* [Booked schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction).
|
|
393
385
|
*
|
|
394
386
|
* Specify `schedule` when creating bookings for:
|
|
395
387
|
* - __Course services__: Multi-session offerings spanning weeks or months (educational courses, training programs).
|
|
@@ -415,8 +407,7 @@ interface BookedEntity extends BookedEntityItemOneOf {
|
|
|
415
407
|
/** @oneof */
|
|
416
408
|
interface BookedEntityItemOneOf {
|
|
417
409
|
/**
|
|
418
|
-
* Booked slot
|
|
419
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability)).
|
|
410
|
+
* [Booked slot](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability).
|
|
420
411
|
*
|
|
421
412
|
* Specify `slot` when creating bookings for:
|
|
422
413
|
* - __Appointment-based services__: Individual sessions with service providers (consultations, treatments).
|
|
@@ -428,8 +419,7 @@ interface BookedEntityItemOneOf {
|
|
|
428
419
|
*/
|
|
429
420
|
slot?: BookedSlot;
|
|
430
421
|
/**
|
|
431
|
-
* Booked schedule
|
|
432
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
|
|
422
|
+
* [Booked schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction).
|
|
433
423
|
*
|
|
434
424
|
* Specify `schedule` when creating bookings for:
|
|
435
425
|
* - __Course services__: Multi-session offerings spanning weeks or months (educational courses, training programs).
|
|
@@ -438,15 +428,27 @@ interface BookedEntityItemOneOf {
|
|
|
438
428
|
schedule?: BookedSchedule;
|
|
439
429
|
}
|
|
440
430
|
interface BookedSlot {
|
|
441
|
-
/**
|
|
431
|
+
/**
|
|
432
|
+
* Session ID. For class bookings, this is the ID of the existing session.
|
|
433
|
+
* For appointment bookings, this field is typically empty during booking creation and gets populated when the booking is confirmed.
|
|
434
|
+
*
|
|
435
|
+
* __Migration Guidance__: Replace usage of this field with `eventId` from the [Time Slots V2 API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/introduction).
|
|
436
|
+
* You can follow [these sample flows](https://dev.wix.com/docs/api-reference/business-solutions/bookings/end-to-end-booking-flows) for step-by-step guidance about determining availability and creating bookings.
|
|
437
|
+
* @deprecated Session ID. For class bookings, this is the ID of the existing session.
|
|
438
|
+
* For appointment bookings, this field is typically empty during booking creation and gets populated when the booking is confirmed.
|
|
439
|
+
*
|
|
440
|
+
* __Migration Guidance__: Replace usage of this field with `eventId` from the [Time Slots V2 API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/introduction).
|
|
441
|
+
* You can follow [these sample flows](https://dev.wix.com/docs/api-reference/business-solutions/bookings/end-to-end-booking-flows) for step-by-step guidance about determining availability and creating bookings.
|
|
442
|
+
* @replacedBy event_id
|
|
443
|
+
* @targetRemovalDate 2026-03-31
|
|
444
|
+
*/
|
|
442
445
|
sessionId?: string | null;
|
|
443
446
|
/** Service ID. */
|
|
444
447
|
serviceId?: string;
|
|
445
448
|
/** Schedule ID. */
|
|
446
449
|
scheduleId?: string;
|
|
447
450
|
/**
|
|
448
|
-
* ID of the corresponding event
|
|
449
|
-
* ([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)).
|
|
451
|
+
* ID of the corresponding [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction).
|
|
450
452
|
* Available for both appointment and class bookings, not available for course bookings.
|
|
451
453
|
* For appointment-based services, Wix Bookings automatically populates `eventId` when the booking `status` changes to `CONFIRMED`.
|
|
452
454
|
* For class bookings, Wix Bookings automatically populates `eventId` upon booking creation.
|
|
@@ -464,9 +466,8 @@ interface BookedSlot {
|
|
|
464
466
|
*/
|
|
465
467
|
timezone?: string | null;
|
|
466
468
|
/**
|
|
467
|
-
* Primary resource
|
|
468
|
-
*
|
|
469
|
-
* For example, the staff member ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction)) providing the service.
|
|
469
|
+
* [Primary resource](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction) for the booking.
|
|
470
|
+
* For example, the [staff member](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction) providing the service.
|
|
470
471
|
*/
|
|
471
472
|
resource?: BookedResource;
|
|
472
473
|
/** Location where the session takes place. */
|
|
@@ -548,7 +549,7 @@ declare enum SelectionMethod {
|
|
|
548
549
|
/** @enumType */
|
|
549
550
|
type SelectionMethodWithLiterals = SelectionMethod | 'UNKNOWN_SELECTION_METHOD' | 'SPECIFIC_RESOURCE' | 'ANY_RESOURCE' | 'NO_SELECTION';
|
|
550
551
|
interface BookedSchedule {
|
|
551
|
-
/** Schedule ID
|
|
552
|
+
/** [Schedule ID](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction). */
|
|
552
553
|
scheduleId?: string;
|
|
553
554
|
/**
|
|
554
555
|
* Booked service ID.
|
|
@@ -556,7 +557,7 @@ interface BookedSchedule {
|
|
|
556
557
|
*/
|
|
557
558
|
serviceId?: string | null;
|
|
558
559
|
/**
|
|
559
|
-
* Location
|
|
560
|
+
* [Location](https://dev.wix.com/docs/rest/business-management/locations/introduction) where the schedule's sessions take place.
|
|
560
561
|
* @readonly
|
|
561
562
|
*/
|
|
562
563
|
location?: Location;
|
|
@@ -700,26 +701,18 @@ type ValueTypeWithLiterals = ValueType | 'SHORT_TEXT' | 'LONG_TEXT' | 'CHECK_BOX
|
|
|
700
701
|
declare enum BookingStatus {
|
|
701
702
|
/** The booking was created, but the customer hasn't completed the related eCommerce order yet. */
|
|
702
703
|
CREATED = "CREATED",
|
|
703
|
-
/**
|
|
704
|
-
* The merchant has confirmed the booking and it appears in the business calendar. Merchants can set up their services
|
|
705
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)) to automatically confirm all `PENDING` bookings.
|
|
706
|
-
*/
|
|
704
|
+
/** The merchant has confirmed the booking and it appears in the business calendar. Merchants can set up their [services](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction) to automatically confirm all `PENDING` bookings. */
|
|
707
705
|
CONFIRMED = "CONFIRMED",
|
|
708
706
|
/**
|
|
709
|
-
* The customer has canceled the booking. Depending on the relevant service's policy snapshot
|
|
710
|
-
*
|
|
711
|
-
* they may have to pay a cancellation fee ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-fees/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/booking-fees/introduction)).
|
|
707
|
+
* The customer has canceled the booking. Depending on the relevant service's [policy snapshot](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policy-snapshots/introduction)
|
|
708
|
+
* they may have to pay a [cancellation fee](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/booking-fees/introduction).
|
|
712
709
|
*/
|
|
713
710
|
CANCELED = "CANCELED",
|
|
714
711
|
/** The merchant must manually confirm the booking before it appears in the business calendar. */
|
|
715
712
|
PENDING = "PENDING",
|
|
716
713
|
/** The merchant has declined the booking before the customer was charged. */
|
|
717
714
|
DECLINED = "DECLINED",
|
|
718
|
-
/**
|
|
719
|
-
* The booking is on a waitlist.
|
|
720
|
-
* Currently, you can't call Register to Waitlist ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/waitlist/register-to-waitlist)) for course or appointment bookings, even though this is supported in live sites.
|
|
721
|
-
* You can call Register to Waitlist only for class session bookings.
|
|
722
|
-
*/
|
|
715
|
+
/** Currently, you can't call [Register to Waitlist](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/waitlist/register-to-waitlist) for course or appointment bookings, even though this is supported in live sites. */
|
|
723
716
|
WAITING_LIST = "WAITING_LIST"
|
|
724
717
|
}
|
|
725
718
|
/** @enumType */
|
|
@@ -886,8 +879,7 @@ interface FlowControlSettings {
|
|
|
886
879
|
skipAvailabilityValidation?: boolean;
|
|
887
880
|
/**
|
|
888
881
|
* Whether the booking's `status` is automatically updated to `CONFIRMED` when
|
|
889
|
-
* the customer completes the eCommerce checkout
|
|
890
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)),
|
|
882
|
+
* the customer completes the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction),
|
|
891
883
|
* regardless of whether the relevant service requires manual business confirmation.
|
|
892
884
|
*/
|
|
893
885
|
skipBusinessConfirmation?: boolean;
|
|
@@ -924,7 +916,7 @@ interface ParticipantChoices {
|
|
|
924
916
|
}
|
|
925
917
|
interface ServiceChoices {
|
|
926
918
|
/**
|
|
927
|
-
* Number of participants for this variant
|
|
919
|
+
* Number of participants for this [variant](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
|
|
928
920
|
* @min 1
|
|
929
921
|
*/
|
|
930
922
|
numberOfParticipants?: number | null;
|
|
@@ -1030,12 +1022,12 @@ type CalculatePriceApplicationErrors = {
|
|
|
1030
1022
|
*
|
|
1031
1023
|
* Preview Price fails if:
|
|
1032
1024
|
*
|
|
1033
|
-
* - You specify line items that belong to different
|
|
1034
|
-
* - The site is using a Bookings Pricing Integration Service Plugin
|
|
1025
|
+
* - You specify line items that belong to different [services](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction).
|
|
1026
|
+
* - The site is using a [Bookings Pricing Integration Service Plugin](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/introduction). Note that external apps can't currently check whether a plugin is installed on the site before calling Preview Price.
|
|
1035
1027
|
*
|
|
1036
|
-
* To retrieve the price of an existing booking, call Calculate Price
|
|
1028
|
+
* To retrieve the price of an existing booking, call [Calculate Price](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/calculate-price) instead.
|
|
1037
1029
|
* @param bookingLineItems - Booking line items to preview pricing for.
|
|
1038
|
-
* All line items must belong to the same service
|
|
1030
|
+
* All line items must belong to the same [service](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction).
|
|
1039
1031
|
* @public
|
|
1040
1032
|
* @requiredField bookingLineItems
|
|
1041
1033
|
* @permissionId BOOKINGS.PRICE_PREVIEW
|
|
@@ -1051,18 +1043,18 @@ declare function previewPrice(bookingLineItems: BookingLineItem[]): Promise<NonN
|
|
|
1051
1043
|
*
|
|
1052
1044
|
* Use this method to display booking costs in external apps or dashboards, or to retrieve accurate pricing for bookings created through other channels.
|
|
1053
1045
|
*
|
|
1054
|
-
* The returned price represents the fundamental booking cost before additional charges during eCommerce checkout
|
|
1046
|
+
* The returned price represents the fundamental booking cost before additional charges during [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/introduction). For recently created unpaid bookings, this typically matches the original booking price. However, this method calculates prices based on the service's current pricing configuration, so the returned price may differ from the original booking price if service pricing has changed since the booking was created.
|
|
1055
1047
|
*
|
|
1056
1048
|
* ### Price calculation methods
|
|
1057
1049
|
*
|
|
1058
|
-
* __Standard pricing__: Wix Bookings calculates prices based on the number of participants for each service variant
|
|
1050
|
+
* __Standard pricing__: Wix Bookings calculates prices based on the number of participants for each [service variant](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
|
|
1059
1051
|
* Specify `booking.bookedEntity.slot.serviceId` for appointment-based services and classes, or `booking.bookedEntity.schedule.serviceId` for courses.
|
|
1060
1052
|
*
|
|
1061
1053
|
* __Custom pricing__: When a [Pricing Service Provider Plugin](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/introduction) is installed, Calculate Price gets responses directly from the external provider instead of using standard Wix pricing logic.
|
|
1062
1054
|
* In this case, specify `booking.bookedEntity`. Note that external apps can't currently check whether a plugin is installed on the site before calling Calculate Price.
|
|
1063
1055
|
*
|
|
1064
|
-
* To estimate the price for multiple booking line items before the booking exists, call Preview Price
|
|
1065
|
-
* @param booking - Existing booking
|
|
1056
|
+
* To estimate the price for multiple booking line items before the booking exists, call [Preview Price](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/preview-price) instead.
|
|
1057
|
+
* @param booking - Existing [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/introduction) to calculate the base price for.
|
|
1066
1058
|
* Must include `bookedEntity` details and participant information.
|
|
1067
1059
|
* @public
|
|
1068
1060
|
* @requiredField booking
|