@wix/auto_sdk_bookings_booking-policies 1.0.30 → 1.0.32
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/{internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.d.ts → bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.mts} +131 -435
- package/build/{cjs/src/bookings-v1-booking-policy-booking-policies.universal.d.ts → bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.ts} +131 -435
- package/build/index.d.mts +146 -0
- package/build/index.d.ts +146 -0
- package/build/index.js +794 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +750 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/bookings-v1-booking-policy-booking-policies.universal.d.ts → bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.mts} +131 -435
- package/build/{es/src/bookings-v1-booking-policy-booking-policies.universal.d.ts → internal/bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.ts} +131 -435
- package/build/internal/index.d.mts +146 -0
- package/build/internal/index.d.ts +146 -0
- package/build/internal/index.js +794 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +750 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +545 -0
- package/build/internal/meta.d.ts +545 -0
- package/build/internal/meta.js +448 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +414 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +545 -0
- package/build/meta.d.ts +545 -0
- package/build/meta.js +448 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +414 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.d.ts +0 -37
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.js +0 -49
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.js.map +0 -1
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.d.ts +0 -71
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.js +0 -330
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.js.map +0 -1
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +0 -28
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js +0 -180
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js.map +0 -1
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.d.ts +0 -117
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.js +0 -110
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.js.map +0 -1
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.d.ts +0 -1436
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.js +0 -155
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.js.map +0 -1
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js +0 -594
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/bookings-v1-booking-policy-booking-policies.context.d.ts +0 -37
- package/build/es/src/bookings-v1-booking-policy-booking-policies.context.js +0 -37
- package/build/es/src/bookings-v1-booking-policy-booking-policies.context.js.map +0 -1
- package/build/es/src/bookings-v1-booking-policy-booking-policies.http.d.ts +0 -71
- package/build/es/src/bookings-v1-booking-policy-booking-policies.http.js +0 -319
- package/build/es/src/bookings-v1-booking-policy-booking-policies.http.js.map +0 -1
- package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +0 -28
- package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.js +0 -146
- package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.js.map +0 -1
- package/build/es/src/bookings-v1-booking-policy-booking-policies.public.d.ts +0 -117
- package/build/es/src/bookings-v1-booking-policy-booking-policies.public.js +0 -90
- package/build/es/src/bookings-v1-booking-policy-booking-policies.public.js.map +0 -1
- package/build/es/src/bookings-v1-booking-policy-booking-policies.types.d.ts +0 -1436
- package/build/es/src/bookings-v1-booking-policy-booking-policies.types.js +0 -152
- package/build/es/src/bookings-v1-booking-policy-booking-policies.types.js.map +0 -1
- package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.js +0 -560
- package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.d.ts +0 -37
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.js +0 -49
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.js.map +0 -1
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.d.ts +0 -71
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.js +0 -330
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.js.map +0 -1
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +0 -28
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js +0 -180
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js.map +0 -1
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.d.ts +0 -117
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.js +0 -110
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.js.map +0 -1
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.d.ts +0 -1436
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.js +0 -155
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.js.map +0 -1
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js +0 -594
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.d.ts +0 -37
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.js +0 -37
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.js.map +0 -1
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.d.ts +0 -71
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.js +0 -319
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.js.map +0 -1
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +0 -28
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.js +0 -146
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.js.map +0 -1
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.d.ts +0 -117
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.js +0 -90
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.js.map +0 -1
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.d.ts +0 -1436
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.js +0 -152
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.js.map +0 -1
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.js +0 -560
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.js.map +0 -1
package/build/index.js
ADDED
|
@@ -0,0 +1,794 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
DayOfWeek: () => DayOfWeek,
|
|
24
|
+
DeleteStatus: () => DeleteStatus,
|
|
25
|
+
Namespace: () => Namespace,
|
|
26
|
+
PlacementType: () => PlacementType,
|
|
27
|
+
ResolutionMethod: () => ResolutionMethod,
|
|
28
|
+
SiteCreatedContext: () => SiteCreatedContext,
|
|
29
|
+
SortOrder: () => SortOrder,
|
|
30
|
+
State: () => State,
|
|
31
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
32
|
+
countBookingPolicies: () => countBookingPolicies4,
|
|
33
|
+
createBookingPolicy: () => createBookingPolicy4,
|
|
34
|
+
deleteBookingPolicy: () => deleteBookingPolicy4,
|
|
35
|
+
getBookingPolicy: () => getBookingPolicy4,
|
|
36
|
+
getStrictestBookingPolicy: () => getStrictestBookingPolicy4,
|
|
37
|
+
onBookingPolicyCreated: () => onBookingPolicyCreated2,
|
|
38
|
+
onBookingPolicyDefaultBookingPolicySet: () => onBookingPolicyDefaultBookingPolicySet2,
|
|
39
|
+
onBookingPolicyDeleted: () => onBookingPolicyDeleted2,
|
|
40
|
+
onBookingPolicyUpdated: () => onBookingPolicyUpdated2,
|
|
41
|
+
queryBookingPolicies: () => queryBookingPolicies4,
|
|
42
|
+
setDefaultBookingPolicy: () => setDefaultBookingPolicy4,
|
|
43
|
+
updateBookingPolicy: () => updateBookingPolicy4
|
|
44
|
+
});
|
|
45
|
+
module.exports = __toCommonJS(index_exports);
|
|
46
|
+
|
|
47
|
+
// src/bookings-v1-booking-policy-booking-policies.public.ts
|
|
48
|
+
var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
49
|
+
var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
50
|
+
var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
51
|
+
var import_sdk_types = require("@wix/sdk-types");
|
|
52
|
+
|
|
53
|
+
// src/bookings-v1-booking-policy-booking-policies.universal.ts
|
|
54
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
55
|
+
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
56
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
57
|
+
|
|
58
|
+
// src/bookings-v1-booking-policy-booking-policies.http.ts
|
|
59
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
60
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
61
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
62
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
63
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
64
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
65
|
+
function resolveWixBookingsV1BookingPoliciesServiceUrl(opts) {
|
|
66
|
+
const domainToMappings = {
|
|
67
|
+
"manage._base_domain_": [
|
|
68
|
+
{
|
|
69
|
+
srcPath: "/_api/bookings/v1/booking-policies",
|
|
70
|
+
destPath: "/v1/booking-policies"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"www.wixapis.com": [
|
|
74
|
+
{
|
|
75
|
+
srcPath: "/bookings/v1/booking-policies",
|
|
76
|
+
destPath: "/v1/booking-policies"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
_: [
|
|
80
|
+
{
|
|
81
|
+
srcPath: "/_api/bookings/v1/booking-policies/strictest",
|
|
82
|
+
destPath: "/v1/booking-policies/strictest"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
srcPath: "/_api/bookings/v1/booking-policies/query",
|
|
86
|
+
destPath: "/v1/booking-policies/query"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
};
|
|
90
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
91
|
+
}
|
|
92
|
+
var PACKAGE_NAME = "@wix/auto_sdk_bookings_booking-policies";
|
|
93
|
+
function createBookingPolicy(payload) {
|
|
94
|
+
function __createBookingPolicy({ host }) {
|
|
95
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
96
|
+
{
|
|
97
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
98
|
+
paths: [
|
|
99
|
+
{ path: "bookingPolicy.createdDate" },
|
|
100
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
]);
|
|
104
|
+
const metadata = {
|
|
105
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
106
|
+
method: "POST",
|
|
107
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.CreateBookingPolicy",
|
|
108
|
+
packageName: PACKAGE_NAME,
|
|
109
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
110
|
+
protoPath: "/v1/booking-policies",
|
|
111
|
+
data: serializedData,
|
|
112
|
+
host
|
|
113
|
+
}),
|
|
114
|
+
data: serializedData,
|
|
115
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
116
|
+
{
|
|
117
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
118
|
+
paths: [
|
|
119
|
+
{ path: "bookingPolicy.createdDate" },
|
|
120
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
])
|
|
124
|
+
};
|
|
125
|
+
return metadata;
|
|
126
|
+
}
|
|
127
|
+
return __createBookingPolicy;
|
|
128
|
+
}
|
|
129
|
+
function getBookingPolicy(payload) {
|
|
130
|
+
function __getBookingPolicy({ host }) {
|
|
131
|
+
const metadata = {
|
|
132
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
133
|
+
method: "GET",
|
|
134
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.GetBookingPolicy",
|
|
135
|
+
packageName: PACKAGE_NAME,
|
|
136
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
137
|
+
protoPath: "/v1/booking-policies/{bookingPolicyId}",
|
|
138
|
+
data: payload,
|
|
139
|
+
host
|
|
140
|
+
}),
|
|
141
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
142
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
143
|
+
{
|
|
144
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
145
|
+
paths: [
|
|
146
|
+
{ path: "bookingPolicy.createdDate" },
|
|
147
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
])
|
|
151
|
+
};
|
|
152
|
+
return metadata;
|
|
153
|
+
}
|
|
154
|
+
return __getBookingPolicy;
|
|
155
|
+
}
|
|
156
|
+
function getStrictestBookingPolicy(payload) {
|
|
157
|
+
function __getStrictestBookingPolicy({ host }) {
|
|
158
|
+
const metadata = {
|
|
159
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
160
|
+
method: "POST",
|
|
161
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.GetStrictestBookingPolicy",
|
|
162
|
+
packageName: PACKAGE_NAME,
|
|
163
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
164
|
+
protoPath: "/v1/booking-policies/strictest",
|
|
165
|
+
data: payload,
|
|
166
|
+
host
|
|
167
|
+
}),
|
|
168
|
+
data: payload,
|
|
169
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
170
|
+
{
|
|
171
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
172
|
+
paths: [
|
|
173
|
+
{ path: "bookingPolicy.createdDate" },
|
|
174
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
])
|
|
178
|
+
};
|
|
179
|
+
return metadata;
|
|
180
|
+
}
|
|
181
|
+
return __getStrictestBookingPolicy;
|
|
182
|
+
}
|
|
183
|
+
function updateBookingPolicy(payload) {
|
|
184
|
+
function __updateBookingPolicy({ host }) {
|
|
185
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
186
|
+
{
|
|
187
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
188
|
+
paths: [{ path: "mask" }]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
192
|
+
paths: [
|
|
193
|
+
{ path: "bookingPolicy.createdDate" },
|
|
194
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
]);
|
|
198
|
+
const metadata = {
|
|
199
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
200
|
+
method: "PATCH",
|
|
201
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.UpdateBookingPolicy",
|
|
202
|
+
packageName: PACKAGE_NAME,
|
|
203
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
204
|
+
protoPath: "/v1/booking-policies/{bookingPolicy.id}",
|
|
205
|
+
data: serializedData,
|
|
206
|
+
host
|
|
207
|
+
}),
|
|
208
|
+
data: serializedData,
|
|
209
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
210
|
+
{
|
|
211
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
212
|
+
paths: [
|
|
213
|
+
{ path: "bookingPolicy.createdDate" },
|
|
214
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
])
|
|
218
|
+
};
|
|
219
|
+
return metadata;
|
|
220
|
+
}
|
|
221
|
+
return __updateBookingPolicy;
|
|
222
|
+
}
|
|
223
|
+
function setDefaultBookingPolicy(payload) {
|
|
224
|
+
function __setDefaultBookingPolicy({ host }) {
|
|
225
|
+
const metadata = {
|
|
226
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
227
|
+
method: "POST",
|
|
228
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.SetDefaultBookingPolicy",
|
|
229
|
+
packageName: PACKAGE_NAME,
|
|
230
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
231
|
+
protoPath: "/v1/booking-policies/{bookingPolicyId}:setDefault",
|
|
232
|
+
data: payload,
|
|
233
|
+
host
|
|
234
|
+
}),
|
|
235
|
+
data: payload,
|
|
236
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
237
|
+
{
|
|
238
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
239
|
+
paths: [
|
|
240
|
+
{ path: "currentDefaultBookingPolicy.createdDate" },
|
|
241
|
+
{ path: "currentDefaultBookingPolicy.updatedDate" },
|
|
242
|
+
{ path: "previousDefaultBookingPolicy.createdDate" },
|
|
243
|
+
{ path: "previousDefaultBookingPolicy.updatedDate" }
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
])
|
|
247
|
+
};
|
|
248
|
+
return metadata;
|
|
249
|
+
}
|
|
250
|
+
return __setDefaultBookingPolicy;
|
|
251
|
+
}
|
|
252
|
+
function deleteBookingPolicy(payload) {
|
|
253
|
+
function __deleteBookingPolicy({ host }) {
|
|
254
|
+
const metadata = {
|
|
255
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
256
|
+
method: "DELETE",
|
|
257
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.DeleteBookingPolicy",
|
|
258
|
+
packageName: PACKAGE_NAME,
|
|
259
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
260
|
+
protoPath: "/v1/booking-policies/{bookingPolicyId}",
|
|
261
|
+
data: payload,
|
|
262
|
+
host
|
|
263
|
+
}),
|
|
264
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
265
|
+
};
|
|
266
|
+
return metadata;
|
|
267
|
+
}
|
|
268
|
+
return __deleteBookingPolicy;
|
|
269
|
+
}
|
|
270
|
+
function queryBookingPolicies(payload) {
|
|
271
|
+
function __queryBookingPolicies({ host }) {
|
|
272
|
+
const metadata = {
|
|
273
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
274
|
+
method: "POST",
|
|
275
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.QueryBookingPolicies",
|
|
276
|
+
packageName: PACKAGE_NAME,
|
|
277
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
278
|
+
protoPath: "/v1/booking-policies/query",
|
|
279
|
+
data: payload,
|
|
280
|
+
host
|
|
281
|
+
}),
|
|
282
|
+
data: payload,
|
|
283
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
284
|
+
{
|
|
285
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
286
|
+
paths: [
|
|
287
|
+
{ path: "bookingPolicies.createdDate" },
|
|
288
|
+
{ path: "bookingPolicies.updatedDate" }
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
])
|
|
292
|
+
};
|
|
293
|
+
return metadata;
|
|
294
|
+
}
|
|
295
|
+
return __queryBookingPolicies;
|
|
296
|
+
}
|
|
297
|
+
function countBookingPolicies(payload) {
|
|
298
|
+
function __countBookingPolicies({ host }) {
|
|
299
|
+
const metadata = {
|
|
300
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
301
|
+
method: "POST",
|
|
302
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.CountBookingPolicies",
|
|
303
|
+
packageName: PACKAGE_NAME,
|
|
304
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
305
|
+
protoPath: "/v1/booking-policies/count",
|
|
306
|
+
data: payload,
|
|
307
|
+
host
|
|
308
|
+
}),
|
|
309
|
+
data: payload
|
|
310
|
+
};
|
|
311
|
+
return metadata;
|
|
312
|
+
}
|
|
313
|
+
return __countBookingPolicies;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// src/bookings-v1-booking-policy-booking-policies.universal.ts
|
|
317
|
+
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
318
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
319
|
+
SortOrder2["ASC"] = "ASC";
|
|
320
|
+
SortOrder2["DESC"] = "DESC";
|
|
321
|
+
return SortOrder2;
|
|
322
|
+
})(SortOrder || {});
|
|
323
|
+
var PlacementType = /* @__PURE__ */ ((PlacementType2) => {
|
|
324
|
+
PlacementType2["BEFORE"] = "BEFORE";
|
|
325
|
+
PlacementType2["AFTER"] = "AFTER";
|
|
326
|
+
PlacementType2["REPLACE"] = "REPLACE";
|
|
327
|
+
return PlacementType2;
|
|
328
|
+
})(PlacementType || {});
|
|
329
|
+
var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
|
|
330
|
+
DayOfWeek2["MONDAY"] = "MONDAY";
|
|
331
|
+
DayOfWeek2["TUESDAY"] = "TUESDAY";
|
|
332
|
+
DayOfWeek2["WEDNESDAY"] = "WEDNESDAY";
|
|
333
|
+
DayOfWeek2["THURSDAY"] = "THURSDAY";
|
|
334
|
+
DayOfWeek2["FRIDAY"] = "FRIDAY";
|
|
335
|
+
DayOfWeek2["SATURDAY"] = "SATURDAY";
|
|
336
|
+
DayOfWeek2["SUNDAY"] = "SUNDAY";
|
|
337
|
+
return DayOfWeek2;
|
|
338
|
+
})(DayOfWeek || {});
|
|
339
|
+
var ResolutionMethod = /* @__PURE__ */ ((ResolutionMethod2) => {
|
|
340
|
+
ResolutionMethod2["QUERY_PARAM"] = "QUERY_PARAM";
|
|
341
|
+
ResolutionMethod2["SUBDOMAIN"] = "SUBDOMAIN";
|
|
342
|
+
ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
|
|
343
|
+
return ResolutionMethod2;
|
|
344
|
+
})(ResolutionMethod || {});
|
|
345
|
+
var State = /* @__PURE__ */ ((State2) => {
|
|
346
|
+
State2["UNKNOWN"] = "UNKNOWN";
|
|
347
|
+
State2["ENABLED"] = "ENABLED";
|
|
348
|
+
State2["DISABLED"] = "DISABLED";
|
|
349
|
+
State2["PENDING"] = "PENDING";
|
|
350
|
+
State2["DEMO"] = "DEMO";
|
|
351
|
+
return State2;
|
|
352
|
+
})(State || {});
|
|
353
|
+
var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
|
|
354
|
+
SiteCreatedContext2["OTHER"] = "OTHER";
|
|
355
|
+
SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
356
|
+
SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
357
|
+
SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
|
|
358
|
+
SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
359
|
+
SiteCreatedContext2["FLASH"] = "FLASH";
|
|
360
|
+
return SiteCreatedContext2;
|
|
361
|
+
})(SiteCreatedContext || {});
|
|
362
|
+
var Namespace = /* @__PURE__ */ ((Namespace2) => {
|
|
363
|
+
Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
364
|
+
Namespace2["WIX"] = "WIX";
|
|
365
|
+
Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
|
|
366
|
+
Namespace2["ALBUMS"] = "ALBUMS";
|
|
367
|
+
Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
368
|
+
Namespace2["HOTELS"] = "HOTELS";
|
|
369
|
+
Namespace2["CLUBS"] = "CLUBS";
|
|
370
|
+
Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
371
|
+
Namespace2["DEV_SITE"] = "DEV_SITE";
|
|
372
|
+
Namespace2["LOGOS"] = "LOGOS";
|
|
373
|
+
Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
374
|
+
Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
375
|
+
Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
376
|
+
Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
|
|
377
|
+
Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
378
|
+
Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
379
|
+
Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
380
|
+
Namespace2["ANYWHERE"] = "ANYWHERE";
|
|
381
|
+
Namespace2["HEADLESS"] = "HEADLESS";
|
|
382
|
+
Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
383
|
+
Namespace2["RISE"] = "RISE";
|
|
384
|
+
Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
385
|
+
Namespace2["NOWNIA"] = "NOWNIA";
|
|
386
|
+
Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
387
|
+
Namespace2["CODUX"] = "CODUX";
|
|
388
|
+
Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
389
|
+
Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
390
|
+
Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
391
|
+
Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
392
|
+
Namespace2["MIMIR"] = "MIMIR";
|
|
393
|
+
return Namespace2;
|
|
394
|
+
})(Namespace || {});
|
|
395
|
+
var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
|
|
396
|
+
DeleteStatus2["UNKNOWN"] = "UNKNOWN";
|
|
397
|
+
DeleteStatus2["TRASH"] = "TRASH";
|
|
398
|
+
DeleteStatus2["DELETED"] = "DELETED";
|
|
399
|
+
DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
|
|
400
|
+
DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
401
|
+
return DeleteStatus2;
|
|
402
|
+
})(DeleteStatus || {});
|
|
403
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
404
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
405
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
406
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
407
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
408
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
409
|
+
return WebhookIdentityType2;
|
|
410
|
+
})(WebhookIdentityType || {});
|
|
411
|
+
async function createBookingPolicy2(bookingPolicy) {
|
|
412
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
413
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
414
|
+
bookingPolicy
|
|
415
|
+
});
|
|
416
|
+
const reqOpts = createBookingPolicy(payload);
|
|
417
|
+
sideEffects?.onSiteCall?.();
|
|
418
|
+
try {
|
|
419
|
+
const result = await httpClient.request(reqOpts);
|
|
420
|
+
sideEffects?.onSuccess?.(result);
|
|
421
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.bookingPolicy;
|
|
422
|
+
} catch (err) {
|
|
423
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
424
|
+
err,
|
|
425
|
+
{
|
|
426
|
+
spreadPathsToArguments: {},
|
|
427
|
+
explicitPathsToArguments: { bookingPolicy: "$[0]" },
|
|
428
|
+
singleArgumentUnchanged: false
|
|
429
|
+
},
|
|
430
|
+
["bookingPolicy"]
|
|
431
|
+
);
|
|
432
|
+
sideEffects?.onError?.(err);
|
|
433
|
+
throw transformedError;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
async function getBookingPolicy2(bookingPolicyId) {
|
|
437
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
438
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
439
|
+
bookingPolicyId
|
|
440
|
+
});
|
|
441
|
+
const reqOpts = getBookingPolicy(payload);
|
|
442
|
+
sideEffects?.onSiteCall?.();
|
|
443
|
+
try {
|
|
444
|
+
const result = await httpClient.request(reqOpts);
|
|
445
|
+
sideEffects?.onSuccess?.(result);
|
|
446
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.bookingPolicy;
|
|
447
|
+
} catch (err) {
|
|
448
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
449
|
+
err,
|
|
450
|
+
{
|
|
451
|
+
spreadPathsToArguments: {},
|
|
452
|
+
explicitPathsToArguments: { bookingPolicyId: "$[0]" },
|
|
453
|
+
singleArgumentUnchanged: false
|
|
454
|
+
},
|
|
455
|
+
["bookingPolicyId"]
|
|
456
|
+
);
|
|
457
|
+
sideEffects?.onError?.(err);
|
|
458
|
+
throw transformedError;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
async function getStrictestBookingPolicy2(bookingPolicyIds) {
|
|
462
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
463
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
464
|
+
bookingPolicyIds
|
|
465
|
+
});
|
|
466
|
+
const reqOpts = getStrictestBookingPolicy(payload);
|
|
467
|
+
sideEffects?.onSiteCall?.();
|
|
468
|
+
try {
|
|
469
|
+
const result = await httpClient.request(reqOpts);
|
|
470
|
+
sideEffects?.onSuccess?.(result);
|
|
471
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
472
|
+
} catch (err) {
|
|
473
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
474
|
+
err,
|
|
475
|
+
{
|
|
476
|
+
spreadPathsToArguments: {},
|
|
477
|
+
explicitPathsToArguments: { bookingPolicyIds: "$[0]" },
|
|
478
|
+
singleArgumentUnchanged: false
|
|
479
|
+
},
|
|
480
|
+
["bookingPolicyIds"]
|
|
481
|
+
);
|
|
482
|
+
sideEffects?.onError?.(err);
|
|
483
|
+
throw transformedError;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
async function updateBookingPolicy2(_id, bookingPolicy) {
|
|
487
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
488
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
489
|
+
bookingPolicy: { ...bookingPolicy, id: _id }
|
|
490
|
+
});
|
|
491
|
+
const reqOpts = updateBookingPolicy(payload);
|
|
492
|
+
sideEffects?.onSiteCall?.();
|
|
493
|
+
try {
|
|
494
|
+
const result = await httpClient.request(reqOpts);
|
|
495
|
+
sideEffects?.onSuccess?.(result);
|
|
496
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.bookingPolicy;
|
|
497
|
+
} catch (err) {
|
|
498
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
499
|
+
err,
|
|
500
|
+
{
|
|
501
|
+
spreadPathsToArguments: { bookingPolicy: "$[1]" },
|
|
502
|
+
explicitPathsToArguments: { "bookingPolicy.id": "$[0]" },
|
|
503
|
+
singleArgumentUnchanged: false
|
|
504
|
+
},
|
|
505
|
+
["_id", "bookingPolicy"]
|
|
506
|
+
);
|
|
507
|
+
sideEffects?.onError?.(err);
|
|
508
|
+
throw transformedError;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
async function setDefaultBookingPolicy2(bookingPolicyId) {
|
|
512
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
513
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
514
|
+
bookingPolicyId
|
|
515
|
+
});
|
|
516
|
+
const reqOpts = setDefaultBookingPolicy(payload);
|
|
517
|
+
sideEffects?.onSiteCall?.();
|
|
518
|
+
try {
|
|
519
|
+
const result = await httpClient.request(reqOpts);
|
|
520
|
+
sideEffects?.onSuccess?.(result);
|
|
521
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
522
|
+
} catch (err) {
|
|
523
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
524
|
+
err,
|
|
525
|
+
{
|
|
526
|
+
spreadPathsToArguments: {},
|
|
527
|
+
explicitPathsToArguments: { bookingPolicyId: "$[0]" },
|
|
528
|
+
singleArgumentUnchanged: false
|
|
529
|
+
},
|
|
530
|
+
["bookingPolicyId"]
|
|
531
|
+
);
|
|
532
|
+
sideEffects?.onError?.(err);
|
|
533
|
+
throw transformedError;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
async function deleteBookingPolicy2(bookingPolicyId) {
|
|
537
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
538
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
539
|
+
bookingPolicyId
|
|
540
|
+
});
|
|
541
|
+
const reqOpts = deleteBookingPolicy(payload);
|
|
542
|
+
sideEffects?.onSiteCall?.();
|
|
543
|
+
try {
|
|
544
|
+
const result = await httpClient.request(reqOpts);
|
|
545
|
+
sideEffects?.onSuccess?.(result);
|
|
546
|
+
} catch (err) {
|
|
547
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
548
|
+
err,
|
|
549
|
+
{
|
|
550
|
+
spreadPathsToArguments: {},
|
|
551
|
+
explicitPathsToArguments: { bookingPolicyId: "$[0]" },
|
|
552
|
+
singleArgumentUnchanged: false
|
|
553
|
+
},
|
|
554
|
+
["bookingPolicyId"]
|
|
555
|
+
);
|
|
556
|
+
sideEffects?.onError?.(err);
|
|
557
|
+
throw transformedError;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
function queryBookingPolicies2() {
|
|
561
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
562
|
+
return (0, import_query_builder.queryBuilder)({
|
|
563
|
+
func: async (payload) => {
|
|
564
|
+
const reqOpts = queryBookingPolicies(payload);
|
|
565
|
+
sideEffects?.onSiteCall?.();
|
|
566
|
+
try {
|
|
567
|
+
const result = await httpClient.request(reqOpts);
|
|
568
|
+
sideEffects?.onSuccess?.(result);
|
|
569
|
+
return result;
|
|
570
|
+
} catch (err) {
|
|
571
|
+
sideEffects?.onError?.(err);
|
|
572
|
+
throw err;
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
requestTransformer: (query) => {
|
|
576
|
+
const args = [query, {}];
|
|
577
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
578
|
+
...args?.[1],
|
|
579
|
+
query: args?.[0]
|
|
580
|
+
});
|
|
581
|
+
},
|
|
582
|
+
responseTransformer: ({
|
|
583
|
+
data
|
|
584
|
+
}) => {
|
|
585
|
+
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
586
|
+
(0, import_transform_paths2.transformPaths)(data, [])
|
|
587
|
+
);
|
|
588
|
+
return {
|
|
589
|
+
items: transformedData?.bookingPolicies,
|
|
590
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
591
|
+
};
|
|
592
|
+
},
|
|
593
|
+
errorTransformer: (err) => {
|
|
594
|
+
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
595
|
+
spreadPathsToArguments: {},
|
|
596
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
597
|
+
singleArgumentUnchanged: false
|
|
598
|
+
});
|
|
599
|
+
throw transformedError;
|
|
600
|
+
},
|
|
601
|
+
pagingMethod: "CURSOR",
|
|
602
|
+
transformationPaths: {}
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
async function countBookingPolicies2(options) {
|
|
606
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
607
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
608
|
+
filter: options?.filter
|
|
609
|
+
});
|
|
610
|
+
const reqOpts = countBookingPolicies(payload);
|
|
611
|
+
sideEffects?.onSiteCall?.();
|
|
612
|
+
try {
|
|
613
|
+
const result = await httpClient.request(reqOpts);
|
|
614
|
+
sideEffects?.onSuccess?.(result);
|
|
615
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
616
|
+
} catch (err) {
|
|
617
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
618
|
+
err,
|
|
619
|
+
{
|
|
620
|
+
spreadPathsToArguments: {},
|
|
621
|
+
explicitPathsToArguments: { filter: "$[0].filter" },
|
|
622
|
+
singleArgumentUnchanged: false
|
|
623
|
+
},
|
|
624
|
+
["options"]
|
|
625
|
+
);
|
|
626
|
+
sideEffects?.onError?.(err);
|
|
627
|
+
throw transformedError;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
// src/bookings-v1-booking-policy-booking-policies.public.ts
|
|
632
|
+
function createBookingPolicy3(httpClient) {
|
|
633
|
+
return (bookingPolicy) => createBookingPolicy2(
|
|
634
|
+
bookingPolicy,
|
|
635
|
+
// @ts-ignore
|
|
636
|
+
{ httpClient }
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
function getBookingPolicy3(httpClient) {
|
|
640
|
+
return (bookingPolicyId) => getBookingPolicy2(
|
|
641
|
+
bookingPolicyId,
|
|
642
|
+
// @ts-ignore
|
|
643
|
+
{ httpClient }
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
function getStrictestBookingPolicy3(httpClient) {
|
|
647
|
+
return (bookingPolicyIds) => getStrictestBookingPolicy2(
|
|
648
|
+
bookingPolicyIds,
|
|
649
|
+
// @ts-ignore
|
|
650
|
+
{ httpClient }
|
|
651
|
+
);
|
|
652
|
+
}
|
|
653
|
+
function updateBookingPolicy3(httpClient) {
|
|
654
|
+
return (_id, bookingPolicy) => updateBookingPolicy2(
|
|
655
|
+
_id,
|
|
656
|
+
bookingPolicy,
|
|
657
|
+
// @ts-ignore
|
|
658
|
+
{ httpClient }
|
|
659
|
+
);
|
|
660
|
+
}
|
|
661
|
+
function setDefaultBookingPolicy3(httpClient) {
|
|
662
|
+
return (bookingPolicyId) => setDefaultBookingPolicy2(
|
|
663
|
+
bookingPolicyId,
|
|
664
|
+
// @ts-ignore
|
|
665
|
+
{ httpClient }
|
|
666
|
+
);
|
|
667
|
+
}
|
|
668
|
+
function deleteBookingPolicy3(httpClient) {
|
|
669
|
+
return (bookingPolicyId) => deleteBookingPolicy2(
|
|
670
|
+
bookingPolicyId,
|
|
671
|
+
// @ts-ignore
|
|
672
|
+
{ httpClient }
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
function queryBookingPolicies3(httpClient) {
|
|
676
|
+
return () => queryBookingPolicies2(
|
|
677
|
+
// @ts-ignore
|
|
678
|
+
{ httpClient }
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
function countBookingPolicies3(httpClient) {
|
|
682
|
+
return (options) => countBookingPolicies2(
|
|
683
|
+
options,
|
|
684
|
+
// @ts-ignore
|
|
685
|
+
{ httpClient }
|
|
686
|
+
);
|
|
687
|
+
}
|
|
688
|
+
var onBookingPolicyCreated = (0, import_sdk_types.EventDefinition)(
|
|
689
|
+
"wix.bookings.v1.booking_policy_created",
|
|
690
|
+
true,
|
|
691
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
692
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
693
|
+
{
|
|
694
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
695
|
+
paths: [
|
|
696
|
+
{ path: "entity.createdDate" },
|
|
697
|
+
{ path: "entity.updatedDate" },
|
|
698
|
+
{ path: "metadata.eventTime" }
|
|
699
|
+
]
|
|
700
|
+
}
|
|
701
|
+
])
|
|
702
|
+
)
|
|
703
|
+
)();
|
|
704
|
+
var onBookingPolicyDefaultBookingPolicySet = (0, import_sdk_types.EventDefinition)(
|
|
705
|
+
"wix.bookings.v1.booking_policy_default_booking_policy_set",
|
|
706
|
+
true,
|
|
707
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
708
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
709
|
+
{
|
|
710
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
711
|
+
paths: [
|
|
712
|
+
{ path: "data.currentDefaultBookingPolicy.createdDate" },
|
|
713
|
+
{ path: "data.currentDefaultBookingPolicy.updatedDate" },
|
|
714
|
+
{ path: "data.previousDefaultBookingPolicy.createdDate" },
|
|
715
|
+
{ path: "data.previousDefaultBookingPolicy.updatedDate" },
|
|
716
|
+
{ path: "metadata.eventTime" }
|
|
717
|
+
]
|
|
718
|
+
}
|
|
719
|
+
])
|
|
720
|
+
)
|
|
721
|
+
)();
|
|
722
|
+
var onBookingPolicyDeleted = (0, import_sdk_types.EventDefinition)(
|
|
723
|
+
"wix.bookings.v1.booking_policy_deleted",
|
|
724
|
+
true,
|
|
725
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
726
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
727
|
+
{
|
|
728
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
729
|
+
paths: [
|
|
730
|
+
{ path: "undefined.createdDate" },
|
|
731
|
+
{ path: "undefined.updatedDate" },
|
|
732
|
+
{ path: "metadata.eventTime" }
|
|
733
|
+
]
|
|
734
|
+
}
|
|
735
|
+
])
|
|
736
|
+
)
|
|
737
|
+
)();
|
|
738
|
+
var onBookingPolicyUpdated = (0, import_sdk_types.EventDefinition)(
|
|
739
|
+
"wix.bookings.v1.booking_policy_updated",
|
|
740
|
+
true,
|
|
741
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
742
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
743
|
+
{
|
|
744
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
745
|
+
paths: [
|
|
746
|
+
{ path: "entity.createdDate" },
|
|
747
|
+
{ path: "entity.updatedDate" },
|
|
748
|
+
{ path: "metadata.eventTime" }
|
|
749
|
+
]
|
|
750
|
+
}
|
|
751
|
+
])
|
|
752
|
+
)
|
|
753
|
+
)();
|
|
754
|
+
|
|
755
|
+
// src/bookings-v1-booking-policy-booking-policies.context.ts
|
|
756
|
+
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
757
|
+
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
758
|
+
var createBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createBookingPolicy3);
|
|
759
|
+
var getBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getBookingPolicy3);
|
|
760
|
+
var getStrictestBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getStrictestBookingPolicy3);
|
|
761
|
+
var updateBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateBookingPolicy3);
|
|
762
|
+
var setDefaultBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setDefaultBookingPolicy3);
|
|
763
|
+
var deleteBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteBookingPolicy3);
|
|
764
|
+
var queryBookingPolicies4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryBookingPolicies3);
|
|
765
|
+
var countBookingPolicies4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(countBookingPolicies3);
|
|
766
|
+
var onBookingPolicyCreated2 = (0, import_event_definition_modules.createEventModule)(onBookingPolicyCreated);
|
|
767
|
+
var onBookingPolicyDefaultBookingPolicySet2 = (0, import_event_definition_modules.createEventModule)(onBookingPolicyDefaultBookingPolicySet);
|
|
768
|
+
var onBookingPolicyDeleted2 = (0, import_event_definition_modules.createEventModule)(onBookingPolicyDeleted);
|
|
769
|
+
var onBookingPolicyUpdated2 = (0, import_event_definition_modules.createEventModule)(onBookingPolicyUpdated);
|
|
770
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
771
|
+
0 && (module.exports = {
|
|
772
|
+
DayOfWeek,
|
|
773
|
+
DeleteStatus,
|
|
774
|
+
Namespace,
|
|
775
|
+
PlacementType,
|
|
776
|
+
ResolutionMethod,
|
|
777
|
+
SiteCreatedContext,
|
|
778
|
+
SortOrder,
|
|
779
|
+
State,
|
|
780
|
+
WebhookIdentityType,
|
|
781
|
+
countBookingPolicies,
|
|
782
|
+
createBookingPolicy,
|
|
783
|
+
deleteBookingPolicy,
|
|
784
|
+
getBookingPolicy,
|
|
785
|
+
getStrictestBookingPolicy,
|
|
786
|
+
onBookingPolicyCreated,
|
|
787
|
+
onBookingPolicyDefaultBookingPolicySet,
|
|
788
|
+
onBookingPolicyDeleted,
|
|
789
|
+
onBookingPolicyUpdated,
|
|
790
|
+
queryBookingPolicies,
|
|
791
|
+
setDefaultBookingPolicy,
|
|
792
|
+
updateBookingPolicy
|
|
793
|
+
});
|
|
794
|
+
//# sourceMappingURL=index.js.map
|