@wix/auto_sdk_bookings_bookings 1.0.122 → 1.0.124
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 +72 -72
- package/build/cjs/index.js +247 -247
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +370 -370
- package/build/cjs/index.typings.js +217 -217
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +336 -336
- package/build/cjs/meta.js +195 -195
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +72 -72
- package/build/es/index.mjs +247 -247
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +370 -370
- package/build/es/index.typings.mjs +217 -217
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +336 -336
- package/build/es/meta.mjs +195 -195
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +72 -72
- package/build/internal/cjs/index.js +247 -247
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +370 -370
- package/build/internal/cjs/index.typings.js +217 -217
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +336 -336
- package/build/internal/cjs/meta.js +195 -195
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +72 -72
- package/build/internal/es/index.mjs +247 -247
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +370 -370
- package/build/internal/es/index.typings.mjs +217 -217
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +336 -336
- package/build/internal/es/meta.mjs +195 -195
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -326,6 +326,57 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
|
|
|
326
326
|
};
|
|
327
327
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
328
328
|
}
|
|
329
|
+
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
330
|
+
const domainToMappings = {
|
|
331
|
+
"www.wixapis.com": [
|
|
332
|
+
{
|
|
333
|
+
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
334
|
+
destPath: "/v2/bookings/confirmation"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
srcPath: "/bookings/v2/confirmation",
|
|
338
|
+
destPath: "/v2/confirmation"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
srcPath: "/bookings/v2/bulk/confirmation",
|
|
342
|
+
destPath: "/v2/bulk/confirmation"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
346
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
350
|
+
destPath: "/v2/bulk/confirmation"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
354
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"*.dev.wix-code.com": [
|
|
358
|
+
{
|
|
359
|
+
srcPath: "/bookings/v2/confirmation",
|
|
360
|
+
destPath: "/v2/confirmation"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
364
|
+
destPath: "/v2/bulk/bookings"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
_: [
|
|
368
|
+
{
|
|
369
|
+
srcPath: "/bookings/v2/confirmation",
|
|
370
|
+
destPath: "/v2/confirmation"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
374
|
+
destPath: "/v2/bulk/bookings"
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
};
|
|
378
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
379
|
+
}
|
|
329
380
|
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
330
381
|
const domainToMappings = {
|
|
331
382
|
_: [
|
|
@@ -479,142 +530,7 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
|
479
530
|
};
|
|
480
531
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
481
532
|
}
|
|
482
|
-
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
483
|
-
const domainToMappings = {
|
|
484
|
-
"www.wixapis.com": [
|
|
485
|
-
{
|
|
486
|
-
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
487
|
-
destPath: "/v2/bookings/confirmation"
|
|
488
|
-
},
|
|
489
|
-
{
|
|
490
|
-
srcPath: "/bookings/v2/confirmation",
|
|
491
|
-
destPath: "/v2/confirmation"
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
srcPath: "/bookings/v2/bulk/confirmation",
|
|
495
|
-
destPath: "/v2/bulk/confirmation"
|
|
496
|
-
},
|
|
497
|
-
{
|
|
498
|
-
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
499
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
500
|
-
},
|
|
501
|
-
{
|
|
502
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
503
|
-
destPath: "/v2/bulk/confirmation"
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
507
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
508
|
-
}
|
|
509
|
-
],
|
|
510
|
-
"*.dev.wix-code.com": [
|
|
511
|
-
{
|
|
512
|
-
srcPath: "/bookings/v2/confirmation",
|
|
513
|
-
destPath: "/v2/confirmation"
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
517
|
-
destPath: "/v2/bulk/bookings"
|
|
518
|
-
}
|
|
519
|
-
],
|
|
520
|
-
_: [
|
|
521
|
-
{
|
|
522
|
-
srcPath: "/bookings/v2/confirmation",
|
|
523
|
-
destPath: "/v2/confirmation"
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
527
|
-
destPath: "/v2/bulk/bookings"
|
|
528
|
-
}
|
|
529
|
-
]
|
|
530
|
-
};
|
|
531
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
532
|
-
}
|
|
533
533
|
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
|
|
534
|
-
function confirmOrDeclineBooking(payload) {
|
|
535
|
-
function __confirmOrDeclineBooking({ host }) {
|
|
536
|
-
const metadata = {
|
|
537
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
538
|
-
method: "POST",
|
|
539
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
540
|
-
packageName: PACKAGE_NAME,
|
|
541
|
-
migrationOptions: {
|
|
542
|
-
optInTransformResponse: true
|
|
543
|
-
},
|
|
544
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
545
|
-
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
546
|
-
data: payload,
|
|
547
|
-
host
|
|
548
|
-
}),
|
|
549
|
-
data: payload,
|
|
550
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
551
|
-
{
|
|
552
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
553
|
-
paths: [
|
|
554
|
-
{ path: "booking.createdDate" },
|
|
555
|
-
{ path: "booking.startDate" },
|
|
556
|
-
{ path: "booking.endDate" },
|
|
557
|
-
{ path: "booking.updatedDate" },
|
|
558
|
-
{ path: "booking.canceledDate" }
|
|
559
|
-
]
|
|
560
|
-
},
|
|
561
|
-
{
|
|
562
|
-
transformFn: transformRESTFloatToSDKFloat,
|
|
563
|
-
paths: [
|
|
564
|
-
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
565
|
-
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
566
|
-
]
|
|
567
|
-
}
|
|
568
|
-
])
|
|
569
|
-
};
|
|
570
|
-
return metadata;
|
|
571
|
-
}
|
|
572
|
-
return __confirmOrDeclineBooking;
|
|
573
|
-
}
|
|
574
|
-
function bulkConfirmOrDeclineBooking(payload) {
|
|
575
|
-
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
576
|
-
const metadata = {
|
|
577
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
578
|
-
method: "POST",
|
|
579
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
580
|
-
packageName: PACKAGE_NAME,
|
|
581
|
-
migrationOptions: {
|
|
582
|
-
optInTransformResponse: true
|
|
583
|
-
},
|
|
584
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
585
|
-
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
586
|
-
data: payload,
|
|
587
|
-
host
|
|
588
|
-
}),
|
|
589
|
-
data: payload,
|
|
590
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
591
|
-
{
|
|
592
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
593
|
-
paths: [
|
|
594
|
-
{ path: "results.item.createdDate" },
|
|
595
|
-
{ path: "results.item.startDate" },
|
|
596
|
-
{ path: "results.item.endDate" },
|
|
597
|
-
{ path: "results.item.updatedDate" },
|
|
598
|
-
{ path: "results.item.canceledDate" }
|
|
599
|
-
]
|
|
600
|
-
},
|
|
601
|
-
{
|
|
602
|
-
transformFn: transformRESTFloatToSDKFloat,
|
|
603
|
-
paths: [
|
|
604
|
-
{
|
|
605
|
-
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
609
|
-
}
|
|
610
|
-
]
|
|
611
|
-
}
|
|
612
|
-
])
|
|
613
|
-
};
|
|
614
|
-
return metadata;
|
|
615
|
-
}
|
|
616
|
-
return __bulkConfirmOrDeclineBooking;
|
|
617
|
-
}
|
|
618
534
|
function createMultiServiceBooking(payload) {
|
|
619
535
|
function __createMultiServiceBooking({ host }) {
|
|
620
536
|
const serializedData = transformPaths(payload, [
|
|
@@ -1072,6 +988,90 @@ function removeBookingsFromMultiServiceBooking(payload) {
|
|
|
1072
988
|
}
|
|
1073
989
|
return __removeBookingsFromMultiServiceBooking;
|
|
1074
990
|
}
|
|
991
|
+
function confirmOrDeclineBooking(payload) {
|
|
992
|
+
function __confirmOrDeclineBooking({ host }) {
|
|
993
|
+
const metadata = {
|
|
994
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
995
|
+
method: "POST",
|
|
996
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
997
|
+
packageName: PACKAGE_NAME,
|
|
998
|
+
migrationOptions: {
|
|
999
|
+
optInTransformResponse: true
|
|
1000
|
+
},
|
|
1001
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1002
|
+
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
1003
|
+
data: payload,
|
|
1004
|
+
host
|
|
1005
|
+
}),
|
|
1006
|
+
data: payload,
|
|
1007
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1008
|
+
{
|
|
1009
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1010
|
+
paths: [
|
|
1011
|
+
{ path: "booking.createdDate" },
|
|
1012
|
+
{ path: "booking.startDate" },
|
|
1013
|
+
{ path: "booking.endDate" },
|
|
1014
|
+
{ path: "booking.updatedDate" },
|
|
1015
|
+
{ path: "booking.canceledDate" }
|
|
1016
|
+
]
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1020
|
+
paths: [
|
|
1021
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
1022
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
1023
|
+
]
|
|
1024
|
+
}
|
|
1025
|
+
])
|
|
1026
|
+
};
|
|
1027
|
+
return metadata;
|
|
1028
|
+
}
|
|
1029
|
+
return __confirmOrDeclineBooking;
|
|
1030
|
+
}
|
|
1031
|
+
function bulkConfirmOrDeclineBooking(payload) {
|
|
1032
|
+
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
1033
|
+
const metadata = {
|
|
1034
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1035
|
+
method: "POST",
|
|
1036
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
1037
|
+
packageName: PACKAGE_NAME,
|
|
1038
|
+
migrationOptions: {
|
|
1039
|
+
optInTransformResponse: true
|
|
1040
|
+
},
|
|
1041
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1042
|
+
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
1043
|
+
data: payload,
|
|
1044
|
+
host
|
|
1045
|
+
}),
|
|
1046
|
+
data: payload,
|
|
1047
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1048
|
+
{
|
|
1049
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1050
|
+
paths: [
|
|
1051
|
+
{ path: "results.item.createdDate" },
|
|
1052
|
+
{ path: "results.item.startDate" },
|
|
1053
|
+
{ path: "results.item.endDate" },
|
|
1054
|
+
{ path: "results.item.updatedDate" },
|
|
1055
|
+
{ path: "results.item.canceledDate" }
|
|
1056
|
+
]
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1060
|
+
paths: [
|
|
1061
|
+
{
|
|
1062
|
+
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
1066
|
+
}
|
|
1067
|
+
]
|
|
1068
|
+
}
|
|
1069
|
+
])
|
|
1070
|
+
};
|
|
1071
|
+
return metadata;
|
|
1072
|
+
}
|
|
1073
|
+
return __bulkConfirmOrDeclineBooking;
|
|
1074
|
+
}
|
|
1075
1075
|
function createBooking(payload) {
|
|
1076
1076
|
function __createBooking({ host }) {
|
|
1077
1077
|
const serializedData = transformPaths(payload, [
|
|
@@ -1238,8 +1238,8 @@ function rescheduleBooking(payload) {
|
|
|
1238
1238
|
}
|
|
1239
1239
|
return __rescheduleBooking;
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1242
|
-
function
|
|
1241
|
+
function bookingsConfirmBooking(payload) {
|
|
1242
|
+
function __bookingsConfirmBooking({ host }) {
|
|
1243
1243
|
const metadata = {
|
|
1244
1244
|
entityFqdn: "wix.bookings.v2.booking",
|
|
1245
1245
|
method: "POST",
|
|
@@ -1276,7 +1276,7 @@ function confirmBooking(payload) {
|
|
|
1276
1276
|
};
|
|
1277
1277
|
return metadata;
|
|
1278
1278
|
}
|
|
1279
|
-
return
|
|
1279
|
+
return __bookingsConfirmBooking;
|
|
1280
1280
|
}
|
|
1281
1281
|
function setBookingSubmissionId(payload) {
|
|
1282
1282
|
function __setBookingSubmissionId({ host }) {
|
|
@@ -1339,8 +1339,8 @@ function updateExtendedFields(payload) {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
return __updateExtendedFields;
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1343
|
-
function
|
|
1342
|
+
function bookingsDeclineBooking(payload) {
|
|
1343
|
+
function __bookingsDeclineBooking({ host }) {
|
|
1344
1344
|
const metadata = {
|
|
1345
1345
|
entityFqdn: "wix.bookings.v2.booking",
|
|
1346
1346
|
method: "POST",
|
|
@@ -1377,10 +1377,10 @@ function declineBooking(payload) {
|
|
|
1377
1377
|
};
|
|
1378
1378
|
return metadata;
|
|
1379
1379
|
}
|
|
1380
|
-
return
|
|
1380
|
+
return __bookingsDeclineBooking;
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1383
|
-
function
|
|
1382
|
+
function bookingsCancelBooking(payload) {
|
|
1383
|
+
function __bookingsCancelBooking({ host }) {
|
|
1384
1384
|
const metadata = {
|
|
1385
1385
|
entityFqdn: "wix.bookings.v2.booking",
|
|
1386
1386
|
method: "POST",
|
|
@@ -1417,10 +1417,10 @@ function cancelBooking(payload) {
|
|
|
1417
1417
|
};
|
|
1418
1418
|
return metadata;
|
|
1419
1419
|
}
|
|
1420
|
-
return
|
|
1420
|
+
return __bookingsCancelBooking;
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1423
|
-
function
|
|
1422
|
+
function bookingsUpdateNumberOfParticipants(payload) {
|
|
1423
|
+
function __bookingsUpdateNumberOfParticipants({ host }) {
|
|
1424
1424
|
const metadata = {
|
|
1425
1425
|
entityFqdn: "wix.bookings.v2.booking",
|
|
1426
1426
|
method: "POST",
|
|
@@ -1457,7 +1457,7 @@ function updateNumberOfParticipants(payload) {
|
|
|
1457
1457
|
};
|
|
1458
1458
|
return metadata;
|
|
1459
1459
|
}
|
|
1460
|
-
return
|
|
1460
|
+
return __bookingsUpdateNumberOfParticipants;
|
|
1461
1461
|
}
|
|
1462
1462
|
function bulkCalculateAllowedActions(payload) {
|
|
1463
1463
|
function __bulkCalculateAllowedActions({ host }) {
|
|
@@ -1784,64 +1784,6 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1784
1784
|
SortOrder2["DESC"] = "DESC";
|
|
1785
1785
|
return SortOrder2;
|
|
1786
1786
|
})(SortOrder || {});
|
|
1787
|
-
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1788
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1789
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1790
|
-
bookingId,
|
|
1791
|
-
paymentStatus: options?.paymentStatus
|
|
1792
|
-
});
|
|
1793
|
-
const reqOpts = confirmOrDeclineBooking(payload);
|
|
1794
|
-
sideEffects?.onSiteCall?.();
|
|
1795
|
-
try {
|
|
1796
|
-
const result = await httpClient.request(reqOpts);
|
|
1797
|
-
sideEffects?.onSuccess?.(result);
|
|
1798
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1799
|
-
} catch (err) {
|
|
1800
|
-
const transformedError = sdkTransformError(
|
|
1801
|
-
err,
|
|
1802
|
-
{
|
|
1803
|
-
spreadPathsToArguments: {},
|
|
1804
|
-
explicitPathsToArguments: {
|
|
1805
|
-
bookingId: "$[0]",
|
|
1806
|
-
paymentStatus: "$[1].paymentStatus"
|
|
1807
|
-
},
|
|
1808
|
-
singleArgumentUnchanged: false
|
|
1809
|
-
},
|
|
1810
|
-
["bookingId", "options"]
|
|
1811
|
-
);
|
|
1812
|
-
sideEffects?.onError?.(err);
|
|
1813
|
-
throw transformedError;
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
1817
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1818
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1819
|
-
details,
|
|
1820
|
-
returnEntity: options?.returnEntity
|
|
1821
|
-
});
|
|
1822
|
-
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
1823
|
-
sideEffects?.onSiteCall?.();
|
|
1824
|
-
try {
|
|
1825
|
-
const result = await httpClient.request(reqOpts);
|
|
1826
|
-
sideEffects?.onSuccess?.(result);
|
|
1827
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1828
|
-
} catch (err) {
|
|
1829
|
-
const transformedError = sdkTransformError(
|
|
1830
|
-
err,
|
|
1831
|
-
{
|
|
1832
|
-
spreadPathsToArguments: {},
|
|
1833
|
-
explicitPathsToArguments: {
|
|
1834
|
-
details: "$[0]",
|
|
1835
|
-
returnEntity: "$[1].returnEntity"
|
|
1836
|
-
},
|
|
1837
|
-
singleArgumentUnchanged: false
|
|
1838
|
-
},
|
|
1839
|
-
["details", "options"]
|
|
1840
|
-
);
|
|
1841
|
-
sideEffects?.onError?.(err);
|
|
1842
|
-
throw transformedError;
|
|
1843
|
-
}
|
|
1844
|
-
}
|
|
1845
1787
|
async function createMultiServiceBooking2(bookings, options) {
|
|
1846
1788
|
const { httpClient, sideEffects } = arguments[2];
|
|
1847
1789
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -2203,6 +2145,64 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
|
|
|
2203
2145
|
throw transformedError;
|
|
2204
2146
|
}
|
|
2205
2147
|
}
|
|
2148
|
+
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
2149
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2150
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2151
|
+
bookingId,
|
|
2152
|
+
paymentStatus: options?.paymentStatus
|
|
2153
|
+
});
|
|
2154
|
+
const reqOpts = confirmOrDeclineBooking(payload);
|
|
2155
|
+
sideEffects?.onSiteCall?.();
|
|
2156
|
+
try {
|
|
2157
|
+
const result = await httpClient.request(reqOpts);
|
|
2158
|
+
sideEffects?.onSuccess?.(result);
|
|
2159
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2160
|
+
} catch (err) {
|
|
2161
|
+
const transformedError = sdkTransformError(
|
|
2162
|
+
err,
|
|
2163
|
+
{
|
|
2164
|
+
spreadPathsToArguments: {},
|
|
2165
|
+
explicitPathsToArguments: {
|
|
2166
|
+
bookingId: "$[0]",
|
|
2167
|
+
paymentStatus: "$[1].paymentStatus"
|
|
2168
|
+
},
|
|
2169
|
+
singleArgumentUnchanged: false
|
|
2170
|
+
},
|
|
2171
|
+
["bookingId", "options"]
|
|
2172
|
+
);
|
|
2173
|
+
sideEffects?.onError?.(err);
|
|
2174
|
+
throw transformedError;
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
2178
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2179
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2180
|
+
details,
|
|
2181
|
+
returnEntity: options?.returnEntity
|
|
2182
|
+
});
|
|
2183
|
+
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
2184
|
+
sideEffects?.onSiteCall?.();
|
|
2185
|
+
try {
|
|
2186
|
+
const result = await httpClient.request(reqOpts);
|
|
2187
|
+
sideEffects?.onSuccess?.(result);
|
|
2188
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2189
|
+
} catch (err) {
|
|
2190
|
+
const transformedError = sdkTransformError(
|
|
2191
|
+
err,
|
|
2192
|
+
{
|
|
2193
|
+
spreadPathsToArguments: {},
|
|
2194
|
+
explicitPathsToArguments: {
|
|
2195
|
+
details: "$[0]",
|
|
2196
|
+
returnEntity: "$[1].returnEntity"
|
|
2197
|
+
},
|
|
2198
|
+
singleArgumentUnchanged: false
|
|
2199
|
+
},
|
|
2200
|
+
["details", "options"]
|
|
2201
|
+
);
|
|
2202
|
+
sideEffects?.onError?.(err);
|
|
2203
|
+
throw transformedError;
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
2206
|
async function createBooking2(booking, options) {
|
|
2207
2207
|
const { httpClient, sideEffects } = arguments[2];
|
|
2208
2208
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -2308,7 +2308,7 @@ async function rescheduleBooking2(bookingId, slot, options) {
|
|
|
2308
2308
|
throw transformedError;
|
|
2309
2309
|
}
|
|
2310
2310
|
}
|
|
2311
|
-
async function
|
|
2311
|
+
async function confirmBooking(bookingId, revision, options) {
|
|
2312
2312
|
const { httpClient, sideEffects } = arguments[3];
|
|
2313
2313
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2314
2314
|
bookingId,
|
|
@@ -2319,7 +2319,7 @@ async function confirmBooking2(bookingId, revision, options) {
|
|
|
2319
2319
|
doubleBooked: options?.doubleBooked,
|
|
2320
2320
|
flowControlSettings: options?.flowControlSettings
|
|
2321
2321
|
});
|
|
2322
|
-
const reqOpts =
|
|
2322
|
+
const reqOpts = bookingsConfirmBooking(payload);
|
|
2323
2323
|
sideEffects?.onSiteCall?.();
|
|
2324
2324
|
try {
|
|
2325
2325
|
const result = await httpClient.request(reqOpts);
|
|
@@ -2404,7 +2404,7 @@ async function updateExtendedFields2(_id, namespace, options) {
|
|
|
2404
2404
|
throw transformedError;
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
2407
|
-
async function
|
|
2407
|
+
async function declineBooking(bookingId, revision, options) {
|
|
2408
2408
|
const { httpClient, sideEffects } = arguments[3];
|
|
2409
2409
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2410
2410
|
bookingId,
|
|
@@ -2414,7 +2414,7 @@ async function declineBooking2(bookingId, revision, options) {
|
|
|
2414
2414
|
doubleBooked: options?.doubleBooked,
|
|
2415
2415
|
flowControlSettings: options?.flowControlSettings
|
|
2416
2416
|
});
|
|
2417
|
-
const reqOpts =
|
|
2417
|
+
const reqOpts = bookingsDeclineBooking(payload);
|
|
2418
2418
|
sideEffects?.onSiteCall?.();
|
|
2419
2419
|
try {
|
|
2420
2420
|
const result = await httpClient.request(reqOpts);
|
|
@@ -2441,7 +2441,7 @@ async function declineBooking2(bookingId, revision, options) {
|
|
|
2441
2441
|
throw transformedError;
|
|
2442
2442
|
}
|
|
2443
2443
|
}
|
|
2444
|
-
async function
|
|
2444
|
+
async function cancelBooking(bookingId, options) {
|
|
2445
2445
|
const { httpClient, sideEffects } = arguments[2];
|
|
2446
2446
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2447
2447
|
bookingId,
|
|
@@ -2449,7 +2449,7 @@ async function cancelBooking2(bookingId, options) {
|
|
|
2449
2449
|
flowControlSettings: options?.flowControlSettings,
|
|
2450
2450
|
revision: options?.revision
|
|
2451
2451
|
});
|
|
2452
|
-
const reqOpts =
|
|
2452
|
+
const reqOpts = bookingsCancelBooking(payload);
|
|
2453
2453
|
sideEffects?.onSiteCall?.();
|
|
2454
2454
|
try {
|
|
2455
2455
|
const result = await httpClient.request(reqOpts);
|
|
@@ -2474,7 +2474,7 @@ async function cancelBooking2(bookingId, options) {
|
|
|
2474
2474
|
throw transformedError;
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
2477
|
-
async function
|
|
2477
|
+
async function updateNumberOfParticipants(bookingId, options) {
|
|
2478
2478
|
const { httpClient, sideEffects } = arguments[2];
|
|
2479
2479
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2480
2480
|
bookingId,
|
|
@@ -2482,7 +2482,7 @@ async function updateNumberOfParticipants2(bookingId, options) {
|
|
|
2482
2482
|
totalParticipants: options?.totalParticipants,
|
|
2483
2483
|
participantsChoices: options?.participantsChoices
|
|
2484
2484
|
});
|
|
2485
|
-
const reqOpts =
|
|
2485
|
+
const reqOpts = bookingsUpdateNumberOfParticipants(payload);
|
|
2486
2486
|
sideEffects?.onSiteCall?.();
|
|
2487
2487
|
try {
|
|
2488
2488
|
const result = await httpClient.request(reqOpts);
|
|
@@ -2703,22 +2703,6 @@ async function getSchedulingUrl2(serviceId) {
|
|
|
2703
2703
|
}
|
|
2704
2704
|
|
|
2705
2705
|
// src/bookings-v2-booking-bookings.public.ts
|
|
2706
|
-
function confirmOrDeclineBooking3(httpClient) {
|
|
2707
|
-
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2708
|
-
bookingId,
|
|
2709
|
-
options,
|
|
2710
|
-
// @ts-ignore
|
|
2711
|
-
{ httpClient }
|
|
2712
|
-
);
|
|
2713
|
-
}
|
|
2714
|
-
function bulkConfirmOrDeclineBooking3(httpClient) {
|
|
2715
|
-
return (details, options) => bulkConfirmOrDeclineBooking2(
|
|
2716
|
-
details,
|
|
2717
|
-
options,
|
|
2718
|
-
// @ts-ignore
|
|
2719
|
-
{ httpClient }
|
|
2720
|
-
);
|
|
2721
|
-
}
|
|
2722
2706
|
function createMultiServiceBooking3(httpClient) {
|
|
2723
2707
|
return (bookings, options) => createMultiServiceBooking2(
|
|
2724
2708
|
bookings,
|
|
@@ -2805,6 +2789,22 @@ function removeBookingsFromMultiServiceBooking3(httpClient) {
|
|
|
2805
2789
|
{ httpClient }
|
|
2806
2790
|
);
|
|
2807
2791
|
}
|
|
2792
|
+
function confirmOrDeclineBooking3(httpClient) {
|
|
2793
|
+
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2794
|
+
bookingId,
|
|
2795
|
+
options,
|
|
2796
|
+
// @ts-ignore
|
|
2797
|
+
{ httpClient }
|
|
2798
|
+
);
|
|
2799
|
+
}
|
|
2800
|
+
function bulkConfirmOrDeclineBooking3(httpClient) {
|
|
2801
|
+
return (details, options) => bulkConfirmOrDeclineBooking2(
|
|
2802
|
+
details,
|
|
2803
|
+
options,
|
|
2804
|
+
// @ts-ignore
|
|
2805
|
+
{ httpClient }
|
|
2806
|
+
);
|
|
2807
|
+
}
|
|
2808
2808
|
function createBooking3(httpClient) {
|
|
2809
2809
|
return (booking, options) => createBooking2(
|
|
2810
2810
|
booking,
|
|
@@ -2830,8 +2830,8 @@ function rescheduleBooking3(httpClient) {
|
|
|
2830
2830
|
{ httpClient }
|
|
2831
2831
|
);
|
|
2832
2832
|
}
|
|
2833
|
-
function
|
|
2834
|
-
return (bookingId, revision, options) =>
|
|
2833
|
+
function confirmBooking2(httpClient) {
|
|
2834
|
+
return (bookingId, revision, options) => confirmBooking(
|
|
2835
2835
|
bookingId,
|
|
2836
2836
|
revision,
|
|
2837
2837
|
options,
|
|
@@ -2856,8 +2856,8 @@ function updateExtendedFields3(httpClient) {
|
|
|
2856
2856
|
{ httpClient }
|
|
2857
2857
|
);
|
|
2858
2858
|
}
|
|
2859
|
-
function
|
|
2860
|
-
return (bookingId, revision, options) =>
|
|
2859
|
+
function declineBooking2(httpClient) {
|
|
2860
|
+
return (bookingId, revision, options) => declineBooking(
|
|
2861
2861
|
bookingId,
|
|
2862
2862
|
revision,
|
|
2863
2863
|
options,
|
|
@@ -2865,16 +2865,16 @@ function declineBooking3(httpClient) {
|
|
|
2865
2865
|
{ httpClient }
|
|
2866
2866
|
);
|
|
2867
2867
|
}
|
|
2868
|
-
function
|
|
2869
|
-
return (bookingId, options) =>
|
|
2868
|
+
function cancelBooking2(httpClient) {
|
|
2869
|
+
return (bookingId, options) => cancelBooking(
|
|
2870
2870
|
bookingId,
|
|
2871
2871
|
options,
|
|
2872
2872
|
// @ts-ignore
|
|
2873
2873
|
{ httpClient }
|
|
2874
2874
|
);
|
|
2875
2875
|
}
|
|
2876
|
-
function
|
|
2877
|
-
return (bookingId, options) =>
|
|
2876
|
+
function updateNumberOfParticipants2(httpClient) {
|
|
2877
|
+
return (bookingId, options) => updateNumberOfParticipants(
|
|
2878
2878
|
bookingId,
|
|
2879
2879
|
options,
|
|
2880
2880
|
// @ts-ignore
|
|
@@ -3184,8 +3184,6 @@ var onBookingNumberOfParticipantsUpdated = EventDefinition(
|
|
|
3184
3184
|
// src/bookings-v2-booking-bookings.context.ts
|
|
3185
3185
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
3186
3186
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
3187
|
-
var confirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(confirmOrDeclineBooking3);
|
|
3188
|
-
var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(bulkConfirmOrDeclineBooking3);
|
|
3189
3187
|
var createMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(createMultiServiceBooking3);
|
|
3190
3188
|
var rescheduleMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(rescheduleMultiServiceBooking3);
|
|
3191
3189
|
var getMultiServiceBookingAvailability4 = /* @__PURE__ */ createRESTModule(getMultiServiceBookingAvailability3);
|
|
@@ -3199,15 +3197,17 @@ var bulkGetMultiServiceBookingAllowedActions4 = /* @__PURE__ */ createRESTModule
|
|
|
3199
3197
|
var getMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(getMultiServiceBooking3);
|
|
3200
3198
|
var addBookingsToMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(addBookingsToMultiServiceBooking3);
|
|
3201
3199
|
var removeBookingsFromMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(removeBookingsFromMultiServiceBooking3);
|
|
3200
|
+
var confirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(confirmOrDeclineBooking3);
|
|
3201
|
+
var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(bulkConfirmOrDeclineBooking3);
|
|
3202
3202
|
var createBooking4 = /* @__PURE__ */ createRESTModule(createBooking3);
|
|
3203
3203
|
var bulkCreateBooking4 = /* @__PURE__ */ createRESTModule(bulkCreateBooking3);
|
|
3204
3204
|
var rescheduleBooking4 = /* @__PURE__ */ createRESTModule(rescheduleBooking3);
|
|
3205
|
-
var
|
|
3205
|
+
var confirmBooking3 = /* @__PURE__ */ createRESTModule(confirmBooking2);
|
|
3206
3206
|
var setBookingSubmissionId4 = /* @__PURE__ */ createRESTModule(setBookingSubmissionId3);
|
|
3207
3207
|
var updateExtendedFields4 = /* @__PURE__ */ createRESTModule(updateExtendedFields3);
|
|
3208
|
-
var
|
|
3209
|
-
var
|
|
3210
|
-
var
|
|
3208
|
+
var declineBooking3 = /* @__PURE__ */ createRESTModule(declineBooking2);
|
|
3209
|
+
var cancelBooking3 = /* @__PURE__ */ createRESTModule(cancelBooking2);
|
|
3210
|
+
var updateNumberOfParticipants3 = /* @__PURE__ */ createRESTModule(updateNumberOfParticipants2);
|
|
3211
3211
|
var bulkCalculateAllowedActions4 = /* @__PURE__ */ createRESTModule(bulkCalculateAllowedActions3);
|
|
3212
3212
|
var markBookingAsPending4 = /* @__PURE__ */ createRESTModule(markBookingAsPending3);
|
|
3213
3213
|
var getAnonymousActionDetails4 = /* @__PURE__ */ createRESTModule(getAnonymousActionDetails3);
|
|
@@ -3249,15 +3249,15 @@ export {
|
|
|
3249
3249
|
bulkConfirmOrDeclineBooking4 as bulkConfirmOrDeclineBooking,
|
|
3250
3250
|
bulkCreateBooking4 as bulkCreateBooking,
|
|
3251
3251
|
bulkGetMultiServiceBookingAllowedActions4 as bulkGetMultiServiceBookingAllowedActions,
|
|
3252
|
-
|
|
3252
|
+
cancelBooking3 as cancelBooking,
|
|
3253
3253
|
cancelBookingAnonymously4 as cancelBookingAnonymously,
|
|
3254
3254
|
cancelMultiServiceBooking4 as cancelMultiServiceBooking,
|
|
3255
|
-
|
|
3255
|
+
confirmBooking3 as confirmBooking,
|
|
3256
3256
|
confirmMultiServiceBooking4 as confirmMultiServiceBooking,
|
|
3257
3257
|
confirmOrDeclineBooking4 as confirmOrDeclineBooking,
|
|
3258
3258
|
createBooking4 as createBooking,
|
|
3259
3259
|
createMultiServiceBooking4 as createMultiServiceBooking,
|
|
3260
|
-
|
|
3260
|
+
declineBooking3 as declineBooking,
|
|
3261
3261
|
declineMultiServiceBooking4 as declineMultiServiceBooking,
|
|
3262
3262
|
getAnonymousActionDetails4 as getAnonymousActionDetails,
|
|
3263
3263
|
getBookingAnonymously4 as getBookingAnonymously,
|
|
@@ -3280,6 +3280,6 @@ export {
|
|
|
3280
3280
|
rescheduleMultiServiceBooking4 as rescheduleMultiServiceBooking,
|
|
3281
3281
|
setBookingSubmissionId4 as setBookingSubmissionId,
|
|
3282
3282
|
updateExtendedFields4 as updateExtendedFields,
|
|
3283
|
-
|
|
3283
|
+
updateNumberOfParticipants3 as updateNumberOfParticipants
|
|
3284
3284
|
};
|
|
3285
3285
|
//# sourceMappingURL=index.mjs.map
|