@wix/auto_sdk_bookings_booking-policies 1.0.81 → 1.0.83
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.
- package/build/cjs/index.d.ts +8 -26
- package/build/cjs/index.js +43 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +15 -1
- package/build/cjs/index.typings.js +25 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +8 -26
- package/build/es/index.mjs +43 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +15 -1
- package/build/es/index.typings.mjs +24 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -26
- package/build/internal/cjs/index.js +43 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +15 -1
- package/build/internal/cjs/index.typings.js +25 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -26
- package/build/internal/es/index.mjs +43 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +15 -1
- package/build/internal/es/index.typings.mjs +24 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1659,6 +1659,8 @@ interface BookingPolicyCreatedEnvelope {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
/**
|
|
1661
1661
|
* Triggered when a booking policy is created.
|
|
1662
|
+
* @permissionScope Manage Stores
|
|
1663
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1662
1664
|
* @permissionScope Read Bookings - Public Data
|
|
1663
1665
|
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1664
1666
|
* @permissionScope Manage Bookings Services and Settings
|
|
@@ -1685,6 +1687,8 @@ interface BookingPolicyDefaultBookingPolicySetEnvelope {
|
|
|
1685
1687
|
* Triggered when the site's default policy changes. Then,
|
|
1686
1688
|
* [Booking Policy Updated](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/booking-policy-updated)
|
|
1687
1689
|
* is also triggered both for the new and the previous default policy.
|
|
1690
|
+
* @permissionScope Manage Stores
|
|
1691
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1688
1692
|
* @permissionScope Read Bookings - Public Data
|
|
1689
1693
|
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1690
1694
|
* @permissionScope Manage Bookings Services and Settings
|
|
@@ -1708,6 +1712,8 @@ interface BookingPolicyDeletedEnvelope {
|
|
|
1708
1712
|
}
|
|
1709
1713
|
/**
|
|
1710
1714
|
* Triggered when a booking policy is deleted.
|
|
1715
|
+
* @permissionScope Manage Stores
|
|
1716
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1711
1717
|
* @permissionScope Read Bookings - Public Data
|
|
1712
1718
|
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1713
1719
|
* @permissionScope Manage Bookings Services and Settings
|
|
@@ -1733,6 +1739,8 @@ interface BookingPolicyUpdatedEnvelope {
|
|
|
1733
1739
|
/**
|
|
1734
1740
|
* Triggered when a booking policy is updated, including when a policy's
|
|
1735
1741
|
* `default` attribute changes.
|
|
1742
|
+
* @permissionScope Manage Stores
|
|
1743
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1736
1744
|
* @permissionScope Read Bookings - Public Data
|
|
1737
1745
|
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1738
1746
|
* @permissionScope Manage Bookings Services and Settings
|
|
@@ -1984,6 +1992,12 @@ interface BookingPoliciesQueryBuilder {
|
|
|
1984
1992
|
skipTo: (cursor: string) => BookingPoliciesQueryBuilder;
|
|
1985
1993
|
find: () => Promise<BookingPoliciesQueryResult>;
|
|
1986
1994
|
}
|
|
1995
|
+
/**
|
|
1996
|
+
* @hidden
|
|
1997
|
+
* @fqn wix.bookings.v1.BookingPoliciesService.QueryBookingPolicies
|
|
1998
|
+
* @requiredField query
|
|
1999
|
+
*/
|
|
2000
|
+
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>>;
|
|
1987
2001
|
/**
|
|
1988
2002
|
* Counts booking policies, given the provided filtering.
|
|
1989
2003
|
*
|
|
@@ -2005,4 +2019,4 @@ interface CountBookingPoliciesOptions {
|
|
|
2005
2019
|
filter?: Record<string, any> | null;
|
|
2006
2020
|
}
|
|
2007
2021
|
|
|
2008
|
-
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, updateBookingPolicy };
|
|
2022
|
+
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 };
|
|
@@ -40,6 +40,7 @@ __export(index_typings_exports, {
|
|
|
40
40
|
getStrictestBookingPolicy: () => getStrictestBookingPolicy2,
|
|
41
41
|
queryBookingPolicies: () => queryBookingPolicies2,
|
|
42
42
|
setDefaultBookingPolicy: () => setDefaultBookingPolicy2,
|
|
43
|
+
typedQueryBookingPolicies: () => typedQueryBookingPolicies,
|
|
43
44
|
updateBookingPolicy: () => updateBookingPolicy2
|
|
44
45
|
});
|
|
45
46
|
module.exports = __toCommonJS(index_typings_exports);
|
|
@@ -652,6 +653,29 @@ function queryBookingPolicies2() {
|
|
|
652
653
|
transformationPaths: {}
|
|
653
654
|
});
|
|
654
655
|
}
|
|
656
|
+
async function typedQueryBookingPolicies(query) {
|
|
657
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
658
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
659
|
+
const reqOpts = queryBookingPolicies(payload);
|
|
660
|
+
sideEffects?.onSiteCall?.();
|
|
661
|
+
try {
|
|
662
|
+
const result = await httpClient.request(reqOpts);
|
|
663
|
+
sideEffects?.onSuccess?.(result);
|
|
664
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
665
|
+
} catch (err) {
|
|
666
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
667
|
+
err,
|
|
668
|
+
{
|
|
669
|
+
spreadPathsToArguments: {},
|
|
670
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
671
|
+
singleArgumentUnchanged: false
|
|
672
|
+
},
|
|
673
|
+
["query"]
|
|
674
|
+
);
|
|
675
|
+
sideEffects?.onError?.(err);
|
|
676
|
+
throw transformedError;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
655
679
|
async function countBookingPolicies2(options) {
|
|
656
680
|
const { httpClient, sideEffects } = arguments[1];
|
|
657
681
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -699,6 +723,7 @@ async function countBookingPolicies2(options) {
|
|
|
699
723
|
getStrictestBookingPolicy,
|
|
700
724
|
queryBookingPolicies,
|
|
701
725
|
setDefaultBookingPolicy,
|
|
726
|
+
typedQueryBookingPolicies,
|
|
702
727
|
updateBookingPolicy
|
|
703
728
|
});
|
|
704
729
|
//# sourceMappingURL=index.typings.js.map
|