@wix/auto_sdk_bookings_bookings 1.0.54 → 1.0.56
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 +61 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +95 -6
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +11 -5
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +61 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +95 -6
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +11 -5
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +61 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +95 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +11 -5
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +61 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +95 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +11 -5
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -2553,15 +2553,21 @@ interface MarkBookingAsPendingRequest {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
interface MarkBookingAsPendingFlowControlSettings {
|
|
2555
2555
|
/**
|
|
2556
|
-
* Whether to check for double
|
|
2556
|
+
* Whether to check for double booking conflicts when updating the status.
|
|
2557
2557
|
*
|
|
2558
|
-
*
|
|
2559
|
-
*
|
|
2558
|
+
* - `true`: Checks for availability conflicts and sets `doubleBooked` to `true`
|
|
2559
|
+
* if conflicts exist.
|
|
2560
|
+
* The booking is still marked as `PENDING` for the business to resolve manually.
|
|
2561
|
+
* - `false`: No availability checking is performed.
|
|
2562
|
+
*
|
|
2563
|
+
* Default: `false`
|
|
2560
2564
|
*/
|
|
2561
2565
|
checkAvailabilityValidation?: boolean;
|
|
2562
2566
|
/**
|
|
2563
|
-
* Whether to
|
|
2564
|
-
*
|
|
2567
|
+
* Whether to allow marking any booking as pending, even if the service doesn't require manual approval.
|
|
2568
|
+
*
|
|
2569
|
+
* - `true`: Bypasses the validation that checks if the service has `service.onlineBooking.requireManualApproval` set to `true`.
|
|
2570
|
+
* - `false`: Only services that require manual approval can have their bookings marked as pending.
|
|
2565
2571
|
*
|
|
2566
2572
|
* Default: `false`.
|
|
2567
2573
|
*/
|
|
@@ -2992,6 +2998,7 @@ interface RemoveBookingsFromMultiServiceBookingResponse {
|
|
|
2992
2998
|
/** Single-service bookings that were removed from the multi-service booking. */
|
|
2993
2999
|
bookings?: BookingResult[];
|
|
2994
3000
|
}
|
|
3001
|
+
/** @docsIgnore */
|
|
2995
3002
|
type ConfirmOrDeclineBookingApplicationErrors = {
|
|
2996
3003
|
code?: 'INVALID_BOOKING_STATUS';
|
|
2997
3004
|
description?: string;
|
|
@@ -3001,11 +3008,13 @@ type ConfirmOrDeclineBookingApplicationErrors = {
|
|
|
3001
3008
|
description?: string;
|
|
3002
3009
|
data?: Record<string, any>;
|
|
3003
3010
|
};
|
|
3011
|
+
/** @docsIgnore */
|
|
3004
3012
|
type BulkConfirmOrDeclineBookingApplicationErrors = {
|
|
3005
3013
|
code?: 'DUPLICATED_BOOKINGS';
|
|
3006
3014
|
description?: string;
|
|
3007
3015
|
data?: Record<string, any>;
|
|
3008
3016
|
};
|
|
3017
|
+
/** @docsIgnore */
|
|
3009
3018
|
type CreateBookingApplicationErrors = {
|
|
3010
3019
|
code?: 'SESSION_NOT_FOUND';
|
|
3011
3020
|
description?: string;
|
|
@@ -3079,6 +3088,7 @@ type CreateBookingApplicationErrors = {
|
|
|
3079
3088
|
description?: string;
|
|
3080
3089
|
data?: Record<string, any>;
|
|
3081
3090
|
};
|
|
3091
|
+
/** @docsIgnore */
|
|
3082
3092
|
type BulkCreateBookingApplicationErrors = {
|
|
3083
3093
|
code?: 'SESSION_NOT_FOUND';
|
|
3084
3094
|
description?: string;
|
|
@@ -3120,6 +3130,7 @@ type BulkCreateBookingApplicationErrors = {
|
|
|
3120
3130
|
description?: string;
|
|
3121
3131
|
data?: Record<string, any>;
|
|
3122
3132
|
};
|
|
3133
|
+
/** @docsIgnore */
|
|
3123
3134
|
type RescheduleBookingApplicationErrors = {
|
|
3124
3135
|
code?: 'BOOKING_NOT_FOUND';
|
|
3125
3136
|
description?: string;
|
|
@@ -3201,6 +3212,7 @@ type RescheduleBookingApplicationErrors = {
|
|
|
3201
3212
|
description?: string;
|
|
3202
3213
|
data?: Record<string, any>;
|
|
3203
3214
|
};
|
|
3215
|
+
/** @docsIgnore */
|
|
3204
3216
|
type ConfirmBookingApplicationErrors = {
|
|
3205
3217
|
code?: 'BOOKING_NOT_FOUND';
|
|
3206
3218
|
description?: string;
|
|
@@ -3218,16 +3230,19 @@ type ConfirmBookingApplicationErrors = {
|
|
|
3218
3230
|
description?: string;
|
|
3219
3231
|
data?: Record<string, any>;
|
|
3220
3232
|
};
|
|
3233
|
+
/** @docsIgnore */
|
|
3221
3234
|
type SetBookingSubmissionIdApplicationErrors = {
|
|
3222
3235
|
code?: 'BOOKING_NOT_FOUND';
|
|
3223
3236
|
description?: string;
|
|
3224
3237
|
data?: Record<string, any>;
|
|
3225
3238
|
};
|
|
3239
|
+
/** @docsIgnore */
|
|
3226
3240
|
type UpdateExtendedFieldsApplicationErrors = {
|
|
3227
3241
|
code?: 'BOOKING_NOT_FOUND';
|
|
3228
3242
|
description?: string;
|
|
3229
3243
|
data?: Record<string, any>;
|
|
3230
3244
|
};
|
|
3245
|
+
/** @docsIgnore */
|
|
3231
3246
|
type DeclineBookingApplicationErrors = {
|
|
3232
3247
|
code?: 'BOOKING_NOT_FOUND';
|
|
3233
3248
|
description?: string;
|
|
@@ -3241,6 +3256,7 @@ type DeclineBookingApplicationErrors = {
|
|
|
3241
3256
|
description?: string;
|
|
3242
3257
|
data?: Record<string, any>;
|
|
3243
3258
|
};
|
|
3259
|
+
/** @docsIgnore */
|
|
3244
3260
|
type CancelBookingApplicationErrors = {
|
|
3245
3261
|
code?: 'BOOKING_NOT_FOUND';
|
|
3246
3262
|
description?: string;
|
|
@@ -3266,11 +3282,13 @@ type CancelBookingApplicationErrors = {
|
|
|
3266
3282
|
description?: string;
|
|
3267
3283
|
data?: Record<string, any>;
|
|
3268
3284
|
};
|
|
3285
|
+
/** @docsIgnore */
|
|
3269
3286
|
type UpdateNumberOfParticipantsApplicationErrors = {
|
|
3270
3287
|
code?: 'BOOKING_NOT_FOUND';
|
|
3271
3288
|
description?: string;
|
|
3272
3289
|
data?: Record<string, any>;
|
|
3273
3290
|
};
|
|
3291
|
+
/** @docsIgnore */
|
|
3274
3292
|
type MarkBookingAsPendingApplicationErrors = {
|
|
3275
3293
|
code?: 'BOOKING_MARK_BOOKING_AS_PENDING';
|
|
3276
3294
|
description?: string;
|
|
@@ -3288,6 +3306,7 @@ type MarkBookingAsPendingApplicationErrors = {
|
|
|
3288
3306
|
description?: string;
|
|
3289
3307
|
data?: Record<string, any>;
|
|
3290
3308
|
};
|
|
3309
|
+
/** @docsIgnore */
|
|
3291
3310
|
type CreateMultiServiceBookingApplicationErrors = {
|
|
3292
3311
|
code?: 'VALIDATION_FAILURE';
|
|
3293
3312
|
description?: string;
|
|
@@ -3325,6 +3344,7 @@ type CreateMultiServiceBookingApplicationErrors = {
|
|
|
3325
3344
|
description?: string;
|
|
3326
3345
|
data?: Record<string, any>;
|
|
3327
3346
|
};
|
|
3347
|
+
/** @docsIgnore */
|
|
3328
3348
|
type RescheduleMultiServiceBookingApplicationErrors = {
|
|
3329
3349
|
code?: 'MULTI_SERVICE_BOOKING_NOT_FOUND';
|
|
3330
3350
|
description?: string;
|
|
@@ -3362,11 +3382,13 @@ type RescheduleMultiServiceBookingApplicationErrors = {
|
|
|
3362
3382
|
description?: string;
|
|
3363
3383
|
data?: Record<string, any>;
|
|
3364
3384
|
};
|
|
3385
|
+
/** @docsIgnore */
|
|
3365
3386
|
type GetMultiServiceBookingAvailabilityApplicationErrors = {
|
|
3366
3387
|
code?: 'MULTI_SERVICE_BOOKING_NOT_FOUND';
|
|
3367
3388
|
description?: string;
|
|
3368
3389
|
data?: Record<string, any>;
|
|
3369
3390
|
};
|
|
3391
|
+
/** @docsIgnore */
|
|
3370
3392
|
type CancelMultiServiceBookingApplicationErrors = {
|
|
3371
3393
|
code?: 'MULTI_SERVICE_BOOKING_NOT_FOUND';
|
|
3372
3394
|
description?: string;
|
|
@@ -3384,6 +3406,7 @@ type CancelMultiServiceBookingApplicationErrors = {
|
|
|
3384
3406
|
description?: string;
|
|
3385
3407
|
data?: Record<string, any>;
|
|
3386
3408
|
};
|
|
3409
|
+
/** @docsIgnore */
|
|
3387
3410
|
type MarkMultiServiceBookingAsPendingApplicationErrors = {
|
|
3388
3411
|
code?: 'MULTI_SERVICE_BOOKING_NOT_FOUND';
|
|
3389
3412
|
description?: string;
|
|
@@ -3421,6 +3444,7 @@ type MarkMultiServiceBookingAsPendingApplicationErrors = {
|
|
|
3421
3444
|
description?: string;
|
|
3422
3445
|
data?: Record<string, any>;
|
|
3423
3446
|
};
|
|
3447
|
+
/** @docsIgnore */
|
|
3424
3448
|
type ConfirmMultiServiceBookingApplicationErrors = {
|
|
3425
3449
|
code?: 'MULTI_SERVICE_BOOKING_NOT_FOUND';
|
|
3426
3450
|
description?: string;
|
|
@@ -3470,6 +3494,7 @@ type ConfirmMultiServiceBookingApplicationErrors = {
|
|
|
3470
3494
|
description?: string;
|
|
3471
3495
|
data?: Record<string, any>;
|
|
3472
3496
|
};
|
|
3497
|
+
/** @docsIgnore */
|
|
3473
3498
|
type DeclineMultiServiceBookingApplicationErrors = {
|
|
3474
3499
|
code?: 'MULTI_SERVICE_BOOKING_NOT_FOUND';
|
|
3475
3500
|
description?: string;
|
|
@@ -3511,6 +3536,7 @@ type DeclineMultiServiceBookingApplicationErrors = {
|
|
|
3511
3536
|
description?: string;
|
|
3512
3537
|
data?: Record<string, any>;
|
|
3513
3538
|
};
|
|
3539
|
+
/** @docsIgnore */
|
|
3514
3540
|
type AddBookingsToMultiServiceBookingApplicationErrors = {
|
|
3515
3541
|
code?: 'MULTI_SERVICE_BOOKING_NOT_FOUND';
|
|
3516
3542
|
description?: string;
|
|
@@ -3536,6 +3562,7 @@ type AddBookingsToMultiServiceBookingApplicationErrors = {
|
|
|
3536
3562
|
description?: string;
|
|
3537
3563
|
data?: Record<string, any>;
|
|
3538
3564
|
};
|
|
3565
|
+
/** @docsIgnore */
|
|
3539
3566
|
type RemoveBookingsFromMultiServiceBookingApplicationErrors = {
|
|
3540
3567
|
code?: 'MULTI_SERVICE_BOOKING_NOT_FOUND';
|
|
3541
3568
|
description?: string;
|
|
@@ -4484,7 +4511,69 @@ interface UpdateNumberOfParticipantsOptionsParticipantsInfoOneOf {
|
|
|
4484
4511
|
*/
|
|
4485
4512
|
participantsChoices?: ParticipantChoices;
|
|
4486
4513
|
}
|
|
4487
|
-
/**
|
|
4514
|
+
/**
|
|
4515
|
+
* Updates the booking status to `PENDING`.
|
|
4516
|
+
*
|
|
4517
|
+
*
|
|
4518
|
+
* ## Service requirement
|
|
4519
|
+
*
|
|
4520
|
+
* By default, this method only works for services ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)) with `service.onlineBooking.requireManualApproval` set to `true`.
|
|
4521
|
+
* If you attempt to mark a booking as pending for a service that doesn't require approval, the call fails unless you use the `skipPendingApprovalServiceValidation` admin overwrite.
|
|
4522
|
+
*
|
|
4523
|
+
* ## Status requirements
|
|
4524
|
+
*
|
|
4525
|
+
* - __Original status__: Booking must have `CREATED` status.
|
|
4526
|
+
* - __Target status__: Booking moves to `PENDING`.
|
|
4527
|
+
*
|
|
4528
|
+
* ## Checkout restrictions
|
|
4529
|
+
*
|
|
4530
|
+
* Only call this method if the customer paid via a custom checkout. For Wix eCommerce checkouts ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/purchase-flow/checkout/introduction)), Wix Bookings automatically manages the bookings' statuses based on payment processing.
|
|
4531
|
+
*
|
|
4532
|
+
* When using custom checkouts, you can also update the booking's `paymentStatus` by specifying a new payment status.
|
|
4533
|
+
*
|
|
4534
|
+
* ## Business workflow
|
|
4535
|
+
*
|
|
4536
|
+
* After marking a booking as `PENDING`, the business must manually approve or reject it. You can call these methods:
|
|
4537
|
+
* - Confirm Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking)).
|
|
4538
|
+
* - Decline Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/decline-booking)).
|
|
4539
|
+
*
|
|
4540
|
+
* ## Resource availability and scheduling
|
|
4541
|
+
*
|
|
4542
|
+
* Marking a booking as `PENDING` immediately affects resource availability:
|
|
4543
|
+
*
|
|
4544
|
+
* - **Calendar impact**: The booking appears on the business calendar.
|
|
4545
|
+
* - **Availability**: The time slot becomes unavailable for other bookings, even while pending approval.
|
|
4546
|
+
* - **Resource assignment**: Available resources ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction)) are automatically assigned if none were explicitly selected during booking creation.
|
|
4547
|
+
*
|
|
4548
|
+
* ## Double bookings
|
|
4549
|
+
*
|
|
4550
|
+
* By default, the method doesn't check for availability conflicts. To detect and handle double bookings, use the `checkAvailabilityValidation: true` admin overwrite.
|
|
4551
|
+
*
|
|
4552
|
+
* ## Notify customers
|
|
4553
|
+
*
|
|
4554
|
+
* You can specify a `participantNotification.message` for the customer.
|
|
4555
|
+
* To send the message, you must also specify `participantNotification.notifyParticipants` as `true`.
|
|
4556
|
+
*
|
|
4557
|
+
* ## Admin overwrites
|
|
4558
|
+
*
|
|
4559
|
+
* There are small but important differences when you specify special
|
|
4560
|
+
* `flowControlSettings`:
|
|
4561
|
+
*
|
|
4562
|
+
* - `{"checkAvailabilityValidation": true}`: Checks for double booking conflicts before updating the status.
|
|
4563
|
+
* When conflicts exist, the booking is still marked as `PENDING` and `doubleBooked` is set to `true` for the business to resolve manually.
|
|
4564
|
+
* - `{"skipPendingApprovalServiceValidation": true}`: Allows marking any booking as pending, even if the service doesn't require manual approval.
|
|
4565
|
+
*
|
|
4566
|
+
* When using special `flowControlSettings`, ensure you have sufficient permissions.
|
|
4567
|
+
* If you encounter failed calls due to insufficient permissions, consider the following options:
|
|
4568
|
+
*
|
|
4569
|
+
* - __App developers__ can use a higher
|
|
4570
|
+
* [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions), such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
|
|
4571
|
+
* - __Site developers__ can utilize
|
|
4572
|
+
* [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
|
|
4573
|
+
*
|
|
4574
|
+
* Granting additional permissions and using elevation permits method calls that would typically fail due to authorization checks.
|
|
4575
|
+
* Therefore, you should use them intentionally and securely.
|
|
4576
|
+
* @param bookingId - ID of the booking to mark as `PENDING`.
|
|
4488
4577
|
* @param revision - Revision number, which increments by 1 each time the booking is updated.
|
|
4489
4578
|
*
|
|
4490
4579
|
* To prevent conflicting changes, the current revision must be specified when
|