@wix/auto_sdk_bookings_bookings 1.0.55 → 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.
@@ -505,6 +505,67 @@ interface UpdateNumberOfParticipantsSignature {
505
505
  declare function markBookingAsPending$1(httpClient: HttpClient): MarkBookingAsPendingSignature;
506
506
  interface MarkBookingAsPendingSignature {
507
507
  /**
508
+ * Updates the booking status to `PENDING`.
509
+ *
510
+ *
511
+ * ## Service requirement
512
+ *
513
+ * 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`.
514
+ * 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.
515
+ *
516
+ * ## Status requirements
517
+ *
518
+ * - __Original status__: Booking must have `CREATED` status.
519
+ * - __Target status__: Booking moves to `PENDING`.
520
+ *
521
+ * ## Checkout restrictions
522
+ *
523
+ * 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.
524
+ *
525
+ * When using custom checkouts, you can also update the booking's `paymentStatus` by specifying a new payment status.
526
+ *
527
+ * ## Business workflow
528
+ *
529
+ * After marking a booking as `PENDING`, the business must manually approve or reject it. You can call these methods:
530
+ * - 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)).
531
+ * - 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)).
532
+ *
533
+ * ## Resource availability and scheduling
534
+ *
535
+ * Marking a booking as `PENDING` immediately affects resource availability:
536
+ *
537
+ * - **Calendar impact**: The booking appears on the business calendar.
538
+ * - **Availability**: The time slot becomes unavailable for other bookings, even while pending approval.
539
+ * - **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.
540
+ *
541
+ * ## Double bookings
542
+ *
543
+ * By default, the method doesn't check for availability conflicts. To detect and handle double bookings, use the `checkAvailabilityValidation: true` admin overwrite.
544
+ *
545
+ * ## Notify customers
546
+ *
547
+ * You can specify a `participantNotification.message` for the customer.
548
+ * To send the message, you must also specify `participantNotification.notifyParticipants` as `true`.
549
+ *
550
+ * ## Admin overwrites
551
+ *
552
+ * There are small but important differences when you specify special
553
+ * `flowControlSettings`:
554
+ *
555
+ * - `{"checkAvailabilityValidation": true}`: Checks for double booking conflicts before updating the status.
556
+ * When conflicts exist, the booking is still marked as `PENDING` and `doubleBooked` is set to `true` for the business to resolve manually.
557
+ * - `{"skipPendingApprovalServiceValidation": true}`: Allows marking any booking as pending, even if the service doesn't require manual approval.
558
+ *
559
+ * When using special `flowControlSettings`, ensure you have sufficient permissions.
560
+ * If you encounter failed calls due to insufficient permissions, consider the following options:
561
+ *
562
+ * - __App developers__ can use a higher
563
+ * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions), such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
564
+ * - __Site developers__ can utilize
565
+ * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
566
+ *
567
+ * Granting additional permissions and using elevation permits method calls that would typically fail due to authorization checks.
568
+ * Therefore, you should use them intentionally and securely.
508
569
  * @param - ID of the booking to mark as `PENDING`.
509
570
  * @param - Revision number, which increments by 1 each time the booking is updated.
510
571
  *