@wix/auto_sdk_bookings_bookings 1.0.108 → 1.0.110
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,57 +399,6 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
|
|
|
398
399
|
};
|
|
399
400
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
400
401
|
}
|
|
401
|
-
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
402
|
-
const domainToMappings = {
|
|
403
|
-
"www.wixapis.com": [
|
|
404
|
-
{
|
|
405
|
-
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
406
|
-
destPath: "/v2/bookings/confirmation"
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
srcPath: "/bookings/v2/confirmation",
|
|
410
|
-
destPath: "/v2/confirmation"
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
srcPath: "/bookings/v2/bulk/confirmation",
|
|
414
|
-
destPath: "/v2/bulk/confirmation"
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
418
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
422
|
-
destPath: "/v2/bulk/confirmation"
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
426
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
427
|
-
}
|
|
428
|
-
],
|
|
429
|
-
"*.dev.wix-code.com": [
|
|
430
|
-
{
|
|
431
|
-
srcPath: "/bookings/v2/confirmation",
|
|
432
|
-
destPath: "/v2/confirmation"
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
436
|
-
destPath: "/v2/bulk/bookings"
|
|
437
|
-
}
|
|
438
|
-
],
|
|
439
|
-
_: [
|
|
440
|
-
{
|
|
441
|
-
srcPath: "/bookings/v2/confirmation",
|
|
442
|
-
destPath: "/v2/confirmation"
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
446
|
-
destPath: "/v2/bulk/bookings"
|
|
447
|
-
}
|
|
448
|
-
]
|
|
449
|
-
};
|
|
450
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
451
|
-
}
|
|
452
402
|
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
453
403
|
const domainToMappings = {
|
|
454
404
|
_: [
|
|
@@ -602,7 +552,142 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
|
602
552
|
};
|
|
603
553
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
604
554
|
}
|
|
555
|
+
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
556
|
+
const domainToMappings = {
|
|
557
|
+
"www.wixapis.com": [
|
|
558
|
+
{
|
|
559
|
+
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
560
|
+
destPath: "/v2/bookings/confirmation"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
srcPath: "/bookings/v2/confirmation",
|
|
564
|
+
destPath: "/v2/confirmation"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
srcPath: "/bookings/v2/bulk/confirmation",
|
|
568
|
+
destPath: "/v2/bulk/confirmation"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
572
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
576
|
+
destPath: "/v2/bulk/confirmation"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
580
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
581
|
+
}
|
|
582
|
+
],
|
|
583
|
+
"*.dev.wix-code.com": [
|
|
584
|
+
{
|
|
585
|
+
srcPath: "/bookings/v2/confirmation",
|
|
586
|
+
destPath: "/v2/confirmation"
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
590
|
+
destPath: "/v2/bulk/bookings"
|
|
591
|
+
}
|
|
592
|
+
],
|
|
593
|
+
_: [
|
|
594
|
+
{
|
|
595
|
+
srcPath: "/bookings/v2/confirmation",
|
|
596
|
+
destPath: "/v2/confirmation"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
600
|
+
destPath: "/v2/bulk/bookings"
|
|
601
|
+
}
|
|
602
|
+
]
|
|
603
|
+
};
|
|
604
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
605
|
+
}
|
|
605
606
|
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
|
|
607
|
+
function confirmOrDeclineBooking(payload) {
|
|
608
|
+
function __confirmOrDeclineBooking({ host }) {
|
|
609
|
+
const metadata = {
|
|
610
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
611
|
+
method: "POST",
|
|
612
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
613
|
+
packageName: PACKAGE_NAME,
|
|
614
|
+
migrationOptions: {
|
|
615
|
+
optInTransformResponse: true
|
|
616
|
+
},
|
|
617
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
618
|
+
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
619
|
+
data: payload,
|
|
620
|
+
host
|
|
621
|
+
}),
|
|
622
|
+
data: payload,
|
|
623
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
624
|
+
{
|
|
625
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
626
|
+
paths: [
|
|
627
|
+
{ path: "booking.createdDate" },
|
|
628
|
+
{ path: "booking.startDate" },
|
|
629
|
+
{ path: "booking.endDate" },
|
|
630
|
+
{ path: "booking.updatedDate" },
|
|
631
|
+
{ path: "booking.canceledDate" }
|
|
632
|
+
]
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
636
|
+
paths: [
|
|
637
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
638
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
639
|
+
]
|
|
640
|
+
}
|
|
641
|
+
])
|
|
642
|
+
};
|
|
643
|
+
return metadata;
|
|
644
|
+
}
|
|
645
|
+
return __confirmOrDeclineBooking;
|
|
646
|
+
}
|
|
647
|
+
function bulkConfirmOrDeclineBooking(payload) {
|
|
648
|
+
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
649
|
+
const metadata = {
|
|
650
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
651
|
+
method: "POST",
|
|
652
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
653
|
+
packageName: PACKAGE_NAME,
|
|
654
|
+
migrationOptions: {
|
|
655
|
+
optInTransformResponse: true
|
|
656
|
+
},
|
|
657
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
658
|
+
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
659
|
+
data: payload,
|
|
660
|
+
host
|
|
661
|
+
}),
|
|
662
|
+
data: payload,
|
|
663
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
664
|
+
{
|
|
665
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
666
|
+
paths: [
|
|
667
|
+
{ path: "results.item.createdDate" },
|
|
668
|
+
{ path: "results.item.startDate" },
|
|
669
|
+
{ path: "results.item.endDate" },
|
|
670
|
+
{ path: "results.item.updatedDate" },
|
|
671
|
+
{ path: "results.item.canceledDate" }
|
|
672
|
+
]
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
676
|
+
paths: [
|
|
677
|
+
{
|
|
678
|
+
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
682
|
+
}
|
|
683
|
+
]
|
|
684
|
+
}
|
|
685
|
+
])
|
|
686
|
+
};
|
|
687
|
+
return metadata;
|
|
688
|
+
}
|
|
689
|
+
return __bulkConfirmOrDeclineBooking;
|
|
690
|
+
}
|
|
606
691
|
function createMultiServiceBooking(payload) {
|
|
607
692
|
function __createMultiServiceBooking({ host }) {
|
|
608
693
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1060,90 +1145,6 @@ function removeBookingsFromMultiServiceBooking(payload) {
|
|
|
1060
1145
|
}
|
|
1061
1146
|
return __removeBookingsFromMultiServiceBooking;
|
|
1062
1147
|
}
|
|
1063
|
-
function confirmOrDeclineBooking(payload) {
|
|
1064
|
-
function __confirmOrDeclineBooking({ host }) {
|
|
1065
|
-
const metadata = {
|
|
1066
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
1067
|
-
method: "POST",
|
|
1068
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
1069
|
-
packageName: PACKAGE_NAME,
|
|
1070
|
-
migrationOptions: {
|
|
1071
|
-
optInTransformResponse: true
|
|
1072
|
-
},
|
|
1073
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1074
|
-
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
1075
|
-
data: payload,
|
|
1076
|
-
host
|
|
1077
|
-
}),
|
|
1078
|
-
data: payload,
|
|
1079
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
1080
|
-
{
|
|
1081
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
1082
|
-
paths: [
|
|
1083
|
-
{ path: "booking.createdDate" },
|
|
1084
|
-
{ path: "booking.startDate" },
|
|
1085
|
-
{ path: "booking.endDate" },
|
|
1086
|
-
{ path: "booking.updatedDate" },
|
|
1087
|
-
{ path: "booking.canceledDate" }
|
|
1088
|
-
]
|
|
1089
|
-
},
|
|
1090
|
-
{
|
|
1091
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
1092
|
-
paths: [
|
|
1093
|
-
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
1094
|
-
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
1095
|
-
]
|
|
1096
|
-
}
|
|
1097
|
-
])
|
|
1098
|
-
};
|
|
1099
|
-
return metadata;
|
|
1100
|
-
}
|
|
1101
|
-
return __confirmOrDeclineBooking;
|
|
1102
|
-
}
|
|
1103
|
-
function bulkConfirmOrDeclineBooking(payload) {
|
|
1104
|
-
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
1105
|
-
const metadata = {
|
|
1106
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
1107
|
-
method: "POST",
|
|
1108
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
1109
|
-
packageName: PACKAGE_NAME,
|
|
1110
|
-
migrationOptions: {
|
|
1111
|
-
optInTransformResponse: true
|
|
1112
|
-
},
|
|
1113
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1114
|
-
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
1115
|
-
data: payload,
|
|
1116
|
-
host
|
|
1117
|
-
}),
|
|
1118
|
-
data: payload,
|
|
1119
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
1120
|
-
{
|
|
1121
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
1122
|
-
paths: [
|
|
1123
|
-
{ path: "results.item.createdDate" },
|
|
1124
|
-
{ path: "results.item.startDate" },
|
|
1125
|
-
{ path: "results.item.endDate" },
|
|
1126
|
-
{ path: "results.item.updatedDate" },
|
|
1127
|
-
{ path: "results.item.canceledDate" }
|
|
1128
|
-
]
|
|
1129
|
-
},
|
|
1130
|
-
{
|
|
1131
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
1132
|
-
paths: [
|
|
1133
|
-
{
|
|
1134
|
-
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
1135
|
-
},
|
|
1136
|
-
{
|
|
1137
|
-
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
1138
|
-
}
|
|
1139
|
-
]
|
|
1140
|
-
}
|
|
1141
|
-
])
|
|
1142
|
-
};
|
|
1143
|
-
return metadata;
|
|
1144
|
-
}
|
|
1145
|
-
return __bulkConfirmOrDeclineBooking;
|
|
1146
|
-
}
|
|
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,6 +1857,64 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1835
1857
|
SortOrder2["DESC"] = "DESC";
|
|
1836
1858
|
return SortOrder2;
|
|
1837
1859
|
})(SortOrder || {});
|
|
1860
|
+
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1861
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1862
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1863
|
+
bookingId,
|
|
1864
|
+
paymentStatus: options?.paymentStatus
|
|
1865
|
+
});
|
|
1866
|
+
const reqOpts = confirmOrDeclineBooking(payload);
|
|
1867
|
+
sideEffects?.onSiteCall?.();
|
|
1868
|
+
try {
|
|
1869
|
+
const result = await httpClient.request(reqOpts);
|
|
1870
|
+
sideEffects?.onSuccess?.(result);
|
|
1871
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1872
|
+
} catch (err) {
|
|
1873
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1874
|
+
err,
|
|
1875
|
+
{
|
|
1876
|
+
spreadPathsToArguments: {},
|
|
1877
|
+
explicitPathsToArguments: {
|
|
1878
|
+
bookingId: "$[0]",
|
|
1879
|
+
paymentStatus: "$[1].paymentStatus"
|
|
1880
|
+
},
|
|
1881
|
+
singleArgumentUnchanged: false
|
|
1882
|
+
},
|
|
1883
|
+
["bookingId", "options"]
|
|
1884
|
+
);
|
|
1885
|
+
sideEffects?.onError?.(err);
|
|
1886
|
+
throw transformedError;
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
1890
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1891
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1892
|
+
details,
|
|
1893
|
+
returnEntity: options?.returnEntity
|
|
1894
|
+
});
|
|
1895
|
+
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
1896
|
+
sideEffects?.onSiteCall?.();
|
|
1897
|
+
try {
|
|
1898
|
+
const result = await httpClient.request(reqOpts);
|
|
1899
|
+
sideEffects?.onSuccess?.(result);
|
|
1900
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1901
|
+
} catch (err) {
|
|
1902
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1903
|
+
err,
|
|
1904
|
+
{
|
|
1905
|
+
spreadPathsToArguments: {},
|
|
1906
|
+
explicitPathsToArguments: {
|
|
1907
|
+
details: "$[0]",
|
|
1908
|
+
returnEntity: "$[1].returnEntity"
|
|
1909
|
+
},
|
|
1910
|
+
singleArgumentUnchanged: false
|
|
1911
|
+
},
|
|
1912
|
+
["details", "options"]
|
|
1913
|
+
);
|
|
1914
|
+
sideEffects?.onError?.(err);
|
|
1915
|
+
throw transformedError;
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1838
1918
|
async function createMultiServiceBooking2(bookings, options) {
|
|
1839
1919
|
const { httpClient, sideEffects } = arguments[2];
|
|
1840
1920
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -2196,64 +2276,6 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
|
|
|
2196
2276
|
throw transformedError;
|
|
2197
2277
|
}
|
|
2198
2278
|
}
|
|
2199
|
-
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
2200
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2201
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2202
|
-
bookingId,
|
|
2203
|
-
paymentStatus: options?.paymentStatus
|
|
2204
|
-
});
|
|
2205
|
-
const reqOpts = confirmOrDeclineBooking(payload);
|
|
2206
|
-
sideEffects?.onSiteCall?.();
|
|
2207
|
-
try {
|
|
2208
|
-
const result = await httpClient.request(reqOpts);
|
|
2209
|
-
sideEffects?.onSuccess?.(result);
|
|
2210
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2211
|
-
} catch (err) {
|
|
2212
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
2213
|
-
err,
|
|
2214
|
-
{
|
|
2215
|
-
spreadPathsToArguments: {},
|
|
2216
|
-
explicitPathsToArguments: {
|
|
2217
|
-
bookingId: "$[0]",
|
|
2218
|
-
paymentStatus: "$[1].paymentStatus"
|
|
2219
|
-
},
|
|
2220
|
-
singleArgumentUnchanged: false
|
|
2221
|
-
},
|
|
2222
|
-
["bookingId", "options"]
|
|
2223
|
-
);
|
|
2224
|
-
sideEffects?.onError?.(err);
|
|
2225
|
-
throw transformedError;
|
|
2226
|
-
}
|
|
2227
|
-
}
|
|
2228
|
-
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
2229
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2230
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2231
|
-
details,
|
|
2232
|
-
returnEntity: options?.returnEntity
|
|
2233
|
-
});
|
|
2234
|
-
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
2235
|
-
sideEffects?.onSiteCall?.();
|
|
2236
|
-
try {
|
|
2237
|
-
const result = await httpClient.request(reqOpts);
|
|
2238
|
-
sideEffects?.onSuccess?.(result);
|
|
2239
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2240
|
-
} catch (err) {
|
|
2241
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
2242
|
-
err,
|
|
2243
|
-
{
|
|
2244
|
-
spreadPathsToArguments: {},
|
|
2245
|
-
explicitPathsToArguments: {
|
|
2246
|
-
details: "$[0]",
|
|
2247
|
-
returnEntity: "$[1].returnEntity"
|
|
2248
|
-
},
|
|
2249
|
-
singleArgumentUnchanged: false
|
|
2250
|
-
},
|
|
2251
|
-
["details", "options"]
|
|
2252
|
-
);
|
|
2253
|
-
sideEffects?.onError?.(err);
|
|
2254
|
-
throw transformedError;
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
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,8 +2749,49 @@ 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
|
|
2779
|
+
function confirmOrDeclineBooking3(httpClient) {
|
|
2780
|
+
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2781
|
+
bookingId,
|
|
2782
|
+
options,
|
|
2783
|
+
// @ts-ignore
|
|
2784
|
+
{ httpClient }
|
|
2785
|
+
);
|
|
2786
|
+
}
|
|
2787
|
+
function bulkConfirmOrDeclineBooking3(httpClient) {
|
|
2788
|
+
return (details, options) => bulkConfirmOrDeclineBooking2(
|
|
2789
|
+
details,
|
|
2790
|
+
options,
|
|
2791
|
+
// @ts-ignore
|
|
2792
|
+
{ httpClient }
|
|
2793
|
+
);
|
|
2794
|
+
}
|
|
2732
2795
|
function createMultiServiceBooking3(httpClient) {
|
|
2733
2796
|
return (bookings, options) => createMultiServiceBooking2(
|
|
2734
2797
|
bookings,
|
|
@@ -2815,22 +2878,6 @@ function removeBookingsFromMultiServiceBooking3(httpClient) {
|
|
|
2815
2878
|
{ httpClient }
|
|
2816
2879
|
);
|
|
2817
2880
|
}
|
|
2818
|
-
function confirmOrDeclineBooking3(httpClient) {
|
|
2819
|
-
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2820
|
-
bookingId,
|
|
2821
|
-
options,
|
|
2822
|
-
// @ts-ignore
|
|
2823
|
-
{ httpClient }
|
|
2824
|
-
);
|
|
2825
|
-
}
|
|
2826
|
-
function bulkConfirmOrDeclineBooking3(httpClient) {
|
|
2827
|
-
return (details, options) => bulkConfirmOrDeclineBooking2(
|
|
2828
|
-
details,
|
|
2829
|
-
options,
|
|
2830
|
-
// @ts-ignore
|
|
2831
|
-
{ httpClient }
|
|
2832
|
-
);
|
|
2833
|
-
}
|
|
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,6 +3257,8 @@ 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");
|
|
3260
|
+
var confirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(confirmOrDeclineBooking3);
|
|
3261
|
+
var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkConfirmOrDeclineBooking3);
|
|
3206
3262
|
var createMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createMultiServiceBooking3);
|
|
3207
3263
|
var rescheduleMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(rescheduleMultiServiceBooking3);
|
|
3208
3264
|
var getMultiServiceBookingAvailability4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMultiServiceBookingAvailability3);
|
|
@@ -3216,8 +3272,6 @@ var bulkGetMultiServiceBookingAllowedActions4 = /* @__PURE__ */ (0, import_rest_
|
|
|
3216
3272
|
var getMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMultiServiceBooking3);
|
|
3217
3273
|
var addBookingsToMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addBookingsToMultiServiceBooking3);
|
|
3218
3274
|
var removeBookingsFromMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeBookingsFromMultiServiceBooking3);
|
|
3219
|
-
var confirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(confirmOrDeclineBooking3);
|
|
3220
|
-
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,
|