import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types'; import { ConfirmOrDeclineBookingOptions, ConfirmOrDeclineBookingResponse, ConfirmOrDeclineBookingApplicationErrors, BulkConfirmOrDeclineBookingRequestBookingDetails, BulkConfirmOrDeclineBookingOptions, BulkConfirmOrDeclineBookingResponse, BulkConfirmOrDeclineBookingApplicationErrors, V1CancelBookingAnonymouslyResponse, BookingsCancelBookingAnonymouslyApplicationErrors, V2Slot, BookingsRescheduleBookingAnonymouslyOptions, V1RescheduleBookingAnonymouslyResponse, BookingsRescheduleBookingAnonymouslyApplicationErrors, BookingsGetBookingAnonymouslyOptions, V1GetBookingAnonymouslyResponse, BookingsGetBookingAnonymouslyApplicationErrors, GetServiceAnonymouslyOptions, GetServiceAnonymouslyResponse, GetServiceAnonymouslyApplicationErrors, GetAnonymousActionTokenResponse, GetAnonymousActionTokenApplicationErrors, Booking, CreateMultiServiceBookingOptions, CreateMultiServiceBookingResponse, CreateMultiServiceBookingApplicationErrors, RescheduleBookingInfo, RescheduleMultiServiceBookingOptions, RescheduleMultiServiceBookingResponse, RescheduleMultiServiceBookingApplicationErrors, GetMultiServiceBookingAvailabilityResponse, GetMultiServiceBookingAvailabilityApplicationErrors, CancelMultiServiceBookingOptions, CancelMultiServiceBookingResponse, CancelMultiServiceBookingApplicationErrors, MarkMultiServiceBookingAsPendingOptions, MarkMultiServiceBookingAsPendingResponse, MarkMultiServiceBookingAsPendingApplicationErrors, ConfirmMultiServiceBookingOptions, ConfirmMultiServiceBookingResponse, ConfirmMultiServiceBookingApplicationErrors, DeclineMultiServiceBookingOptions, DeclineMultiServiceBookingResponse, DeclineMultiServiceBookingApplicationErrors, BulkGetMultiServiceBookingAllowedActionsResponse, MultiServiceBooking, AddBookingsToMultiServiceBookingOptions, AddBookingsToMultiServiceBookingResponse, AddBookingsToMultiServiceBookingApplicationErrors, RemoveBookingsFromMultiServiceBookingOptions, RemoveBookingsFromMultiServiceBookingResponse, RemoveBookingsFromMultiServiceBookingApplicationErrors, CreateBookingOptions, CreateBookingResponse, CreateBookingApplicationErrors, CreateBookingInfo, BulkCreateBookingOptions, BulkCreateBookingResponse, BulkCreateBookingApplicationErrors, RescheduleBookingOptions, RescheduleBookingResponse, RescheduleBookingApplicationErrors, ConfirmBookingOptions, ConfirmBookingResponse, ConfirmBookingApplicationErrors, SetBookingSubmissionIdResponse, SetBookingSubmissionIdApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateExtendedFieldsApplicationErrors, DeclineBookingOptions, DeclineBookingResponse, DeclineBookingApplicationErrors, CancelBookingOptions, CancelBookingResponse, CancelBookingApplicationErrors, UpdateNumberOfParticipantsOptions, UpdateNumberOfParticipantsResponse, UpdateNumberOfParticipantsApplicationErrors, BulkCalculateAllowedActionsResponse, MarkBookingAsPendingOptions, MarkBookingAsPendingResponse, MarkBookingAsPendingApplicationErrors, BookingCanceledEnvelope, BookingConfirmedEnvelope, BookingCreatedEnvelope, BookingDeclinedEnvelope, BookingRescheduledEnvelope, BookingUpdatedEnvelope, BookingMarkedAsPendingEnvelope, BookingNumberOfParticipantsUpdatedEnvelope } from './index.typings.js'; export { AccountInfo, AccountInfoMetadata, ActionEvent, Actor, ActorWithLiterals, AddBookingsToMultiServiceBookingRequest, AddOnDetails, AddOnGroup, AddOnPaymentOptions, AddOnPaymentOptionsWithLiterals, Address, AddressLocation, AddressStreetOneOf, AllowedActions, AllowedActionsAnonymously, AllowedAnonymousActions, AnonymousBookingUrls, ApplicationError, AvailabilityConstraints, AvailableResources, BaseEventMetadata, BookAfterStartPolicy, BookedAddOn, BookedEntity, BookedEntityItemOneOf, BookedResource, BookedSchedule, BookedSlot, BookingCanceled, BookingChanged, BookingConfirmed, BookingDeclined, BookingDetails, BookingFee, BookingFeeStatus, BookingFeeStatusWithLiterals, BookingFormFilled, BookingIdAndRevision, BookingInfo, BookingMarkedAsPending, BookingParticipantsInfoOneOf, BookingPolicy, BookingPolicySettings, BookingPolicyViolations, BookingRescheduled, BookingRescheduledPreviousParticipantsInfoOneOf, BookingResult, BookingSource, BookingStatus, BookingStatusWithLiterals, BulkActionMetadata, BulkBookingResult, BulkCalculateAllowedActionsRequest, BulkCalculateAllowedActionsResult, BulkConfirmOrDeclineBookingRequest, BulkCreateBookingRequest, BulkGetMultiServiceBookingAllowedActionsRequest, BulkRescheduleBookingRequest, BulkRescheduleBookingRequestBooking, BulkRescheduleBookingResponse, BulkUpdateBookedScheduleRequest, BulkUpdateBookedScheduleResponse, BulkUpdateBookingRequest, BulkUpdateBookingResponse, BusinessLocationOptions, CancelBookingAnonymouslyRequest, CancelBookingAnonymouslyResponse, CancelBookingFlowControlSettings, CancelBookingRequest, CancelBookingRequestFlowControlSettings, CancelMultiServiceBookingRequest, CancellationFee, CancellationFeePolicy, CancellationPolicy, CancellationWindow, CancellationWindowFeeOneOf, Category, Clash, CommonAddress, CommonAddressLocation, CommonAddressStreetOneOf, CommonIdentificationData, CommonIdentificationDataIdOneOf, CommonMoney, CommonStreetAddress, CompletionRequirement, CompletionRequirementWithLiterals, Conferencing, ConfirmBookingFlowControlSettings, ConfirmBookingRequest, ConfirmMultiServiceBookingRequest, ConfirmOrDeclineBookingRequest, ConfirmRequest, ConfirmResponse, ConsistentQueryBookingsRequest, ConsistentQueryBookingsResponse, ContactDetails, CountBookingsRequest, CountBookingsResponse, CreateBookingFlowControlSettings, CreateBookingRequest, CreateBookingRequestFlowControlSettings, CreateMultiServiceBookingRequest, CursorPaging, Cursors, CustomFormField, CustomLocationOptions, CustomOptions, CustomPayment, DeclineBookingFlowControlSettings, DeclineBookingRequest, DeclineMultiServiceBookingRequest, DiscountInfo, DomainEvent, DomainEventBodyOneOf, Duration, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, FirstChargeDateType, FirstChargeDateTypeWithLiterals, FixedPayment, FlowControlSettings, Form, FormSettings, FrequencyType, FrequencyTypeWithLiterals, FullUpfrontPayment, GetAnonymousActionDetailsRequest, GetAnonymousActionDetailsResponse, GetAnonymousActionTokenRequest, GetBookingAnonymouslyRequest, GetBookingAnonymouslyResponse, GetMultiServiceBookingAvailabilityRequest, GetMultiServiceBookingAvailabilityResponseBookingInfo, GetMultiServiceBookingRequest, GetMultiServiceBookingResponse, GetScheduleAvailabilityRequest, GetScheduleAvailabilityResponse, GetSchedulingUrlRequest, GetSchedulingUrlResponse, GetServiceAnonymouslyRequest, GetSlotAvailabilityRequest, GetSlotAvailabilityResponse, IdentificationData, IdentificationDataIdOneOf, IdentificationDataIdentityType, IdentificationDataIdentityTypeWithLiterals, IdentityType, IdentityTypeWithLiterals, IntakeFormPolicy, ItemMetadata, Keyword, LegacyCreateBookingRequest, LegacyCreateBookingResponse, LimitEarlyBookingPolicy, LimitLateBookingPolicy, Location, LocationLocationType, LocationLocationTypeWithLiterals, LocationType, LocationTypeEnumLocationType, LocationTypeEnumLocationTypeWithLiterals, LocationTypeWithLiterals, MarkBookingAsPendingFlowControlSettings, MarkBookingAsPendingRequest, MarkMultiServiceBookingAsPendingRequest, MaskedBooking, Media, MediaItem, MediaItemItemOneOf, MessageEnvelope, MigrationCheckIfClashesWithBlockedTimeRequest, MigrationCheckIfClashesWithBlockedTimeResponse, Money, MsidAndBookingId, MultiServiceBookingInfo, MultiServiceBookingMetadata, MultiServiceBookingType, MultiServiceBookingTypeWithLiterals, NumberOfParticipantsUpdated, NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf, OnlineBooking, Paging, PagingMetadataV2, ParticipantChoices, ParticipantNotification, ParticipantsPolicy, Payment, PaymentOptions, PaymentRateOneOf, PaymentStatus, PaymentStatusWithLiterals, PhoneCall, Platform, PlatformWithLiterals, PolicyDescription, PolicyDetails, QueryBookingsRequest, QueryBookingsResponse, QueryV2, QueryV2PagingMethodOneOf, RankingOptions, RankingOrder, RankingOrderWithLiterals, RateType, RateTypeWithLiterals, RemoveBookingsFromMultiServiceBookingRequest, RequestedFields, RequestedFieldsWithLiterals, RescheduleBookingAnonymouslyRequest, RescheduleBookingAnonymouslyResponse, RescheduleBookingFlowControlSettings, RescheduleBookingInfoParticipantsInfoOneOf, RescheduleBookingOptionsParticipantsInfoOneOf, RescheduleBookingRequest, RescheduleBookingRequestFlowControlSettings, RescheduleBookingRequestParticipantsInfoOneOf, RescheduleMultiServiceBookingRequest, ReschedulePolicy, ResourceGroup, ResourceIds, ResourceSelection, ResourceTransparency, ResourceTransparencyWithLiterals, ResourceType, ResourcesPolicy, RestoreInfo, SaveCreditCardPolicy, Schedule, ScheduleAvailability, SelectedPaymentOption, SelectedPaymentOptionWithLiterals, SelectionMethod, SelectionMethodWithLiterals, SeoSchema, Service, ServiceChoice, ServiceChoiceChoiceOneOf, ServiceChoices, ServiceResource, ServiceResourceSelectionOneOf, ServiceType, ServiceTypeWithLiterals, ServicesV2PhoneCall, SetBookingSessionIdRequest, SetBookingSessionIdResponse, SetBookingSubmissionIdRequest, Settings, Slot, SlotAvailability, SlotBookings, SlotLocation, SlotResource, SlotSlotResource, Slug, SortOrder, SortOrderWithLiterals, Sorting, SortingMethodType, SortingMethodTypeWithLiterals, StaffMediaItem, StaffMediaItemItemOneOf, StaffMember, StaffMemberDetails, StaffSortingPolicy, StaffSortingPolicyOptionsOneOf, StreetAddress, Subdivision, SubscriptionPayment, Tag, TaxableAddress, TaxableAddressType, TaxableAddressTypeWithLiterals, Timing, TimingWithLiterals, Trigger, TriggerWithLiterals, URLs, UpdateBookingRequest, UpdateBookingResponse, UpdateExtendedFieldsRequest, UpdateNumberOfParticipantsOptionsParticipantsInfoOneOf, UpdateNumberOfParticipantsRequest, UpdateNumberOfParticipantsRequestParticipantsInfoOneOf, V1AllowedAnonymousActions, V1CancelBookingAnonymouslyRequest, V1GetBookingAnonymouslyRequest, V1RequestedFields, V1RequestedFieldsWithLiterals, V1RescheduleBookingAnonymouslyRequest, V2CancelBookingRequest, V2CancelBookingResponse, V2ConfirmBookingRequest, V2ConfirmBookingResponse, V2CreateBookingRequest, V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf, V2CreateBookingResponse, V2DeclineBookingRequest, V2DeclineBookingResponse, V2Duration, V2Location, V2LocationOptionsOneOf, V2PhoneCall, V2RescheduleBookingRequest, V2RescheduleBookingRequestParticipantsInfoOneOf, V2RescheduleBookingResponse, V2UpdateNumberOfParticipantsRequest, V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf, V2UpdateNumberOfParticipantsResponse, ValueType, ValueTypeWithLiterals, VariedPayment, WaitingList, WaitlistPolicy, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WebhooksIdentificationData, WebhooksIdentificationDataIdOneOf } from './index.typings.js'; declare function confirmOrDeclineBooking$1(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](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction). * In such cases, Wix Bookings automatically updates the booking status based on the `paymentStatus` of the corresponding [Wix eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction). * * ### When to call Confirm Booking or Decline Booking instead * * This method has specific limitations based on payment status and double booking conflicts. * Use the alternative methods in these scenarios: * + **To force confirm double-booked free bookings:** Call [Confirm Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking). * Confirm Or Decline Booking can't confirm double-booked free bookings. * + **To decline bookings without double booking conflicts:** Call [Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/decline-booking). * Confirm Or Decline Booking only declines bookings when both a double booking conflict exists and payment status is unpaid. * * ### 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): Promise & { __applicationErrorsType?: ConfirmOrDeclineBookingApplicationErrors; }>; } declare function bulkConfirmOrDeclineBooking$1(httpClient: HttpClient): BulkConfirmOrDeclineBookingSignature; interface BulkConfirmOrDeclineBookingSignature { /** * Confirms or declines up to 300 bookings. * * * See [Confirm Or Decline Booking](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: NonNullablePaths[], options?: BulkConfirmOrDeclineBookingOptions): Promise & { __applicationErrorsType?: BulkConfirmOrDeclineBookingApplicationErrors; }>; } declare function bookingsCancelBookingAnonymously$1(httpClient: HttpClient): BookingsCancelBookingAnonymouslySignature; interface BookingsCancelBookingAnonymouslySignature { /** * Cancels a booking using an anonymous token. * * * This method doesn't require standard authentication. Pass a token generated by [Get Anonymous Action Token](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/get-anonymous-action-token) instead. * * Before calling this method, check that `allowedAnonymousActions.cancel` is `true` in the [Get Booking Anonymously](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/anonymous-booking-actions-get-booking-anonymously) response. * @param - Anonymous token for the booking. * @param - Revision number, which increments by 1 each time the booking is updated. * To prevent conflicting changes, the current revision must be passed when canceling the booking. * @returns Response for CancelBookingAnonymously */ (token: string, revision: string): Promise & { __applicationErrorsType?: BookingsCancelBookingAnonymouslyApplicationErrors; }>; } declare function bookingsRescheduleBookingAnonymously$1(httpClient: HttpClient): BookingsRescheduleBookingAnonymouslySignature; interface BookingsRescheduleBookingAnonymouslySignature { /** * Reschedules a booking to a new slot using an anonymous token. * * * This method doesn't require standard authentication. Pass a token generated by [Get Anonymous Action Token](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/get-anonymous-action-token) instead. * * Before calling this method, check that `allowedAnonymousActions.reschedule` is `true` in the [Get Booking Anonymously](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/anonymous-booking-actions-get-booking-anonymously) response. * * A notification is always sent to participants. * @param - Anonymous token for the booking. * @param - New slot to reschedule the booking to. * @returns Response for RescheduleBookingAnonymously */ (token: string, slot: V2Slot, options: NonNullablePaths): Promise & { __applicationErrorsType?: BookingsRescheduleBookingAnonymouslyApplicationErrors; }>; } declare function bookingsGetBookingAnonymously$1(httpClient: HttpClient): BookingsGetBookingAnonymouslySignature; interface BookingsGetBookingAnonymouslySignature { /** * Retrieves a booking and its allowed anonymous actions using an anonymous token. * * * This method doesn't require standard authentication. Pass a token generated by [Get Anonymous Action Token](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/get-anonymous-action-token) instead. * * To include booking fee details, specify `BOOKING_FEES` in `fields`. * @param - Anonymous token for the booking. * @returns Response for GetBookingAnonymously */ (token: string, options?: BookingsGetBookingAnonymouslyOptions): Promise & { __applicationErrorsType?: BookingsGetBookingAnonymouslyApplicationErrors; }>; } declare function getServiceAnonymously$1(httpClient: HttpClient): GetServiceAnonymouslySignature; interface GetServiceAnonymouslySignature { /** * Retrieves the [service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) associated with a booking using an anonymous token. * * * This method doesn't require standard authentication. Pass a token generated by [Get Anonymous Action Token](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/get-anonymous-action-token) instead. * @param - Anonymous token for the booking. * @returns Response for GetServiceAnonymously */ (token: string, options?: GetServiceAnonymouslyOptions): Promise & { __applicationErrorsType?: GetServiceAnonymouslyApplicationErrors; }>; } declare function getAnonymousActionToken$1(httpClient: HttpClient): GetAnonymousActionTokenSignature; interface GetAnonymousActionTokenSignature { /** * Generates an anonymous action token for a booking. * * The generated token is an encrypted, URL-safe string that authorizes booking actions without authentication. Specify the token when calling other methods in this API to retrieve, cancel, or reschedule the booking without authentication. * * This is the only method in this API that requires authentication. * @param - Booking ID. * @returns Response for GetAnonymousActionToken */ (bookingId: string): Promise; } declare function createMultiServiceBooking$1(httpClient: HttpClient): CreateMultiServiceBookingSignature; interface CreateMultiServiceBookingSignature { /** * Creates a multi-service booking and all included single-service bookings simultaneously. * * * ### When to call this method * * Create sequential appointments where customers book related services together. For adding existing single-service bookings to an existing multi-service booking, call [Add Bookings to Multi Service Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/add-bookings-to-multi-service-booking) instead. * * ### Requirements and behavior * * __Package constraints__: Multi-service bookings support 2-8 appointment-based single-service bookings only (course and class bookings aren't supported). All single-service bookings must be at the same location with sequential scheduling and no gaps between appointments. * * __Timing specification__: You must provide complete `slot` details (`scheduleId`, `startDate`, `endDate`) for each single-service booking. Wix Bookings validates sequential timing but doesn't auto-calculate it. * * __Package pricing__: The total price equals the sum of individual services. Wix Bookings automatically syncs the payment status from the corresponding [Wix eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction) if the customer paid via an [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction). * * __Package notifications__: Customers receive 1 unified notification for the entire multi-service booking. Wix Bookings doesn't send notifications for the package's individual single-service bookings. * * ### Related methods * * Verify availability first with [List Multi Service Availability Time Slots](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/time-slots-v2/list-multi-service-availability-time-slots). * * See [Create Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/create-booking) for more details about constraints and effects of creating single-service bookings. * @param - Between 2 to 8 new single-service booking specifications to create and combine in a multi-service booking. * * Each single-service booking specification must include `slot` details (`scheduleId`, `startDate`, and `endDate`). * Specify contact details, number of participants, and any additional fields as needed. * * For sequential bookings, ensure the timing allows services to be scheduled back-to-back. */ (bookings: NonNullablePaths[], options?: CreateMultiServiceBookingOptions): Promise & { __applicationErrorsType?: CreateMultiServiceBookingApplicationErrors; }>; } declare function rescheduleMultiServiceBooking$1(httpClient: HttpClient): RescheduleMultiServiceBookingSignature; interface RescheduleMultiServiceBookingSignature { /** * Reschedules a multi-service booking by changing the timing for all or specific single-service bookings in the package. * * * This method reschedules single-service bookings within the multi-service booking while maintaining sequential order. You must specify exact new timing for each service to ensure they remain back-to-back with no gaps or overlaps. * * This method fails if it can't reschedule at least 1 single-service booking. You must provide the current revision number for each single-service booking you're rescheduling to prevent conflicting changes. * * See [Reschedule Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/reschedule-booking) for single-service booking rescheduling details. * @param - ID of the multi-service booking to reschedule. * @param - Information about the single-service bookings to reschedule. */ (multiServiceBookingId: string, rescheduleBookingsInfo: NonNullablePaths[], options?: RescheduleMultiServiceBookingOptions): Promise & { __applicationErrorsType?: RescheduleMultiServiceBookingApplicationErrors; }>; } declare function getMultiServiceBookingAvailability$1(httpClient: HttpClient): GetMultiServiceBookingAvailabilitySignature; interface GetMultiServiceBookingAvailabilitySignature { /** * Checks if the business can still accommodate an existing multi-service booking and returns overall bookability status, capacity details, and policy violations. * * * Wix Bookings considers: * - The relevant services' [booking policies](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction). * - The availability of all required [resources](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction). * * Call this method to check if an existing multi-service booking is still valid after business configuration changes. * For example, staff changes, policy updates, or capacity modifications. * * For checking availability before creating new multi-service bookings, call [List Multi Service Availability Time Slots](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/time-slots-v2/list-multi-service-availability-time-slots) instead. * @param - ID of the multi-service booking to retrieve. */ (multiServiceBookingId: string): Promise & { __applicationErrorsType?: GetMultiServiceBookingAvailabilityApplicationErrors; }>; } declare function cancelMultiServiceBooking$1(httpClient: HttpClient): CancelMultiServiceBookingSignature; interface CancelMultiServiceBookingSignature { /** * Cancels a multi-service booking and all its associated single-service bookings. * * * Cancels the entire multi-service booking, updating the status of all single-service bookings to `CANCELED`. * The call fails if all single-service bookings are already canceled or declined. * * See [Cancel Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/cancel-booking) for single-service booking cancellation details. * @param - ID of the multi-service booking to cancel. */ (multiServiceBookingId: string, options?: CancelMultiServiceBookingOptions): Promise & { __applicationErrorsType?: CancelMultiServiceBookingApplicationErrors; }>; } declare function markMultiServiceBookingAsPending$1(httpClient: HttpClient): MarkMultiServiceBookingAsPendingSignature; interface MarkMultiServiceBookingAsPendingSignature { /** * Updates the status for all single-service bookings in a multi-service booking to `PENDING`. * * * Call this method for multi-service bookings requiring manual business approval before confirmation. * * ### Status requirements * * - __Original status__: All single-service bookings must have `CREATED` status. * - __Target status__: All bookings move to `PENDING` together (all-or-nothing operation). * * ### Checkout restrictions * * Only call this method if the customer paid via a custom checkout. For Wix eCommerce checkouts, * Wix Bookings automatically manages the bookings' statuses based on payment processing. * * ### Additional updates * * - __Payment status__: Updates if you specify a new `markAsPendingBookingsInfo.paymentStatus`. * - __Customer notifications__: Send messages using `participantNotification`. * - __Revision control__: Requires current revision numbers for all single-service bookings. * * See [Mark Booking as Pending](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/mark-booking-as-pending) for more details about marking single-service bookings as pending. * @param - ID of the multi-service booking to mark as `PENDING`. */ (multiServiceBookingId: string, options?: MarkMultiServiceBookingAsPendingOptions): Promise & { __applicationErrorsType?: MarkMultiServiceBookingAsPendingApplicationErrors; }>; } declare function confirmMultiServiceBooking$1(httpClient: HttpClient): ConfirmMultiServiceBookingSignature; interface ConfirmMultiServiceBookingSignature { /** * Updates the status for all single-service bookings in a multi-service booking to `CONFIRMED`. * * * Call this method for multi-service bookings requiring manual business approval. * * ### Status requirements * * - __Original status__: All single-service bookings must have `PENDING`, `CREATED`, or `WAITING_LIST` status. * - __Target status__: All bookings move to `CONFIRMED` together (all-or-nothing operation). * * ### Checkout restrictions * * Only call this method if the customer paid via a custom checkout. For Wix eCommerce checkouts, * Wix Bookings automatically manages the bookings' statuses based on payment processing. * * ### Additional updates * * - __Payment status__: Updates if you specify a new `confirmBookingsInfo.paymentStatus`. * - __Customer notifications__: Send messages using `participantNotification`. * - __Revision control__: Requires current revision numbers for all single-service bookings. * * See [Confirm Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking) for more details about confirming single-service bookings. * @param - ID of the multi-service booking to confirm its related bookings. */ (multiServiceBookingId: string, options?: ConfirmMultiServiceBookingOptions): Promise & { __applicationErrorsType?: ConfirmMultiServiceBookingApplicationErrors; }>; } declare function declineMultiServiceBooking$1(httpClient: HttpClient): DeclineMultiServiceBookingSignature; interface DeclineMultiServiceBookingSignature { /** * Updates the status for all single-service bookings in a multi-service booking to `DECLINED`. * * * Call this method to reject multi-service bookings that can't be accommodated or don't meet business requirements. * * ### Status requirements * * - __Original status__: All single-service bookings must have `PENDING`, `CREATED`, or `WAITING_LIST` status. * - __Target status__: All bookings move to `DECLINED` together (all-or-nothing operation). * * ### Checkout restrictions * * Only call this method if the customer paid via a custom checkout. For Wix eCommerce checkouts, * Wix Bookings automatically manages the bookings' statuses based on payment processing. * * ### Additional updates * * - __Payment status__: Updates if you specify a new `declineBookingsInfo.paymentStatus`. * - __Customer notifications__: Send messages using `participantNotification`. * - __Revision control__: Requires current revision numbers for all single-service bookings. * * Refer to [Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/decline-booking) for more details about declining single-service bookings. * @param - ID of the multi-service booking to decline. */ (multiServiceBookingId: string, options?: DeclineMultiServiceBookingOptions): Promise & { __applicationErrorsType?: DeclineMultiServiceBookingApplicationErrors; }>; } declare function bulkGetMultiServiceBookingAllowedActions$1(httpClient: HttpClient): BulkGetMultiServiceBookingAllowedActionsSignature; interface BulkGetMultiServiceBookingAllowedActionsSignature { /** * Retrieves information about which actions the customer can perform for up to 50 multi-service bookings. * * * For each multi-service booking, the response indicates which actions are currently allowed: * - `cancel`: Whether the customer can cancel the multi-service booking. * - `reschedule`: Whether the customer can adjust the multi-service booking's timing. * * Bear the following considerations in mind when calling this method: * * __Real-time validation__: Wix Bookings calculates allowed actions based on current multi-service booking status, [booking policies](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction), and [available resources](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction) at the time of the call. * * __Permission context__: Depending on the permissions of the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities), you may see different allowed actions for the same multi-service booking. For example, if the identity has permissions to read only part of the multi-service booking, the response indicates which single-service bookings the identity can read. * * __Status dependencies__: Allowed actions change as bookings progress through their lifecycle (`CREATED` → `PENDING` → `CONFIRMED`/`DECLINED` → `CANCELED`). * Bookings can skip `PENDING` and move directly from `CREATED` to `CONFIRMED`/`DECLINED` based on service configuration. * @param - IDs of the multi-service bookings to retrieve allowed actions for. */ (multiServiceBookingIds: string[]): Promise>; } declare function getMultiServiceBooking$1(httpClient: HttpClient): GetMultiServiceBookingSignature; interface GetMultiServiceBookingSignature { /** * Retrieves a multi-service booking and all its associated single-service bookings. * * * Returns the complete multi-service booking information including its ID, associated single-service bookings, and the total number of scheduled single-service bookings. * * If you call on behalf of an [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) with permissions to read only part of the multi-service booking, only the permitted single-service bookings are retrieved. * The returned total number includes single-service bookings for which you don't have permissions. * * See [Query Extended Bookings](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-reader-v2/query-extended-bookings) for details about retrieving individual single-service bookings and additional metadata. * @param - ID of the multi-service booking. * @returns Retrieved multi-service booking. */ (multiServiceBookingId: string): Promise>; } declare function addBookingsToMultiServiceBooking$1(httpClient: HttpClient): AddBookingsToMultiServiceBookingSignature; interface AddBookingsToMultiServiceBookingSignature { /** * Expands an existing multi-service booking by adding existing single-service bookings to the package. * * * ### When to call this method * * Call this method to add 1 or more existing single-service bookings to an existing multi-service booking. * For creating a new multi-service booking with new single-service bookings, call [Create Multi Service Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/create-multi-service-booking) instead. * * ### Package integration * * The timing of the single-service bookings to add must be compatible with the multi-service booking's sequential schedule to ensure no gaps or overlaps between services in the updated package. * * ### Requirements and limitations * * - __Maximum capacity__: The total number of single-service bookings can't exceed 8. * - __Booking eligibility__: You can add only independent single-service bookings that aren't part of another multi-service booking. * - __Status compatibility__: Added bookings must have compatible status with the target multi-service booking. * - __Revision control__: You must provide current revision numbers for all single-service bookings to add. * @param - ID of the multi-service booking. */ (multiServiceBookingId: string, options?: NonNullablePaths): Promise & { __applicationErrorsType?: AddBookingsToMultiServiceBookingApplicationErrors; }>; } declare function removeBookingsFromMultiServiceBooking$1(httpClient: HttpClient): RemoveBookingsFromMultiServiceBookingSignature; interface RemoveBookingsFromMultiServiceBookingSignature { /** * Removes single-service bookings from a multi-service booking and converts them to independent single-service bookings. * * * ### Removal options * * __Remove all permitted 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. * * __Selective removal__: Specify single-service booking IDs and revisions to remove only specific single-service bookings from the package. * * __Sequential scheduling__: To maintain sequential scheduling, remove only first or last single-service bookings. For middle bookings, first reschedule all relevant single-service bookings to eliminate gaps. To do so, call [Reschedule Multi Service Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/reschedule-multi-service-booking) before removing the unwanted bookings. * * ### Removal behavior * * __Independent bookings__: Removed single-service bookings become independent bookings. * You can manage them using single-service booking methods. * * __Automatic cleanup__: Multi-service bookings must contain at least 2 services. * If removal results in only 1 remaining single-service booking for the multi-service booking, the entire multi-service booking is deleted and the remaining single-service booking becomes a standalone booking. * * __Revision control__: Specify current revision numbers to prevent conflicting modifications during the removal process. * @param - ID of the multi-service booking. */ (multiServiceBookingId: string, options?: RemoveBookingsFromMultiServiceBookingOptions): Promise & { __applicationErrorsType?: RemoveBookingsFromMultiServiceBookingApplicationErrors; }>; } declare function createBooking$1(httpClient: HttpClient): CreateBookingSignature; interface CreateBookingSignature { /** * Creates a booking. * * * ### Appointment booking * * For appointment-based services, specify the relevant time slot in `bookedEntity.slot`. * * We recommend following the [appointment booking sample flow](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/sample-flows#book-an-appointment) using Time Slots V2. * Specify the slot's `startDate`, `endDate`, `resource`, and `location` in `booking.bookedEntity.slot`. * * ### Class session booking * * For class services, specify the relevant event ID as `bookedEntity.slot.eventId`. * * We recommend following the [class session booking sample flow](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/sample-flows#book-a-class-session) using Time Slots V2. * Specify the `eventId` from the selected time slot in `booking.bookedEntity.slot.eventId`. * * When you specify `eventId`, Wix Bookings automatically derives `startDate`, `endDate`, `timezone`, `resource`, and `location` based on the event details. Manually specified values are ignored. * * ### 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/end-to-end-booking-flows#book-a-course) * to minimize failed calls due to unavailability. * * ### Booking status * * Create Booking defaults to `status=CREATED`. Such bookings aren't visible in the [Booking Calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-booking-calendar). * * Only [identities](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) with `Manage Bookings` permissions can set `status=CONFIRMED`. * * ### Related resources * * Specifying a `resource` triggers an availability check, and the Create Booking call fails if the resource is unavailable. * * If you omit `resource`, resource assignment and availability validation occur during booking confirmation. * If no resources are available, the behavior depends on the confirmation method used and payment status. * * ### Booking form data * * When customers sign up for a service, they must fill out the [booking form](https://support.wix.com/en/article/wix-bookings-creating-and-setting-up-your-booking-forms). * To create a booking with a completed booking form, specify the relevant data in `formSubmission`. * When specifying `formSubmission`, Wix Bookings sets all `booking.contactDetails` fields based on `formSubmission` and ignores any values in `booking.contactDetails`, except for `booking.contactDetails.contactId`. * To avoid conflicts, send `booking.contactDetails.contactId` together with `formSubmission`, and omit other contact details. * Learn more about the [Bookings and Wix Forms integration](https://dev.wix.com/docs/rest/business-solutions/bookings/wix-forms-integration). * * ### 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](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction). * * ### Add-ons * * You can include [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) when creating a booking by specifying `bookedAddOns`. * Each selected add-on must belong to an [add-on group](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-add-on-groups) associated with the service and respect the group's selection limits. * * ### 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`. * * ### Payment options * * The specified `selectedPaymentOption` indicates how the customer intends to pay, allowing for later changes to a different method supported by the service. * * When the customer pays with a [Wix eCommerce checkout](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/introduction), you must specify a `selectedPaymentOption`. * Otherwise, the Create Booking call fails. * For custom checkouts, you don't have to specify a `selectedPaymentOption`. * * ### Payment status * * All bookings are created with `paymentStatus=UNDEFINED`, ignoring the payment status you specify. * * For customers paying with a [Wix eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/purchase-flow/checkout/checkout/introduction), Wix Bookings automatically syncs the booking's payment status from the corresponding [eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction). * * For customers using a custom checkout, call [Confirm or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking) to update booking's payment status manually. * * ### 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. * - `{"skipAddOnValidation": true}`: Allows customers to choose add-ons that aren't associated with the service or exceed group selection limits. * - `{"allowAddOnChanges": true}`: Allows customers to update the list of add-ons associated with the booking when rescheduling. * * 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: NonNullablePaths, options?: CreateBookingOptions): Promise & { __applicationErrorsType?: CreateBookingApplicationErrors; }>; } declare function bulkCreateBooking$1(httpClient: HttpClient): BulkCreateBookingSignature; interface BulkCreateBookingSignature { /** * Creates up to 8 bookings. * * * See [Create Booking](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: NonNullablePaths[], options?: BulkCreateBookingOptions): Promise & { __applicationErrorsType?: BulkCreateBookingApplicationErrors; }>; } declare function rescheduleBooking$1(httpClient: HttpClient): RescheduleBookingSignature; interface RescheduleBookingSignature { /** * Reschedules an appointment booking to a different slot or a class booking to * a different session. * * * ### Updating add-ons * * You can also call this method to update the list of [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) associated with the booking. * To do so, both of these conditions must be met: * + The booking must have been created with `flowControlSettings.allowAddOnChanges` set to `true`. * + You must have `BOOKINGS.MANAGE_ADDONS` permissions and specify `flowControlSettings.allowAddOnChanges` as `true`. * * ### 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](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](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. * * ### Add-ons * * You can call Reschedule Booking to replace the list of [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) associated with the booking. * * To do so, all of these conditions must be met: * - The booking must have been created with `flowControlSettings.allowAddOnChanges` set to `true`. * - You must have `BOOKINGS.MANAGE_ADDONS` permissions. * - For bookings paid via an [eCommerce checkout](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/introduction): The related [eCommerce order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/draft-orders/introduction) must be in a draftable state to correctly adjust the price when modifying add-ons. You can call [Get Order Draftability Status](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/draft-orders/get-order-draftability-status), specifying the order ID to check if it's draftable. If the order isn't draftable, Reschedule Booking still succeeds, but the order's `priceSummary` isn't updated. * * ### 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. Also skips * external validation providers. * - `{"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?: NonNullablePaths): Promise & { __applicationErrorsType?: RescheduleBookingApplicationErrors; }>; } declare function confirmBooking$1(httpClient: HttpClient): ConfirmBookingSignature; interface ConfirmBookingSignature { /** * Updates the booking status to `CONFIRMED` 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](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](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction). * * ### When to call Confirm Booking * * When using a custom checkout flow for free bookings, call this method to confirm bookings even when a double booking conflict exists. * The alternative [Confirm or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking) method doesn't support confirming double-booked free bookings in this scenario. * * ### When to call Confirm Or Decline Booking instead * * Confirm Booking doesn't check whether a slot or schedule is still available. * For these checks, call [Confirm or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking) instead. * * ### 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, options?: ConfirmBookingOptions): Promise & { __applicationErrorsType?: ConfirmBookingApplicationErrors; }>; } declare function setBookingSubmissionId$1(httpClient: HttpClient): SetBookingSubmissionIdSignature; interface SetBookingSubmissionIdSignature { /** * Sets a form submission ID for a booking. * * * Use this method to associate a [Wix Forms submission](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/introduction) with a booking, or to replace an existing form submission with a new one. * * Learn more about [how Bookings integrates with Wix Forms](https://dev.wix.com/docs/api-reference/business-solutions/bookings/wix-forms-integration). * @param - ID of the booking to set `formSubmissionId` for. * @param - ID of the [Wix Forms submission](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/introduction) to associate with the booking. */ (bookingId: string, submissionId: string): Promise & { __applicationErrorsType?: SetBookingSubmissionIdApplicationErrors; }>; } declare function updateExtendedFields$1(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: NonNullablePaths): Promise & { __applicationErrorsType?: UpdateExtendedFieldsApplicationErrors; }>; } declare function declineBooking$1(httpClient: HttpClient): DeclineBookingSignature; interface DeclineBookingSignature { /** * Updates the booking status 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](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction). * In such cases, Wix Bookings automatically updates the booking status based on the `paymentStatus` of the corresponding [Wix eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction). * * ### When to call Decline Booking * * When using a custom checkout, call this method to decline bookings that don't have a double booking conflict. * The alternative [Confirm or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking) method doesn't support this scenario. * * ### When to call Confirm Or Decline Booking instead * * Decline Booking doesn't check whether a slot or schedule is still available. * For these checks you can call [Confirm or Decline Booking](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, options?: DeclineBookingOptions): Promise & { __applicationErrorsType?: DeclineBookingApplicationErrors; }>; } declare function cancelBooking$1(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?: NonNullablePaths): Promise & { __applicationErrorsType?: CancelBookingApplicationErrors; }>; } declare function updateNumberOfParticipants$1(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](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?: NonNullablePaths): Promise & { __applicationErrorsType?: UpdateNumberOfParticipantsApplicationErrors; }>; } declare function bulkCalculateAllowedActions$1(httpClient: HttpClient): BulkCalculateAllowedActionsSignature; interface BulkCalculateAllowedActionsSignature { /** * Checks whether you can [reschedule](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/reschedule-booking) or [cancel](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/cancel-booking) a list of bookings without using [force resolution](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/sample-flows#force-resolution). * * * Call this method to determine which standard actions are available before attempting to modify bookings. If standard actions aren't available, you may need to use force resolution to override business rules and availability validation. * @param - List of booking IDs to calculate allowed actions for. */ (bookingIds: string[]): Promise>; } declare function markBookingAsPending$1(httpClient: HttpClient): MarkBookingAsPendingSignature; interface MarkBookingAsPendingSignature { /** * Updates the booking status to `PENDING`. * * * ### Service requirement * * By default, this method only works for [services](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction) with `service.onlineBooking.requireManualApproval` set to `true`. * 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. * * ### Status requirements * * - __Original status__: Booking must have `CREATED` status. * - __Target status__: Booking moves to `PENDING`. * * ### Checkout restrictions * * Only call this method if the customer paid via a custom checkout. For [Wix eCommerce checkouts](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. * * When using custom checkouts, you can also update the booking's `paymentStatus` by specifying a new payment status. * * ### Business workflow * * After marking a booking as `PENDING`, the business must manually approve or reject it. You can call these methods: * - [Confirm Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking). * - [Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/decline-booking). * * ### Resource availability and scheduling * * Marking a booking as `PENDING` immediately affects resource availability: * * - **Calendar impact**: The booking appears on the business calendar. * - **Availability**: The time slot becomes unavailable for other bookings, even while pending approval. * - **Resource assignment**: Available [resources](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction) are automatically assigned if none were explicitly selected during booking creation. * * ### Double bookings * * By default, the method doesn't check for availability conflicts. To detect and handle double bookings, use the `checkAvailabilityValidation: true` admin overwrite. * * ### 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`: * * - `{"checkAvailabilityValidation": true}`: Checks for double booking conflicts before updating the status. * When conflicts exist, the booking is still marked as `PENDING` and `doubleBooked` is set to `true` for the business to resolve manually. * - `{"skipPendingApprovalServiceValidation": true}`: Allows marking any booking as pending, even if the service doesn't require manual approval. * * 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 mark as `PENDING`. * @param - Revision number, which increments by 1 each time the booking is updated. * * To prevent conflicting changes, the current revision must be specified when * managing the booking. */ (bookingId: string, revision: string, options?: MarkBookingAsPendingOptions): Promise & { __applicationErrorsType?: MarkBookingAsPendingApplicationErrors; }>; } declare const onBookingCanceled$1: EventDefinition; declare const onBookingConfirmed$1: EventDefinition; declare const onBookingCreated$1: EventDefinition; declare const onBookingDeclined$1: EventDefinition; declare const onBookingRescheduled$1: EventDefinition; declare const onBookingUpdated$1: EventDefinition; declare const onBookingMarkedAsPending$1: EventDefinition; declare const onBookingNumberOfParticipantsUpdated$1: EventDefinition; declare const confirmOrDeclineBooking: MaybeContext & typeof confirmOrDeclineBooking$1>; declare const bulkConfirmOrDeclineBooking: MaybeContext & typeof bulkConfirmOrDeclineBooking$1>; declare const bookingsCancelBookingAnonymously: MaybeContext & typeof bookingsCancelBookingAnonymously$1>; declare const bookingsRescheduleBookingAnonymously: MaybeContext & typeof bookingsRescheduleBookingAnonymously$1>; declare const bookingsGetBookingAnonymously: MaybeContext & typeof bookingsGetBookingAnonymously$1>; declare const getServiceAnonymously: MaybeContext & typeof getServiceAnonymously$1>; declare const getAnonymousActionToken: MaybeContext & typeof getAnonymousActionToken$1>; declare const createMultiServiceBooking: MaybeContext & typeof createMultiServiceBooking$1>; declare const rescheduleMultiServiceBooking: MaybeContext & typeof rescheduleMultiServiceBooking$1>; declare const getMultiServiceBookingAvailability: MaybeContext & typeof getMultiServiceBookingAvailability$1>; declare const cancelMultiServiceBooking: MaybeContext & typeof cancelMultiServiceBooking$1>; declare const markMultiServiceBookingAsPending: MaybeContext & typeof markMultiServiceBookingAsPending$1>; declare const confirmMultiServiceBooking: MaybeContext & typeof confirmMultiServiceBooking$1>; declare const declineMultiServiceBooking: MaybeContext & typeof declineMultiServiceBooking$1>; declare const bulkGetMultiServiceBookingAllowedActions: MaybeContext & typeof bulkGetMultiServiceBookingAllowedActions$1>; declare const getMultiServiceBooking: MaybeContext & typeof getMultiServiceBooking$1>; declare const addBookingsToMultiServiceBooking: MaybeContext & typeof addBookingsToMultiServiceBooking$1>; declare const removeBookingsFromMultiServiceBooking: MaybeContext & typeof removeBookingsFromMultiServiceBooking$1>; declare const createBooking: MaybeContext & typeof createBooking$1>; declare const bulkCreateBooking: MaybeContext & typeof bulkCreateBooking$1>; declare const rescheduleBooking: MaybeContext & typeof rescheduleBooking$1>; declare const confirmBooking: MaybeContext & typeof confirmBooking$1>; declare const setBookingSubmissionId: MaybeContext & typeof setBookingSubmissionId$1>; declare const updateExtendedFields: MaybeContext & typeof updateExtendedFields$1>; declare const declineBooking: MaybeContext & typeof declineBooking$1>; declare const cancelBooking: MaybeContext & typeof cancelBooking$1>; declare const updateNumberOfParticipants: MaybeContext & typeof updateNumberOfParticipants$1>; declare const bulkCalculateAllowedActions: MaybeContext & typeof bulkCalculateAllowedActions$1>; declare const markBookingAsPending: MaybeContext & typeof markBookingAsPending$1>; /** * Triggered when a booking is canceled. */ declare const onBookingCanceled: BuildEventDefinition & typeof onBookingCanceled$1; /** * Triggered when a booking is confirmed. */ declare const onBookingConfirmed: BuildEventDefinition & typeof onBookingConfirmed$1; /** * Triggered when a booking is created. */ declare const onBookingCreated: BuildEventDefinition & typeof onBookingCreated$1; /** * Triggered when a booking is declined. */ declare const onBookingDeclined: BuildEventDefinition & typeof onBookingDeclined$1; /** * Triggered when a booking is rescheduled. */ declare const onBookingRescheduled: BuildEventDefinition & typeof onBookingRescheduled$1; /** * Triggered when a booked schedule is updated. */ declare const onBookingUpdated: BuildEventDefinition & typeof onBookingUpdated$1; /** * Triggered when a booking is marked as pending. */ declare const onBookingMarkedAsPending: BuildEventDefinition & typeof onBookingMarkedAsPending$1; /** * Triggered when the number of participants is updated. */ declare const onBookingNumberOfParticipantsUpdated: BuildEventDefinition & typeof onBookingNumberOfParticipantsUpdated$1; export { AddBookingsToMultiServiceBookingApplicationErrors, AddBookingsToMultiServiceBookingOptions, AddBookingsToMultiServiceBookingResponse, Booking, BookingCanceledEnvelope, BookingConfirmedEnvelope, BookingCreatedEnvelope, BookingDeclinedEnvelope, BookingMarkedAsPendingEnvelope, BookingNumberOfParticipantsUpdatedEnvelope, BookingRescheduledEnvelope, BookingUpdatedEnvelope, BookingsCancelBookingAnonymouslyApplicationErrors, BookingsGetBookingAnonymouslyApplicationErrors, BookingsGetBookingAnonymouslyOptions, BookingsRescheduleBookingAnonymouslyApplicationErrors, BookingsRescheduleBookingAnonymouslyOptions, BulkCalculateAllowedActionsResponse, BulkConfirmOrDeclineBookingApplicationErrors, BulkConfirmOrDeclineBookingOptions, BulkConfirmOrDeclineBookingRequestBookingDetails, BulkConfirmOrDeclineBookingResponse, BulkCreateBookingApplicationErrors, BulkCreateBookingOptions, BulkCreateBookingResponse, BulkGetMultiServiceBookingAllowedActionsResponse, CancelBookingApplicationErrors, CancelBookingOptions, CancelBookingResponse, CancelMultiServiceBookingApplicationErrors, CancelMultiServiceBookingOptions, CancelMultiServiceBookingResponse, ConfirmBookingApplicationErrors, ConfirmBookingOptions, ConfirmBookingResponse, ConfirmMultiServiceBookingApplicationErrors, ConfirmMultiServiceBookingOptions, ConfirmMultiServiceBookingResponse, ConfirmOrDeclineBookingApplicationErrors, ConfirmOrDeclineBookingOptions, ConfirmOrDeclineBookingResponse, CreateBookingApplicationErrors, CreateBookingInfo, CreateBookingOptions, CreateBookingResponse, CreateMultiServiceBookingApplicationErrors, CreateMultiServiceBookingOptions, CreateMultiServiceBookingResponse, DeclineBookingApplicationErrors, DeclineBookingOptions, DeclineBookingResponse, DeclineMultiServiceBookingApplicationErrors, DeclineMultiServiceBookingOptions, DeclineMultiServiceBookingResponse, GetAnonymousActionTokenApplicationErrors, GetAnonymousActionTokenResponse, GetMultiServiceBookingAvailabilityApplicationErrors, GetMultiServiceBookingAvailabilityResponse, GetServiceAnonymouslyApplicationErrors, GetServiceAnonymouslyOptions, GetServiceAnonymouslyResponse, MarkBookingAsPendingApplicationErrors, MarkBookingAsPendingOptions, MarkBookingAsPendingResponse, MarkMultiServiceBookingAsPendingApplicationErrors, MarkMultiServiceBookingAsPendingOptions, MarkMultiServiceBookingAsPendingResponse, MultiServiceBooking, RemoveBookingsFromMultiServiceBookingApplicationErrors, RemoveBookingsFromMultiServiceBookingOptions, RemoveBookingsFromMultiServiceBookingResponse, RescheduleBookingApplicationErrors, RescheduleBookingInfo, RescheduleBookingOptions, RescheduleBookingResponse, RescheduleMultiServiceBookingApplicationErrors, RescheduleMultiServiceBookingOptions, RescheduleMultiServiceBookingResponse, SetBookingSubmissionIdApplicationErrors, SetBookingSubmissionIdResponse, UpdateExtendedFieldsApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateNumberOfParticipantsApplicationErrors, UpdateNumberOfParticipantsOptions, UpdateNumberOfParticipantsResponse, V1CancelBookingAnonymouslyResponse, V1GetBookingAnonymouslyResponse, V1RescheduleBookingAnonymouslyResponse, V2Slot, addBookingsToMultiServiceBooking, bookingsCancelBookingAnonymously, bookingsGetBookingAnonymously, bookingsRescheduleBookingAnonymously, bulkCalculateAllowedActions, bulkConfirmOrDeclineBooking, bulkCreateBooking, bulkGetMultiServiceBookingAllowedActions, cancelBooking, cancelMultiServiceBooking, confirmBooking, confirmMultiServiceBooking, confirmOrDeclineBooking, createBooking, createMultiServiceBooking, declineBooking, declineMultiServiceBooking, getAnonymousActionToken, getMultiServiceBooking, getMultiServiceBookingAvailability, getServiceAnonymously, markBookingAsPending, markMultiServiceBookingAsPending, onBookingCanceled, onBookingConfirmed, onBookingCreated, onBookingDeclined, onBookingMarkedAsPending, onBookingNumberOfParticipantsUpdated, onBookingRescheduled, onBookingUpdated, removeBookingsFromMultiServiceBooking, rescheduleBooking, rescheduleMultiServiceBooking, setBookingSubmissionId, updateExtendedFields, updateNumberOfParticipants };