import { EventDefinition, HttpClient } from '@wix/sdk-types'; import { AddBookingsToMultiServiceBookingOptions, AddBookingsToMultiServiceBookingResponse, AddBookingsToMultiServiceBookingResponseNonNullableFields, Booking, BookingCanceledEnvelope, BookingConfirmedEnvelope, BookingCreatedEnvelope, BookingDeclinedEnvelope, BookingNumberOfParticipantsUpdatedEnvelope, BookingRescheduledEnvelope, BookingUpdatedEnvelope, BulkConfirmOrDeclineBookingOptions, BulkConfirmOrDeclineBookingRequestBookingDetails, BulkConfirmOrDeclineBookingResponse, BulkConfirmOrDeclineBookingResponseNonNullableFields, BulkCreateBookingOptions, BulkCreateBookingResponse, BulkCreateBookingResponseNonNullableFields, BulkGetMultiServiceBookingAllowedActionsResponse, BulkGetMultiServiceBookingAllowedActionsResponseNonNullableFields, CancelBookingOptions, CancelBookingResponse, CancelBookingResponseNonNullableFields, CancelMultiServiceBookingOptions, CancelMultiServiceBookingResponse, CancelMultiServiceBookingResponseNonNullableFields, ConfirmBookingOptions, ConfirmBookingResponse, ConfirmBookingResponseNonNullableFields, ConfirmMultiServiceBookingOptions, ConfirmMultiServiceBookingResponse, ConfirmMultiServiceBookingResponseNonNullableFields, ConfirmOrDeclineBookingOptions, ConfirmOrDeclineBookingResponse, ConfirmOrDeclineBookingResponseNonNullableFields, CreateBookingInfo, CreateBookingOptions, CreateBookingResponse, CreateBookingResponseNonNullableFields, CreateMultiServiceBookingOptions, CreateMultiServiceBookingResponse, CreateMultiServiceBookingResponseNonNullableFields, DeclineBookingOptions, DeclineBookingResponse, DeclineBookingResponseNonNullableFields, DeclineMultiServiceBookingOptions, DeclineMultiServiceBookingResponse, DeclineMultiServiceBookingResponseNonNullableFields, GetMultiServiceBookingAvailabilityResponse, GetMultiServiceBookingAvailabilityResponseNonNullableFields, MarkMultiServiceBookingAsPendingOptions, MarkMultiServiceBookingAsPendingResponse, MarkMultiServiceBookingAsPendingResponseNonNullableFields, MultiServiceBooking, MultiServiceBookingNonNullableFields, RemoveBookingsFromMultiServiceBookingOptions, RemoveBookingsFromMultiServiceBookingResponse, RemoveBookingsFromMultiServiceBookingResponseNonNullableFields, RescheduleBookingInfo, RescheduleBookingOptions, RescheduleBookingResponse, RescheduleBookingResponseNonNullableFields, RescheduleMultiServiceBookingOptions, RescheduleMultiServiceBookingResponse, RescheduleMultiServiceBookingResponseNonNullableFields, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateExtendedFieldsResponseNonNullableFields, UpdateNumberOfParticipantsOptions, UpdateNumberOfParticipantsResponse, UpdateNumberOfParticipantsResponseNonNullableFields, V2Slot } from './bookings-v2-booking-bookings.universal.js'; export declare const __metadata: { PACKAGE_NAME: string; }; export declare function createMultiServiceBooking(httpClient: HttpClient): CreateMultiServiceBookingSignature; interface CreateMultiServiceBookingSignature { /** * Creates a multi-service booking. * * * See Create Booking for more information. * @param - Single-service bookings to combine in a multi-service booking. */ (bookings: Booking[], options?: CreateMultiServiceBookingOptions | undefined): Promise; } export declare function rescheduleMultiServiceBooking(httpClient: HttpClient): RescheduleMultiServiceBookingSignature; interface RescheduleMultiServiceBookingSignature { /** * 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. * @param - ID of the multi service booking to reschedule. * @param - Information about the single-service bookings to reschedule. */ (multiServiceBookingId: string | null, rescheduleBookingsInfo: RescheduleBookingInfo[], options?: RescheduleMultiServiceBookingOptions | undefined): Promise; } export declare function getMultiServiceBookingAvailability(httpClient: HttpClient): GetMultiServiceBookingAvailabilitySignature; interface GetMultiServiceBookingAvailabilitySignature { /** * Retrieves a multi-service booking's availability. * * * Use List Multi Service Availability Time Slots to check availability for a * `SEQUENTIAL_BOOKINGS` multi-service booking. * @param - ID of the multi-service booking to retrieve. */ (multiServiceBookingId: string | null): Promise; } export declare function cancelMultiServiceBooking(httpClient: HttpClient): CancelMultiServiceBookingSignature; interface CancelMultiServiceBookingSignature { /** * Cancels a multi-service booking and thus all its individual bookings. * @param - ID of the multi-service booking to cancel. */ (multiServiceBookingId: string | null, options?: CancelMultiServiceBookingOptions | undefined): Promise; } export declare function markMultiServiceBookingAsPending(httpClient: HttpClient): MarkMultiServiceBookingAsPendingSignature; interface MarkMultiServiceBookingAsPendingSignature { /** * 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. * @param - ID of the multi-service booking to mark as `PENDING`. */ (multiServiceBookingId: string | null, options?: MarkMultiServiceBookingAsPendingOptions | undefined): Promise; } export declare function confirmMultiServiceBooking(httpClient: HttpClient): ConfirmMultiServiceBookingSignature; interface ConfirmMultiServiceBookingSignature { /** * 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. * @param - ID of the multi-service booking to confirm its related bookings. */ (multiServiceBookingId: string | null, options?: ConfirmMultiServiceBookingOptions | undefined): Promise; } export declare function declineMultiServiceBooking(httpClient: HttpClient): DeclineMultiServiceBookingSignature; interface DeclineMultiServiceBookingSignature { /** * 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. * @param - ID of the multi service booking to decline. */ (multiServiceBookingId: string | null, options?: DeclineMultiServiceBookingOptions | undefined): Promise; } export declare function bulkGetMultiServiceBookingAllowedActions(httpClient: HttpClient): BulkGetMultiServiceBookingAllowedActionsSignature; interface BulkGetMultiServiceBookingAllowedActionsSignature { /** * Retrieves the allowed actions for a list of multi-service bookings. * @param - IDs of the multi-service bookings to retrieve allowed actions for. */ (multiServiceBookingIds: string[] | null): Promise; } export declare function getMultiServiceBooking(httpClient: HttpClient): GetMultiServiceBookingSignature; interface GetMultiServiceBookingSignature { /** * 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. * @param - ID of the multi-service booking. * @returns Retrieved multi-service booking. */ (multiServiceBookingId: string | null): Promise; } export declare function addBookingsToMultiServiceBooking(httpClient: HttpClient): AddBookingsToMultiServiceBookingSignature; interface AddBookingsToMultiServiceBookingSignature { /** * 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. * @param - ID of the multi-service booking. */ (multiServiceBookingId: string | null, options?: AddBookingsToMultiServiceBookingOptions | undefined): Promise; } export declare function removeBookingsFromMultiServiceBooking(httpClient: HttpClient): RemoveBookingsFromMultiServiceBookingSignature; interface RemoveBookingsFromMultiServiceBookingSignature { /** * 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. * @param - ID of the multi-service booking. */ (multiServiceBookingId: string | null, options?: RemoveBookingsFromMultiServiceBookingOptions | undefined): Promise; } export declare function createBooking(httpClient: HttpClient): CreateBookingSignature; interface CreateBookingSignature { /** * 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. * @param - The booking to create. */ (booking: Booking, options?: CreateBookingOptions | undefined): Promise; } export declare function bulkCreateBooking(httpClient: HttpClient): BulkCreateBookingSignature; interface BulkCreateBookingSignature { /** * 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`. * @param - Bookings to create. * * Max: 8 bookings */ (createBookingsInfo: CreateBookingInfo[], options?: BulkCreateBookingOptions | undefined): Promise; } export declare function rescheduleBooking(httpClient: HttpClient): RescheduleBookingSignature; interface RescheduleBookingSignature { /** * 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. * @param - ID of the booking to reschedule. * @param - New slot of the booking. * @param - An object representing the available options for rescheduling a booking. */ (bookingId: string, slot: V2Slot, options?: RescheduleBookingOptions | undefined): Promise; } export declare function confirmBooking(httpClient: HttpClient): ConfirmBookingSignature; interface ConfirmBookingSignature { /** * 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`. * @param - ID of the booking to confirm. * @param - Revision number, which increments by 1 each time the booking is updated. * To prevent conflicting changes, the current revision must be passed when * updating the booking. * @param - An object representing the available options for canceling a booking. */ (bookingId: string, revision: string | null, options?: ConfirmBookingOptions | undefined): Promise; } export declare function updateExtendedFields(httpClient: HttpClient): UpdateExtendedFieldsSignature; interface UpdateExtendedFieldsSignature { /** * 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). * @param - ID of the booking for which to update extended fields. * @param - [Namespace](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-reading-and-writing-schema-plugin-fields#namespaces) of the app for which to update extended fields. * @param - Options for updating the booking's extended fields. */ (_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise; } export declare function declineBooking(httpClient: HttpClient): DeclineBookingSignature; interface DeclineBookingSignature { /** * 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`. * @param - ID of the booking to decline. * @param - Revision number, which increments by 1 each time the booking is updated. * * To prevent conflicting changes, the current revision must be specified when * declining the booking. * @param - An object representing the available options for declining a booking. */ (bookingId: string, revision: string | null, options?: DeclineBookingOptions | undefined): Promise; } export declare function cancelBooking(httpClient: HttpClient): CancelBookingSignature; interface CancelBookingSignature { /** * 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. * @param - ID of the booking to cancel. * @param - An object representing the available options for canceling a booking. */ (bookingId: string, options?: CancelBookingOptions | undefined): Promise; } export declare function updateNumberOfParticipants(httpClient: HttpClient): UpdateNumberOfParticipantsSignature; interface UpdateNumberOfParticipantsSignature { /** * 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)). * @param - ID of the booking to update the number of participants for. */ (bookingId: string, options?: UpdateNumberOfParticipantsOptions | undefined): Promise; } export declare function confirmOrDeclineBooking(httpClient: HttpClient): ConfirmOrDeclineBookingSignature; interface ConfirmOrDeclineBookingSignature { /** * 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. * @param - ID of the booking to confirm or decline. */ (bookingId: string, options?: ConfirmOrDeclineBookingOptions | undefined): Promise; } export declare function bulkConfirmOrDeclineBooking(httpClient: HttpClient): BulkConfirmOrDeclineBookingSignature; interface BulkConfirmOrDeclineBookingSignature { /** * 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. * @param - Bookings to confirm or decline. */ (details: BulkConfirmOrDeclineBookingRequestBookingDetails[], options?: BulkConfirmOrDeclineBookingOptions | undefined): Promise; } export declare const onBookingCanceled: EventDefinition; export declare const onBookingConfirmed: EventDefinition; export declare const onBookingCreated: EventDefinition; export declare const onBookingDeclined: EventDefinition; export declare const onBookingRescheduled: EventDefinition; export declare const onBookingUpdated: EventDefinition; export declare const onBookingNumberOfParticipantsUpdated: EventDefinition; export { ActionEvent, Actor, AddBookingsToMultiServiceBookingOptions, AddBookingsToMultiServiceBookingRequest, AddBookingsToMultiServiceBookingResponse, AddBookingsToMultiServiceBookingResponseNonNullableFields, Address, AddressLocation, AddressStreetOneOf, AllowedActions, ApplicationError, AvailableResources, BaseEventMetadata, BookedEntity, BookedEntityItemOneOf, BookedResource, BookedSchedule, BookedSlot, Booking, BookingCanceled, BookingCanceledEnvelope, BookingChanged, BookingConfirmed, BookingConfirmedEnvelope, BookingCreatedEnvelope, BookingDeclined, BookingDeclinedEnvelope, BookingDetails, BookingFormFilled, BookingIdAndRevision, BookingInfo, BookingMarkedAsPending, BookingNumberOfParticipantsUpdatedEnvelope, BookingParticipantsInfoOneOf, BookingPolicySettings, BookingPolicyViolations, BookingRescheduled, BookingRescheduledEnvelope, BookingRescheduledPreviousParticipantsInfoOneOf, BookingResult, BookingSource, BookingStatus, BookingUpdatedEnvelope, BulkActionMetadata, BulkBookingResult, BulkCalculateAllowedActionsRequest, BulkCalculateAllowedActionsResponse, BulkCalculateAllowedActionsResult, BulkConfirmOrDeclineBookingOptions, BulkConfirmOrDeclineBookingRequest, BulkConfirmOrDeclineBookingRequestBookingDetails, BulkConfirmOrDeclineBookingResponse, BulkConfirmOrDeclineBookingResponseNonNullableFields, BulkCreateBookingOptions, BulkCreateBookingRequest, BulkCreateBookingResponse, BulkCreateBookingResponseNonNullableFields, BulkGetMultiServiceBookingAllowedActionsRequest, BulkGetMultiServiceBookingAllowedActionsResponse, BulkGetMultiServiceBookingAllowedActionsResponseNonNullableFields, BulkRescheduleBookingRequest, BulkRescheduleBookingRequestBooking, BulkRescheduleBookingResponse, BulkUpdateBookedScheduleRequest, BulkUpdateBookedScheduleResponse, BulkUpdateBookingRequest, BulkUpdateBookingResponse, CancelBookingFlowControlSettings, CancelBookingOptions, CancelBookingRequest, CancelBookingRequestFlowControlSettings, CancelBookingResponse, CancelBookingResponseNonNullableFields, CancelMultiServiceBookingOptions, CancelMultiServiceBookingRequest, CancelMultiServiceBookingResponse, CancelMultiServiceBookingResponseNonNullableFields, Clash, CommonIdentificationData, CommonIdentificationDataIdOneOf, ConfirmBookingFlowControlSettings, ConfirmBookingOptions, ConfirmBookingRequest, ConfirmBookingResponse, ConfirmBookingResponseNonNullableFields, ConfirmMultiServiceBookingOptions, ConfirmMultiServiceBookingRequest, ConfirmMultiServiceBookingResponse, ConfirmMultiServiceBookingResponseNonNullableFields, ConfirmOrDeclineBookingOptions, ConfirmOrDeclineBookingRequest, ConfirmOrDeclineBookingResponse, ConfirmOrDeclineBookingResponseNonNullableFields, ConfirmRequest, ConfirmResponse, ConsistentQueryBookingsRequest, ConsistentQueryBookingsResponse, ContactDetails, CountBookingsRequest, CountBookingsResponse, CreateBookingFlowControlSettings, CreateBookingInfo, CreateBookingOptions, CreateBookingRequest, CreateBookingRequestFlowControlSettings, CreateBookingResponse, CreateBookingResponseNonNullableFields, CreateMultiServiceBookingOptions, CreateMultiServiceBookingRequest, CreateMultiServiceBookingResponse, CreateMultiServiceBookingResponseNonNullableFields, CursorPaging, Cursors, CustomFormField, DeclineBookingFlowControlSettings, DeclineBookingOptions, DeclineBookingRequest, DeclineBookingResponse, DeclineBookingResponseNonNullableFields, DeclineMultiServiceBookingOptions, DeclineMultiServiceBookingRequest, DeclineMultiServiceBookingResponse, DeclineMultiServiceBookingResponseNonNullableFields, DomainEvent, DomainEventBodyOneOf, Duration, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, FlowControlSettings, GetMultiServiceBookingAvailabilityRequest, GetMultiServiceBookingAvailabilityResponse, GetMultiServiceBookingAvailabilityResponseBookingInfo, GetMultiServiceBookingAvailabilityResponseNonNullableFields, GetMultiServiceBookingRequest, GetMultiServiceBookingResponse, GetMultiServiceBookingResponseNonNullableFields, GetScheduleAvailabilityRequest, GetScheduleAvailabilityResponse, GetSlotAvailabilityRequest, GetSlotAvailabilityResponse, IdentificationData, IdentificationDataIdOneOf, IdentificationDataIdentityType, IdentityType, ItemMetadata, LegacyCreateBookingRequest, LegacyCreateBookingResponse, Location, LocationLocationType, LocationType, MarkBookingAsPendingFlowControlSettings, MarkBookingAsPendingRequest, MarkBookingAsPendingResponse, MarkMultiServiceBookingAsPendingOptions, MarkMultiServiceBookingAsPendingRequest, MarkMultiServiceBookingAsPendingResponse, MarkMultiServiceBookingAsPendingResponseNonNullableFields, MaskedBooking, MessageEnvelope, MigrationCheckIfClashesWithBlockedTimeRequest, MigrationCheckIfClashesWithBlockedTimeResponse, MsidAndBookingId, MultiServiceBooking, MultiServiceBookingInfo, MultiServiceBookingMetadata, MultiServiceBookingNonNullableFields, MultiServiceBookingType, NumberOfParticipantsUpdated, NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf, Paging, PagingMetadataV2, ParticipantChoices, ParticipantNotification, PaymentStatus, Platform, QueryBookingsRequest, QueryBookingsResponse, QueryV2, QueryV2PagingMethodOneOf, RemoveBookingsFromMultiServiceBookingOptions, RemoveBookingsFromMultiServiceBookingRequest, RemoveBookingsFromMultiServiceBookingResponse, RemoveBookingsFromMultiServiceBookingResponseNonNullableFields, RescheduleBookingFlowControlSettings, RescheduleBookingInfo, RescheduleBookingInfoParticipantsInfoOneOf, RescheduleBookingOptions, RescheduleBookingRequest, RescheduleBookingRequestFlowControlSettings, RescheduleBookingRequestParticipantsInfoOneOf, RescheduleBookingResponse, RescheduleBookingResponseNonNullableFields, RescheduleMultiServiceBookingOptions, RescheduleMultiServiceBookingRequest, RescheduleMultiServiceBookingResponse, RescheduleMultiServiceBookingResponseNonNullableFields, RestoreInfo, ScheduleAvailability, SelectedPaymentOption, ServiceChoice, ServiceChoiceChoiceOneOf, ServiceChoices, SetBookingFormAndSubmissionIdRequest, SetBookingFormAndSubmissionIdResponse, SetBookingSessionIdRequest, SetBookingSessionIdResponse, SetBookingSubmissionIdRequest, SetBookingSubmissionIdResponse, Slot, SlotAvailability, SlotBookings, SlotLocation, SlotResource, SlotSlotResource, SortOrder, Sorting, StreetAddress, Subdivision, UpdateBookingRequest, UpdateBookingResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse, UpdateExtendedFieldsResponseNonNullableFields, UpdateNumberOfParticipantsOptions, UpdateNumberOfParticipantsRequest, UpdateNumberOfParticipantsRequestParticipantsInfoOneOf, UpdateNumberOfParticipantsResponse, UpdateNumberOfParticipantsResponseNonNullableFields, V2CancelBookingRequest, V2CancelBookingResponse, V2ConfirmBookingRequest, V2ConfirmBookingResponse, V2CreateBookingRequest, V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf, V2CreateBookingResponse, V2DeclineBookingRequest, V2DeclineBookingResponse, V2RescheduleBookingRequest, V2RescheduleBookingRequestParticipantsInfoOneOf, V2RescheduleBookingResponse, V2Slot, V2UpdateNumberOfParticipantsRequest, V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf, V2UpdateNumberOfParticipantsResponse, ValueType, WaitingList, WebhookIdentityType, WebhooksIdentificationData, WebhooksIdentificationDataIdOneOf, } from './bookings-v2-booking-bookings.universal.js';