@wix/auto_sdk_bookings_bookings 1.0.36 → 1.0.38
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 +104 -25
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{bookings-v2-booking-bookings.universal-BREkRFfz.d.ts → index.typings.d.ts} +1496 -1
- package/build/cjs/index.typings.js +2021 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +104 -25
- package/build/es/index.mjs.map +1 -1
- package/build/es/{bookings-v2-booking-bookings.universal-BREkRFfz.d.mts → index.typings.d.mts} +1496 -1
- package/build/es/index.typings.mjs +1963 -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 +104 -25
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{bookings-v2-booking-bookings.universal-BREkRFfz.d.ts → index.typings.d.ts} +1496 -1
- package/build/internal/cjs/index.typings.js +2021 -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 +104 -25
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{bookings-v2-booking-bookings.universal-BREkRFfz.d.mts → index.typings.d.mts} +1496 -1
- package/build/internal/es/index.typings.mjs +1963 -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,1963 @@
|
|
|
1
|
+
// src/bookings-v2-booking-bookings.universal.ts
|
|
2
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import {
|
|
4
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
5
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
6
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
7
|
+
|
|
8
|
+
// src/bookings-v2-booking-bookings.http.ts
|
|
9
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
10
|
+
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
|
|
11
|
+
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
|
|
12
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
13
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
14
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
15
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
16
|
+
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
17
|
+
const domainToMappings = {
|
|
18
|
+
_: [
|
|
19
|
+
{
|
|
20
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
21
|
+
destPath: "/v2/bookings"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
25
|
+
destPath: "/v2/bulk/bookings"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
srcPath: "/_api/bookings-service/v2/multi_service_bookings",
|
|
29
|
+
destPath: "/v2/multi_service_bookings"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
srcPath: "/_api/bookings-service/v2/bulk/multi_service_bookings",
|
|
33
|
+
destPath: "/v2/bulk/multi_service_bookings"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"manage._base_domain_": [
|
|
37
|
+
{
|
|
38
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
39
|
+
destPath: "/v2/bookings"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
43
|
+
destPath: "/v2/bulk/bookings"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
srcPath: "/_api/bookings-service/v2/multi_service_bookings",
|
|
47
|
+
destPath: "/v2/multi_service_bookings"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
srcPath: "/_api/bookings-service/v2/bulk/multi_service_bookings",
|
|
51
|
+
destPath: "/v2/bulk/multi_service_bookings"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"www.wixapis.com": [
|
|
55
|
+
{
|
|
56
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
57
|
+
destPath: "/v2/bookings"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
srcPath: "/bookings/v2/bookings",
|
|
61
|
+
destPath: "/v2/bookings"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
65
|
+
destPath: "/v2/bulk/bookings"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"www._base_domain_": [
|
|
69
|
+
{
|
|
70
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
71
|
+
destPath: "/v2/bulk/bookings"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
75
|
+
destPath: "/v2/bookings"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"bo._base_domain_": [
|
|
79
|
+
{
|
|
80
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
81
|
+
destPath: "/v2/bulk/bookings"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
85
|
+
destPath: "/v2/bookings"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"wixbo.ai": [
|
|
89
|
+
{
|
|
90
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
91
|
+
destPath: "/v2/bulk/bookings"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
95
|
+
destPath: "/v2/bookings"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"wix-bo.com": [
|
|
99
|
+
{
|
|
100
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
101
|
+
destPath: "/v2/bulk/bookings"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
105
|
+
destPath: "/v2/bookings"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"*.dev.wix-code.com": [
|
|
109
|
+
{
|
|
110
|
+
srcPath: "/_api/bookings-service",
|
|
111
|
+
destPath: "/v2/bookings"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
};
|
|
115
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
116
|
+
}
|
|
117
|
+
function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
|
|
118
|
+
const domainToMappings = {
|
|
119
|
+
_: [
|
|
120
|
+
{
|
|
121
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
122
|
+
destPath: "/v2/bookings"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
126
|
+
destPath: "/v2/bulk/bookings"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
srcPath: "/_api/bookings-service/v2/multi_service_bookings",
|
|
130
|
+
destPath: "/v2/multi_service_bookings"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
srcPath: "/_api/bookings-service/v2/bulk/multi_service_bookings",
|
|
134
|
+
destPath: "/v2/bulk/multi_service_bookings"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"manage._base_domain_": [
|
|
138
|
+
{
|
|
139
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
140
|
+
destPath: "/v2/bookings"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
144
|
+
destPath: "/v2/bulk/bookings"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
srcPath: "/_api/bookings-service/v2/multi_service_bookings",
|
|
148
|
+
destPath: "/v2/multi_service_bookings"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
srcPath: "/_api/bookings-service/v2/bulk/multi_service_bookings",
|
|
152
|
+
destPath: "/v2/bulk/multi_service_bookings"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"www.wixapis.com": [
|
|
156
|
+
{
|
|
157
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
158
|
+
destPath: "/v2/bookings"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
srcPath: "/bookings/v2/bookings",
|
|
162
|
+
destPath: "/v2/bookings"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
166
|
+
destPath: "/v2/bulk/bookings"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"www._base_domain_": [
|
|
170
|
+
{
|
|
171
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
172
|
+
destPath: "/v2/bulk/bookings"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
176
|
+
destPath: "/v2/bookings"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"bo._base_domain_": [
|
|
180
|
+
{
|
|
181
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
182
|
+
destPath: "/v2/bulk/bookings"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
186
|
+
destPath: "/v2/bookings"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"wixbo.ai": [
|
|
190
|
+
{
|
|
191
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
192
|
+
destPath: "/v2/bulk/bookings"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
196
|
+
destPath: "/v2/bookings"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"wix-bo.com": [
|
|
200
|
+
{
|
|
201
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
202
|
+
destPath: "/v2/bulk/bookings"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
206
|
+
destPath: "/v2/bookings"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"*.dev.wix-code.com": [
|
|
210
|
+
{
|
|
211
|
+
srcPath: "/_api/bookings-service",
|
|
212
|
+
destPath: "/v2/bookings"
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
};
|
|
216
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
217
|
+
}
|
|
218
|
+
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
219
|
+
const domainToMappings = {
|
|
220
|
+
"www.wixapis.com": [
|
|
221
|
+
{
|
|
222
|
+
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
223
|
+
destPath: "/v2/bookings/confirmation"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
srcPath: "/bookings/v2/confirmation",
|
|
227
|
+
destPath: "/v2/confirmation"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
srcPath: "/bookings/v2/bulk/confirmation",
|
|
231
|
+
destPath: "/v2/bulk/confirmation"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
235
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
239
|
+
destPath: "/v2/bulk/confirmation"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
243
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
};
|
|
247
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
248
|
+
}
|
|
249
|
+
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
|
|
250
|
+
function confirmOrDeclineBooking(payload) {
|
|
251
|
+
function __confirmOrDeclineBooking({ host }) {
|
|
252
|
+
const metadata = {
|
|
253
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
254
|
+
method: "POST",
|
|
255
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
256
|
+
packageName: PACKAGE_NAME,
|
|
257
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
258
|
+
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
259
|
+
data: payload,
|
|
260
|
+
host
|
|
261
|
+
}),
|
|
262
|
+
data: payload,
|
|
263
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
264
|
+
{
|
|
265
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
266
|
+
paths: [
|
|
267
|
+
{ path: "booking.createdDate" },
|
|
268
|
+
{ path: "booking.startDate" },
|
|
269
|
+
{ path: "booking.endDate" },
|
|
270
|
+
{ path: "booking.updatedDate" },
|
|
271
|
+
{ path: "booking.canceledDate" }
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
276
|
+
paths: [
|
|
277
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
278
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
])
|
|
282
|
+
};
|
|
283
|
+
return metadata;
|
|
284
|
+
}
|
|
285
|
+
return __confirmOrDeclineBooking;
|
|
286
|
+
}
|
|
287
|
+
function bulkConfirmOrDeclineBooking(payload) {
|
|
288
|
+
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
289
|
+
const metadata = {
|
|
290
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
291
|
+
method: "POST",
|
|
292
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
293
|
+
packageName: PACKAGE_NAME,
|
|
294
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
295
|
+
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
296
|
+
data: payload,
|
|
297
|
+
host
|
|
298
|
+
}),
|
|
299
|
+
data: payload,
|
|
300
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
301
|
+
{
|
|
302
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
303
|
+
paths: [
|
|
304
|
+
{ path: "results.item.createdDate" },
|
|
305
|
+
{ path: "results.item.startDate" },
|
|
306
|
+
{ path: "results.item.endDate" },
|
|
307
|
+
{ path: "results.item.updatedDate" },
|
|
308
|
+
{ path: "results.item.canceledDate" }
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
313
|
+
paths: [
|
|
314
|
+
{
|
|
315
|
+
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
])
|
|
323
|
+
};
|
|
324
|
+
return metadata;
|
|
325
|
+
}
|
|
326
|
+
return __bulkConfirmOrDeclineBooking;
|
|
327
|
+
}
|
|
328
|
+
function createBooking(payload) {
|
|
329
|
+
function __createBooking({ host }) {
|
|
330
|
+
const serializedData = transformPaths(payload, [
|
|
331
|
+
{
|
|
332
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
333
|
+
paths: [
|
|
334
|
+
{ path: "booking.createdDate" },
|
|
335
|
+
{ path: "booking.startDate" },
|
|
336
|
+
{ path: "booking.endDate" },
|
|
337
|
+
{ path: "booking.updatedDate" },
|
|
338
|
+
{ path: "booking.canceledDate" }
|
|
339
|
+
]
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
343
|
+
paths: [
|
|
344
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
345
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
]);
|
|
349
|
+
const metadata = {
|
|
350
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
351
|
+
method: "POST",
|
|
352
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.CreateBooking",
|
|
353
|
+
packageName: PACKAGE_NAME,
|
|
354
|
+
url: resolveComWixpressBookingsBookingsV2BookingsUrl({
|
|
355
|
+
protoPath: "/v2/bookings",
|
|
356
|
+
data: serializedData,
|
|
357
|
+
host
|
|
358
|
+
}),
|
|
359
|
+
data: serializedData,
|
|
360
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
361
|
+
{
|
|
362
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
363
|
+
paths: [
|
|
364
|
+
{ path: "booking.createdDate" },
|
|
365
|
+
{ path: "booking.startDate" },
|
|
366
|
+
{ path: "booking.endDate" },
|
|
367
|
+
{ path: "booking.updatedDate" },
|
|
368
|
+
{ path: "booking.canceledDate" }
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
373
|
+
paths: [
|
|
374
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
375
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
])
|
|
379
|
+
};
|
|
380
|
+
return metadata;
|
|
381
|
+
}
|
|
382
|
+
return __createBooking;
|
|
383
|
+
}
|
|
384
|
+
function bulkCreateBooking(payload) {
|
|
385
|
+
function __bulkCreateBooking({ host }) {
|
|
386
|
+
const serializedData = transformPaths(payload, [
|
|
387
|
+
{
|
|
388
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
389
|
+
paths: [
|
|
390
|
+
{ path: "createBookingsInfo.booking.createdDate" },
|
|
391
|
+
{ path: "createBookingsInfo.booking.startDate" },
|
|
392
|
+
{ path: "createBookingsInfo.booking.endDate" },
|
|
393
|
+
{ path: "createBookingsInfo.booking.updatedDate" },
|
|
394
|
+
{ path: "createBookingsInfo.booking.canceledDate" }
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
399
|
+
paths: [
|
|
400
|
+
{
|
|
401
|
+
path: "createBookingsInfo.booking.contactDetails.fullAddress.geocode.latitude"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
path: "createBookingsInfo.booking.contactDetails.fullAddress.geocode.longitude"
|
|
405
|
+
}
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
]);
|
|
409
|
+
const metadata = {
|
|
410
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
411
|
+
method: "POST",
|
|
412
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.BulkCreateBooking",
|
|
413
|
+
packageName: PACKAGE_NAME,
|
|
414
|
+
url: resolveComWixpressBookingsBookingsV2BookingsUrl({
|
|
415
|
+
protoPath: "/v2/bulk/bookings/create",
|
|
416
|
+
data: serializedData,
|
|
417
|
+
host
|
|
418
|
+
}),
|
|
419
|
+
data: serializedData,
|
|
420
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
421
|
+
{
|
|
422
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
423
|
+
paths: [
|
|
424
|
+
{ path: "results.item.createdDate" },
|
|
425
|
+
{ path: "results.item.startDate" },
|
|
426
|
+
{ path: "results.item.endDate" },
|
|
427
|
+
{ path: "results.item.updatedDate" },
|
|
428
|
+
{ path: "results.item.canceledDate" }
|
|
429
|
+
]
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
433
|
+
paths: [
|
|
434
|
+
{
|
|
435
|
+
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
}
|
|
442
|
+
])
|
|
443
|
+
};
|
|
444
|
+
return metadata;
|
|
445
|
+
}
|
|
446
|
+
return __bulkCreateBooking;
|
|
447
|
+
}
|
|
448
|
+
function rescheduleBooking(payload) {
|
|
449
|
+
function __rescheduleBooking({ host }) {
|
|
450
|
+
const metadata = {
|
|
451
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
452
|
+
method: "POST",
|
|
453
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.RescheduleBooking",
|
|
454
|
+
packageName: PACKAGE_NAME,
|
|
455
|
+
url: resolveComWixpressBookingsBookingsV2BookingsUrl({
|
|
456
|
+
protoPath: "/v2/bookings/{bookingId}/reschedule",
|
|
457
|
+
data: payload,
|
|
458
|
+
host
|
|
459
|
+
}),
|
|
460
|
+
data: payload,
|
|
461
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
462
|
+
{
|
|
463
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
464
|
+
paths: [
|
|
465
|
+
{ path: "booking.createdDate" },
|
|
466
|
+
{ path: "booking.startDate" },
|
|
467
|
+
{ path: "booking.endDate" },
|
|
468
|
+
{ path: "booking.updatedDate" },
|
|
469
|
+
{ path: "booking.canceledDate" }
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
474
|
+
paths: [
|
|
475
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
476
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
477
|
+
]
|
|
478
|
+
}
|
|
479
|
+
])
|
|
480
|
+
};
|
|
481
|
+
return metadata;
|
|
482
|
+
}
|
|
483
|
+
return __rescheduleBooking;
|
|
484
|
+
}
|
|
485
|
+
function bookingsConfirmBooking(payload) {
|
|
486
|
+
function __bookingsConfirmBooking({ host }) {
|
|
487
|
+
const metadata = {
|
|
488
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
489
|
+
method: "POST",
|
|
490
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.ConfirmBooking",
|
|
491
|
+
packageName: PACKAGE_NAME,
|
|
492
|
+
url: resolveComWixpressBookingsBookingsV2BookingsUrl({
|
|
493
|
+
protoPath: "/v2/bookings/{bookingId}/confirm",
|
|
494
|
+
data: payload,
|
|
495
|
+
host
|
|
496
|
+
}),
|
|
497
|
+
data: payload,
|
|
498
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
499
|
+
{
|
|
500
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
501
|
+
paths: [
|
|
502
|
+
{ path: "booking.createdDate" },
|
|
503
|
+
{ path: "booking.startDate" },
|
|
504
|
+
{ path: "booking.endDate" },
|
|
505
|
+
{ path: "booking.updatedDate" },
|
|
506
|
+
{ path: "booking.canceledDate" }
|
|
507
|
+
]
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
511
|
+
paths: [
|
|
512
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
513
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
])
|
|
517
|
+
};
|
|
518
|
+
return metadata;
|
|
519
|
+
}
|
|
520
|
+
return __bookingsConfirmBooking;
|
|
521
|
+
}
|
|
522
|
+
function setBookingSubmissionId(payload) {
|
|
523
|
+
function __setBookingSubmissionId({ host }) {
|
|
524
|
+
const metadata = {
|
|
525
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
526
|
+
method: "POST",
|
|
527
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.SetBookingSubmissionId",
|
|
528
|
+
packageName: PACKAGE_NAME,
|
|
529
|
+
url: resolveComWixpressBookingsBookingsV2BookingsUrl({
|
|
530
|
+
protoPath: "/v2/bookings/{bookingId}/set-booking-submission-id",
|
|
531
|
+
data: payload,
|
|
532
|
+
host
|
|
533
|
+
}),
|
|
534
|
+
data: payload,
|
|
535
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
536
|
+
{
|
|
537
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
538
|
+
paths: [
|
|
539
|
+
{ path: "booking.createdDate" },
|
|
540
|
+
{ path: "booking.startDate" },
|
|
541
|
+
{ path: "booking.endDate" },
|
|
542
|
+
{ path: "booking.updatedDate" },
|
|
543
|
+
{ path: "booking.canceledDate" }
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
548
|
+
paths: [
|
|
549
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
550
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
])
|
|
554
|
+
};
|
|
555
|
+
return metadata;
|
|
556
|
+
}
|
|
557
|
+
return __setBookingSubmissionId;
|
|
558
|
+
}
|
|
559
|
+
function updateExtendedFields(payload) {
|
|
560
|
+
function __updateExtendedFields({ host }) {
|
|
561
|
+
const metadata = {
|
|
562
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
563
|
+
method: "POST",
|
|
564
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.UpdateExtendedFields",
|
|
565
|
+
packageName: PACKAGE_NAME,
|
|
566
|
+
url: resolveComWixpressBookingsBookingsV2BookingsUrl({
|
|
567
|
+
protoPath: "/v2/bookings/{id}/update_extended_fields",
|
|
568
|
+
data: payload,
|
|
569
|
+
host
|
|
570
|
+
}),
|
|
571
|
+
data: payload
|
|
572
|
+
};
|
|
573
|
+
return metadata;
|
|
574
|
+
}
|
|
575
|
+
return __updateExtendedFields;
|
|
576
|
+
}
|
|
577
|
+
function bookingsDeclineBooking(payload) {
|
|
578
|
+
function __bookingsDeclineBooking({ host }) {
|
|
579
|
+
const metadata = {
|
|
580
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
581
|
+
method: "POST",
|
|
582
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.DeclineBooking",
|
|
583
|
+
packageName: PACKAGE_NAME,
|
|
584
|
+
url: resolveComWixpressBookingsBookingsV2BookingsUrl({
|
|
585
|
+
protoPath: "/v2/bookings/{bookingId}/decline",
|
|
586
|
+
data: payload,
|
|
587
|
+
host
|
|
588
|
+
}),
|
|
589
|
+
data: payload,
|
|
590
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
591
|
+
{
|
|
592
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
593
|
+
paths: [
|
|
594
|
+
{ path: "booking.createdDate" },
|
|
595
|
+
{ path: "booking.startDate" },
|
|
596
|
+
{ path: "booking.endDate" },
|
|
597
|
+
{ path: "booking.updatedDate" },
|
|
598
|
+
{ path: "booking.canceledDate" }
|
|
599
|
+
]
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
603
|
+
paths: [
|
|
604
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
605
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
606
|
+
]
|
|
607
|
+
}
|
|
608
|
+
])
|
|
609
|
+
};
|
|
610
|
+
return metadata;
|
|
611
|
+
}
|
|
612
|
+
return __bookingsDeclineBooking;
|
|
613
|
+
}
|
|
614
|
+
function bookingsCancelBooking(payload) {
|
|
615
|
+
function __bookingsCancelBooking({ host }) {
|
|
616
|
+
const metadata = {
|
|
617
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
618
|
+
method: "POST",
|
|
619
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.CancelBooking",
|
|
620
|
+
packageName: PACKAGE_NAME,
|
|
621
|
+
url: resolveComWixpressBookingsBookingsV2BookingsUrl({
|
|
622
|
+
protoPath: "/v2/bookings/{bookingId}/cancel",
|
|
623
|
+
data: payload,
|
|
624
|
+
host
|
|
625
|
+
}),
|
|
626
|
+
data: payload,
|
|
627
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
628
|
+
{
|
|
629
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
630
|
+
paths: [
|
|
631
|
+
{ path: "booking.createdDate" },
|
|
632
|
+
{ path: "booking.startDate" },
|
|
633
|
+
{ path: "booking.endDate" },
|
|
634
|
+
{ path: "booking.updatedDate" },
|
|
635
|
+
{ path: "booking.canceledDate" }
|
|
636
|
+
]
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
640
|
+
paths: [
|
|
641
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
642
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
643
|
+
]
|
|
644
|
+
}
|
|
645
|
+
])
|
|
646
|
+
};
|
|
647
|
+
return metadata;
|
|
648
|
+
}
|
|
649
|
+
return __bookingsCancelBooking;
|
|
650
|
+
}
|
|
651
|
+
function bookingsUpdateNumberOfParticipants(payload) {
|
|
652
|
+
function __bookingsUpdateNumberOfParticipants({ host }) {
|
|
653
|
+
const metadata = {
|
|
654
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
655
|
+
method: "POST",
|
|
656
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.UpdateNumberOfParticipants",
|
|
657
|
+
packageName: PACKAGE_NAME,
|
|
658
|
+
url: resolveComWixpressBookingsBookingsV2BookingsUrl({
|
|
659
|
+
protoPath: "/v2/bookings/{bookingId}/update_number_of_participants",
|
|
660
|
+
data: payload,
|
|
661
|
+
host
|
|
662
|
+
}),
|
|
663
|
+
data: payload,
|
|
664
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
665
|
+
{
|
|
666
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
667
|
+
paths: [
|
|
668
|
+
{ path: "booking.createdDate" },
|
|
669
|
+
{ path: "booking.startDate" },
|
|
670
|
+
{ path: "booking.endDate" },
|
|
671
|
+
{ path: "booking.updatedDate" },
|
|
672
|
+
{ path: "booking.canceledDate" }
|
|
673
|
+
]
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
677
|
+
paths: [
|
|
678
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
679
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
680
|
+
]
|
|
681
|
+
}
|
|
682
|
+
])
|
|
683
|
+
};
|
|
684
|
+
return metadata;
|
|
685
|
+
}
|
|
686
|
+
return __bookingsUpdateNumberOfParticipants;
|
|
687
|
+
}
|
|
688
|
+
function createMultiServiceBooking(payload) {
|
|
689
|
+
function __createMultiServiceBooking({ host }) {
|
|
690
|
+
const serializedData = transformPaths(payload, [
|
|
691
|
+
{
|
|
692
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
693
|
+
paths: [
|
|
694
|
+
{ path: "bookings.createdDate" },
|
|
695
|
+
{ path: "bookings.startDate" },
|
|
696
|
+
{ path: "bookings.endDate" },
|
|
697
|
+
{ path: "bookings.updatedDate" },
|
|
698
|
+
{ path: "bookings.canceledDate" }
|
|
699
|
+
]
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
703
|
+
paths: [
|
|
704
|
+
{ path: "bookings.contactDetails.fullAddress.geocode.latitude" },
|
|
705
|
+
{ path: "bookings.contactDetails.fullAddress.geocode.longitude" }
|
|
706
|
+
]
|
|
707
|
+
}
|
|
708
|
+
]);
|
|
709
|
+
const metadata = {
|
|
710
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
711
|
+
method: "POST",
|
|
712
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.CreateMultiServiceBooking",
|
|
713
|
+
packageName: PACKAGE_NAME,
|
|
714
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
715
|
+
protoPath: "/v2/multi_service_bookings",
|
|
716
|
+
data: serializedData,
|
|
717
|
+
host
|
|
718
|
+
}),
|
|
719
|
+
data: serializedData,
|
|
720
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
721
|
+
{
|
|
722
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
723
|
+
paths: [
|
|
724
|
+
{ path: "multiServiceBooking.bookings.booking.createdDate" },
|
|
725
|
+
{ path: "multiServiceBooking.bookings.booking.startDate" },
|
|
726
|
+
{ path: "multiServiceBooking.bookings.booking.endDate" },
|
|
727
|
+
{ path: "multiServiceBooking.bookings.booking.updatedDate" },
|
|
728
|
+
{ path: "multiServiceBooking.bookings.booking.canceledDate" }
|
|
729
|
+
]
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
733
|
+
paths: [
|
|
734
|
+
{
|
|
735
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
|
|
739
|
+
}
|
|
740
|
+
]
|
|
741
|
+
}
|
|
742
|
+
])
|
|
743
|
+
};
|
|
744
|
+
return metadata;
|
|
745
|
+
}
|
|
746
|
+
return __createMultiServiceBooking;
|
|
747
|
+
}
|
|
748
|
+
function rescheduleMultiServiceBooking(payload) {
|
|
749
|
+
function __rescheduleMultiServiceBooking({ host }) {
|
|
750
|
+
const metadata = {
|
|
751
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
752
|
+
method: "POST",
|
|
753
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.RescheduleMultiServiceBooking",
|
|
754
|
+
packageName: PACKAGE_NAME,
|
|
755
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
756
|
+
protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/reschedule",
|
|
757
|
+
data: payload,
|
|
758
|
+
host
|
|
759
|
+
}),
|
|
760
|
+
data: payload,
|
|
761
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
762
|
+
{
|
|
763
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
764
|
+
paths: [
|
|
765
|
+
{ path: "multiServiceBooking.bookings.booking.createdDate" },
|
|
766
|
+
{ path: "multiServiceBooking.bookings.booking.startDate" },
|
|
767
|
+
{ path: "multiServiceBooking.bookings.booking.endDate" },
|
|
768
|
+
{ path: "multiServiceBooking.bookings.booking.updatedDate" },
|
|
769
|
+
{ path: "multiServiceBooking.bookings.booking.canceledDate" }
|
|
770
|
+
]
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
774
|
+
paths: [
|
|
775
|
+
{
|
|
776
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
|
|
780
|
+
}
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
])
|
|
784
|
+
};
|
|
785
|
+
return metadata;
|
|
786
|
+
}
|
|
787
|
+
return __rescheduleMultiServiceBooking;
|
|
788
|
+
}
|
|
789
|
+
function getMultiServiceBookingAvailability(payload) {
|
|
790
|
+
function __getMultiServiceBookingAvailability({ host }) {
|
|
791
|
+
const metadata = {
|
|
792
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
793
|
+
method: "POST",
|
|
794
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.GetMultiServiceBookingAvailability",
|
|
795
|
+
packageName: PACKAGE_NAME,
|
|
796
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
797
|
+
protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/get_availability",
|
|
798
|
+
data: payload,
|
|
799
|
+
host
|
|
800
|
+
}),
|
|
801
|
+
data: payload
|
|
802
|
+
};
|
|
803
|
+
return metadata;
|
|
804
|
+
}
|
|
805
|
+
return __getMultiServiceBookingAvailability;
|
|
806
|
+
}
|
|
807
|
+
function cancelMultiServiceBooking(payload) {
|
|
808
|
+
function __cancelMultiServiceBooking({ host }) {
|
|
809
|
+
const metadata = {
|
|
810
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
811
|
+
method: "POST",
|
|
812
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.CancelMultiServiceBooking",
|
|
813
|
+
packageName: PACKAGE_NAME,
|
|
814
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
815
|
+
protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/cancel",
|
|
816
|
+
data: payload,
|
|
817
|
+
host
|
|
818
|
+
}),
|
|
819
|
+
data: payload,
|
|
820
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
821
|
+
{
|
|
822
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
823
|
+
paths: [
|
|
824
|
+
{ path: "multiServiceBooking.bookings.booking.createdDate" },
|
|
825
|
+
{ path: "multiServiceBooking.bookings.booking.startDate" },
|
|
826
|
+
{ path: "multiServiceBooking.bookings.booking.endDate" },
|
|
827
|
+
{ path: "multiServiceBooking.bookings.booking.updatedDate" },
|
|
828
|
+
{ path: "multiServiceBooking.bookings.booking.canceledDate" }
|
|
829
|
+
]
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
833
|
+
paths: [
|
|
834
|
+
{
|
|
835
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
|
|
839
|
+
}
|
|
840
|
+
]
|
|
841
|
+
}
|
|
842
|
+
])
|
|
843
|
+
};
|
|
844
|
+
return metadata;
|
|
845
|
+
}
|
|
846
|
+
return __cancelMultiServiceBooking;
|
|
847
|
+
}
|
|
848
|
+
function markMultiServiceBookingAsPending(payload) {
|
|
849
|
+
function __markMultiServiceBookingAsPending({ host }) {
|
|
850
|
+
const metadata = {
|
|
851
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
852
|
+
method: "POST",
|
|
853
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.MarkMultiServiceBookingAsPending",
|
|
854
|
+
packageName: PACKAGE_NAME,
|
|
855
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
856
|
+
protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/mark_as_pending",
|
|
857
|
+
data: payload,
|
|
858
|
+
host
|
|
859
|
+
}),
|
|
860
|
+
data: payload,
|
|
861
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
862
|
+
{
|
|
863
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
864
|
+
paths: [
|
|
865
|
+
{ path: "multiServiceBooking.bookings.booking.createdDate" },
|
|
866
|
+
{ path: "multiServiceBooking.bookings.booking.startDate" },
|
|
867
|
+
{ path: "multiServiceBooking.bookings.booking.endDate" },
|
|
868
|
+
{ path: "multiServiceBooking.bookings.booking.updatedDate" },
|
|
869
|
+
{ path: "multiServiceBooking.bookings.booking.canceledDate" }
|
|
870
|
+
]
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
874
|
+
paths: [
|
|
875
|
+
{
|
|
876
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
|
|
880
|
+
}
|
|
881
|
+
]
|
|
882
|
+
}
|
|
883
|
+
])
|
|
884
|
+
};
|
|
885
|
+
return metadata;
|
|
886
|
+
}
|
|
887
|
+
return __markMultiServiceBookingAsPending;
|
|
888
|
+
}
|
|
889
|
+
function confirmMultiServiceBooking(payload) {
|
|
890
|
+
function __confirmMultiServiceBooking({ host }) {
|
|
891
|
+
const metadata = {
|
|
892
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
893
|
+
method: "POST",
|
|
894
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.ConfirmMultiServiceBooking",
|
|
895
|
+
packageName: PACKAGE_NAME,
|
|
896
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
897
|
+
protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/confirm",
|
|
898
|
+
data: payload,
|
|
899
|
+
host
|
|
900
|
+
}),
|
|
901
|
+
data: payload,
|
|
902
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
903
|
+
{
|
|
904
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
905
|
+
paths: [
|
|
906
|
+
{ path: "multiServiceBooking.bookings.booking.createdDate" },
|
|
907
|
+
{ path: "multiServiceBooking.bookings.booking.startDate" },
|
|
908
|
+
{ path: "multiServiceBooking.bookings.booking.endDate" },
|
|
909
|
+
{ path: "multiServiceBooking.bookings.booking.updatedDate" },
|
|
910
|
+
{ path: "multiServiceBooking.bookings.booking.canceledDate" }
|
|
911
|
+
]
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
915
|
+
paths: [
|
|
916
|
+
{
|
|
917
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
|
|
921
|
+
}
|
|
922
|
+
]
|
|
923
|
+
}
|
|
924
|
+
])
|
|
925
|
+
};
|
|
926
|
+
return metadata;
|
|
927
|
+
}
|
|
928
|
+
return __confirmMultiServiceBooking;
|
|
929
|
+
}
|
|
930
|
+
function declineMultiServiceBooking(payload) {
|
|
931
|
+
function __declineMultiServiceBooking({ host }) {
|
|
932
|
+
const metadata = {
|
|
933
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
934
|
+
method: "POST",
|
|
935
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.DeclineMultiServiceBooking",
|
|
936
|
+
packageName: PACKAGE_NAME,
|
|
937
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
938
|
+
protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/decline",
|
|
939
|
+
data: payload,
|
|
940
|
+
host
|
|
941
|
+
}),
|
|
942
|
+
data: payload,
|
|
943
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
944
|
+
{
|
|
945
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
946
|
+
paths: [
|
|
947
|
+
{ path: "multiServiceBooking.bookings.booking.createdDate" },
|
|
948
|
+
{ path: "multiServiceBooking.bookings.booking.startDate" },
|
|
949
|
+
{ path: "multiServiceBooking.bookings.booking.endDate" },
|
|
950
|
+
{ path: "multiServiceBooking.bookings.booking.updatedDate" },
|
|
951
|
+
{ path: "multiServiceBooking.bookings.booking.canceledDate" }
|
|
952
|
+
]
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
956
|
+
paths: [
|
|
957
|
+
{
|
|
958
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
|
|
962
|
+
}
|
|
963
|
+
]
|
|
964
|
+
}
|
|
965
|
+
])
|
|
966
|
+
};
|
|
967
|
+
return metadata;
|
|
968
|
+
}
|
|
969
|
+
return __declineMultiServiceBooking;
|
|
970
|
+
}
|
|
971
|
+
function bulkGetMultiServiceBookingAllowedActions(payload) {
|
|
972
|
+
function __bulkGetMultiServiceBookingAllowedActions({ host }) {
|
|
973
|
+
const metadata = {
|
|
974
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
975
|
+
method: "POST",
|
|
976
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.BulkGetMultiServiceBookingAllowedActions",
|
|
977
|
+
packageName: PACKAGE_NAME,
|
|
978
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
979
|
+
protoPath: "/v2/bulk/multi_service_bookings/get_allowed_actions",
|
|
980
|
+
data: payload,
|
|
981
|
+
host
|
|
982
|
+
}),
|
|
983
|
+
data: payload
|
|
984
|
+
};
|
|
985
|
+
return metadata;
|
|
986
|
+
}
|
|
987
|
+
return __bulkGetMultiServiceBookingAllowedActions;
|
|
988
|
+
}
|
|
989
|
+
function getMultiServiceBooking(payload) {
|
|
990
|
+
function __getMultiServiceBooking({ host }) {
|
|
991
|
+
const metadata = {
|
|
992
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
993
|
+
method: "GET",
|
|
994
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.GetMultiServiceBooking",
|
|
995
|
+
packageName: PACKAGE_NAME,
|
|
996
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
997
|
+
protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}",
|
|
998
|
+
data: payload,
|
|
999
|
+
host
|
|
1000
|
+
}),
|
|
1001
|
+
params: toURLSearchParams(payload),
|
|
1002
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1003
|
+
{
|
|
1004
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1005
|
+
paths: [
|
|
1006
|
+
{ path: "multiServiceBooking.bookings.booking.createdDate" },
|
|
1007
|
+
{ path: "multiServiceBooking.bookings.booking.startDate" },
|
|
1008
|
+
{ path: "multiServiceBooking.bookings.booking.endDate" },
|
|
1009
|
+
{ path: "multiServiceBooking.bookings.booking.updatedDate" },
|
|
1010
|
+
{ path: "multiServiceBooking.bookings.booking.canceledDate" }
|
|
1011
|
+
]
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1015
|
+
paths: [
|
|
1016
|
+
{
|
|
1017
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
|
|
1021
|
+
}
|
|
1022
|
+
]
|
|
1023
|
+
}
|
|
1024
|
+
])
|
|
1025
|
+
};
|
|
1026
|
+
return metadata;
|
|
1027
|
+
}
|
|
1028
|
+
return __getMultiServiceBooking;
|
|
1029
|
+
}
|
|
1030
|
+
function addBookingsToMultiServiceBooking(payload) {
|
|
1031
|
+
function __addBookingsToMultiServiceBooking({ host }) {
|
|
1032
|
+
const metadata = {
|
|
1033
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1034
|
+
method: "POST",
|
|
1035
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.AddBookingsToMultiServiceBooking",
|
|
1036
|
+
packageName: PACKAGE_NAME,
|
|
1037
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
1038
|
+
protoPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
|
|
1039
|
+
data: payload,
|
|
1040
|
+
host
|
|
1041
|
+
}),
|
|
1042
|
+
data: payload,
|
|
1043
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1044
|
+
{
|
|
1045
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1046
|
+
paths: [
|
|
1047
|
+
{ path: "bookings.booking.createdDate" },
|
|
1048
|
+
{ path: "bookings.booking.startDate" },
|
|
1049
|
+
{ path: "bookings.booking.endDate" },
|
|
1050
|
+
{ path: "bookings.booking.updatedDate" },
|
|
1051
|
+
{ path: "bookings.booking.canceledDate" }
|
|
1052
|
+
]
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1056
|
+
paths: [
|
|
1057
|
+
{
|
|
1058
|
+
path: "bookings.booking.contactDetails.fullAddress.geocode.latitude"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
path: "bookings.booking.contactDetails.fullAddress.geocode.longitude"
|
|
1062
|
+
}
|
|
1063
|
+
]
|
|
1064
|
+
}
|
|
1065
|
+
])
|
|
1066
|
+
};
|
|
1067
|
+
return metadata;
|
|
1068
|
+
}
|
|
1069
|
+
return __addBookingsToMultiServiceBooking;
|
|
1070
|
+
}
|
|
1071
|
+
function removeBookingsFromMultiServiceBooking(payload) {
|
|
1072
|
+
function __removeBookingsFromMultiServiceBooking({ host }) {
|
|
1073
|
+
const metadata = {
|
|
1074
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1075
|
+
method: "POST",
|
|
1076
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.RemoveBookingsFromMultiServiceBooking",
|
|
1077
|
+
packageName: PACKAGE_NAME,
|
|
1078
|
+
url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
|
|
1079
|
+
protoPath: "/v2/multi_service_bookings/remove_bookings_from_multi_service_booking",
|
|
1080
|
+
data: payload,
|
|
1081
|
+
host
|
|
1082
|
+
}),
|
|
1083
|
+
data: payload,
|
|
1084
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1085
|
+
{
|
|
1086
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1087
|
+
paths: [
|
|
1088
|
+
{ path: "bookings.booking.createdDate" },
|
|
1089
|
+
{ path: "bookings.booking.startDate" },
|
|
1090
|
+
{ path: "bookings.booking.endDate" },
|
|
1091
|
+
{ path: "bookings.booking.updatedDate" },
|
|
1092
|
+
{ path: "bookings.booking.canceledDate" }
|
|
1093
|
+
]
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1097
|
+
paths: [
|
|
1098
|
+
{
|
|
1099
|
+
path: "bookings.booking.contactDetails.fullAddress.geocode.latitude"
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
path: "bookings.booking.contactDetails.fullAddress.geocode.longitude"
|
|
1103
|
+
}
|
|
1104
|
+
]
|
|
1105
|
+
}
|
|
1106
|
+
])
|
|
1107
|
+
};
|
|
1108
|
+
return metadata;
|
|
1109
|
+
}
|
|
1110
|
+
return __removeBookingsFromMultiServiceBooking;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
// src/bookings-v2-booking-bookings.universal.ts
|
|
1114
|
+
var MultiServiceBookingType = /* @__PURE__ */ ((MultiServiceBookingType2) => {
|
|
1115
|
+
MultiServiceBookingType2["SEQUENTIAL_BOOKINGS"] = "SEQUENTIAL_BOOKINGS";
|
|
1116
|
+
MultiServiceBookingType2["SEPARATE_BOOKINGS"] = "SEPARATE_BOOKINGS";
|
|
1117
|
+
MultiServiceBookingType2["PARALLEL_BOOKINGS"] = "PARALLEL_BOOKINGS";
|
|
1118
|
+
return MultiServiceBookingType2;
|
|
1119
|
+
})(MultiServiceBookingType || {});
|
|
1120
|
+
var LocationType = /* @__PURE__ */ ((LocationType2) => {
|
|
1121
|
+
LocationType2["UNDEFINED"] = "UNDEFINED";
|
|
1122
|
+
LocationType2["OWNER_BUSINESS"] = "OWNER_BUSINESS";
|
|
1123
|
+
LocationType2["OWNER_CUSTOM"] = "OWNER_CUSTOM";
|
|
1124
|
+
LocationType2["CUSTOM"] = "CUSTOM";
|
|
1125
|
+
return LocationType2;
|
|
1126
|
+
})(LocationType || {});
|
|
1127
|
+
var ValueType = /* @__PURE__ */ ((ValueType2) => {
|
|
1128
|
+
ValueType2["SHORT_TEXT"] = "SHORT_TEXT";
|
|
1129
|
+
ValueType2["LONG_TEXT"] = "LONG_TEXT";
|
|
1130
|
+
ValueType2["CHECK_BOX"] = "CHECK_BOX";
|
|
1131
|
+
return ValueType2;
|
|
1132
|
+
})(ValueType || {});
|
|
1133
|
+
var BookingStatus = /* @__PURE__ */ ((BookingStatus2) => {
|
|
1134
|
+
BookingStatus2["CREATED"] = "CREATED";
|
|
1135
|
+
BookingStatus2["CONFIRMED"] = "CONFIRMED";
|
|
1136
|
+
BookingStatus2["CANCELED"] = "CANCELED";
|
|
1137
|
+
BookingStatus2["PENDING"] = "PENDING";
|
|
1138
|
+
BookingStatus2["DECLINED"] = "DECLINED";
|
|
1139
|
+
BookingStatus2["WAITING_LIST"] = "WAITING_LIST";
|
|
1140
|
+
return BookingStatus2;
|
|
1141
|
+
})(BookingStatus || {});
|
|
1142
|
+
var PaymentStatus = /* @__PURE__ */ ((PaymentStatus2) => {
|
|
1143
|
+
PaymentStatus2["UNDEFINED"] = "UNDEFINED";
|
|
1144
|
+
PaymentStatus2["NOT_PAID"] = "NOT_PAID";
|
|
1145
|
+
PaymentStatus2["PAID"] = "PAID";
|
|
1146
|
+
PaymentStatus2["PARTIALLY_PAID"] = "PARTIALLY_PAID";
|
|
1147
|
+
PaymentStatus2["REFUNDED"] = "REFUNDED";
|
|
1148
|
+
PaymentStatus2["EXEMPT"] = "EXEMPT";
|
|
1149
|
+
return PaymentStatus2;
|
|
1150
|
+
})(PaymentStatus || {});
|
|
1151
|
+
var SelectedPaymentOption = /* @__PURE__ */ ((SelectedPaymentOption2) => {
|
|
1152
|
+
SelectedPaymentOption2["UNDEFINED"] = "UNDEFINED";
|
|
1153
|
+
SelectedPaymentOption2["OFFLINE"] = "OFFLINE";
|
|
1154
|
+
SelectedPaymentOption2["ONLINE"] = "ONLINE";
|
|
1155
|
+
SelectedPaymentOption2["MEMBERSHIP"] = "MEMBERSHIP";
|
|
1156
|
+
SelectedPaymentOption2["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
|
|
1157
|
+
return SelectedPaymentOption2;
|
|
1158
|
+
})(SelectedPaymentOption || {});
|
|
1159
|
+
var Platform = /* @__PURE__ */ ((Platform2) => {
|
|
1160
|
+
Platform2["UNDEFINED_PLATFORM"] = "UNDEFINED_PLATFORM";
|
|
1161
|
+
Platform2["WEB"] = "WEB";
|
|
1162
|
+
Platform2["MOBILE_APP"] = "MOBILE_APP";
|
|
1163
|
+
return Platform2;
|
|
1164
|
+
})(Platform || {});
|
|
1165
|
+
var Actor = /* @__PURE__ */ ((Actor2) => {
|
|
1166
|
+
Actor2["UNDEFINED_ACTOR"] = "UNDEFINED_ACTOR";
|
|
1167
|
+
Actor2["BUSINESS"] = "BUSINESS";
|
|
1168
|
+
Actor2["CUSTOMER"] = "CUSTOMER";
|
|
1169
|
+
return Actor2;
|
|
1170
|
+
})(Actor || {});
|
|
1171
|
+
var IdentificationDataIdentityType = /* @__PURE__ */ ((IdentificationDataIdentityType2) => {
|
|
1172
|
+
IdentificationDataIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
1173
|
+
IdentificationDataIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
1174
|
+
IdentificationDataIdentityType2["MEMBER"] = "MEMBER";
|
|
1175
|
+
IdentificationDataIdentityType2["WIX_USER"] = "WIX_USER";
|
|
1176
|
+
IdentificationDataIdentityType2["APP"] = "APP";
|
|
1177
|
+
return IdentificationDataIdentityType2;
|
|
1178
|
+
})(IdentificationDataIdentityType || {});
|
|
1179
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
1180
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
1181
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
1182
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
1183
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
1184
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
1185
|
+
return WebhookIdentityType2;
|
|
1186
|
+
})(WebhookIdentityType || {});
|
|
1187
|
+
var LocationLocationType = /* @__PURE__ */ ((LocationLocationType2) => {
|
|
1188
|
+
LocationLocationType2["UNDEFINED"] = "UNDEFINED";
|
|
1189
|
+
LocationLocationType2["OWNER_BUSINESS"] = "OWNER_BUSINESS";
|
|
1190
|
+
LocationLocationType2["OWNER_CUSTOM"] = "OWNER_CUSTOM";
|
|
1191
|
+
LocationLocationType2["CUSTOM"] = "CUSTOM";
|
|
1192
|
+
return LocationLocationType2;
|
|
1193
|
+
})(LocationLocationType || {});
|
|
1194
|
+
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
|
|
1195
|
+
IdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
1196
|
+
IdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
1197
|
+
IdentityType2["MEMBER"] = "MEMBER";
|
|
1198
|
+
IdentityType2["WIX_USER"] = "WIX_USER";
|
|
1199
|
+
IdentityType2["APP"] = "APP";
|
|
1200
|
+
return IdentityType2;
|
|
1201
|
+
})(IdentityType || {});
|
|
1202
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
1203
|
+
SortOrder2["ASC"] = "ASC";
|
|
1204
|
+
SortOrder2["DESC"] = "DESC";
|
|
1205
|
+
return SortOrder2;
|
|
1206
|
+
})(SortOrder || {});
|
|
1207
|
+
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1208
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1209
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1210
|
+
bookingId,
|
|
1211
|
+
paymentStatus: options?.paymentStatus
|
|
1212
|
+
});
|
|
1213
|
+
const reqOpts = confirmOrDeclineBooking(payload);
|
|
1214
|
+
sideEffects?.onSiteCall?.();
|
|
1215
|
+
try {
|
|
1216
|
+
const result = await httpClient.request(reqOpts);
|
|
1217
|
+
sideEffects?.onSuccess?.(result);
|
|
1218
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1219
|
+
} catch (err) {
|
|
1220
|
+
const transformedError = sdkTransformError(
|
|
1221
|
+
err,
|
|
1222
|
+
{
|
|
1223
|
+
spreadPathsToArguments: {},
|
|
1224
|
+
explicitPathsToArguments: {
|
|
1225
|
+
bookingId: "$[0]",
|
|
1226
|
+
paymentStatus: "$[1].paymentStatus"
|
|
1227
|
+
},
|
|
1228
|
+
singleArgumentUnchanged: false
|
|
1229
|
+
},
|
|
1230
|
+
["bookingId", "options"]
|
|
1231
|
+
);
|
|
1232
|
+
sideEffects?.onError?.(err);
|
|
1233
|
+
throw transformedError;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
1237
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1238
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1239
|
+
details,
|
|
1240
|
+
returnEntity: options?.returnEntity
|
|
1241
|
+
});
|
|
1242
|
+
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
1243
|
+
sideEffects?.onSiteCall?.();
|
|
1244
|
+
try {
|
|
1245
|
+
const result = await httpClient.request(reqOpts);
|
|
1246
|
+
sideEffects?.onSuccess?.(result);
|
|
1247
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1248
|
+
} catch (err) {
|
|
1249
|
+
const transformedError = sdkTransformError(
|
|
1250
|
+
err,
|
|
1251
|
+
{
|
|
1252
|
+
spreadPathsToArguments: {},
|
|
1253
|
+
explicitPathsToArguments: {
|
|
1254
|
+
details: "$[0]",
|
|
1255
|
+
returnEntity: "$[1].returnEntity"
|
|
1256
|
+
},
|
|
1257
|
+
singleArgumentUnchanged: false
|
|
1258
|
+
},
|
|
1259
|
+
["details", "options"]
|
|
1260
|
+
);
|
|
1261
|
+
sideEffects?.onError?.(err);
|
|
1262
|
+
throw transformedError;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
async function createBooking2(booking, options) {
|
|
1266
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1267
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1268
|
+
booking,
|
|
1269
|
+
participantNotification: options?.participantNotification,
|
|
1270
|
+
sendSmsReminder: options?.sendSmsReminder,
|
|
1271
|
+
flowControlSettings: options?.flowControlSettings
|
|
1272
|
+
});
|
|
1273
|
+
const reqOpts = createBooking(payload);
|
|
1274
|
+
sideEffects?.onSiteCall?.();
|
|
1275
|
+
try {
|
|
1276
|
+
const result = await httpClient.request(reqOpts);
|
|
1277
|
+
sideEffects?.onSuccess?.(result);
|
|
1278
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1279
|
+
} catch (err) {
|
|
1280
|
+
const transformedError = sdkTransformError(
|
|
1281
|
+
err,
|
|
1282
|
+
{
|
|
1283
|
+
spreadPathsToArguments: {},
|
|
1284
|
+
explicitPathsToArguments: {
|
|
1285
|
+
booking: "$[0]",
|
|
1286
|
+
participantNotification: "$[1].participantNotification",
|
|
1287
|
+
sendSmsReminder: "$[1].sendSmsReminder",
|
|
1288
|
+
flowControlSettings: "$[1].flowControlSettings"
|
|
1289
|
+
},
|
|
1290
|
+
singleArgumentUnchanged: false
|
|
1291
|
+
},
|
|
1292
|
+
["booking", "options"]
|
|
1293
|
+
);
|
|
1294
|
+
sideEffects?.onError?.(err);
|
|
1295
|
+
throw transformedError;
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
async function bulkCreateBooking2(createBookingsInfo, options) {
|
|
1299
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1300
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1301
|
+
createBookingsInfo,
|
|
1302
|
+
returnFullEntity: options?.returnFullEntity
|
|
1303
|
+
});
|
|
1304
|
+
const reqOpts = bulkCreateBooking(payload);
|
|
1305
|
+
sideEffects?.onSiteCall?.();
|
|
1306
|
+
try {
|
|
1307
|
+
const result = await httpClient.request(reqOpts);
|
|
1308
|
+
sideEffects?.onSuccess?.(result);
|
|
1309
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1310
|
+
} catch (err) {
|
|
1311
|
+
const transformedError = sdkTransformError(
|
|
1312
|
+
err,
|
|
1313
|
+
{
|
|
1314
|
+
spreadPathsToArguments: {},
|
|
1315
|
+
explicitPathsToArguments: {
|
|
1316
|
+
createBookingsInfo: "$[0]",
|
|
1317
|
+
returnFullEntity: "$[1].returnFullEntity"
|
|
1318
|
+
},
|
|
1319
|
+
singleArgumentUnchanged: false
|
|
1320
|
+
},
|
|
1321
|
+
["createBookingsInfo", "options"]
|
|
1322
|
+
);
|
|
1323
|
+
sideEffects?.onError?.(err);
|
|
1324
|
+
throw transformedError;
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
async function rescheduleBooking2(bookingId, slot, options) {
|
|
1328
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1329
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1330
|
+
bookingId,
|
|
1331
|
+
slot,
|
|
1332
|
+
revision: options?.revision,
|
|
1333
|
+
participantNotification: options?.participantNotification,
|
|
1334
|
+
flowControlSettings: options?.flowControlSettings,
|
|
1335
|
+
totalParticipants: options?.totalParticipants,
|
|
1336
|
+
participantsChoices: options?.participantsChoices
|
|
1337
|
+
});
|
|
1338
|
+
const reqOpts = rescheduleBooking(payload);
|
|
1339
|
+
sideEffects?.onSiteCall?.();
|
|
1340
|
+
try {
|
|
1341
|
+
const result = await httpClient.request(reqOpts);
|
|
1342
|
+
sideEffects?.onSuccess?.(result);
|
|
1343
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1344
|
+
} catch (err) {
|
|
1345
|
+
const transformedError = sdkTransformError(
|
|
1346
|
+
err,
|
|
1347
|
+
{
|
|
1348
|
+
spreadPathsToArguments: {},
|
|
1349
|
+
explicitPathsToArguments: {
|
|
1350
|
+
bookingId: "$[0]",
|
|
1351
|
+
slot: "$[1]",
|
|
1352
|
+
revision: "$[2].revision",
|
|
1353
|
+
participantNotification: "$[2].participantNotification",
|
|
1354
|
+
flowControlSettings: "$[2].flowControlSettings",
|
|
1355
|
+
totalParticipants: "$[2].totalParticipants",
|
|
1356
|
+
participantsChoices: "$[2].participantsChoices"
|
|
1357
|
+
},
|
|
1358
|
+
singleArgumentUnchanged: false
|
|
1359
|
+
},
|
|
1360
|
+
["bookingId", "slot", "options"]
|
|
1361
|
+
);
|
|
1362
|
+
sideEffects?.onError?.(err);
|
|
1363
|
+
throw transformedError;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
async function confirmBooking(bookingId, revision, options) {
|
|
1367
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1368
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1369
|
+
bookingId,
|
|
1370
|
+
revision,
|
|
1371
|
+
participantNotification: options?.participantNotification,
|
|
1372
|
+
sendSmsReminder: options?.sendSmsReminder,
|
|
1373
|
+
paymentStatus: options?.paymentStatus,
|
|
1374
|
+
doubleBooked: options?.doubleBooked,
|
|
1375
|
+
flowControlSettings: options?.flowControlSettings
|
|
1376
|
+
});
|
|
1377
|
+
const reqOpts = bookingsConfirmBooking(payload);
|
|
1378
|
+
sideEffects?.onSiteCall?.();
|
|
1379
|
+
try {
|
|
1380
|
+
const result = await httpClient.request(reqOpts);
|
|
1381
|
+
sideEffects?.onSuccess?.(result);
|
|
1382
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1383
|
+
} catch (err) {
|
|
1384
|
+
const transformedError = sdkTransformError(
|
|
1385
|
+
err,
|
|
1386
|
+
{
|
|
1387
|
+
spreadPathsToArguments: {},
|
|
1388
|
+
explicitPathsToArguments: {
|
|
1389
|
+
bookingId: "$[0]",
|
|
1390
|
+
revision: "$[1]",
|
|
1391
|
+
participantNotification: "$[2].participantNotification",
|
|
1392
|
+
sendSmsReminder: "$[2].sendSmsReminder",
|
|
1393
|
+
paymentStatus: "$[2].paymentStatus",
|
|
1394
|
+
doubleBooked: "$[2].doubleBooked",
|
|
1395
|
+
flowControlSettings: "$[2].flowControlSettings"
|
|
1396
|
+
},
|
|
1397
|
+
singleArgumentUnchanged: false
|
|
1398
|
+
},
|
|
1399
|
+
["bookingId", "revision", "options"]
|
|
1400
|
+
);
|
|
1401
|
+
sideEffects?.onError?.(err);
|
|
1402
|
+
throw transformedError;
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
async function setBookingSubmissionId2(bookingId, submissionId) {
|
|
1406
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1407
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1408
|
+
bookingId,
|
|
1409
|
+
submissionId
|
|
1410
|
+
});
|
|
1411
|
+
const reqOpts = setBookingSubmissionId(payload);
|
|
1412
|
+
sideEffects?.onSiteCall?.();
|
|
1413
|
+
try {
|
|
1414
|
+
const result = await httpClient.request(reqOpts);
|
|
1415
|
+
sideEffects?.onSuccess?.(result);
|
|
1416
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1417
|
+
} catch (err) {
|
|
1418
|
+
const transformedError = sdkTransformError(
|
|
1419
|
+
err,
|
|
1420
|
+
{
|
|
1421
|
+
spreadPathsToArguments: {},
|
|
1422
|
+
explicitPathsToArguments: { bookingId: "$[0]", submissionId: "$[1]" },
|
|
1423
|
+
singleArgumentUnchanged: false
|
|
1424
|
+
},
|
|
1425
|
+
["bookingId", "submissionId"]
|
|
1426
|
+
);
|
|
1427
|
+
sideEffects?.onError?.(err);
|
|
1428
|
+
throw transformedError;
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
async function updateExtendedFields2(_id, namespace, options) {
|
|
1432
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1433
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1434
|
+
id: _id,
|
|
1435
|
+
namespace,
|
|
1436
|
+
namespaceData: options?.namespaceData
|
|
1437
|
+
});
|
|
1438
|
+
const reqOpts = updateExtendedFields(payload);
|
|
1439
|
+
sideEffects?.onSiteCall?.();
|
|
1440
|
+
try {
|
|
1441
|
+
const result = await httpClient.request(reqOpts);
|
|
1442
|
+
sideEffects?.onSuccess?.(result);
|
|
1443
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1444
|
+
} catch (err) {
|
|
1445
|
+
const transformedError = sdkTransformError(
|
|
1446
|
+
err,
|
|
1447
|
+
{
|
|
1448
|
+
spreadPathsToArguments: {},
|
|
1449
|
+
explicitPathsToArguments: {
|
|
1450
|
+
id: "$[0]",
|
|
1451
|
+
namespace: "$[1]",
|
|
1452
|
+
namespaceData: "$[2].namespaceData"
|
|
1453
|
+
},
|
|
1454
|
+
singleArgumentUnchanged: false
|
|
1455
|
+
},
|
|
1456
|
+
["_id", "namespace", "options"]
|
|
1457
|
+
);
|
|
1458
|
+
sideEffects?.onError?.(err);
|
|
1459
|
+
throw transformedError;
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
async function declineBooking(bookingId, revision, options) {
|
|
1463
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1464
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1465
|
+
bookingId,
|
|
1466
|
+
revision,
|
|
1467
|
+
participantNotification: options?.participantNotification,
|
|
1468
|
+
paymentStatus: options?.paymentStatus,
|
|
1469
|
+
doubleBooked: options?.doubleBooked,
|
|
1470
|
+
flowControlSettings: options?.flowControlSettings
|
|
1471
|
+
});
|
|
1472
|
+
const reqOpts = bookingsDeclineBooking(payload);
|
|
1473
|
+
sideEffects?.onSiteCall?.();
|
|
1474
|
+
try {
|
|
1475
|
+
const result = await httpClient.request(reqOpts);
|
|
1476
|
+
sideEffects?.onSuccess?.(result);
|
|
1477
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1478
|
+
} catch (err) {
|
|
1479
|
+
const transformedError = sdkTransformError(
|
|
1480
|
+
err,
|
|
1481
|
+
{
|
|
1482
|
+
spreadPathsToArguments: {},
|
|
1483
|
+
explicitPathsToArguments: {
|
|
1484
|
+
bookingId: "$[0]",
|
|
1485
|
+
revision: "$[1]",
|
|
1486
|
+
participantNotification: "$[2].participantNotification",
|
|
1487
|
+
paymentStatus: "$[2].paymentStatus",
|
|
1488
|
+
doubleBooked: "$[2].doubleBooked",
|
|
1489
|
+
flowControlSettings: "$[2].flowControlSettings"
|
|
1490
|
+
},
|
|
1491
|
+
singleArgumentUnchanged: false
|
|
1492
|
+
},
|
|
1493
|
+
["bookingId", "revision", "options"]
|
|
1494
|
+
);
|
|
1495
|
+
sideEffects?.onError?.(err);
|
|
1496
|
+
throw transformedError;
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
async function cancelBooking(bookingId, options) {
|
|
1500
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1501
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1502
|
+
bookingId,
|
|
1503
|
+
participantNotification: options?.participantNotification,
|
|
1504
|
+
flowControlSettings: options?.flowControlSettings,
|
|
1505
|
+
revision: options?.revision
|
|
1506
|
+
});
|
|
1507
|
+
const reqOpts = bookingsCancelBooking(payload);
|
|
1508
|
+
sideEffects?.onSiteCall?.();
|
|
1509
|
+
try {
|
|
1510
|
+
const result = await httpClient.request(reqOpts);
|
|
1511
|
+
sideEffects?.onSuccess?.(result);
|
|
1512
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1513
|
+
} catch (err) {
|
|
1514
|
+
const transformedError = sdkTransformError(
|
|
1515
|
+
err,
|
|
1516
|
+
{
|
|
1517
|
+
spreadPathsToArguments: {},
|
|
1518
|
+
explicitPathsToArguments: {
|
|
1519
|
+
bookingId: "$[0]",
|
|
1520
|
+
participantNotification: "$[1].participantNotification",
|
|
1521
|
+
flowControlSettings: "$[1].flowControlSettings",
|
|
1522
|
+
revision: "$[1].revision"
|
|
1523
|
+
},
|
|
1524
|
+
singleArgumentUnchanged: false
|
|
1525
|
+
},
|
|
1526
|
+
["bookingId", "options"]
|
|
1527
|
+
);
|
|
1528
|
+
sideEffects?.onError?.(err);
|
|
1529
|
+
throw transformedError;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
async function updateNumberOfParticipants(bookingId, options) {
|
|
1533
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1534
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1535
|
+
bookingId,
|
|
1536
|
+
revision: options?.revision,
|
|
1537
|
+
totalParticipants: options?.totalParticipants,
|
|
1538
|
+
participantsChoices: options?.participantsChoices
|
|
1539
|
+
});
|
|
1540
|
+
const reqOpts = bookingsUpdateNumberOfParticipants(payload);
|
|
1541
|
+
sideEffects?.onSiteCall?.();
|
|
1542
|
+
try {
|
|
1543
|
+
const result = await httpClient.request(reqOpts);
|
|
1544
|
+
sideEffects?.onSuccess?.(result);
|
|
1545
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1546
|
+
} catch (err) {
|
|
1547
|
+
const transformedError = sdkTransformError(
|
|
1548
|
+
err,
|
|
1549
|
+
{
|
|
1550
|
+
spreadPathsToArguments: {},
|
|
1551
|
+
explicitPathsToArguments: {
|
|
1552
|
+
bookingId: "$[0]",
|
|
1553
|
+
revision: "$[1].revision",
|
|
1554
|
+
totalParticipants: "$[1].totalParticipants",
|
|
1555
|
+
participantsChoices: "$[1].participantsChoices"
|
|
1556
|
+
},
|
|
1557
|
+
singleArgumentUnchanged: false
|
|
1558
|
+
},
|
|
1559
|
+
["bookingId", "options"]
|
|
1560
|
+
);
|
|
1561
|
+
sideEffects?.onError?.(err);
|
|
1562
|
+
throw transformedError;
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
async function createMultiServiceBooking2(bookings, options) {
|
|
1566
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1567
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1568
|
+
bookings,
|
|
1569
|
+
participantNotification: options?.participantNotification,
|
|
1570
|
+
sendSmsReminder: options?.sendSmsReminder,
|
|
1571
|
+
flowControlSettings: options?.flowControlSettings,
|
|
1572
|
+
returnFullEntity: options?.returnFullEntity,
|
|
1573
|
+
multiServiceBookingType: options?.multiServiceBookingType
|
|
1574
|
+
});
|
|
1575
|
+
const reqOpts = createMultiServiceBooking(payload);
|
|
1576
|
+
sideEffects?.onSiteCall?.();
|
|
1577
|
+
try {
|
|
1578
|
+
const result = await httpClient.request(reqOpts);
|
|
1579
|
+
sideEffects?.onSuccess?.(result);
|
|
1580
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1581
|
+
} catch (err) {
|
|
1582
|
+
const transformedError = sdkTransformError(
|
|
1583
|
+
err,
|
|
1584
|
+
{
|
|
1585
|
+
spreadPathsToArguments: {},
|
|
1586
|
+
explicitPathsToArguments: {
|
|
1587
|
+
bookings: "$[0]",
|
|
1588
|
+
participantNotification: "$[1].participantNotification",
|
|
1589
|
+
sendSmsReminder: "$[1].sendSmsReminder",
|
|
1590
|
+
flowControlSettings: "$[1].flowControlSettings",
|
|
1591
|
+
returnFullEntity: "$[1].returnFullEntity",
|
|
1592
|
+
multiServiceBookingType: "$[1].multiServiceBookingType"
|
|
1593
|
+
},
|
|
1594
|
+
singleArgumentUnchanged: false
|
|
1595
|
+
},
|
|
1596
|
+
["bookings", "options"]
|
|
1597
|
+
);
|
|
1598
|
+
sideEffects?.onError?.(err);
|
|
1599
|
+
throw transformedError;
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
async function rescheduleMultiServiceBooking2(multiServiceBookingId, rescheduleBookingsInfo, options) {
|
|
1603
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1604
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1605
|
+
multiServiceBookingId,
|
|
1606
|
+
rescheduleBookingsInfo,
|
|
1607
|
+
participantNotification: options?.participantNotification,
|
|
1608
|
+
flowControlSettings: options?.flowControlSettings,
|
|
1609
|
+
returnFullEntity: options?.returnFullEntity
|
|
1610
|
+
});
|
|
1611
|
+
const reqOpts = rescheduleMultiServiceBooking(payload);
|
|
1612
|
+
sideEffects?.onSiteCall?.();
|
|
1613
|
+
try {
|
|
1614
|
+
const result = await httpClient.request(reqOpts);
|
|
1615
|
+
sideEffects?.onSuccess?.(result);
|
|
1616
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1617
|
+
} catch (err) {
|
|
1618
|
+
const transformedError = sdkTransformError(
|
|
1619
|
+
err,
|
|
1620
|
+
{
|
|
1621
|
+
spreadPathsToArguments: {},
|
|
1622
|
+
explicitPathsToArguments: {
|
|
1623
|
+
multiServiceBookingId: "$[0]",
|
|
1624
|
+
rescheduleBookingsInfo: "$[1]",
|
|
1625
|
+
participantNotification: "$[2].participantNotification",
|
|
1626
|
+
flowControlSettings: "$[2].flowControlSettings",
|
|
1627
|
+
returnFullEntity: "$[2].returnFullEntity"
|
|
1628
|
+
},
|
|
1629
|
+
singleArgumentUnchanged: false
|
|
1630
|
+
},
|
|
1631
|
+
["multiServiceBookingId", "rescheduleBookingsInfo", "options"]
|
|
1632
|
+
);
|
|
1633
|
+
sideEffects?.onError?.(err);
|
|
1634
|
+
throw transformedError;
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
async function getMultiServiceBookingAvailability2(multiServiceBookingId) {
|
|
1638
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1639
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1640
|
+
multiServiceBookingId
|
|
1641
|
+
});
|
|
1642
|
+
const reqOpts = getMultiServiceBookingAvailability(payload);
|
|
1643
|
+
sideEffects?.onSiteCall?.();
|
|
1644
|
+
try {
|
|
1645
|
+
const result = await httpClient.request(reqOpts);
|
|
1646
|
+
sideEffects?.onSuccess?.(result);
|
|
1647
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1648
|
+
} catch (err) {
|
|
1649
|
+
const transformedError = sdkTransformError(
|
|
1650
|
+
err,
|
|
1651
|
+
{
|
|
1652
|
+
spreadPathsToArguments: {},
|
|
1653
|
+
explicitPathsToArguments: { multiServiceBookingId: "$[0]" },
|
|
1654
|
+
singleArgumentUnchanged: false
|
|
1655
|
+
},
|
|
1656
|
+
["multiServiceBookingId"]
|
|
1657
|
+
);
|
|
1658
|
+
sideEffects?.onError?.(err);
|
|
1659
|
+
throw transformedError;
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
async function cancelMultiServiceBooking2(multiServiceBookingId, options) {
|
|
1663
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1664
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1665
|
+
multiServiceBookingId,
|
|
1666
|
+
participantNotification: options?.participantNotification,
|
|
1667
|
+
flowControlSettings: options?.flowControlSettings,
|
|
1668
|
+
returnFullEntity: options?.returnFullEntity
|
|
1669
|
+
});
|
|
1670
|
+
const reqOpts = cancelMultiServiceBooking(payload);
|
|
1671
|
+
sideEffects?.onSiteCall?.();
|
|
1672
|
+
try {
|
|
1673
|
+
const result = await httpClient.request(reqOpts);
|
|
1674
|
+
sideEffects?.onSuccess?.(result);
|
|
1675
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1676
|
+
} catch (err) {
|
|
1677
|
+
const transformedError = sdkTransformError(
|
|
1678
|
+
err,
|
|
1679
|
+
{
|
|
1680
|
+
spreadPathsToArguments: {},
|
|
1681
|
+
explicitPathsToArguments: {
|
|
1682
|
+
multiServiceBookingId: "$[0]",
|
|
1683
|
+
participantNotification: "$[1].participantNotification",
|
|
1684
|
+
flowControlSettings: "$[1].flowControlSettings",
|
|
1685
|
+
returnFullEntity: "$[1].returnFullEntity"
|
|
1686
|
+
},
|
|
1687
|
+
singleArgumentUnchanged: false
|
|
1688
|
+
},
|
|
1689
|
+
["multiServiceBookingId", "options"]
|
|
1690
|
+
);
|
|
1691
|
+
sideEffects?.onError?.(err);
|
|
1692
|
+
throw transformedError;
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
async function markMultiServiceBookingAsPending2(multiServiceBookingId, options) {
|
|
1696
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1697
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1698
|
+
multiServiceBookingId,
|
|
1699
|
+
markAsPendingBookingsInfo: options?.markAsPendingBookingsInfo,
|
|
1700
|
+
participantNotification: options?.participantNotification,
|
|
1701
|
+
sendSmsReminder: options?.sendSmsReminder,
|
|
1702
|
+
doubleBooked: options?.doubleBooked,
|
|
1703
|
+
returnFullEntity: options?.returnFullEntity,
|
|
1704
|
+
flowControlSettings: options?.flowControlSettings
|
|
1705
|
+
});
|
|
1706
|
+
const reqOpts = markMultiServiceBookingAsPending(payload);
|
|
1707
|
+
sideEffects?.onSiteCall?.();
|
|
1708
|
+
try {
|
|
1709
|
+
const result = await httpClient.request(reqOpts);
|
|
1710
|
+
sideEffects?.onSuccess?.(result);
|
|
1711
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1712
|
+
} catch (err) {
|
|
1713
|
+
const transformedError = sdkTransformError(
|
|
1714
|
+
err,
|
|
1715
|
+
{
|
|
1716
|
+
spreadPathsToArguments: {},
|
|
1717
|
+
explicitPathsToArguments: {
|
|
1718
|
+
multiServiceBookingId: "$[0]",
|
|
1719
|
+
markAsPendingBookingsInfo: "$[1].markAsPendingBookingsInfo",
|
|
1720
|
+
participantNotification: "$[1].participantNotification",
|
|
1721
|
+
sendSmsReminder: "$[1].sendSmsReminder",
|
|
1722
|
+
doubleBooked: "$[1].doubleBooked",
|
|
1723
|
+
returnFullEntity: "$[1].returnFullEntity",
|
|
1724
|
+
flowControlSettings: "$[1].flowControlSettings"
|
|
1725
|
+
},
|
|
1726
|
+
singleArgumentUnchanged: false
|
|
1727
|
+
},
|
|
1728
|
+
["multiServiceBookingId", "options"]
|
|
1729
|
+
);
|
|
1730
|
+
sideEffects?.onError?.(err);
|
|
1731
|
+
throw transformedError;
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
async function confirmMultiServiceBooking2(multiServiceBookingId, options) {
|
|
1735
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1736
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1737
|
+
multiServiceBookingId,
|
|
1738
|
+
confirmBookingsInfo: options?.confirmBookingsInfo,
|
|
1739
|
+
participantNotification: options?.participantNotification,
|
|
1740
|
+
sendSmsReminder: options?.sendSmsReminder,
|
|
1741
|
+
doubleBooked: options?.doubleBooked,
|
|
1742
|
+
returnFullEntity: options?.returnFullEntity,
|
|
1743
|
+
flowControlSettings: options?.flowControlSettings
|
|
1744
|
+
});
|
|
1745
|
+
const reqOpts = confirmMultiServiceBooking(payload);
|
|
1746
|
+
sideEffects?.onSiteCall?.();
|
|
1747
|
+
try {
|
|
1748
|
+
const result = await httpClient.request(reqOpts);
|
|
1749
|
+
sideEffects?.onSuccess?.(result);
|
|
1750
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1751
|
+
} catch (err) {
|
|
1752
|
+
const transformedError = sdkTransformError(
|
|
1753
|
+
err,
|
|
1754
|
+
{
|
|
1755
|
+
spreadPathsToArguments: {},
|
|
1756
|
+
explicitPathsToArguments: {
|
|
1757
|
+
multiServiceBookingId: "$[0]",
|
|
1758
|
+
confirmBookingsInfo: "$[1].confirmBookingsInfo",
|
|
1759
|
+
participantNotification: "$[1].participantNotification",
|
|
1760
|
+
sendSmsReminder: "$[1].sendSmsReminder",
|
|
1761
|
+
doubleBooked: "$[1].doubleBooked",
|
|
1762
|
+
returnFullEntity: "$[1].returnFullEntity",
|
|
1763
|
+
flowControlSettings: "$[1].flowControlSettings"
|
|
1764
|
+
},
|
|
1765
|
+
singleArgumentUnchanged: false
|
|
1766
|
+
},
|
|
1767
|
+
["multiServiceBookingId", "options"]
|
|
1768
|
+
);
|
|
1769
|
+
sideEffects?.onError?.(err);
|
|
1770
|
+
throw transformedError;
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
async function declineMultiServiceBooking2(multiServiceBookingId, options) {
|
|
1774
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1775
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1776
|
+
multiServiceBookingId,
|
|
1777
|
+
declineBookingsInfo: options?.declineBookingsInfo,
|
|
1778
|
+
participantNotification: options?.participantNotification,
|
|
1779
|
+
doubleBooked: options?.doubleBooked,
|
|
1780
|
+
returnFullEntity: options?.returnFullEntity,
|
|
1781
|
+
flowControlSettings: options?.flowControlSettings
|
|
1782
|
+
});
|
|
1783
|
+
const reqOpts = declineMultiServiceBooking(payload);
|
|
1784
|
+
sideEffects?.onSiteCall?.();
|
|
1785
|
+
try {
|
|
1786
|
+
const result = await httpClient.request(reqOpts);
|
|
1787
|
+
sideEffects?.onSuccess?.(result);
|
|
1788
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1789
|
+
} catch (err) {
|
|
1790
|
+
const transformedError = sdkTransformError(
|
|
1791
|
+
err,
|
|
1792
|
+
{
|
|
1793
|
+
spreadPathsToArguments: {},
|
|
1794
|
+
explicitPathsToArguments: {
|
|
1795
|
+
multiServiceBookingId: "$[0]",
|
|
1796
|
+
declineBookingsInfo: "$[1].declineBookingsInfo",
|
|
1797
|
+
participantNotification: "$[1].participantNotification",
|
|
1798
|
+
doubleBooked: "$[1].doubleBooked",
|
|
1799
|
+
returnFullEntity: "$[1].returnFullEntity",
|
|
1800
|
+
flowControlSettings: "$[1].flowControlSettings"
|
|
1801
|
+
},
|
|
1802
|
+
singleArgumentUnchanged: false
|
|
1803
|
+
},
|
|
1804
|
+
["multiServiceBookingId", "options"]
|
|
1805
|
+
);
|
|
1806
|
+
sideEffects?.onError?.(err);
|
|
1807
|
+
throw transformedError;
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
async function bulkGetMultiServiceBookingAllowedActions2(multiServiceBookingIds) {
|
|
1811
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1812
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1813
|
+
multiServiceBookingIds
|
|
1814
|
+
});
|
|
1815
|
+
const reqOpts = bulkGetMultiServiceBookingAllowedActions(
|
|
1816
|
+
payload
|
|
1817
|
+
);
|
|
1818
|
+
sideEffects?.onSiteCall?.();
|
|
1819
|
+
try {
|
|
1820
|
+
const result = await httpClient.request(reqOpts);
|
|
1821
|
+
sideEffects?.onSuccess?.(result);
|
|
1822
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1823
|
+
} catch (err) {
|
|
1824
|
+
const transformedError = sdkTransformError(
|
|
1825
|
+
err,
|
|
1826
|
+
{
|
|
1827
|
+
spreadPathsToArguments: {},
|
|
1828
|
+
explicitPathsToArguments: { multiServiceBookingIds: "$[0]" },
|
|
1829
|
+
singleArgumentUnchanged: false
|
|
1830
|
+
},
|
|
1831
|
+
["multiServiceBookingIds"]
|
|
1832
|
+
);
|
|
1833
|
+
sideEffects?.onError?.(err);
|
|
1834
|
+
throw transformedError;
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
async function getMultiServiceBooking2(multiServiceBookingId) {
|
|
1838
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1839
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1840
|
+
multiServiceBookingId
|
|
1841
|
+
});
|
|
1842
|
+
const reqOpts = getMultiServiceBooking(payload);
|
|
1843
|
+
sideEffects?.onSiteCall?.();
|
|
1844
|
+
try {
|
|
1845
|
+
const result = await httpClient.request(reqOpts);
|
|
1846
|
+
sideEffects?.onSuccess?.(result);
|
|
1847
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.multiServiceBooking;
|
|
1848
|
+
} catch (err) {
|
|
1849
|
+
const transformedError = sdkTransformError(
|
|
1850
|
+
err,
|
|
1851
|
+
{
|
|
1852
|
+
spreadPathsToArguments: {},
|
|
1853
|
+
explicitPathsToArguments: { multiServiceBookingId: "$[0]" },
|
|
1854
|
+
singleArgumentUnchanged: false
|
|
1855
|
+
},
|
|
1856
|
+
["multiServiceBookingId"]
|
|
1857
|
+
);
|
|
1858
|
+
sideEffects?.onError?.(err);
|
|
1859
|
+
throw transformedError;
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
async function addBookingsToMultiServiceBooking2(multiServiceBookingId, options) {
|
|
1863
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1864
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1865
|
+
multiServiceBookingId,
|
|
1866
|
+
bookings: options?.bookings,
|
|
1867
|
+
returnFullEntity: options?.returnFullEntity
|
|
1868
|
+
});
|
|
1869
|
+
const reqOpts = addBookingsToMultiServiceBooking(payload);
|
|
1870
|
+
sideEffects?.onSiteCall?.();
|
|
1871
|
+
try {
|
|
1872
|
+
const result = await httpClient.request(reqOpts);
|
|
1873
|
+
sideEffects?.onSuccess?.(result);
|
|
1874
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1875
|
+
} catch (err) {
|
|
1876
|
+
const transformedError = sdkTransformError(
|
|
1877
|
+
err,
|
|
1878
|
+
{
|
|
1879
|
+
spreadPathsToArguments: {},
|
|
1880
|
+
explicitPathsToArguments: {
|
|
1881
|
+
multiServiceBookingId: "$[0]",
|
|
1882
|
+
bookings: "$[1].bookings",
|
|
1883
|
+
returnFullEntity: "$[1].returnFullEntity"
|
|
1884
|
+
},
|
|
1885
|
+
singleArgumentUnchanged: false
|
|
1886
|
+
},
|
|
1887
|
+
["multiServiceBookingId", "options"]
|
|
1888
|
+
);
|
|
1889
|
+
sideEffects?.onError?.(err);
|
|
1890
|
+
throw transformedError;
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, options) {
|
|
1894
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1895
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1896
|
+
multiServiceBookingId,
|
|
1897
|
+
bookings: options?.bookings,
|
|
1898
|
+
returnFullEntity: options?.returnFullEntity
|
|
1899
|
+
});
|
|
1900
|
+
const reqOpts = removeBookingsFromMultiServiceBooking(
|
|
1901
|
+
payload
|
|
1902
|
+
);
|
|
1903
|
+
sideEffects?.onSiteCall?.();
|
|
1904
|
+
try {
|
|
1905
|
+
const result = await httpClient.request(reqOpts);
|
|
1906
|
+
sideEffects?.onSuccess?.(result);
|
|
1907
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1908
|
+
} catch (err) {
|
|
1909
|
+
const transformedError = sdkTransformError(
|
|
1910
|
+
err,
|
|
1911
|
+
{
|
|
1912
|
+
spreadPathsToArguments: {},
|
|
1913
|
+
explicitPathsToArguments: {
|
|
1914
|
+
multiServiceBookingId: "$[0]",
|
|
1915
|
+
bookings: "$[1].bookings",
|
|
1916
|
+
returnFullEntity: "$[1].returnFullEntity"
|
|
1917
|
+
},
|
|
1918
|
+
singleArgumentUnchanged: false
|
|
1919
|
+
},
|
|
1920
|
+
["multiServiceBookingId", "options"]
|
|
1921
|
+
);
|
|
1922
|
+
sideEffects?.onError?.(err);
|
|
1923
|
+
throw transformedError;
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
export {
|
|
1927
|
+
Actor,
|
|
1928
|
+
BookingStatus,
|
|
1929
|
+
IdentificationDataIdentityType,
|
|
1930
|
+
IdentityType,
|
|
1931
|
+
LocationLocationType,
|
|
1932
|
+
LocationType,
|
|
1933
|
+
MultiServiceBookingType,
|
|
1934
|
+
PaymentStatus,
|
|
1935
|
+
Platform,
|
|
1936
|
+
SelectedPaymentOption,
|
|
1937
|
+
SortOrder,
|
|
1938
|
+
ValueType,
|
|
1939
|
+
WebhookIdentityType,
|
|
1940
|
+
addBookingsToMultiServiceBooking2 as addBookingsToMultiServiceBooking,
|
|
1941
|
+
bulkConfirmOrDeclineBooking2 as bulkConfirmOrDeclineBooking,
|
|
1942
|
+
bulkCreateBooking2 as bulkCreateBooking,
|
|
1943
|
+
bulkGetMultiServiceBookingAllowedActions2 as bulkGetMultiServiceBookingAllowedActions,
|
|
1944
|
+
cancelBooking,
|
|
1945
|
+
cancelMultiServiceBooking2 as cancelMultiServiceBooking,
|
|
1946
|
+
confirmBooking,
|
|
1947
|
+
confirmMultiServiceBooking2 as confirmMultiServiceBooking,
|
|
1948
|
+
confirmOrDeclineBooking2 as confirmOrDeclineBooking,
|
|
1949
|
+
createBooking2 as createBooking,
|
|
1950
|
+
createMultiServiceBooking2 as createMultiServiceBooking,
|
|
1951
|
+
declineBooking,
|
|
1952
|
+
declineMultiServiceBooking2 as declineMultiServiceBooking,
|
|
1953
|
+
getMultiServiceBooking2 as getMultiServiceBooking,
|
|
1954
|
+
getMultiServiceBookingAvailability2 as getMultiServiceBookingAvailability,
|
|
1955
|
+
markMultiServiceBookingAsPending2 as markMultiServiceBookingAsPending,
|
|
1956
|
+
removeBookingsFromMultiServiceBooking2 as removeBookingsFromMultiServiceBooking,
|
|
1957
|
+
rescheduleBooking2 as rescheduleBooking,
|
|
1958
|
+
rescheduleMultiServiceBooking2 as rescheduleMultiServiceBooking,
|
|
1959
|
+
setBookingSubmissionId2 as setBookingSubmissionId,
|
|
1960
|
+
updateExtendedFields2 as updateExtendedFields,
|
|
1961
|
+
updateNumberOfParticipants
|
|
1962
|
+
};
|
|
1963
|
+
//# sourceMappingURL=index.typings.mjs.map
|