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