@wix/auto_sdk_bookings_booking-policies 1.0.91 → 1.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
1
+ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
2
2
 
3
3
  /**
4
4
  * A booking policy is a set of rules that determine how customers can book a
@@ -2003,7 +2003,104 @@ interface BookingPoliciesQueryBuilder {
2003
2003
  * @fqn wix.bookings.v1.BookingPoliciesService.QueryBookingPolicies
2004
2004
  * @requiredField query
2005
2005
  */
2006
- declare function typedQueryBookingPolicies(query: CursorQuery): Promise<NonNullablePaths<QueryBookingPoliciesResponse, `bookingPolicies` | `bookingPolicies.${number}.customPolicyDescription.enabled` | `bookingPolicies.${number}.customPolicyDescription.description` | `bookingPolicies.${number}.limitEarlyBookingPolicy.enabled` | `bookingPolicies.${number}.limitEarlyBookingPolicy.earliestBookingInMinutes` | `bookingPolicies.${number}.limitLateBookingPolicy.enabled` | `bookingPolicies.${number}.limitLateBookingPolicy.latestBookingInMinutes` | `bookingPolicies.${number}.bookAfterStartPolicy.enabled` | `bookingPolicies.${number}.cancellationPolicy.enabled` | `bookingPolicies.${number}.cancellationPolicy.limitLatestCancellation` | `bookingPolicies.${number}.cancellationPolicy.latestCancellationInMinutes` | `bookingPolicies.${number}.reschedulePolicy.enabled` | `bookingPolicies.${number}.reschedulePolicy.limitLatestReschedule` | `bookingPolicies.${number}.reschedulePolicy.latestRescheduleInMinutes` | `bookingPolicies.${number}.waitlistPolicy.enabled` | `bookingPolicies.${number}.waitlistPolicy.capacity` | `bookingPolicies.${number}.waitlistPolicy.reservationTimeInMinutes` | `bookingPolicies.${number}.participantsPolicy.maxParticipantsPerBooking` | `bookingPolicies.${number}.cancellationFeePolicy.enabled` | `bookingPolicies.${number}.saveCreditCardPolicy.enabled`, 5>>;
2006
+ declare function typedQueryBookingPolicies(query: BookingPolicyQuery): Promise<NonNullablePaths<QueryBookingPoliciesResponse, `bookingPolicies` | `bookingPolicies.${number}.customPolicyDescription.enabled` | `bookingPolicies.${number}.customPolicyDescription.description` | `bookingPolicies.${number}.limitEarlyBookingPolicy.enabled` | `bookingPolicies.${number}.limitEarlyBookingPolicy.earliestBookingInMinutes` | `bookingPolicies.${number}.limitLateBookingPolicy.enabled` | `bookingPolicies.${number}.limitLateBookingPolicy.latestBookingInMinutes` | `bookingPolicies.${number}.bookAfterStartPolicy.enabled` | `bookingPolicies.${number}.cancellationPolicy.enabled` | `bookingPolicies.${number}.cancellationPolicy.limitLatestCancellation` | `bookingPolicies.${number}.cancellationPolicy.latestCancellationInMinutes` | `bookingPolicies.${number}.reschedulePolicy.enabled` | `bookingPolicies.${number}.reschedulePolicy.limitLatestReschedule` | `bookingPolicies.${number}.reschedulePolicy.latestRescheduleInMinutes` | `bookingPolicies.${number}.waitlistPolicy.enabled` | `bookingPolicies.${number}.waitlistPolicy.capacity` | `bookingPolicies.${number}.waitlistPolicy.reservationTimeInMinutes` | `bookingPolicies.${number}.participantsPolicy.maxParticipantsPerBooking` | `bookingPolicies.${number}.cancellationFeePolicy.enabled` | `bookingPolicies.${number}.saveCreditCardPolicy.enabled`, 5>>;
2007
+ interface BookingPolicyQuerySpec extends QuerySpec {
2008
+ paging: 'cursor';
2009
+ wql: [
2010
+ {
2011
+ fields: ['_id'];
2012
+ operators: ['$eq', '$in', '$ne'];
2013
+ sort: 'BOTH';
2014
+ },
2015
+ {
2016
+ fields: [
2017
+ 'customPolicyDescription.description',
2018
+ 'intakeFormPolicy.formId',
2019
+ 'name'
2020
+ ];
2021
+ operators: ['$begins', '$eq', '$ne'];
2022
+ sort: 'BOTH';
2023
+ },
2024
+ {
2025
+ fields: [
2026
+ 'bookAfterStartPolicy.enabled',
2027
+ 'cancellationPolicy.enabled',
2028
+ 'cancellationPolicy.limitLatestCancellation',
2029
+ 'customPolicyDescription.enabled',
2030
+ 'default',
2031
+ 'limitEarlyBookingPolicy.enabled',
2032
+ 'limitLateBookingPolicy.enabled',
2033
+ 'reschedulePolicy.enabled',
2034
+ 'reschedulePolicy.limitLatestReschedule',
2035
+ 'resourcesPolicy.autoAssignAllowed',
2036
+ 'resourcesPolicy.enabled',
2037
+ 'waitlistPolicy.enabled'
2038
+ ];
2039
+ operators: ['$eq', '$ne'];
2040
+ sort: 'BOTH';
2041
+ },
2042
+ {
2043
+ fields: [
2044
+ 'cancellationPolicy.latestCancellationInMinutes',
2045
+ 'limitEarlyBookingPolicy.earliestBookingInMinutes',
2046
+ 'limitLateBookingPolicy.latestBookingInMinutes',
2047
+ 'participantsPolicy.maxParticipantsPerBooking',
2048
+ 'reschedulePolicy.latestRescheduleInMinutes',
2049
+ 'waitlistPolicy.capacity',
2050
+ 'waitlistPolicy.reservationTimeInMinutes'
2051
+ ];
2052
+ operators: ['$eq', '$gt', '$gte', '$in', '$lt', '$lte', '$ne', '$nin'];
2053
+ sort: 'BOTH';
2054
+ }
2055
+ ];
2056
+ }
2057
+ type CommonQueryWithEntityContext = Query<BookingPolicy, BookingPolicyQuerySpec>;
2058
+ type BookingPolicyQuery = {
2059
+ /**
2060
+ Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.
2061
+ */
2062
+ cursorPaging?: {
2063
+ /**
2064
+ Number of items to load.
2065
+ @max: 100
2066
+ */
2067
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
2068
+ /**
2069
+ Pointer to the next or previous page in the list of results.
2070
+
2071
+ You can get the relevant cursor token
2072
+ from the `pagingMetadata` object in the previous call's response.
2073
+ Not relevant for the first request.
2074
+ @maxLength: 16000
2075
+ */
2076
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
2077
+ };
2078
+ /**
2079
+ Filter object in the following format:
2080
+ `"filter" : {
2081
+ "fieldName1": "value1",
2082
+ "fieldName2":{"$operator":"value2"}
2083
+ }`
2084
+ Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
2085
+ */
2086
+ filter?: CommonQueryWithEntityContext['filter'] | null;
2087
+ /**
2088
+ Sort object in the following format:
2089
+ `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
2090
+ @maxSize: 10
2091
+ */
2092
+ sort?: {
2093
+ /**
2094
+ Name of the field to sort by.
2095
+ @maxLength: 512
2096
+ */
2097
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
2098
+ /**
2099
+ Sort order.
2100
+ */
2101
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
2102
+ }[];
2103
+ };
2007
2104
  /**
2008
2105
  * Counts booking policies, given the provided filtering.
2009
2106
  *
@@ -2025,4 +2122,4 @@ interface CountBookingPoliciesOptions {
2025
2122
  filter?: Record<string, any> | null;
2026
2123
  }
2027
2124
 
2028
- export { type ActionEvent, type Address, type AddressHint, type Asset, type BaseEventMetadata, type BookAfterStartPolicy, type BookingPoliciesQueryBuilder, type BookingPoliciesQueryResult, type BookingPolicy, type BookingPolicyCreatedEnvelope, type BookingPolicyDefaultBookingPolicySetEnvelope, type BookingPolicyDeletedEnvelope, type BookingPolicyUpdatedEnvelope, type BusinessSchedule, type CancellationFeePolicy, type CancellationPolicy, type CancellationWindow, type CancellationWindowFeeOneOf, type Categories, type ChangeContext, type ChangeContextPayloadOneOf, CompletionRequirement, type CompletionRequirementWithLiterals, type ConsentPolicy, type CountBookingPoliciesOptions, type CountBookingPoliciesRequest, type CountBookingPoliciesResponse, type CreateBookingPolicyRequest, type CreateBookingPolicyResponse, type CreateBookingPolicyValidationErrors, type CreateMissingDefaultPolicyRequest, type CreateMissingDefaultPolicyResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomOptions, DayOfWeek, type DayOfWeekWithLiterals, type DefaultBookingPolicySet, type DeleteBookingPolicyApplicationErrors, type DeleteBookingPolicyRequest, type DeleteBookingPolicyResponse, type DeleteContext, DeleteStatus, type DeleteStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GeoCoordinates, type GetBookingPolicyRequest, type GetBookingPolicyResponse, type GetStrictestBookingPolicyRequest, type GetStrictestBookingPolicyResponse, type IdentificationData, type IdentificationDataIdOneOf, type IntakeFormPolicy, type LimitEarlyBookingPolicy, type LimitLateBookingPolicy, type Locale, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, type Money, type Multilingual, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type ParticipantsPolicy, type PicassoAssigned, type PicassoUnassigned, PlacementType, type PlacementTypeWithLiterals, type PolicyDescription, type Properties, type PropertiesChange, type QueryBookingPoliciesRequest, type QueryBookingPoliciesResponse, type RankingOptions, RankingOrder, type RankingOrderWithLiterals, type ReschedulePolicy, ResolutionMethod, type ResolutionMethodWithLiterals, type ResourcesPolicy, type RestoreInfo, type SaveCreditCardPolicy, type ServiceProvisioned, type ServiceRemoved, type SetDefaultBookingPolicyRequest, type SetDefaultBookingPolicyResponse, type SiteCloned, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePropertiesEvent, type SitePropertiesNotification, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, SortingMethodType, type SortingMethodTypeWithLiterals, type SpecialHourPeriod, type StaffSortingPolicy, type StaffSortingPolicyOptionsOneOf, State, type StateWithLiterals, type StudioAssigned, type StudioTwoAssigned, type StudioTwoUnassigned, type StudioUnassigned, type SupportedLanguage, type TimePeriod, Timing, type TimingWithLiterals, type Translation, type UpdateAllPoliciesRequest, type UpdateAllPoliciesResponse, type UpdateBookingPolicy, type UpdateBookingPolicyRequest, type UpdateBookingPolicyResponse, type UpdateBookingPolicyValidationErrors, type V4SiteCreated, type WaitlistPolicy, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixelAssigned, type WixelUnassigned, countBookingPolicies, createBookingPolicy, deleteBookingPolicy, getBookingPolicy, getStrictestBookingPolicy, onBookingPolicyCreated, onBookingPolicyDefaultBookingPolicySet, onBookingPolicyDeleted, onBookingPolicyUpdated, queryBookingPolicies, setDefaultBookingPolicy, typedQueryBookingPolicies, updateBookingPolicy };
2125
+ export { type ActionEvent, type Address, type AddressHint, type Asset, type BaseEventMetadata, type BookAfterStartPolicy, type BookingPoliciesQueryBuilder, type BookingPoliciesQueryResult, type BookingPolicy, type BookingPolicyCreatedEnvelope, type BookingPolicyDefaultBookingPolicySetEnvelope, type BookingPolicyDeletedEnvelope, type BookingPolicyQuery, type BookingPolicyQuerySpec, type BookingPolicyUpdatedEnvelope, type BusinessSchedule, type CancellationFeePolicy, type CancellationPolicy, type CancellationWindow, type CancellationWindowFeeOneOf, type Categories, type ChangeContext, type ChangeContextPayloadOneOf, type CommonQueryWithEntityContext, CompletionRequirement, type CompletionRequirementWithLiterals, type ConsentPolicy, type CountBookingPoliciesOptions, type CountBookingPoliciesRequest, type CountBookingPoliciesResponse, type CreateBookingPolicyRequest, type CreateBookingPolicyResponse, type CreateBookingPolicyValidationErrors, type CreateMissingDefaultPolicyRequest, type CreateMissingDefaultPolicyResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomOptions, DayOfWeek, type DayOfWeekWithLiterals, type DefaultBookingPolicySet, type DeleteBookingPolicyApplicationErrors, type DeleteBookingPolicyRequest, type DeleteBookingPolicyResponse, type DeleteContext, DeleteStatus, type DeleteStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GeoCoordinates, type GetBookingPolicyRequest, type GetBookingPolicyResponse, type GetStrictestBookingPolicyRequest, type GetStrictestBookingPolicyResponse, type IdentificationData, type IdentificationDataIdOneOf, type IntakeFormPolicy, type LimitEarlyBookingPolicy, type LimitLateBookingPolicy, type Locale, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, type Money, type Multilingual, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type ParticipantsPolicy, type PicassoAssigned, type PicassoUnassigned, PlacementType, type PlacementTypeWithLiterals, type PolicyDescription, type Properties, type PropertiesChange, type QueryBookingPoliciesRequest, type QueryBookingPoliciesResponse, type RankingOptions, RankingOrder, type RankingOrderWithLiterals, type ReschedulePolicy, ResolutionMethod, type ResolutionMethodWithLiterals, type ResourcesPolicy, type RestoreInfo, type SaveCreditCardPolicy, type ServiceProvisioned, type ServiceRemoved, type SetDefaultBookingPolicyRequest, type SetDefaultBookingPolicyResponse, type SiteCloned, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePropertiesEvent, type SitePropertiesNotification, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, SortingMethodType, type SortingMethodTypeWithLiterals, type SpecialHourPeriod, type StaffSortingPolicy, type StaffSortingPolicyOptionsOneOf, State, type StateWithLiterals, type StudioAssigned, type StudioTwoAssigned, type StudioTwoUnassigned, type StudioUnassigned, type SupportedLanguage, type TimePeriod, Timing, type TimingWithLiterals, type Translation, type UpdateAllPoliciesRequest, type UpdateAllPoliciesResponse, type UpdateBookingPolicy, type UpdateBookingPolicyRequest, type UpdateBookingPolicyResponse, type UpdateBookingPolicyValidationErrors, type V4SiteCreated, type WaitlistPolicy, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixelAssigned, type WixelUnassigned, countBookingPolicies, createBookingPolicy, deleteBookingPolicy, getBookingPolicy, getStrictestBookingPolicy, onBookingPolicyCreated, onBookingPolicyDefaultBookingPolicySet, onBookingPolicyDeleted, onBookingPolicyUpdated, queryBookingPolicies, setDefaultBookingPolicy, typedQueryBookingPolicies, updateBookingPolicy };