@wix/auto_sdk_bookings_bookings 1.0.55 → 1.0.57
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 +68 -7
- package/build/cjs/index.js +6 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +74 -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 +68 -7
- package/build/es/index.mjs +6 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +74 -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 +68 -7
- package/build/internal/cjs/index.js +6 -2
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +74 -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 +68 -7
- package/build/internal/es/index.mjs +6 -2
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +74 -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
|
*/
|
|
@@ -4505,7 +4511,69 @@ interface UpdateNumberOfParticipantsOptionsParticipantsInfoOneOf {
|
|
|
4505
4511
|
*/
|
|
4506
4512
|
participantsChoices?: ParticipantChoices;
|
|
4507
4513
|
}
|
|
4508
|
-
/**
|
|
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`.
|
|
4509
4577
|
* @param revision - Revision number, which increments by 1 each time the booking is updated.
|
|
4510
4578
|
*
|
|
4511
4579
|
* To prevent conflicting changes, the current revision must be specified when
|