import { RequestOptionsFactory } from '@wix/sdk-types'; /** * Creates a service. * * * ## Required fields * * When creating a service you must specify the following fields: * - `type` * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types)): * Whether it's an appointment-based service, class, or course. * - `name`: Service name that's displayed to customers. * - `onlineBooking`: * Settings determining whether customers can book online, whether the business * must manually confirm bookings, and whether customers can request to book an * appointment time slot that already has a booking request awaiting business * confirmation. * - `payment` * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments)): * How customers can pay when signing up for the service. * * ### Session durations * * Depending on which type of service you're creating, you may also need to specify * supported session durations. * * __Classes and courses__ * * Don't specify `schedule.availabilityConstraints.sessionDurations`. * * __Appointment-based services without varied pricing based on session length__ * * Specify the single supported session duration in the * `schedule.availabilityConstraints.sessionDurations` array. * * __Appointment-based services with varied pricing based on session length__ * * - Specify all supported session durations in `schedule.availabilityConstraints.sessionDurations`. * - Note that Wix Bookings doesn't display these values to customers and * ignores them in pricing and availability calculations. Instead session * durations are retrieved from the relevant service 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)). * - It is mandatory to specify `schedule.availabilityConstraints.sessionDurations`, * even though these values are ignored. */ export declare function createService(payload: object): RequestOptionsFactory; /** Retrieves a service. */ export declare function getService(payload: object): RequestOptionsFactory; /** * Updates a service. * * * Each time the service is updated, `revision` increments by 1. You must * include the number of the existing revision when updating the service. * This ensures you're working with the latest service information and * prevents unintended overwrites. * * ## Session durations * * Specify `schedule.availabilityConstraints.sessionDurations` * only if you want to update it for appointment-based services without varied * pricing based on session length. Don't specify `schedule.availabilityConstraints.sessionDurations` * for all other appointment-based services, classes, or courses. See Create Service * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/create-service#session-durations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/create-service#session-durations)) * for more details. */ export declare function updateService(payload: object): RequestOptionsFactory; /** * Updates multiple services. * * * See Update Service * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service)) * for more details. * * The call succeeds even if one or more individual services can't be updated. * Information about failures is returned in `bulkActionMetadata`. */ export declare function bulkUpdateServices(payload: object): RequestOptionsFactory; /** * Updates multiple services by filter. * * * Refer to the supported filters article * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering)) * for more details. * * See Update Service * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service)) * for more details about updating a service. * * The call succeeds even if one or more individual services can't be updated. * Information about failures is returned in `bulkActionMetadata`. */ export declare function bulkUpdateServicesByFilter(payload: object): RequestOptionsFactory; /** * Deletes a service. * * * Specify `{"preserveFutureSessionsWithParticipants": true}` to retain all * future sessions for the service. By default, all future sessions are canceled. */ export declare function deleteService(payload: object): RequestOptionsFactory; /** * Deletes multiple services. * * * See Delete Service * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)) * for more details about deleting a service. * * The call succeeds even if one or more individual services can't be deleted. * Information about failures is returned in `bulkActionMetadata`. */ export declare function bulkDeleteServices(payload: object): RequestOptionsFactory; /** * Deletes multiple services by filter. * * * See Delete Service * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)) * for more details about deleting a service. * * The call succeeds even if one or more individual services can't be deleted. * Information about failures is returned in `bulkActionMetadata`. * * Refer to the supported filters article * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering)) * for more details. * * To learn about working with filters in general, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ export declare function bulkDeleteServicesByFilter(payload: object): RequestOptionsFactory; /** * Retrieves a list of up to 100 services, given the provided paging, filtering, and sorting. * `queryServices()` runs with these defaults, which you can override: * + `paging.limit` is `100`. * + `paging.offset` is `0`. * * * >**Notes:** * > + Use UTC format when filtering with dates. * > + Only 1 use of each filter in the same query is supported. If a filter is defined more than once in a query, only the first occurrence is processed. */ export declare function queryServices(payload: object): RequestOptionsFactory; /** * Retrieves a list of up to 100 services, given the provided filtering, paging, * and sorting. * * * ## Defaults * * Search Services has the following default settings, which you can override: * + Sorted by `createdDate` in ascending order. * + `paging.limit` set to `100`. * + `paging.offset` set to `0`. * * ## Filters * * When using filters for dates, you must use * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). * * Refer to the supported filters article * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)) * for a complete list of supported filters and sorting options. * * ## See also * * To learn about working with *Search* methods, see * API Query Language * ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)) * and Sorting and Paging * ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language#the-sort-array) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging)). */ export declare function searchServices(payload: object): RequestOptionsFactory; /** * Retrieves a list of up to 100 booking policies * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction)), * and information about the services that are connected to them, * given the provided filtering, paging, and sorting. * * ## Defaults * * Query Policies has the following default settings, which you can override: * * + Sorted by `id` in ascending order. * + `cursorPaging.limit` set to `100`. * * ## Filters * * For a complete list of supported filters, refer to **Booking Policies API: Supported Filters** * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters)). * * When using date filters, you must use * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). * * ## Returned services * * If a booking policy is connected to more than 5 services, only a subset of * those services is returned. The `bookingPolicies.totalServiceCount` values * indicate the total number of services linked to each policy. You can call Search Services * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/search-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/search-services)) * and specify the relevant policy ID in the filter to retrieve all services * connected to the booking policy. * * ## See also * * To learn about working with *Query* endpoints, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging). */ export declare function queryPolicies(payload: object): RequestOptionsFactory; /** * Retrieves a list of up to 100 booking forms * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/forms/forms/introduction) | [REST](https://dev.wix.com/docs/rest/crm/forms/forms/introduction)), * and information about the services that are connected to them, * given the provided filtering, paging, and sorting. * * * ## Defaults * * Query Booking Forms has the following default settings, which you can override: * * + Sorted by `id` in ascending order. * + `cursorPaging.limit` set to `100`. * * ## Filters * * For a complete list of supported filters, refer to **Forms API: Supported Filters** * ([REST](https://dev.wix.com/docs/rest/crm/forms/forms/introduction/supported-filters)). * * When using date filters, you must use * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). * * ## Returned services * * If a booking policy is connected to more than 5 services, only a subset of * these service IDs and names is returned. The `bookingForms.totalServiceCount` * values indicate the total number of services linked to each form. You can call Query Services * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/query-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/query-services)) * and specify the relevant form ID in the filter to retrieve all services * connected to the booking form. * * ## Default booking forms * * By default, all Wix Bookings services use a standard booking form. To retrieve * a site's default booking form with Query Booking Forms, specify * `{"conditionalFields": ["DEFAULT_BOOKING_FORM"]}`. * * ## See also * * To learn about working with *Query* endpoints, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging). */ export declare function queryBookingForms(payload: object): RequestOptionsFactory; /** * Counts how many services match the given filter. * * * Refer to the supported filters article * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering)) * for more details. * * To learn about working with filters in general, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters) */ export declare function countServices(payload: object): RequestOptionsFactory; /** * Retrieves 3 separate lists of business, custom, and customer locations * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)), * given the provided filtering, and whether each location is connected to at * least one of the site's services. * * * ## Defaults * * Query Locations has the following default setting, which you can't override: * Sorted by `id` in ascending order. * * ## Filters * * For a complete list of supported filters, refer to the supported filters article * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering)). * * When using date filters, you must use * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). * * ## See also * * To learn about working with *Query* endpoints, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging). */ export declare function queryLocations(payload: object): RequestOptionsFactory; /** * Retrieves a list of service categories * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/introduction)), * given the provided filtering. * * * ## Defaults * * Query Categories has the following default setting, which you can't override: * Sorted by `id` in ascending order. * * ## Filters * * For a complete list of supported filters, refer to the supported filters article * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering)). * * When using date filters, you must use * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). * * ## See also * * To learn about working with *Query* endpoints, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging). */ export declare function queryCategories(payload: object): RequestOptionsFactory; /** * Replaces the list of the locations * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)) * where the business offers the service. * * * ## Consequences for customers * * Removing a service location may impact existing sessions and their * participants. If you remove at least one service location, you must * specify `removedLocationSessionsAction` to indicate what happens to all * future sessions scheduled at this location. * * - **Keep existing location**: If you want to retain future sessions at their * originally scheduled location, specify * `{"removedLocationSessionsAction.action": "KEEP_AT_CURRENT_LOCATION"}`. * This ensures nothing changes for the customer, but the business must be * able to provide access to the removed location in the future. * - **Update location**: If you want to update the location for future sessions * scheduled at the removed location, specify * `{"removedLocationSessionsAction.action": "MOVE_TO_LOCATION"}` and * `moveToLocationOptions.newLocation`. * * You can't mix and match to keep some sessions at the previous location while * moving other sessions to an updated location. * * Past session details aren't changed, no matter which option you choose for * future sessions. * * Future sessions scheduled for a location defined by the customer are also not * updated. * * ## Specify location details * * Depending on whether the new or updated location is a business or custom location, * you need to specify different fields. * * - **Business location**: Specify the relevant location ID * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)) * in `locations.business.id`. * - **Custom location**: Specify the complete address object as * `locations.custom.address`. * * ## Participant notifications * * You can specify a `participantNotification.message` that's immediately send * to all customers who had booked at a changed location. Ensure * `participantNotification.notifyParticipants` is set to `true` to send the * message. */ export declare function setServiceLocations(payload: object): RequestOptionsFactory; /** * Adds a list of pricing plans ID * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object)) * to a service's `payment.pricingPlanIds` array. * * * The call doesn't validate whether the service's `payment.options.pricingPlan` * is set to `true`. If it's set to `false`, customers aren't able to pay * for their bookings using pricing plans. You can call Update Service * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service)) * to change a service's supported payment methods. */ export declare function enablePricingPlansForService(payload: object): RequestOptionsFactory; /** * Removes a list of pricing plans ID * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object)) * from a service's `payment.pricingPlanIds` array. * * * If you remove all pricing plan IDs from `payment.pricingPlanIds` and the * service supports only payments by pricing plan, customers will no longer be * able to book the service, as they will have no payment options available. */ export declare function disablePricingPlansForService(payload: object): RequestOptionsFactory; /** * Sets a new active slug for the service. * * * The call fails if at least one of these conditions is met: * - The slug doesn't adheres to the supported format. * - Another service is currently using the slug. * - Another service has used the slug in the past. */ export declare function setCustomSlug(payload: object): RequestOptionsFactory; /** * Checks whether a custom slug is validate for the service. * * * The checks include: * - The slug adheres to the supported format. * - No other service is currently using the slug. * - No other service has used the slug in the past. * * The call fails if at least one of the checks fails. */ export declare function validateSlug(payload: object): RequestOptionsFactory; /** * Clones a service. * * * ## Connected entities * * By default, not all entities connected to the service are cloned. * * ### Schedule * * Wix Bookings automatically creates a new active *schedule* * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)) * for the cloned service. If Wix Bookings can't create this schedule, the * Clone Service* call fails. * * - __For appointment-based services__: Future appointments aren't added to the * cloned service's schedule. Use the *Events API* * ([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)) * to add them as needed. * - __For classes and courses__: Future one-time events aren't added to the * cloned service's schedule, while future recurring events are added * asynchronously. The *Clone Service* call always succeeds, whether or not * recurring events are added. * If the response includes `RECURRING_EVENTS` in the `errors` array, it means the * cloned service doesn't have future recurring events, even though the original * service does. You can either delete the cloned service and try again or use * the *Events API* * ([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)) * to add missing events to the schedule. * * Wix Bookings never adds past events to the cloned service's schedule. * * ### Service options and variants * * If the original service has 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)), * they're cloned asynchronously. The *Clone Service* call always succeeds, * regardless of whether variants were cloned. * * If the response includes `OPTIONS_AND_VARIANTS` in the `errors` array, the cloned * service doesn't have variants, even though the original service does. You can * delete the cloned service and call *Clone Service* again, or use the * Service Options And Variants API* * ([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)) * to add variants. * * ### Booking form * * The original service's booking form isn't cloned, whether it's * the default or a custom booking form. * * ### Pricing plans * * If the original service's accepts payments via pricing plans * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans/introduction)), * the cloned service's `payment.options.pricingPlan` is also set to `true`. To * accept specific pricing plans, call *Enable Pricing Plans For Service* * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/enable-pricing-plans-for-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/enable-pricing-plans-for-service)), * after cloning the service. If the original service accepts only * pricing plan payments and you don't call *Enable Pricing Plans For Service* * after cloning the service, customers will be unable to book the service. */ export declare function cloneService(payload: object): RequestOptionsFactory;