import { RequestOptionsFactory } from '@wix/sdk-types'; /** * Creates a multi-service booking. * * * See Create Booking for more information. */ export declare function createMultiServiceBooking(payload: object): RequestOptionsFactory; /** * Reschedules a multi-service booking. * * * The call fails if at least 1 individual booking can't be rescheduled due * the service being unavailable or a rescheduling policy violation. * * * See Reschedule Booking for more information. */ export declare function rescheduleMultiServiceBooking(payload: object): RequestOptionsFactory; /** * Retrieves a multi-service booking's availability. * * * Use List Multi Service Availability Time Slots to check availability for a * `SEQUENTIAL_BOOKINGS` multi-service booking. */ export declare function getMultiServiceBookingAvailability(payload: object): RequestOptionsFactory; /** Cancels a multi-service booking and thus all its individual bookings. */ export declare function cancelMultiServiceBooking(payload: object): RequestOptionsFactory; /** * Updates the status of a multi-service booking to `PENDING`. * * * Also updates the status of each of individual bookings within the multi-service booking to `PENDING`. * * The call fails if the status for at least a single individual booking can't be updated. * * See Mark Booking as Pending for more information. */ export declare function markMultiServiceBookingAsPending(payload: object): RequestOptionsFactory; /** * Updates the status of a multi-service booking to `CONFIRMED`. * * * Also updates the status of each of individual bookings within the multi-service booking to `CONFIRMED`. * * The call fails if the status for at least a single individual booking can't be updated. * * See Confirm Booking for more information. */ export declare function confirmMultiServiceBooking(payload: object): RequestOptionsFactory; /** * Updates the status of a multi-service booking to `DECLINED`. * * * Also updates the status of each of individual bookings within the multi-service booking to `DECLINED`. * * The call fails if the status for at least a single individual booking can't be updated. * * See Decline Booking for more information. */ export declare function declineMultiServiceBooking(payload: object): RequestOptionsFactory; /** Retrieves the allowed actions for a list of multi-service bookings. */ export declare function bulkGetMultiServiceBookingAllowedActions(payload: object): RequestOptionsFactory; /** * Retrieves all single-service bookings belonging to a multi-service booking. * * * If you call as an [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) * who has permissions to read only part of the bookings, * only the permitted bookings are retrieved. The returned total number of * bookings includes also the bookings for which you don't have permissions. */ export declare function getMultiServiceBooking(payload: object): RequestOptionsFactory; /** * Adds a list of single-service bookings to a multi-service booking. * * * The call fails, if at least 1 of the specified booking is already part of a * multi-service booking. */ export declare function addBookingsToMultiServiceBooking(payload: object): RequestOptionsFactory; /** * Removes single-service bookings from a multi-service booking and returns the * removed bookings. * * * If you specify an empty `bookings` array, all single-service bookings for which * the call's [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) * has read permissions are removed from the multi-service booking. * * If the call would create a multi-service booking including only 1 single-service * booking, the multi-service booking is also deleted. */ export declare function removeBookingsFromMultiServiceBooking(payload: object): RequestOptionsFactory; /** * Creates a booking. * * * ## Appointment booking * * For appointment-based services, specify the relevant `slot` in * `bookedEntity.slot`. We recommend specifying the complete * `availabilityEntries.slot` returned in Query Availability * ([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)) * in your call's request to avoid failed calls due to unavailability. * * ## Class session booking * * For class services, specify the relevant event ID * ([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)) * as `bookedEntity.slot.eventId`. * We recommend retrieving the event ID from Query Availability's * ([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)) * `availabilityEntries.slot.eventId` to avoid failed calls due to unavailability. * Specifying an event ID leads to automatic calculations of `slot.startDate`, `slot.endDate`, * `slot.timezone`, `slot.resource`, and `slot.location`. All manually specified * values are overridden. * * ## Course booking * * For course services, specify the course's schedule ID in `bookedEntity.schedule.scheduleId`. * We recommend following [this sample flow](https://dev.wix.com/docs/rest/business-solutions/bookings/sample-booking-flows#book-a-course) * to minimize failed calls due to unavailability. * * ## Related resources * * Specifying a `resource` triggers an availability check, resulting in a failed * call if the resource is unavailable. Omitting a resource allows Wix Bookings * to assign a resource belonging to the relevant type randomly when the merchant * confirms the booking. * * ## Participant information * * You must specify either `participantsChoices` or `totalParticipants`. * The call fails if the specified `participantsChoices` aren't among the supported * service options and variants * ([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)). * * ## Notify customers * * You can specify a `participantNotification.message` for the customer that's send * immediately. Ensure `participantNotification.notifyParticipants` is set to `true` * to send the message. * * If you specify `{"sendSmsReminder": true}`, the customer receives an SMS 24 hours * before the session starts. The phone number is taken from `contactDetails.phone`. * * ## Booking status * * Bookings default to the `CREATED` status, not affecting the business calendar * or resource availability. You can specify a different status when the calling * [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) * has `Manage Bookings` permissions. * * ## Payment options * * The specified `selectedPaymentOption` indicates how the customer intends to * pay, allowing for later changes to a different method supported by the service. * * ## Payment status * * A booking is initially created with `{"paymentStatus": "UNDEFINED"}` regardless * of the payment status specified in Create Booking. If a customer uses an eCommerce * 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)), * Wix Bookings automatically syncs the booking's payment status from * 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)). * * If a booking doesn't have a corresponding eCommerce order, for example, since * the customer didn't use the eCommerce checkout, you can update the booking's * payment status with Confirm Or Decline Booking * ([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)). * * ## Booking form data * * When customers sign up for a service, they must fill out the booking form. * To create a booking with a completed booking form, specify the relevant data in * `formSubmission`. Ensure the values of the corresponding fields in * `booking.contactDetails` and `formSubmission` are identical. If these values * don't match, Create Booking fails. Therefore, we recommend specifying * only `booking.contactDetails.contactId` when providing `formSubmission`. * * ## Admin overwrites * * There are small but important differences when you specify special * `flowControlSettings`: * * - `{"skipAvailabilityValidation": true}`: The call succeeds * regardless of availability. If you don't specify any resource, the call * succeeds even if no resource of the relevant type is available. * - `{"skipBusinessConfirmation": true}`: Automatically confirms `PENDING` * bookings that require manual confirmation. * - `{"skipSelectedPaymentOptionValidation": true}`: Allows customers to pay * with payment methods that aren't supported for the service. * * When using special `flowControlSettings`, ensure you have sufficient * permissions. If you encounter failed calls due to insufficient permissions, * consider the following options: * * - **App developers** can use a higher * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions), * such as `MANAGE BOOKINGS - ALL PERMISSIONS`. * - **Site developers** can utilize * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation). * * Granting additional permissions and using elevation permits method calls that * would typically fail due to authorization checks. Therefore, you should use * them intentionally and securely. */ export declare function createBooking(payload: object): RequestOptionsFactory; /** * Creates up to 8 bookings. * * * 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)) * for more information. * * If any of the specified bookings is missing a required field the entire call * fails. * * If you specify 1 or more unavailable bookings, the call succeeds * while the unavailable bookings aren't created. Instead, they're counted as * failures in the returned `bulkActionMetadata`. */ export declare function bulkCreateBooking(payload: object): RequestOptionsFactory; /** * Reschedules an appointment booking to a different slot or a class booking to * a different session. * * * ## Course booking limitation * * You can't reschedule course bookings. * * ## Appointment sessions * * For appointments, the old session is removed from the business calendar * while a new session is added. We recommend calling Query Availability * ([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)) * first and specifying the entire retrieved `slot`. * * ## Class sessions * * For classes, the new session must be an existing session belonging to the * same class. We recommend retrieving `availabilityEntries.slot.eventId` * from Query Availability * ([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)) * to avoid failed Reschedule Booking calls due to unavailability. Specify * only `slot.eventId` instead of the entire `slot` object. * * ## Notify customers * * You can specify a `participantNotification.message` for the customer. To send * the message, you must also specify `participantNotification.notifyParticipants` * as `true`. * * ## Admin overwrites * * There are small but important differences when you specify special * `flowControlSettings`: * * - `{"ignoreReschedulePolicy": true}`: The call succeeds even if the * service's `reschedulePolicy` doesn't allow it. * - `{"skipAvailabilityValidation": true}`: The call succeeds even if * the specified session, slot, or resource isn't available. If you don't * specify any resource, the call succeeds even if no resource of the relevant * type is available. * - `{"skipBusinessConfirmation": true}`: Any `PENDING` booking is * automatically confirmed even if the services requires the merchants's * manual confirmation. * * When using special `flowControlSettings`, ensure you have sufficient * permissions. If you encounter failed calls due to insufficient permissions, * consider the following options: * * - **App developers** can use a higher * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions), * such as `MANAGE BOOKINGS - ALL PERMISSIONS`. * - **Site developers** can utilize * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation). * * Granting additional permissions and using elevation permits method calls that * would typically fail due to authorization checks. Therefore, you should use * them intentionally and securely. */ export declare function rescheduleBooking(payload: object): RequestOptionsFactory; /** * Updates the booking status to `CONFIRMED` and updates the relevant session's * `participants.approvalStatus` to `APPROVED` without checking whether the relevant * slot or schedule is still available. * * ## eCommerce checkout restriction * * Call this method only when using a custom checkout page. Don't * call it when using a Wix eCommerce 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)). * In such cases, Wix automatically updates the booking status based on * the `paymentStatus` of the corresponding Wix 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)). * * ## When to call Confirm Or Decline Booking instead * * Confirm Booking doesn't check whether a slot or schedule is still available. For * these checks you can call Confirm or Decline Booking * ([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)). * * ## Original status validation * * You can only confirm bookings with a status of `PENDING`, `CREATED`, or * `WAITING_LIST`. * * ## Double bookings * * Confirm Booking doesn't check whether a slot or schedule is still available. * You can specify * * ```json * { * "flowControlSettings": { * "checkAvailabilityValidation": true * }, * "doubleBooked": true * } * ``` * to forcefully set the booking's `doubleBooked` flag to `true`, regardless of * a potential double booking conflict. You must call with `Manage Bookings` * permissions to do so. For the default flow control settings * `{"checkAvailabilityValidation": false}`, the specified `doubleBooked` value * is ignored. * * ## Payment status * * Also updates the booking's `paymentStatus`, if you specify a new payment * status. * * ## Notify customers * * You can specify a `participantNotification.message` for the customer. To send * the message, you must also specify `participantNotification.notifyParticipants` * as `true`. */ export declare function bookingsConfirmBooking(payload: object): RequestOptionsFactory; /** * Updates the extended fields for a booking. * * * If you specify an extended field `namespace` that doesn't exist yet, it's * created. * * Learn more about [extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/about-backend-extensions#schema-plugin-extensions). */ export declare function updateExtendedFields(payload: object): RequestOptionsFactory; /** * Updates the booking status to `DECLINED` and updates the relevant session's * `participants.approvalStatus` to `DECLINED` without checking whether the relevant * slot or schedule is still available. * * * ## eCommerce checkout restriction * * Call this method only when using a custom checkout page. Don't * call it when using a Wix eCommerce 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)). * In such cases, Wix automatically updates the booking status based on * the `paymentStatus` of the corresponding Wix 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)). * * ## When to call Confirm Or Decline Booking instead * * The method doesn't check whether a slot or schedule is still available. For * these checks you can call Confirm or Decline Booking * ([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)). * * ## Original status validation * * You can only decline bookings with a `status` of `PENDING`, `CREATED`, or * `WAITING_LIST`. * * ## Payment status * * Also updates the booking's `paymentStatus`, if you specify a new payment * status. * * ## Notify customers * * You can specify a `participantNotification.message` for the customer. To send * the message, you must also specify `participantNotification.notifyParticipants` * as `true`. */ export declare function bookingsDeclineBooking(payload: object): RequestOptionsFactory; /** * Updates the booking status to `CANCELED`. * * * ## Appointments * * For appointments, the corresponding event is removed from the Bookings * calendar. * * ## Class and course bookings * * For class or course bookings, the relevant participants are removed * from the class session or the course. However, the class session or course * remain on the business calendar. * * ## Notify customers * * You can specify a `participantNotification.message` for the customer. To send * the message, you must also specify `participantNotification.notifyParticipants` * as `true`. * * ## Admin overwrites * * There are small but important differences when you specify special * `flowControlSettings`: * * - `{"ignoreCancellationPolicy": true}`: The call succeeds even if the * service's `cancellationPolicy` doesn't allow it. * - `{"withRefund": true}`: The customer is refunded even if the service's * `refundPolicy` doesn't allow it. * - `{"waiveCancellationFee": true}`: The customer doesn't have to pay * the cancellation fee, even if the service's `cancellationPolicy` requires it. * * When using special `flowControlSettings`, ensure you have sufficient * permissions. If you encounter failed calls due to insufficient permissions, * consider the following options: * * - **App developers** can use a higher * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions), * such as `MANAGE BOOKINGS - ALL PERMISSIONS`. * - **Site developers** can utilize * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation). * * Granting additional permissions and using elevation permits method calls that * would typically fail due to authorization checks. Therefore, you should use * them intentionally and securely. */ export declare function bookingsCancelBooking(payload: object): RequestOptionsFactory; /** * Updates the number of participants for a class or course booking and changes * the `totalNumberOfParticipants` for the relevant sessions. * * * ## Appointment limitation * * You can't update the number of participants for appointment bookings. * * ## Participant information * * You must specify either `participantsChoices` or `totalParticipants`. * The call fails if the specified `participantsChoices` aren't among the * supported service options and variants * ([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)). */ export declare function bookingsUpdateNumberOfParticipants(payload: object): RequestOptionsFactory; /** * Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based * on the `paymentStatus` you provide, double booking conflicts, and whether * the service requires business approval. * * ## eCommerce checkout restriction * * Call this method only when using a custom checkout page. Don't * call it when using a Wix eCommerce 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)). * In such cases, Wix automatically updates the booking status based on * the `paymentStatus` of the corresponding Wix 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)). * * ## New booking status * * The booking `status` is set to `DECLINED` if both of the following conditions * are met: * + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status. * + There is a double booking conflict. * * If only one or none of these conditions is met, `status` is set to `PENDING` * or `CONFIRMED` depending on whether the service requires business approval. * * ## Double bookings * * If there is a double booking conflict, but the booking has already been at least * partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`. * Then, it also sets `doubleBooked` to `true`. * * ## Admin overwrites * * There are small but important differences in confirmation behavior if the * booking was created with special `flowControlSettings`: * + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to * `true`, the booking is never declined regardless of double booking conflicts. * Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the * service requires business approval. * + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to * `true`, the booking skips `PENDING` status and is marked `CONFIRMED` * immediately. */ export declare function confirmOrDeclineBooking(payload: object): RequestOptionsFactory; /** * Confirms or declines up to 300 bookings. * * * See Confirm Or Decline Booking * ([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)) * for details about when a booking is confirmed or declined. */ export declare function bulkConfirmOrDeclineBooking(payload: object): RequestOptionsFactory;