import { EventDefinition, HttpClient } from '@wix/sdk-types'; import { CloneServiceOptionsAndVariantsResponse, CloneServiceOptionsAndVariantsResponseNonNullableFields, DeleteServiceOptionsAndVariantsOptions, GetServiceOptionsAndVariantsByServiceIdResponse, GetServiceOptionsAndVariantsByServiceIdResponseNonNullableFields, ServiceOptionsAndVariants, ServiceOptionsAndVariantsCreatedEnvelope, ServiceOptionsAndVariantsDeletedEnvelope, ServiceOptionsAndVariantsListQueryBuilder, ServiceOptionsAndVariantsNonNullableFields, ServiceOptionsAndVariantsUpdatedEnvelope, UpdateServiceOptionsAndVariants } from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal.js'; export declare const __metadata: { PACKAGE_NAME: string; }; export declare function createServiceOptionsAndVariants(httpClient: HttpClient): CreateServiceOptionsAndVariantsSignature; interface CreateServiceOptionsAndVariantsSignature { /** * Creates a `serviceOptionsAndVariants` object and for a service. * * * ## Calculate variants * * Before creating a `serviceOptionsAndVariants` object, you need to * anticipate and manually define all its variants, since Wix Bookings doesn't * automatically calculate them. For the actual * Create Service Options And Variants* call, specify both the `options` and * `variants` arrays. * * ## Limitations * * Wix Bookings allows you to connect only a single `serviceOptionsAndVariants` * object to a service. *Create Service Options And Variants* fails, if the * service already has a connected `serviceOptionsAndVariants` object. * * Currently, you can include only a single option per * `serviceOptionsAndVariants` object. Taken together, this means that services * are limited to a single option. * * ## Option ID * * When creating a`serviceOptionsAndVariants` object, you must specify an ID in * [UUID format](https://en.wikipedia.org/wiki/Universally_unique_identifier) * for its only option. You must reference this option ID for each variant as * `variants.values.choices.optionId`. * * ## Staff member option * * To creating an option based on the *staff member* * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction)) * providing the service, you need to specify `STAFF_MEMBER` as `options.values.type`. * Also, specify all staff member IDs as `variants.values.choices.staffMemberId`. * You could follow this *sample flow* * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/sample-flows#create-staff-member-based-service-variants) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/sample-flows#create-staff-member-based-service-variants)). * * ## Custom option * * To create an option based on a custom parameter, specify `CUSTOM` as * `options.values.type`. Provide descriptive names for all custom choices as * `variants.values.choices.custom`. These names are displayed to customers * during the book flow. You could follow this *sample flow* * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/sample-flows#create-service-variants-based-on-the-booked-equipment) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/sample-flows#create-service-variants-based-on-the-booked-equipment)). * * ## Duration option * * To create an option based on appointment duration, specify `DURATION` as * `options.values.type` and set a descriptive name in `options.values.durationData.name`. * Also, indicate the appointment length in `minutes` and provide a descriptive * `name` for each duration choice in `variants.values.choices.duration`. * @param - Service options and variants to create. * @returns Information about the created service options and variants. */ (serviceOptionsAndVariants: ServiceOptionsAndVariants): Promise; } export declare function cloneServiceOptionsAndVariants(httpClient: HttpClient): CloneServiceOptionsAndVariantsSignature; interface CloneServiceOptionsAndVariantsSignature { /** * Clones a `serviceOptionsAndVariants` object and connects it to a *service* * ([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction) | [REST](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction)). * * * The call fails if the service already has a connected * `serviceOptionsAndVariants` object. * * The cloned `serviceOptionsAndVariants` object gets a new, unique option ID. * The option ID of the existing `serviceOptionsAndVariants` object isn't reused. * * For example, you may call this method after *cloning a service* * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/clone-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/clone-service)). * @param - ID of the `serviceOptionsAndVariants` object to clone. * @param - ID of the service to which the cloned `serviceOptionsAndVariants` are * connected. */ (cloneFromId: string, targetServiceId: string): Promise; } export declare function getServiceOptionsAndVariants(httpClient: HttpClient): GetServiceOptionsAndVariantsSignature; interface GetServiceOptionsAndVariantsSignature { /** * Retrieves a `serviceOptionsAndVariants` object by its ID. * @param - ID of the `serviceOptionsAndVariants` object to retrieve. * @returns Retrieved `serviceOptionsAndVariants` object. */ (serviceOptionsAndVariantsId: string): Promise; } export declare function getServiceOptionsAndVariantsByServiceId(httpClient: HttpClient): GetServiceOptionsAndVariantsByServiceIdSignature; interface GetServiceOptionsAndVariantsByServiceIdSignature { /** * Retrieves a `serviceOptionsAndVariants` object by *service ID* * ([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction) | [REST](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction)). * @param - ID of the service to retrieve options and variants for. */ (serviceId: string): Promise; } export declare function updateServiceOptionsAndVariants(httpClient: HttpClient): UpdateServiceOptionsAndVariantsSignature; interface UpdateServiceOptionsAndVariantsSignature { /** * Updates a `serviceOptionsAndVariants` object. * * * Currently, only a single option is supported per `serviceOptionsAndVariants` object. * * If you want to update `variants`, you must pass the entire list of supported * variants, not only newly added variants. * * If you want to update `options`, you must pass the entire list of supported * options, not only newly added options. * @param - ID of the `serviceOptionsAndVariants` object. * @param - Service options and variants to update. * @param - Options for updating the service options and variants. * @returns Updated `serviceOptionsAndVariants` object. */ (_id: string | null, serviceOptionsAndVariants: UpdateServiceOptionsAndVariants): Promise; } export declare function deleteServiceOptionsAndVariants(httpClient: HttpClient): DeleteServiceOptionsAndVariantsSignature; interface DeleteServiceOptionsAndVariantsSignature { /** * Deletes a `serviceOptionsAndVariants` object. * * * Because each service can be connected to only a single `serviceOptionsAndVariants` * object, the service doesn't support *varied pricing* * ([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#service-rates)) * after deleting a `serviceOptionsAndVariants` object. Instead, Wix Bookings * uses its standard price calculation. * @param - ID of the `serviceOptionsAndVariants` object to delete. * @param - Options for deleting the service options and variants. */ (serviceOptionsAndVariantsId: string, options?: DeleteServiceOptionsAndVariantsOptions | undefined): Promise; } export declare function queryServiceOptionsAndVariants(httpClient: HttpClient): QueryServiceOptionsAndVariantsSignature; interface QueryServiceOptionsAndVariantsSignature { /** * Creates a query to retrieve a list of `serviceOptionsAndVariants` objects.\n\nThe `queryServiceOptionsAndVariants()` function builds a query to retrieve a list of `serviceOptionsAndVariants` objects and returns a `ServiceOptionsAndVariantsQueryBuilder` object.\n\nThe returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/service-options-and-variants-list-query-builder/find) function.\n\nYou can refine the query by chaining `ServiceOptionsAndVariantsQueryBuilder` functions onto the query. `ServiceOptionsAndVariantsQueryBuilder` functions enable you to sort, filter, and control the results that `queryServiceOptionsAndVariants()` returns.\n\n`queryServiceOptionsAndVariants()` runs with the following `ServiceOptionsAndVariantsQueryBuilder` default that you can override:\n\n+ `limit` is `50`.\n+ Sorted by `id` in ascending order.\n\nThe functions that are chained to `queryServiceOptionsAndVariants()` are applied in the order they are called. For example, if you apply `ascending("options.values.type")` and then `ascending("variants.values.price")`, the results are sorted first by the `"type"`, and then, if there are multiple results with the same `"type"`, the items are sorted by `"price"`.\n\nThe following `ServiceOptionsAndVariantsQueryBuilder` functions are supported for the `queryServiceOptionsAndVariants()` function. For a full description of the `serviceOptionsAndVariants` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/service-options-and-variants-list-query-result/items) property in `ServiceOptionsAndVariantsQueryResult`. */ (): ServiceOptionsAndVariantsListQueryBuilder; } export declare const onServiceOptionsAndVariantsCreated: EventDefinition; export declare const onServiceOptionsAndVariantsDeleted: EventDefinition; export declare const onServiceOptionsAndVariantsUpdated: EventDefinition; export { ActionEvent, Address, AddressHint, AddressLocation, AddressStreetOneOf, ApprovalStatus, Availability, AvailabilityConstraints, AvailabilityPolicy, AvailabilityPolicyUpdated, BaseEventMetadata, BusinessLocation, BusinessSchedule, CalendarConference, CalendarDateTime, CalendarType, Categories, ChangeContext, ChangeContextPayloadOneOf, CloneServiceOptionsAndVariantsRequest, CloneServiceOptionsAndVariantsResponse, CloneServiceOptionsAndVariantsResponseNonNullableFields, ConferenceProvider, ConferenceType, ConsentPolicy, CreateServiceOptionsAndVariantsRequest, CreateServiceOptionsAndVariantsResponse, CreateServiceOptionsAndVariantsResponseNonNullableFields, CursorPaging, Cursors, CustomServiceOption, Day, DayOfWeek, DeleteServiceOptionsAndVariantsOptions, DeleteServiceOptionsAndVariantsRequest, DeleteServiceOptionsAndVariantsResponse, DomainEvent, DomainEventBodyOneOf, Duration, DurationServiceOption, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Event, EventMetadata, ExtendedFields, ExternalCalendarInfo, ExternalCalendarOverrides, FocalPoint, Frequency, GeoCoordinates, GetServiceOptionsAndVariantsByServiceIdRequest, GetServiceOptionsAndVariantsByServiceIdResponse, GetServiceOptionsAndVariantsByServiceIdResponseNonNullableFields, GetServiceOptionsAndVariantsRequest, GetServiceOptionsAndVariantsResponse, GetServiceOptionsAndVariantsResponseNonNullableFields, IdentificationData, IdentificationDataIdOneOf, Interval, IntervalSplit, LinkedSchedule, LocalDateTime, Locale, Location, LocationStatus, LocationType, LocationsAddress, LocationsAddressLocation, LocationsLocation, LocationsLocationType, LocationsStreetAddress, MessageEnvelope, MigrationData, MigrationEvent, Money, Multilingual, MultipleSessionsCreated, Paging, PagingMetadataV2, Participant, ParticipantNotification, PlacementType, Price, Properties, PropertiesChange, QueryServiceOptionsAndVariantsRequest, QueryServiceOptionsAndVariantsResponse, QueryServiceOptionsAndVariantsResponseNonNullableFields, QueryV2, QueryV2PagingMethodOneOf, Rate, RecurringInterval, RecurringIntervalType, RecurringSessionSplit, RecurringSessionsUpdated, ResolutionMethod, Resource, ResourceNotification, ResourceStatus, RestoreInfo, Schedule, ScheduleCancelled, ScheduleCreated, ScheduleNotification, ScheduleNotificationEventOneOf, ScheduleStatus, ScheduleUnassignedFromUser, ScheduleUpdated, ScheduleWithSessions, ServiceChoice, ServiceChoiceChoiceOneOf, ServiceOption, ServiceOptionOptionSpecificDataOneOf, ServiceOptionType, ServiceOptions, ServiceOptionsAndVariants, ServiceOptionsAndVariantsCreatedEnvelope, ServiceOptionsAndVariantsDeletedEnvelope, ServiceOptionsAndVariantsListQueryBuilder, ServiceOptionsAndVariantsListQueryResult, ServiceOptionsAndVariantsNonNullableFields, ServiceOptionsAndVariantsUpdatedEnvelope, ServiceVariant, ServiceVariants, Session, SessionCancelled, SessionCreated, SessionType, SessionUpdated, SessionVersion, SiteCloned, SiteCreated, SitePropertiesEvent, SitePropertiesNotification, SitePropertiesOnScheduleCreation, SortOrder, Sorting, SpecialHourPeriod, SplitInterval, StaffData, Status, StreetAddress, Subdivision, SupportedLanguage, TimePeriod, Translation, Transparency, UpdateServiceOptionsAndVariants, UpdateServiceOptionsAndVariantsRequest, UpdateServiceOptionsAndVariantsResponse, UpdateServiceOptionsAndVariantsResponseNonNullableFields, V4Address, Version, WebhookIdentityType, } from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal.js';