@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
|
@@ -0,0 +1,641 @@
|
|
|
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.typings.ts
|
|
21
|
+
var index_typings_exports = {};
|
|
22
|
+
__export(index_typings_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: () => countBookingPolicies2,
|
|
33
|
+
createBookingPolicy: () => createBookingPolicy2,
|
|
34
|
+
deleteBookingPolicy: () => deleteBookingPolicy2,
|
|
35
|
+
getBookingPolicy: () => getBookingPolicy2,
|
|
36
|
+
getStrictestBookingPolicy: () => getStrictestBookingPolicy2,
|
|
37
|
+
queryBookingPolicies: () => queryBookingPolicies2,
|
|
38
|
+
setDefaultBookingPolicy: () => setDefaultBookingPolicy2,
|
|
39
|
+
updateBookingPolicy: () => updateBookingPolicy2
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(index_typings_exports);
|
|
42
|
+
|
|
43
|
+
// src/bookings-v1-booking-policy-booking-policies.universal.ts
|
|
44
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
45
|
+
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
46
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
47
|
+
|
|
48
|
+
// src/bookings-v1-booking-policy-booking-policies.http.ts
|
|
49
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
50
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
51
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
52
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
53
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
54
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
55
|
+
function resolveWixBookingsV1BookingPoliciesServiceUrl(opts) {
|
|
56
|
+
const domainToMappings = {
|
|
57
|
+
"manage._base_domain_": [
|
|
58
|
+
{
|
|
59
|
+
srcPath: "/_api/bookings/v1/booking-policies",
|
|
60
|
+
destPath: "/v1/booking-policies"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"www.wixapis.com": [
|
|
64
|
+
{
|
|
65
|
+
srcPath: "/bookings/v1/booking-policies",
|
|
66
|
+
destPath: "/v1/booking-policies"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
_: [
|
|
70
|
+
{
|
|
71
|
+
srcPath: "/_api/bookings/v1/booking-policies/strictest",
|
|
72
|
+
destPath: "/v1/booking-policies/strictest"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
srcPath: "/_api/bookings/v1/booking-policies/query",
|
|
76
|
+
destPath: "/v1/booking-policies/query"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
};
|
|
80
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
81
|
+
}
|
|
82
|
+
var PACKAGE_NAME = "@wix/auto_sdk_bookings_booking-policies";
|
|
83
|
+
function createBookingPolicy(payload) {
|
|
84
|
+
function __createBookingPolicy({ host }) {
|
|
85
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
86
|
+
{
|
|
87
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
88
|
+
paths: [
|
|
89
|
+
{ path: "bookingPolicy.createdDate" },
|
|
90
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]);
|
|
94
|
+
const metadata = {
|
|
95
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
96
|
+
method: "POST",
|
|
97
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.CreateBookingPolicy",
|
|
98
|
+
packageName: PACKAGE_NAME,
|
|
99
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
100
|
+
protoPath: "/v1/booking-policies",
|
|
101
|
+
data: serializedData,
|
|
102
|
+
host
|
|
103
|
+
}),
|
|
104
|
+
data: serializedData,
|
|
105
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
106
|
+
{
|
|
107
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
108
|
+
paths: [
|
|
109
|
+
{ path: "bookingPolicy.createdDate" },
|
|
110
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
])
|
|
114
|
+
};
|
|
115
|
+
return metadata;
|
|
116
|
+
}
|
|
117
|
+
return __createBookingPolicy;
|
|
118
|
+
}
|
|
119
|
+
function getBookingPolicy(payload) {
|
|
120
|
+
function __getBookingPolicy({ host }) {
|
|
121
|
+
const metadata = {
|
|
122
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
123
|
+
method: "GET",
|
|
124
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.GetBookingPolicy",
|
|
125
|
+
packageName: PACKAGE_NAME,
|
|
126
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
127
|
+
protoPath: "/v1/booking-policies/{bookingPolicyId}",
|
|
128
|
+
data: payload,
|
|
129
|
+
host
|
|
130
|
+
}),
|
|
131
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
132
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
133
|
+
{
|
|
134
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
135
|
+
paths: [
|
|
136
|
+
{ path: "bookingPolicy.createdDate" },
|
|
137
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
])
|
|
141
|
+
};
|
|
142
|
+
return metadata;
|
|
143
|
+
}
|
|
144
|
+
return __getBookingPolicy;
|
|
145
|
+
}
|
|
146
|
+
function getStrictestBookingPolicy(payload) {
|
|
147
|
+
function __getStrictestBookingPolicy({ host }) {
|
|
148
|
+
const metadata = {
|
|
149
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
150
|
+
method: "POST",
|
|
151
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.GetStrictestBookingPolicy",
|
|
152
|
+
packageName: PACKAGE_NAME,
|
|
153
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
154
|
+
protoPath: "/v1/booking-policies/strictest",
|
|
155
|
+
data: payload,
|
|
156
|
+
host
|
|
157
|
+
}),
|
|
158
|
+
data: payload,
|
|
159
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
160
|
+
{
|
|
161
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
162
|
+
paths: [
|
|
163
|
+
{ path: "bookingPolicy.createdDate" },
|
|
164
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
])
|
|
168
|
+
};
|
|
169
|
+
return metadata;
|
|
170
|
+
}
|
|
171
|
+
return __getStrictestBookingPolicy;
|
|
172
|
+
}
|
|
173
|
+
function updateBookingPolicy(payload) {
|
|
174
|
+
function __updateBookingPolicy({ host }) {
|
|
175
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
176
|
+
{
|
|
177
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
178
|
+
paths: [{ path: "mask" }]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
182
|
+
paths: [
|
|
183
|
+
{ path: "bookingPolicy.createdDate" },
|
|
184
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
]);
|
|
188
|
+
const metadata = {
|
|
189
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
190
|
+
method: "PATCH",
|
|
191
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.UpdateBookingPolicy",
|
|
192
|
+
packageName: PACKAGE_NAME,
|
|
193
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
194
|
+
protoPath: "/v1/booking-policies/{bookingPolicy.id}",
|
|
195
|
+
data: serializedData,
|
|
196
|
+
host
|
|
197
|
+
}),
|
|
198
|
+
data: serializedData,
|
|
199
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
200
|
+
{
|
|
201
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
202
|
+
paths: [
|
|
203
|
+
{ path: "bookingPolicy.createdDate" },
|
|
204
|
+
{ path: "bookingPolicy.updatedDate" }
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
])
|
|
208
|
+
};
|
|
209
|
+
return metadata;
|
|
210
|
+
}
|
|
211
|
+
return __updateBookingPolicy;
|
|
212
|
+
}
|
|
213
|
+
function setDefaultBookingPolicy(payload) {
|
|
214
|
+
function __setDefaultBookingPolicy({ host }) {
|
|
215
|
+
const metadata = {
|
|
216
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
217
|
+
method: "POST",
|
|
218
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.SetDefaultBookingPolicy",
|
|
219
|
+
packageName: PACKAGE_NAME,
|
|
220
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
221
|
+
protoPath: "/v1/booking-policies/{bookingPolicyId}:setDefault",
|
|
222
|
+
data: payload,
|
|
223
|
+
host
|
|
224
|
+
}),
|
|
225
|
+
data: payload,
|
|
226
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
227
|
+
{
|
|
228
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
229
|
+
paths: [
|
|
230
|
+
{ path: "currentDefaultBookingPolicy.createdDate" },
|
|
231
|
+
{ path: "currentDefaultBookingPolicy.updatedDate" },
|
|
232
|
+
{ path: "previousDefaultBookingPolicy.createdDate" },
|
|
233
|
+
{ path: "previousDefaultBookingPolicy.updatedDate" }
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
])
|
|
237
|
+
};
|
|
238
|
+
return metadata;
|
|
239
|
+
}
|
|
240
|
+
return __setDefaultBookingPolicy;
|
|
241
|
+
}
|
|
242
|
+
function deleteBookingPolicy(payload) {
|
|
243
|
+
function __deleteBookingPolicy({ host }) {
|
|
244
|
+
const metadata = {
|
|
245
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
246
|
+
method: "DELETE",
|
|
247
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.DeleteBookingPolicy",
|
|
248
|
+
packageName: PACKAGE_NAME,
|
|
249
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
250
|
+
protoPath: "/v1/booking-policies/{bookingPolicyId}",
|
|
251
|
+
data: payload,
|
|
252
|
+
host
|
|
253
|
+
}),
|
|
254
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
255
|
+
};
|
|
256
|
+
return metadata;
|
|
257
|
+
}
|
|
258
|
+
return __deleteBookingPolicy;
|
|
259
|
+
}
|
|
260
|
+
function queryBookingPolicies(payload) {
|
|
261
|
+
function __queryBookingPolicies({ host }) {
|
|
262
|
+
const metadata = {
|
|
263
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
264
|
+
method: "POST",
|
|
265
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.QueryBookingPolicies",
|
|
266
|
+
packageName: PACKAGE_NAME,
|
|
267
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
268
|
+
protoPath: "/v1/booking-policies/query",
|
|
269
|
+
data: payload,
|
|
270
|
+
host
|
|
271
|
+
}),
|
|
272
|
+
data: payload,
|
|
273
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
274
|
+
{
|
|
275
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
276
|
+
paths: [
|
|
277
|
+
{ path: "bookingPolicies.createdDate" },
|
|
278
|
+
{ path: "bookingPolicies.updatedDate" }
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
])
|
|
282
|
+
};
|
|
283
|
+
return metadata;
|
|
284
|
+
}
|
|
285
|
+
return __queryBookingPolicies;
|
|
286
|
+
}
|
|
287
|
+
function countBookingPolicies(payload) {
|
|
288
|
+
function __countBookingPolicies({ host }) {
|
|
289
|
+
const metadata = {
|
|
290
|
+
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
291
|
+
method: "POST",
|
|
292
|
+
methodFqn: "wix.bookings.v1.BookingPoliciesService.CountBookingPolicies",
|
|
293
|
+
packageName: PACKAGE_NAME,
|
|
294
|
+
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
295
|
+
protoPath: "/v1/booking-policies/count",
|
|
296
|
+
data: payload,
|
|
297
|
+
host
|
|
298
|
+
}),
|
|
299
|
+
data: payload
|
|
300
|
+
};
|
|
301
|
+
return metadata;
|
|
302
|
+
}
|
|
303
|
+
return __countBookingPolicies;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// src/bookings-v1-booking-policy-booking-policies.universal.ts
|
|
307
|
+
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
308
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
309
|
+
SortOrder2["ASC"] = "ASC";
|
|
310
|
+
SortOrder2["DESC"] = "DESC";
|
|
311
|
+
return SortOrder2;
|
|
312
|
+
})(SortOrder || {});
|
|
313
|
+
var PlacementType = /* @__PURE__ */ ((PlacementType2) => {
|
|
314
|
+
PlacementType2["BEFORE"] = "BEFORE";
|
|
315
|
+
PlacementType2["AFTER"] = "AFTER";
|
|
316
|
+
PlacementType2["REPLACE"] = "REPLACE";
|
|
317
|
+
return PlacementType2;
|
|
318
|
+
})(PlacementType || {});
|
|
319
|
+
var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
|
|
320
|
+
DayOfWeek2["MONDAY"] = "MONDAY";
|
|
321
|
+
DayOfWeek2["TUESDAY"] = "TUESDAY";
|
|
322
|
+
DayOfWeek2["WEDNESDAY"] = "WEDNESDAY";
|
|
323
|
+
DayOfWeek2["THURSDAY"] = "THURSDAY";
|
|
324
|
+
DayOfWeek2["FRIDAY"] = "FRIDAY";
|
|
325
|
+
DayOfWeek2["SATURDAY"] = "SATURDAY";
|
|
326
|
+
DayOfWeek2["SUNDAY"] = "SUNDAY";
|
|
327
|
+
return DayOfWeek2;
|
|
328
|
+
})(DayOfWeek || {});
|
|
329
|
+
var ResolutionMethod = /* @__PURE__ */ ((ResolutionMethod2) => {
|
|
330
|
+
ResolutionMethod2["QUERY_PARAM"] = "QUERY_PARAM";
|
|
331
|
+
ResolutionMethod2["SUBDOMAIN"] = "SUBDOMAIN";
|
|
332
|
+
ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
|
|
333
|
+
return ResolutionMethod2;
|
|
334
|
+
})(ResolutionMethod || {});
|
|
335
|
+
var State = /* @__PURE__ */ ((State2) => {
|
|
336
|
+
State2["UNKNOWN"] = "UNKNOWN";
|
|
337
|
+
State2["ENABLED"] = "ENABLED";
|
|
338
|
+
State2["DISABLED"] = "DISABLED";
|
|
339
|
+
State2["PENDING"] = "PENDING";
|
|
340
|
+
State2["DEMO"] = "DEMO";
|
|
341
|
+
return State2;
|
|
342
|
+
})(State || {});
|
|
343
|
+
var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
|
|
344
|
+
SiteCreatedContext2["OTHER"] = "OTHER";
|
|
345
|
+
SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
346
|
+
SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
347
|
+
SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
|
|
348
|
+
SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
349
|
+
SiteCreatedContext2["FLASH"] = "FLASH";
|
|
350
|
+
return SiteCreatedContext2;
|
|
351
|
+
})(SiteCreatedContext || {});
|
|
352
|
+
var Namespace = /* @__PURE__ */ ((Namespace2) => {
|
|
353
|
+
Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
354
|
+
Namespace2["WIX"] = "WIX";
|
|
355
|
+
Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
|
|
356
|
+
Namespace2["ALBUMS"] = "ALBUMS";
|
|
357
|
+
Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
358
|
+
Namespace2["HOTELS"] = "HOTELS";
|
|
359
|
+
Namespace2["CLUBS"] = "CLUBS";
|
|
360
|
+
Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
361
|
+
Namespace2["DEV_SITE"] = "DEV_SITE";
|
|
362
|
+
Namespace2["LOGOS"] = "LOGOS";
|
|
363
|
+
Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
364
|
+
Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
365
|
+
Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
366
|
+
Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
|
|
367
|
+
Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
368
|
+
Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
369
|
+
Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
370
|
+
Namespace2["ANYWHERE"] = "ANYWHERE";
|
|
371
|
+
Namespace2["HEADLESS"] = "HEADLESS";
|
|
372
|
+
Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
373
|
+
Namespace2["RISE"] = "RISE";
|
|
374
|
+
Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
375
|
+
Namespace2["NOWNIA"] = "NOWNIA";
|
|
376
|
+
Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
377
|
+
Namespace2["CODUX"] = "CODUX";
|
|
378
|
+
Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
379
|
+
Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
380
|
+
Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
381
|
+
Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
382
|
+
Namespace2["MIMIR"] = "MIMIR";
|
|
383
|
+
return Namespace2;
|
|
384
|
+
})(Namespace || {});
|
|
385
|
+
var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
|
|
386
|
+
DeleteStatus2["UNKNOWN"] = "UNKNOWN";
|
|
387
|
+
DeleteStatus2["TRASH"] = "TRASH";
|
|
388
|
+
DeleteStatus2["DELETED"] = "DELETED";
|
|
389
|
+
DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
|
|
390
|
+
DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
391
|
+
return DeleteStatus2;
|
|
392
|
+
})(DeleteStatus || {});
|
|
393
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
394
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
395
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
396
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
397
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
398
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
399
|
+
return WebhookIdentityType2;
|
|
400
|
+
})(WebhookIdentityType || {});
|
|
401
|
+
async function createBookingPolicy2(bookingPolicy) {
|
|
402
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
403
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
404
|
+
bookingPolicy
|
|
405
|
+
});
|
|
406
|
+
const reqOpts = createBookingPolicy(payload);
|
|
407
|
+
sideEffects?.onSiteCall?.();
|
|
408
|
+
try {
|
|
409
|
+
const result = await httpClient.request(reqOpts);
|
|
410
|
+
sideEffects?.onSuccess?.(result);
|
|
411
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.bookingPolicy;
|
|
412
|
+
} catch (err) {
|
|
413
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
414
|
+
err,
|
|
415
|
+
{
|
|
416
|
+
spreadPathsToArguments: {},
|
|
417
|
+
explicitPathsToArguments: { bookingPolicy: "$[0]" },
|
|
418
|
+
singleArgumentUnchanged: false
|
|
419
|
+
},
|
|
420
|
+
["bookingPolicy"]
|
|
421
|
+
);
|
|
422
|
+
sideEffects?.onError?.(err);
|
|
423
|
+
throw transformedError;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
async function getBookingPolicy2(bookingPolicyId) {
|
|
427
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
428
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
429
|
+
bookingPolicyId
|
|
430
|
+
});
|
|
431
|
+
const reqOpts = getBookingPolicy(payload);
|
|
432
|
+
sideEffects?.onSiteCall?.();
|
|
433
|
+
try {
|
|
434
|
+
const result = await httpClient.request(reqOpts);
|
|
435
|
+
sideEffects?.onSuccess?.(result);
|
|
436
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.bookingPolicy;
|
|
437
|
+
} catch (err) {
|
|
438
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
439
|
+
err,
|
|
440
|
+
{
|
|
441
|
+
spreadPathsToArguments: {},
|
|
442
|
+
explicitPathsToArguments: { bookingPolicyId: "$[0]" },
|
|
443
|
+
singleArgumentUnchanged: false
|
|
444
|
+
},
|
|
445
|
+
["bookingPolicyId"]
|
|
446
|
+
);
|
|
447
|
+
sideEffects?.onError?.(err);
|
|
448
|
+
throw transformedError;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
async function getStrictestBookingPolicy2(bookingPolicyIds) {
|
|
452
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
453
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
454
|
+
bookingPolicyIds
|
|
455
|
+
});
|
|
456
|
+
const reqOpts = getStrictestBookingPolicy(payload);
|
|
457
|
+
sideEffects?.onSiteCall?.();
|
|
458
|
+
try {
|
|
459
|
+
const result = await httpClient.request(reqOpts);
|
|
460
|
+
sideEffects?.onSuccess?.(result);
|
|
461
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
462
|
+
} catch (err) {
|
|
463
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
464
|
+
err,
|
|
465
|
+
{
|
|
466
|
+
spreadPathsToArguments: {},
|
|
467
|
+
explicitPathsToArguments: { bookingPolicyIds: "$[0]" },
|
|
468
|
+
singleArgumentUnchanged: false
|
|
469
|
+
},
|
|
470
|
+
["bookingPolicyIds"]
|
|
471
|
+
);
|
|
472
|
+
sideEffects?.onError?.(err);
|
|
473
|
+
throw transformedError;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
async function updateBookingPolicy2(_id, bookingPolicy) {
|
|
477
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
478
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
479
|
+
bookingPolicy: { ...bookingPolicy, id: _id }
|
|
480
|
+
});
|
|
481
|
+
const reqOpts = updateBookingPolicy(payload);
|
|
482
|
+
sideEffects?.onSiteCall?.();
|
|
483
|
+
try {
|
|
484
|
+
const result = await httpClient.request(reqOpts);
|
|
485
|
+
sideEffects?.onSuccess?.(result);
|
|
486
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.bookingPolicy;
|
|
487
|
+
} catch (err) {
|
|
488
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
489
|
+
err,
|
|
490
|
+
{
|
|
491
|
+
spreadPathsToArguments: { bookingPolicy: "$[1]" },
|
|
492
|
+
explicitPathsToArguments: { "bookingPolicy.id": "$[0]" },
|
|
493
|
+
singleArgumentUnchanged: false
|
|
494
|
+
},
|
|
495
|
+
["_id", "bookingPolicy"]
|
|
496
|
+
);
|
|
497
|
+
sideEffects?.onError?.(err);
|
|
498
|
+
throw transformedError;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
async function setDefaultBookingPolicy2(bookingPolicyId) {
|
|
502
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
503
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
504
|
+
bookingPolicyId
|
|
505
|
+
});
|
|
506
|
+
const reqOpts = setDefaultBookingPolicy(payload);
|
|
507
|
+
sideEffects?.onSiteCall?.();
|
|
508
|
+
try {
|
|
509
|
+
const result = await httpClient.request(reqOpts);
|
|
510
|
+
sideEffects?.onSuccess?.(result);
|
|
511
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
512
|
+
} catch (err) {
|
|
513
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
514
|
+
err,
|
|
515
|
+
{
|
|
516
|
+
spreadPathsToArguments: {},
|
|
517
|
+
explicitPathsToArguments: { bookingPolicyId: "$[0]" },
|
|
518
|
+
singleArgumentUnchanged: false
|
|
519
|
+
},
|
|
520
|
+
["bookingPolicyId"]
|
|
521
|
+
);
|
|
522
|
+
sideEffects?.onError?.(err);
|
|
523
|
+
throw transformedError;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
async function deleteBookingPolicy2(bookingPolicyId) {
|
|
527
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
528
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
529
|
+
bookingPolicyId
|
|
530
|
+
});
|
|
531
|
+
const reqOpts = deleteBookingPolicy(payload);
|
|
532
|
+
sideEffects?.onSiteCall?.();
|
|
533
|
+
try {
|
|
534
|
+
const result = await httpClient.request(reqOpts);
|
|
535
|
+
sideEffects?.onSuccess?.(result);
|
|
536
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
537
|
+
} catch (err) {
|
|
538
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
539
|
+
err,
|
|
540
|
+
{
|
|
541
|
+
spreadPathsToArguments: {},
|
|
542
|
+
explicitPathsToArguments: { bookingPolicyId: "$[0]" },
|
|
543
|
+
singleArgumentUnchanged: false
|
|
544
|
+
},
|
|
545
|
+
["bookingPolicyId"]
|
|
546
|
+
);
|
|
547
|
+
sideEffects?.onError?.(err);
|
|
548
|
+
throw transformedError;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
function queryBookingPolicies2() {
|
|
552
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
553
|
+
return (0, import_query_builder.queryBuilder)({
|
|
554
|
+
func: async (payload) => {
|
|
555
|
+
const reqOpts = queryBookingPolicies(payload);
|
|
556
|
+
sideEffects?.onSiteCall?.();
|
|
557
|
+
try {
|
|
558
|
+
const result = await httpClient.request(reqOpts);
|
|
559
|
+
sideEffects?.onSuccess?.(result);
|
|
560
|
+
return result;
|
|
561
|
+
} catch (err) {
|
|
562
|
+
sideEffects?.onError?.(err);
|
|
563
|
+
throw err;
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
requestTransformer: (query) => {
|
|
567
|
+
const args = [query, {}];
|
|
568
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
569
|
+
...args?.[1],
|
|
570
|
+
query: args?.[0]
|
|
571
|
+
});
|
|
572
|
+
},
|
|
573
|
+
responseTransformer: ({
|
|
574
|
+
data
|
|
575
|
+
}) => {
|
|
576
|
+
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
577
|
+
(0, import_transform_paths2.transformPaths)(data, [])
|
|
578
|
+
);
|
|
579
|
+
return {
|
|
580
|
+
items: transformedData?.bookingPolicies,
|
|
581
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
582
|
+
};
|
|
583
|
+
},
|
|
584
|
+
errorTransformer: (err) => {
|
|
585
|
+
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
586
|
+
spreadPathsToArguments: {},
|
|
587
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
588
|
+
singleArgumentUnchanged: false
|
|
589
|
+
});
|
|
590
|
+
throw transformedError;
|
|
591
|
+
},
|
|
592
|
+
pagingMethod: "CURSOR",
|
|
593
|
+
transformationPaths: {}
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
async function countBookingPolicies2(options) {
|
|
597
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
598
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
599
|
+
filter: options?.filter
|
|
600
|
+
});
|
|
601
|
+
const reqOpts = countBookingPolicies(payload);
|
|
602
|
+
sideEffects?.onSiteCall?.();
|
|
603
|
+
try {
|
|
604
|
+
const result = await httpClient.request(reqOpts);
|
|
605
|
+
sideEffects?.onSuccess?.(result);
|
|
606
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
607
|
+
} catch (err) {
|
|
608
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
609
|
+
err,
|
|
610
|
+
{
|
|
611
|
+
spreadPathsToArguments: {},
|
|
612
|
+
explicitPathsToArguments: { filter: "$[0].filter" },
|
|
613
|
+
singleArgumentUnchanged: false
|
|
614
|
+
},
|
|
615
|
+
["options"]
|
|
616
|
+
);
|
|
617
|
+
sideEffects?.onError?.(err);
|
|
618
|
+
throw transformedError;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
622
|
+
0 && (module.exports = {
|
|
623
|
+
DayOfWeek,
|
|
624
|
+
DeleteStatus,
|
|
625
|
+
Namespace,
|
|
626
|
+
PlacementType,
|
|
627
|
+
ResolutionMethod,
|
|
628
|
+
SiteCreatedContext,
|
|
629
|
+
SortOrder,
|
|
630
|
+
State,
|
|
631
|
+
WebhookIdentityType,
|
|
632
|
+
countBookingPolicies,
|
|
633
|
+
createBookingPolicy,
|
|
634
|
+
deleteBookingPolicy,
|
|
635
|
+
getBookingPolicy,
|
|
636
|
+
getStrictestBookingPolicy,
|
|
637
|
+
queryBookingPolicies,
|
|
638
|
+
setDefaultBookingPolicy,
|
|
639
|
+
updateBookingPolicy
|
|
640
|
+
});
|
|
641
|
+
//# sourceMappingURL=index.typings.js.map
|