@wix/auto_sdk_bookings_bookings 1.0.109 → 1.0.111
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 +85 -74
- package/build/cjs/index.js +267 -211
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +377 -349
- package/build/cjs/index.typings.js +241 -193
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +264 -247
- package/build/cjs/meta.js +212 -171
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +85 -74
- package/build/es/index.mjs +266 -211
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +377 -349
- package/build/es/index.typings.mjs +240 -193
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +264 -247
- package/build/es/meta.mjs +211 -171
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +85 -74
- package/build/internal/cjs/index.js +267 -211
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +377 -349
- package/build/internal/cjs/index.typings.js +241 -193
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +264 -247
- package/build/internal/cjs/meta.js +212 -171
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +85 -74
- package/build/internal/es/index.mjs +266 -211
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +377 -349
- package/build/internal/es/index.typings.mjs +240 -193
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +264 -247
- package/build/internal/es/meta.mjs +211 -171
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -53,6 +53,7 @@ __export(index_exports, {
|
|
|
53
53
|
getBookingAnonymously: () => getBookingAnonymously4,
|
|
54
54
|
getMultiServiceBooking: () => getMultiServiceBooking4,
|
|
55
55
|
getMultiServiceBookingAvailability: () => getMultiServiceBookingAvailability4,
|
|
56
|
+
getSchedulingUrl: () => getSchedulingUrl4,
|
|
56
57
|
markBookingAsPending: () => markBookingAsPending4,
|
|
57
58
|
markMultiServiceBookingAsPending: () => markMultiServiceBookingAsPending4,
|
|
58
59
|
onBookingCanceled: () => onBookingCanceled2,
|
|
@@ -398,6 +399,57 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
|
|
|
398
399
|
};
|
|
399
400
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
400
401
|
}
|
|
402
|
+
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
403
|
+
const domainToMappings = {
|
|
404
|
+
"www.wixapis.com": [
|
|
405
|
+
{
|
|
406
|
+
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
407
|
+
destPath: "/v2/bookings/confirmation"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
srcPath: "/bookings/v2/confirmation",
|
|
411
|
+
destPath: "/v2/confirmation"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
srcPath: "/bookings/v2/bulk/confirmation",
|
|
415
|
+
destPath: "/v2/bulk/confirmation"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
419
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
423
|
+
destPath: "/v2/bulk/confirmation"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
427
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"*.dev.wix-code.com": [
|
|
431
|
+
{
|
|
432
|
+
srcPath: "/bookings/v2/confirmation",
|
|
433
|
+
destPath: "/v2/confirmation"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
437
|
+
destPath: "/v2/bulk/bookings"
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
_: [
|
|
441
|
+
{
|
|
442
|
+
srcPath: "/bookings/v2/confirmation",
|
|
443
|
+
destPath: "/v2/confirmation"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
447
|
+
destPath: "/v2/bulk/bookings"
|
|
448
|
+
}
|
|
449
|
+
]
|
|
450
|
+
};
|
|
451
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
452
|
+
}
|
|
401
453
|
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
402
454
|
const domainToMappings = {
|
|
403
455
|
_: [
|
|
@@ -551,142 +603,7 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
|
551
603
|
};
|
|
552
604
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
553
605
|
}
|
|
554
|
-
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
555
|
-
const domainToMappings = {
|
|
556
|
-
"www.wixapis.com": [
|
|
557
|
-
{
|
|
558
|
-
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
559
|
-
destPath: "/v2/bookings/confirmation"
|
|
560
|
-
},
|
|
561
|
-
{
|
|
562
|
-
srcPath: "/bookings/v2/confirmation",
|
|
563
|
-
destPath: "/v2/confirmation"
|
|
564
|
-
},
|
|
565
|
-
{
|
|
566
|
-
srcPath: "/bookings/v2/bulk/confirmation",
|
|
567
|
-
destPath: "/v2/bulk/confirmation"
|
|
568
|
-
},
|
|
569
|
-
{
|
|
570
|
-
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
571
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
575
|
-
destPath: "/v2/bulk/confirmation"
|
|
576
|
-
},
|
|
577
|
-
{
|
|
578
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
579
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
580
|
-
}
|
|
581
|
-
],
|
|
582
|
-
"*.dev.wix-code.com": [
|
|
583
|
-
{
|
|
584
|
-
srcPath: "/bookings/v2/confirmation",
|
|
585
|
-
destPath: "/v2/confirmation"
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
589
|
-
destPath: "/v2/bulk/bookings"
|
|
590
|
-
}
|
|
591
|
-
],
|
|
592
|
-
_: [
|
|
593
|
-
{
|
|
594
|
-
srcPath: "/bookings/v2/confirmation",
|
|
595
|
-
destPath: "/v2/confirmation"
|
|
596
|
-
},
|
|
597
|
-
{
|
|
598
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
599
|
-
destPath: "/v2/bulk/bookings"
|
|
600
|
-
}
|
|
601
|
-
]
|
|
602
|
-
};
|
|
603
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
604
|
-
}
|
|
605
606
|
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
|
|
606
|
-
function confirmOrDeclineBooking(payload) {
|
|
607
|
-
function __confirmOrDeclineBooking({ host }) {
|
|
608
|
-
const metadata = {
|
|
609
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
610
|
-
method: "POST",
|
|
611
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
612
|
-
packageName: PACKAGE_NAME,
|
|
613
|
-
migrationOptions: {
|
|
614
|
-
optInTransformResponse: true
|
|
615
|
-
},
|
|
616
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
617
|
-
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
618
|
-
data: payload,
|
|
619
|
-
host
|
|
620
|
-
}),
|
|
621
|
-
data: payload,
|
|
622
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
623
|
-
{
|
|
624
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
625
|
-
paths: [
|
|
626
|
-
{ path: "booking.createdDate" },
|
|
627
|
-
{ path: "booking.startDate" },
|
|
628
|
-
{ path: "booking.endDate" },
|
|
629
|
-
{ path: "booking.updatedDate" },
|
|
630
|
-
{ path: "booking.canceledDate" }
|
|
631
|
-
]
|
|
632
|
-
},
|
|
633
|
-
{
|
|
634
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
635
|
-
paths: [
|
|
636
|
-
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
637
|
-
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
638
|
-
]
|
|
639
|
-
}
|
|
640
|
-
])
|
|
641
|
-
};
|
|
642
|
-
return metadata;
|
|
643
|
-
}
|
|
644
|
-
return __confirmOrDeclineBooking;
|
|
645
|
-
}
|
|
646
|
-
function bulkConfirmOrDeclineBooking(payload) {
|
|
647
|
-
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
648
|
-
const metadata = {
|
|
649
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
650
|
-
method: "POST",
|
|
651
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
652
|
-
packageName: PACKAGE_NAME,
|
|
653
|
-
migrationOptions: {
|
|
654
|
-
optInTransformResponse: true
|
|
655
|
-
},
|
|
656
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
657
|
-
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
658
|
-
data: payload,
|
|
659
|
-
host
|
|
660
|
-
}),
|
|
661
|
-
data: payload,
|
|
662
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
663
|
-
{
|
|
664
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
665
|
-
paths: [
|
|
666
|
-
{ path: "results.item.createdDate" },
|
|
667
|
-
{ path: "results.item.startDate" },
|
|
668
|
-
{ path: "results.item.endDate" },
|
|
669
|
-
{ path: "results.item.updatedDate" },
|
|
670
|
-
{ path: "results.item.canceledDate" }
|
|
671
|
-
]
|
|
672
|
-
},
|
|
673
|
-
{
|
|
674
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
675
|
-
paths: [
|
|
676
|
-
{
|
|
677
|
-
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
678
|
-
},
|
|
679
|
-
{
|
|
680
|
-
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
681
|
-
}
|
|
682
|
-
]
|
|
683
|
-
}
|
|
684
|
-
])
|
|
685
|
-
};
|
|
686
|
-
return metadata;
|
|
687
|
-
}
|
|
688
|
-
return __bulkConfirmOrDeclineBooking;
|
|
689
|
-
}
|
|
690
607
|
function createMultiServiceBooking(payload) {
|
|
691
608
|
function __createMultiServiceBooking({ host }) {
|
|
692
609
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1144,6 +1061,90 @@ function removeBookingsFromMultiServiceBooking(payload) {
|
|
|
1144
1061
|
}
|
|
1145
1062
|
return __removeBookingsFromMultiServiceBooking;
|
|
1146
1063
|
}
|
|
1064
|
+
function confirmOrDeclineBooking(payload) {
|
|
1065
|
+
function __confirmOrDeclineBooking({ host }) {
|
|
1066
|
+
const metadata = {
|
|
1067
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1068
|
+
method: "POST",
|
|
1069
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
1070
|
+
packageName: PACKAGE_NAME,
|
|
1071
|
+
migrationOptions: {
|
|
1072
|
+
optInTransformResponse: true
|
|
1073
|
+
},
|
|
1074
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1075
|
+
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
1076
|
+
data: payload,
|
|
1077
|
+
host
|
|
1078
|
+
}),
|
|
1079
|
+
data: payload,
|
|
1080
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
1081
|
+
{
|
|
1082
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
1083
|
+
paths: [
|
|
1084
|
+
{ path: "booking.createdDate" },
|
|
1085
|
+
{ path: "booking.startDate" },
|
|
1086
|
+
{ path: "booking.endDate" },
|
|
1087
|
+
{ path: "booking.updatedDate" },
|
|
1088
|
+
{ path: "booking.canceledDate" }
|
|
1089
|
+
]
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
1093
|
+
paths: [
|
|
1094
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
1095
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
1096
|
+
]
|
|
1097
|
+
}
|
|
1098
|
+
])
|
|
1099
|
+
};
|
|
1100
|
+
return metadata;
|
|
1101
|
+
}
|
|
1102
|
+
return __confirmOrDeclineBooking;
|
|
1103
|
+
}
|
|
1104
|
+
function bulkConfirmOrDeclineBooking(payload) {
|
|
1105
|
+
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
1106
|
+
const metadata = {
|
|
1107
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1108
|
+
method: "POST",
|
|
1109
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
1110
|
+
packageName: PACKAGE_NAME,
|
|
1111
|
+
migrationOptions: {
|
|
1112
|
+
optInTransformResponse: true
|
|
1113
|
+
},
|
|
1114
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1115
|
+
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
1116
|
+
data: payload,
|
|
1117
|
+
host
|
|
1118
|
+
}),
|
|
1119
|
+
data: payload,
|
|
1120
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
1121
|
+
{
|
|
1122
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
1123
|
+
paths: [
|
|
1124
|
+
{ path: "results.item.createdDate" },
|
|
1125
|
+
{ path: "results.item.startDate" },
|
|
1126
|
+
{ path: "results.item.endDate" },
|
|
1127
|
+
{ path: "results.item.updatedDate" },
|
|
1128
|
+
{ path: "results.item.canceledDate" }
|
|
1129
|
+
]
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
1133
|
+
paths: [
|
|
1134
|
+
{
|
|
1135
|
+
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
1139
|
+
}
|
|
1140
|
+
]
|
|
1141
|
+
}
|
|
1142
|
+
])
|
|
1143
|
+
};
|
|
1144
|
+
return metadata;
|
|
1145
|
+
}
|
|
1146
|
+
return __bulkConfirmOrDeclineBooking;
|
|
1147
|
+
}
|
|
1147
1148
|
function createBooking(payload) {
|
|
1148
1149
|
function __createBooking({ host }) {
|
|
1149
1150
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1733,6 +1734,27 @@ function getBookingAnonymously(payload) {
|
|
|
1733
1734
|
}
|
|
1734
1735
|
return __getBookingAnonymously;
|
|
1735
1736
|
}
|
|
1737
|
+
function getSchedulingUrl(payload) {
|
|
1738
|
+
function __getSchedulingUrl({ host }) {
|
|
1739
|
+
const metadata = {
|
|
1740
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1741
|
+
method: "GET",
|
|
1742
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.AnonymousBookingActions.GetSchedulingUrl",
|
|
1743
|
+
packageName: PACKAGE_NAME,
|
|
1744
|
+
migrationOptions: {
|
|
1745
|
+
optInTransformResponse: true
|
|
1746
|
+
},
|
|
1747
|
+
url: resolveComWixpressBookingsBookingsV2AnonymousBookingActionsUrl({
|
|
1748
|
+
protoPath: "/v2/bookings/scheduling-url",
|
|
1749
|
+
data: payload,
|
|
1750
|
+
host
|
|
1751
|
+
}),
|
|
1752
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
1753
|
+
};
|
|
1754
|
+
return metadata;
|
|
1755
|
+
}
|
|
1756
|
+
return __getSchedulingUrl;
|
|
1757
|
+
}
|
|
1736
1758
|
|
|
1737
1759
|
// src/bookings-v2-booking-bookings.universal.ts
|
|
1738
1760
|
var MultiServiceBookingType = /* @__PURE__ */ ((MultiServiceBookingType2) => {
|
|
@@ -1835,64 +1857,6 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1835
1857
|
SortOrder2["DESC"] = "DESC";
|
|
1836
1858
|
return SortOrder2;
|
|
1837
1859
|
})(SortOrder || {});
|
|
1838
|
-
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1839
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1840
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1841
|
-
bookingId,
|
|
1842
|
-
paymentStatus: options?.paymentStatus
|
|
1843
|
-
});
|
|
1844
|
-
const reqOpts = confirmOrDeclineBooking(payload);
|
|
1845
|
-
sideEffects?.onSiteCall?.();
|
|
1846
|
-
try {
|
|
1847
|
-
const result = await httpClient.request(reqOpts);
|
|
1848
|
-
sideEffects?.onSuccess?.(result);
|
|
1849
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1850
|
-
} catch (err) {
|
|
1851
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1852
|
-
err,
|
|
1853
|
-
{
|
|
1854
|
-
spreadPathsToArguments: {},
|
|
1855
|
-
explicitPathsToArguments: {
|
|
1856
|
-
bookingId: "$[0]",
|
|
1857
|
-
paymentStatus: "$[1].paymentStatus"
|
|
1858
|
-
},
|
|
1859
|
-
singleArgumentUnchanged: false
|
|
1860
|
-
},
|
|
1861
|
-
["bookingId", "options"]
|
|
1862
|
-
);
|
|
1863
|
-
sideEffects?.onError?.(err);
|
|
1864
|
-
throw transformedError;
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
1868
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1869
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1870
|
-
details,
|
|
1871
|
-
returnEntity: options?.returnEntity
|
|
1872
|
-
});
|
|
1873
|
-
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
1874
|
-
sideEffects?.onSiteCall?.();
|
|
1875
|
-
try {
|
|
1876
|
-
const result = await httpClient.request(reqOpts);
|
|
1877
|
-
sideEffects?.onSuccess?.(result);
|
|
1878
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1879
|
-
} catch (err) {
|
|
1880
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1881
|
-
err,
|
|
1882
|
-
{
|
|
1883
|
-
spreadPathsToArguments: {},
|
|
1884
|
-
explicitPathsToArguments: {
|
|
1885
|
-
details: "$[0]",
|
|
1886
|
-
returnEntity: "$[1].returnEntity"
|
|
1887
|
-
},
|
|
1888
|
-
singleArgumentUnchanged: false
|
|
1889
|
-
},
|
|
1890
|
-
["details", "options"]
|
|
1891
|
-
);
|
|
1892
|
-
sideEffects?.onError?.(err);
|
|
1893
|
-
throw transformedError;
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
1860
|
async function createMultiServiceBooking2(bookings, options) {
|
|
1897
1861
|
const { httpClient, sideEffects } = arguments[2];
|
|
1898
1862
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -2254,6 +2218,64 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
|
|
|
2254
2218
|
throw transformedError;
|
|
2255
2219
|
}
|
|
2256
2220
|
}
|
|
2221
|
+
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
2222
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2223
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2224
|
+
bookingId,
|
|
2225
|
+
paymentStatus: options?.paymentStatus
|
|
2226
|
+
});
|
|
2227
|
+
const reqOpts = confirmOrDeclineBooking(payload);
|
|
2228
|
+
sideEffects?.onSiteCall?.();
|
|
2229
|
+
try {
|
|
2230
|
+
const result = await httpClient.request(reqOpts);
|
|
2231
|
+
sideEffects?.onSuccess?.(result);
|
|
2232
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2233
|
+
} catch (err) {
|
|
2234
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
2235
|
+
err,
|
|
2236
|
+
{
|
|
2237
|
+
spreadPathsToArguments: {},
|
|
2238
|
+
explicitPathsToArguments: {
|
|
2239
|
+
bookingId: "$[0]",
|
|
2240
|
+
paymentStatus: "$[1].paymentStatus"
|
|
2241
|
+
},
|
|
2242
|
+
singleArgumentUnchanged: false
|
|
2243
|
+
},
|
|
2244
|
+
["bookingId", "options"]
|
|
2245
|
+
);
|
|
2246
|
+
sideEffects?.onError?.(err);
|
|
2247
|
+
throw transformedError;
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
2251
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2252
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2253
|
+
details,
|
|
2254
|
+
returnEntity: options?.returnEntity
|
|
2255
|
+
});
|
|
2256
|
+
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
2257
|
+
sideEffects?.onSiteCall?.();
|
|
2258
|
+
try {
|
|
2259
|
+
const result = await httpClient.request(reqOpts);
|
|
2260
|
+
sideEffects?.onSuccess?.(result);
|
|
2261
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2262
|
+
} catch (err) {
|
|
2263
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
2264
|
+
err,
|
|
2265
|
+
{
|
|
2266
|
+
spreadPathsToArguments: {},
|
|
2267
|
+
explicitPathsToArguments: {
|
|
2268
|
+
details: "$[0]",
|
|
2269
|
+
returnEntity: "$[1].returnEntity"
|
|
2270
|
+
},
|
|
2271
|
+
singleArgumentUnchanged: false
|
|
2272
|
+
},
|
|
2273
|
+
["details", "options"]
|
|
2274
|
+
);
|
|
2275
|
+
sideEffects?.onError?.(err);
|
|
2276
|
+
throw transformedError;
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2257
2279
|
async function createBooking2(booking, options) {
|
|
2258
2280
|
const { httpClient, sideEffects } = arguments[2];
|
|
2259
2281
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -2727,24 +2749,33 @@ async function getBookingAnonymously2(token) {
|
|
|
2727
2749
|
throw transformedError;
|
|
2728
2750
|
}
|
|
2729
2751
|
}
|
|
2752
|
+
async function getSchedulingUrl2(serviceId) {
|
|
2753
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2754
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2755
|
+
serviceId
|
|
2756
|
+
});
|
|
2757
|
+
const reqOpts = getSchedulingUrl(payload);
|
|
2758
|
+
sideEffects?.onSiteCall?.();
|
|
2759
|
+
try {
|
|
2760
|
+
const result = await httpClient.request(reqOpts);
|
|
2761
|
+
sideEffects?.onSuccess?.(result);
|
|
2762
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2763
|
+
} catch (err) {
|
|
2764
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
2765
|
+
err,
|
|
2766
|
+
{
|
|
2767
|
+
spreadPathsToArguments: {},
|
|
2768
|
+
explicitPathsToArguments: { serviceId: "$[0]" },
|
|
2769
|
+
singleArgumentUnchanged: false
|
|
2770
|
+
},
|
|
2771
|
+
["serviceId"]
|
|
2772
|
+
);
|
|
2773
|
+
sideEffects?.onError?.(err);
|
|
2774
|
+
throw transformedError;
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2730
2777
|
|
|
2731
2778
|
// src/bookings-v2-booking-bookings.public.ts
|
|
2732
|
-
function confirmOrDeclineBooking3(httpClient) {
|
|
2733
|
-
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2734
|
-
bookingId,
|
|
2735
|
-
options,
|
|
2736
|
-
// @ts-ignore
|
|
2737
|
-
{ httpClient }
|
|
2738
|
-
);
|
|
2739
|
-
}
|
|
2740
|
-
function bulkConfirmOrDeclineBooking3(httpClient) {
|
|
2741
|
-
return (details, options) => bulkConfirmOrDeclineBooking2(
|
|
2742
|
-
details,
|
|
2743
|
-
options,
|
|
2744
|
-
// @ts-ignore
|
|
2745
|
-
{ httpClient }
|
|
2746
|
-
);
|
|
2747
|
-
}
|
|
2748
2779
|
function createMultiServiceBooking3(httpClient) {
|
|
2749
2780
|
return (bookings, options) => createMultiServiceBooking2(
|
|
2750
2781
|
bookings,
|
|
@@ -2831,6 +2862,22 @@ function removeBookingsFromMultiServiceBooking3(httpClient) {
|
|
|
2831
2862
|
{ httpClient }
|
|
2832
2863
|
);
|
|
2833
2864
|
}
|
|
2865
|
+
function confirmOrDeclineBooking3(httpClient) {
|
|
2866
|
+
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2867
|
+
bookingId,
|
|
2868
|
+
options,
|
|
2869
|
+
// @ts-ignore
|
|
2870
|
+
{ httpClient }
|
|
2871
|
+
);
|
|
2872
|
+
}
|
|
2873
|
+
function bulkConfirmOrDeclineBooking3(httpClient) {
|
|
2874
|
+
return (details, options) => bulkConfirmOrDeclineBooking2(
|
|
2875
|
+
details,
|
|
2876
|
+
options,
|
|
2877
|
+
// @ts-ignore
|
|
2878
|
+
{ httpClient }
|
|
2879
|
+
);
|
|
2880
|
+
}
|
|
2834
2881
|
function createBooking3(httpClient) {
|
|
2835
2882
|
return (booking, options) => createBooking2(
|
|
2836
2883
|
booking,
|
|
@@ -2954,6 +3001,13 @@ function getBookingAnonymously3(httpClient) {
|
|
|
2954
3001
|
{ httpClient }
|
|
2955
3002
|
);
|
|
2956
3003
|
}
|
|
3004
|
+
function getSchedulingUrl3(httpClient) {
|
|
3005
|
+
return (serviceId) => getSchedulingUrl2(
|
|
3006
|
+
serviceId,
|
|
3007
|
+
// @ts-ignore
|
|
3008
|
+
{ httpClient }
|
|
3009
|
+
);
|
|
3010
|
+
}
|
|
2957
3011
|
var onBookingCanceled = (0, import_sdk_types.EventDefinition)(
|
|
2958
3012
|
"wix.bookings.v2.booking_canceled",
|
|
2959
3013
|
true,
|
|
@@ -3203,8 +3257,6 @@ var onBookingNumberOfParticipantsUpdated = (0, import_sdk_types.EventDefinition)
|
|
|
3203
3257
|
// src/bookings-v2-booking-bookings.context.ts
|
|
3204
3258
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
3205
3259
|
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
3206
|
-
var confirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(confirmOrDeclineBooking3);
|
|
3207
|
-
var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkConfirmOrDeclineBooking3);
|
|
3208
3260
|
var createMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createMultiServiceBooking3);
|
|
3209
3261
|
var rescheduleMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(rescheduleMultiServiceBooking3);
|
|
3210
3262
|
var getMultiServiceBookingAvailability4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMultiServiceBookingAvailability3);
|
|
@@ -3218,6 +3270,8 @@ var bulkGetMultiServiceBookingAllowedActions4 = /* @__PURE__ */ (0, import_rest_
|
|
|
3218
3270
|
var getMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMultiServiceBooking3);
|
|
3219
3271
|
var addBookingsToMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addBookingsToMultiServiceBooking3);
|
|
3220
3272
|
var removeBookingsFromMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeBookingsFromMultiServiceBooking3);
|
|
3273
|
+
var confirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(confirmOrDeclineBooking3);
|
|
3274
|
+
var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkConfirmOrDeclineBooking3);
|
|
3221
3275
|
var createBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createBooking3);
|
|
3222
3276
|
var bulkCreateBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateBooking3);
|
|
3223
3277
|
var rescheduleBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(rescheduleBooking3);
|
|
@@ -3233,6 +3287,7 @@ var getAnonymousActionDetails4 = /* @__PURE__ */ (0, import_rest_modules3.create
|
|
|
3233
3287
|
var cancelBookingAnonymously4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cancelBookingAnonymously3);
|
|
3234
3288
|
var rescheduleBookingAnonymously4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(rescheduleBookingAnonymously3);
|
|
3235
3289
|
var getBookingAnonymously4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getBookingAnonymously3);
|
|
3290
|
+
var getSchedulingUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSchedulingUrl3);
|
|
3236
3291
|
var onBookingCanceled2 = (0, import_event_definition_modules.createEventModule)(onBookingCanceled);
|
|
3237
3292
|
var onBookingConfirmed2 = (0, import_event_definition_modules.createEventModule)(onBookingConfirmed);
|
|
3238
3293
|
var onBookingCreated2 = (0, import_event_definition_modules.createEventModule)(onBookingCreated);
|
|
@@ -3282,6 +3337,7 @@ var onBookingNumberOfParticipantsUpdated2 = (0, import_event_definition_modules.
|
|
|
3282
3337
|
getBookingAnonymously,
|
|
3283
3338
|
getMultiServiceBooking,
|
|
3284
3339
|
getMultiServiceBookingAvailability,
|
|
3340
|
+
getSchedulingUrl,
|
|
3285
3341
|
markBookingAsPending,
|
|
3286
3342
|
markMultiServiceBookingAsPending,
|
|
3287
3343
|
onBookingCanceled,
|