@wix/auto_sdk_bookings_booking-policies 1.0.38 → 1.0.40
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 +23 -10
- package/build/cjs/index.js +1 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.ts → index.typings.d.ts} +266 -1
- package/build/cjs/index.typings.js +641 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +23 -10
- package/build/es/index.mjs +1 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/{bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.mts → index.typings.d.mts} +266 -1
- package/build/es/index.typings.mjs +601 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +23 -10
- package/build/internal/cjs/index.js +1 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.ts → index.typings.d.ts} +266 -1
- package/build/internal/cjs/index.typings.js +641 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +23 -10
- package/build/internal/es/index.mjs +1 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.mts → index.typings.d.mts} +266 -1
- package/build/internal/es/index.typings.mjs +601 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { BookingPolicy, CreateBookingPolicyValidationErrors, GetStrictestBookingPolicyResponse, UpdateBookingPolicy, UpdateBookingPolicyValidationErrors, SetDefaultBookingPolicyResponse, DeleteBookingPolicyApplicationErrors, BookingPoliciesQueryBuilder, CountBookingPoliciesOptions, CountBookingPoliciesResponse, BookingPolicyCreatedEnvelope, BookingPolicyDefaultBookingPolicySetEnvelope, BookingPolicyDeletedEnvelope, BookingPolicyUpdatedEnvelope } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, Address, AddressHint, Asset, BaseEventMetadata, BookAfterStartPolicy, BookingPoliciesQueryResult, BusinessSchedule, CancellationFeePolicy, CancellationPolicy, CancellationWindow, CancellationWindowFeeOneOf, Categories, ChangeContext, ChangeContextPayloadOneOf, ConsentPolicy, CountBookingPoliciesRequest, CreateBookingPolicyRequest, CreateBookingPolicyResponse, CreateMissingDefaultPolicyRequest, CreateMissingDefaultPolicyResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DayOfWeek, DefaultBookingPolicySet, DeleteBookingPolicyRequest, DeleteBookingPolicyResponse, DeleteContext, DeleteStatus, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GeoCoordinates, GetBookingPolicyRequest, GetBookingPolicyResponse, GetStrictestBookingPolicyRequest, IdentificationData, IdentificationDataIdOneOf, LimitEarlyBookingPolicy, LimitLateBookingPolicy, Locale, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, Money, Multilingual, Namespace, NamespaceChanged, OdeditorAssigned, OdeditorUnassigned, ParticipantsPolicy, PicassoAssigned, PicassoUnassigned, PlacementType, PolicyDescription, Properties, PropertiesChange, QueryBookingPoliciesRequest, QueryBookingPoliciesResponse, ReschedulePolicy, ResolutionMethod, ResourcesPolicy, RestoreInfo, SaveCreditCardPolicy, ServiceProvisioned, ServiceRemoved, SetDefaultBookingPolicyRequest, SiteCloned, SiteCreated, SiteCreatedContext, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePropertiesEvent, SitePropertiesNotification, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, Sorting, SpecialHourPeriod, State, StudioAssigned, StudioUnassigned, SupportedLanguage, TimePeriod, Translation, UpdateAllPoliciesRequest, UpdateAllPoliciesResponse, UpdateBookingPolicyRequest, UpdateBookingPolicyResponse, V4SiteCreated, WaitlistPolicy, WebhookIdentityType } from './index.typings.js';
|
|
4
4
|
|
|
5
|
+
type BookingPolicyNonNullablePaths = `customPolicyDescription.enabled` | `customPolicyDescription.description` | `limitEarlyBookingPolicy.enabled` | `limitEarlyBookingPolicy.earliestBookingInMinutes` | `limitLateBookingPolicy.enabled` | `limitLateBookingPolicy.latestBookingInMinutes` | `bookAfterStartPolicy.enabled` | `cancellationPolicy.enabled` | `cancellationPolicy.limitLatestCancellation` | `cancellationPolicy.latestCancellationInMinutes` | `reschedulePolicy.enabled` | `reschedulePolicy.limitLatestReschedule` | `reschedulePolicy.latestRescheduleInMinutes` | `waitlistPolicy.enabled` | `waitlistPolicy.capacity` | `waitlistPolicy.reservationTimeInMinutes` | `participantsPolicy.maxParticipantsPerBooking` | `cancellationFeePolicy.enabled` | `cancellationFeePolicy.cancellationWindows` | `cancellationFeePolicy.cancellationWindows.${number}.amount.value` | `cancellationFeePolicy.cancellationWindows.${number}.amount.currency` | `cancellationFeePolicy.cancellationWindows.${number}.percentage` | `saveCreditCardPolicy.enabled`;
|
|
5
6
|
declare function createBookingPolicy$1(httpClient: HttpClient): CreateBookingPolicySignature;
|
|
6
7
|
interface CreateBookingPolicySignature {
|
|
7
8
|
/**
|
|
@@ -9,7 +10,9 @@ interface CreateBookingPolicySignature {
|
|
|
9
10
|
* @param - Booking policy to create.
|
|
10
11
|
* @returns Created booking policy.
|
|
11
12
|
*/
|
|
12
|
-
(bookingPolicy: BookingPolicy): Promise<BookingPolicy
|
|
13
|
+
(bookingPolicy: BookingPolicy): Promise<NonNullablePaths<BookingPolicy, BookingPolicyNonNullablePaths> & {
|
|
14
|
+
__validationErrorsType?: CreateBookingPolicyValidationErrors;
|
|
15
|
+
}>;
|
|
13
16
|
}
|
|
14
17
|
declare function getBookingPolicy$1(httpClient: HttpClient): GetBookingPolicySignature;
|
|
15
18
|
interface GetBookingPolicySignature {
|
|
@@ -18,7 +21,7 @@ interface GetBookingPolicySignature {
|
|
|
18
21
|
* @param - ID of the booking policy to retrieve.
|
|
19
22
|
* @returns Retrieved booking policy.
|
|
20
23
|
*/
|
|
21
|
-
(bookingPolicyId: string): Promise<BookingPolicy
|
|
24
|
+
(bookingPolicyId: string): Promise<NonNullablePaths<BookingPolicy, BookingPolicyNonNullablePaths>>;
|
|
22
25
|
}
|
|
23
26
|
declare function getStrictestBookingPolicy$1(httpClient: HttpClient): GetStrictestBookingPolicySignature;
|
|
24
27
|
interface GetStrictestBookingPolicySignature {
|
|
@@ -34,7 +37,9 @@ interface GetStrictestBookingPolicySignature {
|
|
|
34
37
|
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/create-booking-policy) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/create-booking-policy)).
|
|
35
38
|
* @param - IDs of the booking policies for which to retrieve the strictest rules for.
|
|
36
39
|
*/
|
|
37
|
-
(bookingPolicyIds: string[]): Promise<GetStrictestBookingPolicyResponse
|
|
40
|
+
(bookingPolicyIds: string[]): Promise<NonNullablePaths<GetStrictestBookingPolicyResponse, {
|
|
41
|
+
[P in BookingPolicyNonNullablePaths]: `bookingPolicy.${P}`;
|
|
42
|
+
}[BookingPolicyNonNullablePaths]>>;
|
|
38
43
|
}
|
|
39
44
|
declare function updateBookingPolicy$1(httpClient: HttpClient): UpdateBookingPolicySignature;
|
|
40
45
|
interface UpdateBookingPolicySignature {
|
|
@@ -48,7 +53,9 @@ interface UpdateBookingPolicySignature {
|
|
|
48
53
|
* @param - ID of the booking policy.
|
|
49
54
|
* @returns Updated booking policy.
|
|
50
55
|
*/
|
|
51
|
-
(_id: string, bookingPolicy: UpdateBookingPolicy): Promise<BookingPolicy
|
|
56
|
+
(_id: string, bookingPolicy: NonNullablePaths<UpdateBookingPolicy, `revision`>): Promise<NonNullablePaths<BookingPolicy, BookingPolicyNonNullablePaths> & {
|
|
57
|
+
__validationErrorsType?: UpdateBookingPolicyValidationErrors;
|
|
58
|
+
}>;
|
|
52
59
|
}
|
|
53
60
|
declare function setDefaultBookingPolicy$1(httpClient: HttpClient): SetDefaultBookingPolicySignature;
|
|
54
61
|
interface SetDefaultBookingPolicySignature {
|
|
@@ -61,7 +68,11 @@ interface SetDefaultBookingPolicySignature {
|
|
|
61
68
|
* default, the call succeeds without changing any `bookingPolicy` object.
|
|
62
69
|
* @param - ID of the booking policy that's set as default.
|
|
63
70
|
*/
|
|
64
|
-
(bookingPolicyId: string): Promise<SetDefaultBookingPolicyResponse
|
|
71
|
+
(bookingPolicyId: string): Promise<NonNullablePaths<SetDefaultBookingPolicyResponse, {
|
|
72
|
+
[P in BookingPolicyNonNullablePaths]: `currentDefaultBookingPolicy.${P}`;
|
|
73
|
+
}[BookingPolicyNonNullablePaths] | {
|
|
74
|
+
[P in BookingPolicyNonNullablePaths]: `previousDefaultBookingPolicy.${P}`;
|
|
75
|
+
}[BookingPolicyNonNullablePaths]>>;
|
|
65
76
|
}
|
|
66
77
|
declare function deleteBookingPolicy$1(httpClient: HttpClient): DeleteBookingPolicySignature;
|
|
67
78
|
interface DeleteBookingPolicySignature {
|
|
@@ -73,7 +84,9 @@ interface DeleteBookingPolicySignature {
|
|
|
73
84
|
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/set-default-booking-policy) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/set-default-booking-policy)).
|
|
74
85
|
* @param - ID of the booking policy to delete.
|
|
75
86
|
*/
|
|
76
|
-
(bookingPolicyId: string): Promise<void
|
|
87
|
+
(bookingPolicyId: string): Promise<void & {
|
|
88
|
+
__applicationErrorsType?: DeleteBookingPolicyApplicationErrors;
|
|
89
|
+
}>;
|
|
77
90
|
}
|
|
78
91
|
declare function queryBookingPolicies$1(httpClient: HttpClient): QueryBookingPoliciesSignature;
|
|
79
92
|
interface QueryBookingPoliciesSignature {
|
|
@@ -107,7 +120,7 @@ interface CountBookingPoliciesSignature {
|
|
|
107
120
|
* ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))
|
|
108
121
|
* for a complete list of supported filters.
|
|
109
122
|
*/
|
|
110
|
-
(options?: CountBookingPoliciesOptions
|
|
123
|
+
(options?: CountBookingPoliciesOptions): Promise<NonNullablePaths<CountBookingPoliciesResponse, `count`>>;
|
|
111
124
|
}
|
|
112
125
|
declare const onBookingPolicyCreated$1: EventDefinition<BookingPolicyCreatedEnvelope, "wix.bookings.v1.booking_policy_created">;
|
|
113
126
|
declare const onBookingPolicyDefaultBookingPolicySet$1: EventDefinition<BookingPolicyDefaultBookingPolicySetEnvelope, "wix.bookings.v1.booking_policy_default_booking_policy_set">;
|
package/build/cjs/index.js
CHANGED
|
@@ -543,6 +543,7 @@ async function deleteBookingPolicy2(bookingPolicyId) {
|
|
|
543
543
|
try {
|
|
544
544
|
const result = await httpClient.request(reqOpts);
|
|
545
545
|
sideEffects?.onSuccess?.(result);
|
|
546
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
546
547
|
} catch (err) {
|
|
547
548
|
const transformedError = (0, import_transform_error.transformError)(
|
|
548
549
|
err,
|