@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
|
@@ -53,6 +53,7 @@ __export(index_typings_exports, {
|
|
|
53
53
|
getBookingAnonymously: () => getBookingAnonymously2,
|
|
54
54
|
getMultiServiceBooking: () => getMultiServiceBooking2,
|
|
55
55
|
getMultiServiceBookingAvailability: () => getMultiServiceBookingAvailability2,
|
|
56
|
+
getSchedulingUrl: () => getSchedulingUrl2,
|
|
56
57
|
markBookingAsPending: () => markBookingAsPending2,
|
|
57
58
|
markMultiServiceBookingAsPending: () => markMultiServiceBookingAsPending2,
|
|
58
59
|
removeBookingsFromMultiServiceBooking: () => removeBookingsFromMultiServiceBooking2,
|
|
@@ -383,57 +384,6 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
|
|
|
383
384
|
};
|
|
384
385
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
385
386
|
}
|
|
386
|
-
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
387
|
-
const domainToMappings = {
|
|
388
|
-
"www.wixapis.com": [
|
|
389
|
-
{
|
|
390
|
-
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
391
|
-
destPath: "/v2/bookings/confirmation"
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
srcPath: "/bookings/v2/confirmation",
|
|
395
|
-
destPath: "/v2/confirmation"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
srcPath: "/bookings/v2/bulk/confirmation",
|
|
399
|
-
destPath: "/v2/bulk/confirmation"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
403
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
407
|
-
destPath: "/v2/bulk/confirmation"
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
411
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
412
|
-
}
|
|
413
|
-
],
|
|
414
|
-
"*.dev.wix-code.com": [
|
|
415
|
-
{
|
|
416
|
-
srcPath: "/bookings/v2/confirmation",
|
|
417
|
-
destPath: "/v2/confirmation"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
421
|
-
destPath: "/v2/bulk/bookings"
|
|
422
|
-
}
|
|
423
|
-
],
|
|
424
|
-
_: [
|
|
425
|
-
{
|
|
426
|
-
srcPath: "/bookings/v2/confirmation",
|
|
427
|
-
destPath: "/v2/confirmation"
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
431
|
-
destPath: "/v2/bulk/bookings"
|
|
432
|
-
}
|
|
433
|
-
]
|
|
434
|
-
};
|
|
435
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
436
|
-
}
|
|
437
387
|
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
438
388
|
const domainToMappings = {
|
|
439
389
|
_: [
|
|
@@ -587,7 +537,142 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
|
587
537
|
};
|
|
588
538
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
589
539
|
}
|
|
540
|
+
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
541
|
+
const domainToMappings = {
|
|
542
|
+
"www.wixapis.com": [
|
|
543
|
+
{
|
|
544
|
+
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
545
|
+
destPath: "/v2/bookings/confirmation"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
srcPath: "/bookings/v2/confirmation",
|
|
549
|
+
destPath: "/v2/confirmation"
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
srcPath: "/bookings/v2/bulk/confirmation",
|
|
553
|
+
destPath: "/v2/bulk/confirmation"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
557
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
561
|
+
destPath: "/v2/bulk/confirmation"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
565
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
566
|
+
}
|
|
567
|
+
],
|
|
568
|
+
"*.dev.wix-code.com": [
|
|
569
|
+
{
|
|
570
|
+
srcPath: "/bookings/v2/confirmation",
|
|
571
|
+
destPath: "/v2/confirmation"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
575
|
+
destPath: "/v2/bulk/bookings"
|
|
576
|
+
}
|
|
577
|
+
],
|
|
578
|
+
_: [
|
|
579
|
+
{
|
|
580
|
+
srcPath: "/bookings/v2/confirmation",
|
|
581
|
+
destPath: "/v2/confirmation"
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
585
|
+
destPath: "/v2/bulk/bookings"
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
};
|
|
589
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
590
|
+
}
|
|
590
591
|
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
|
|
592
|
+
function confirmOrDeclineBooking(payload) {
|
|
593
|
+
function __confirmOrDeclineBooking({ host }) {
|
|
594
|
+
const metadata = {
|
|
595
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
596
|
+
method: "POST",
|
|
597
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
598
|
+
packageName: PACKAGE_NAME,
|
|
599
|
+
migrationOptions: {
|
|
600
|
+
optInTransformResponse: true
|
|
601
|
+
},
|
|
602
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
603
|
+
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
604
|
+
data: payload,
|
|
605
|
+
host
|
|
606
|
+
}),
|
|
607
|
+
data: payload,
|
|
608
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
609
|
+
{
|
|
610
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
611
|
+
paths: [
|
|
612
|
+
{ path: "booking.createdDate" },
|
|
613
|
+
{ path: "booking.startDate" },
|
|
614
|
+
{ path: "booking.endDate" },
|
|
615
|
+
{ path: "booking.updatedDate" },
|
|
616
|
+
{ path: "booking.canceledDate" }
|
|
617
|
+
]
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
621
|
+
paths: [
|
|
622
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
623
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
624
|
+
]
|
|
625
|
+
}
|
|
626
|
+
])
|
|
627
|
+
};
|
|
628
|
+
return metadata;
|
|
629
|
+
}
|
|
630
|
+
return __confirmOrDeclineBooking;
|
|
631
|
+
}
|
|
632
|
+
function bulkConfirmOrDeclineBooking(payload) {
|
|
633
|
+
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
634
|
+
const metadata = {
|
|
635
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
636
|
+
method: "POST",
|
|
637
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
638
|
+
packageName: PACKAGE_NAME,
|
|
639
|
+
migrationOptions: {
|
|
640
|
+
optInTransformResponse: true
|
|
641
|
+
},
|
|
642
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
643
|
+
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
644
|
+
data: payload,
|
|
645
|
+
host
|
|
646
|
+
}),
|
|
647
|
+
data: payload,
|
|
648
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
649
|
+
{
|
|
650
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
651
|
+
paths: [
|
|
652
|
+
{ path: "results.item.createdDate" },
|
|
653
|
+
{ path: "results.item.startDate" },
|
|
654
|
+
{ path: "results.item.endDate" },
|
|
655
|
+
{ path: "results.item.updatedDate" },
|
|
656
|
+
{ path: "results.item.canceledDate" }
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
661
|
+
paths: [
|
|
662
|
+
{
|
|
663
|
+
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
667
|
+
}
|
|
668
|
+
]
|
|
669
|
+
}
|
|
670
|
+
])
|
|
671
|
+
};
|
|
672
|
+
return metadata;
|
|
673
|
+
}
|
|
674
|
+
return __bulkConfirmOrDeclineBooking;
|
|
675
|
+
}
|
|
591
676
|
function createMultiServiceBooking(payload) {
|
|
592
677
|
function __createMultiServiceBooking({ host }) {
|
|
593
678
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1045,90 +1130,6 @@ function removeBookingsFromMultiServiceBooking(payload) {
|
|
|
1045
1130
|
}
|
|
1046
1131
|
return __removeBookingsFromMultiServiceBooking;
|
|
1047
1132
|
}
|
|
1048
|
-
function confirmOrDeclineBooking(payload) {
|
|
1049
|
-
function __confirmOrDeclineBooking({ host }) {
|
|
1050
|
-
const metadata = {
|
|
1051
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
1052
|
-
method: "POST",
|
|
1053
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
1054
|
-
packageName: PACKAGE_NAME,
|
|
1055
|
-
migrationOptions: {
|
|
1056
|
-
optInTransformResponse: true
|
|
1057
|
-
},
|
|
1058
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1059
|
-
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
1060
|
-
data: payload,
|
|
1061
|
-
host
|
|
1062
|
-
}),
|
|
1063
|
-
data: payload,
|
|
1064
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
1065
|
-
{
|
|
1066
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
1067
|
-
paths: [
|
|
1068
|
-
{ path: "booking.createdDate" },
|
|
1069
|
-
{ path: "booking.startDate" },
|
|
1070
|
-
{ path: "booking.endDate" },
|
|
1071
|
-
{ path: "booking.updatedDate" },
|
|
1072
|
-
{ path: "booking.canceledDate" }
|
|
1073
|
-
]
|
|
1074
|
-
},
|
|
1075
|
-
{
|
|
1076
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
1077
|
-
paths: [
|
|
1078
|
-
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
1079
|
-
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
1080
|
-
]
|
|
1081
|
-
}
|
|
1082
|
-
])
|
|
1083
|
-
};
|
|
1084
|
-
return metadata;
|
|
1085
|
-
}
|
|
1086
|
-
return __confirmOrDeclineBooking;
|
|
1087
|
-
}
|
|
1088
|
-
function bulkConfirmOrDeclineBooking(payload) {
|
|
1089
|
-
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
1090
|
-
const metadata = {
|
|
1091
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
1092
|
-
method: "POST",
|
|
1093
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
1094
|
-
packageName: PACKAGE_NAME,
|
|
1095
|
-
migrationOptions: {
|
|
1096
|
-
optInTransformResponse: true
|
|
1097
|
-
},
|
|
1098
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1099
|
-
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
1100
|
-
data: payload,
|
|
1101
|
-
host
|
|
1102
|
-
}),
|
|
1103
|
-
data: payload,
|
|
1104
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
1105
|
-
{
|
|
1106
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
1107
|
-
paths: [
|
|
1108
|
-
{ path: "results.item.createdDate" },
|
|
1109
|
-
{ path: "results.item.startDate" },
|
|
1110
|
-
{ path: "results.item.endDate" },
|
|
1111
|
-
{ path: "results.item.updatedDate" },
|
|
1112
|
-
{ path: "results.item.canceledDate" }
|
|
1113
|
-
]
|
|
1114
|
-
},
|
|
1115
|
-
{
|
|
1116
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
1117
|
-
paths: [
|
|
1118
|
-
{
|
|
1119
|
-
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
1120
|
-
},
|
|
1121
|
-
{
|
|
1122
|
-
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
1123
|
-
}
|
|
1124
|
-
]
|
|
1125
|
-
}
|
|
1126
|
-
])
|
|
1127
|
-
};
|
|
1128
|
-
return metadata;
|
|
1129
|
-
}
|
|
1130
|
-
return __bulkConfirmOrDeclineBooking;
|
|
1131
|
-
}
|
|
1132
1133
|
function createBooking(payload) {
|
|
1133
1134
|
function __createBooking({ host }) {
|
|
1134
1135
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1718,6 +1719,27 @@ function getBookingAnonymously(payload) {
|
|
|
1718
1719
|
}
|
|
1719
1720
|
return __getBookingAnonymously;
|
|
1720
1721
|
}
|
|
1722
|
+
function getSchedulingUrl(payload) {
|
|
1723
|
+
function __getSchedulingUrl({ host }) {
|
|
1724
|
+
const metadata = {
|
|
1725
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1726
|
+
method: "GET",
|
|
1727
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.AnonymousBookingActions.GetSchedulingUrl",
|
|
1728
|
+
packageName: PACKAGE_NAME,
|
|
1729
|
+
migrationOptions: {
|
|
1730
|
+
optInTransformResponse: true
|
|
1731
|
+
},
|
|
1732
|
+
url: resolveComWixpressBookingsBookingsV2AnonymousBookingActionsUrl({
|
|
1733
|
+
protoPath: "/v2/bookings/scheduling-url",
|
|
1734
|
+
data: payload,
|
|
1735
|
+
host
|
|
1736
|
+
}),
|
|
1737
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
1738
|
+
};
|
|
1739
|
+
return metadata;
|
|
1740
|
+
}
|
|
1741
|
+
return __getSchedulingUrl;
|
|
1742
|
+
}
|
|
1721
1743
|
|
|
1722
1744
|
// src/bookings-v2-booking-bookings.universal.ts
|
|
1723
1745
|
var MultiServiceBookingType = /* @__PURE__ */ ((MultiServiceBookingType2) => {
|
|
@@ -1820,6 +1842,64 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1820
1842
|
SortOrder2["DESC"] = "DESC";
|
|
1821
1843
|
return SortOrder2;
|
|
1822
1844
|
})(SortOrder || {});
|
|
1845
|
+
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1846
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1847
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1848
|
+
bookingId,
|
|
1849
|
+
paymentStatus: options?.paymentStatus
|
|
1850
|
+
});
|
|
1851
|
+
const reqOpts = confirmOrDeclineBooking(payload);
|
|
1852
|
+
sideEffects?.onSiteCall?.();
|
|
1853
|
+
try {
|
|
1854
|
+
const result = await httpClient.request(reqOpts);
|
|
1855
|
+
sideEffects?.onSuccess?.(result);
|
|
1856
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1857
|
+
} catch (err) {
|
|
1858
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1859
|
+
err,
|
|
1860
|
+
{
|
|
1861
|
+
spreadPathsToArguments: {},
|
|
1862
|
+
explicitPathsToArguments: {
|
|
1863
|
+
bookingId: "$[0]",
|
|
1864
|
+
paymentStatus: "$[1].paymentStatus"
|
|
1865
|
+
},
|
|
1866
|
+
singleArgumentUnchanged: false
|
|
1867
|
+
},
|
|
1868
|
+
["bookingId", "options"]
|
|
1869
|
+
);
|
|
1870
|
+
sideEffects?.onError?.(err);
|
|
1871
|
+
throw transformedError;
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
1875
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1876
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1877
|
+
details,
|
|
1878
|
+
returnEntity: options?.returnEntity
|
|
1879
|
+
});
|
|
1880
|
+
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
1881
|
+
sideEffects?.onSiteCall?.();
|
|
1882
|
+
try {
|
|
1883
|
+
const result = await httpClient.request(reqOpts);
|
|
1884
|
+
sideEffects?.onSuccess?.(result);
|
|
1885
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1886
|
+
} catch (err) {
|
|
1887
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1888
|
+
err,
|
|
1889
|
+
{
|
|
1890
|
+
spreadPathsToArguments: {},
|
|
1891
|
+
explicitPathsToArguments: {
|
|
1892
|
+
details: "$[0]",
|
|
1893
|
+
returnEntity: "$[1].returnEntity"
|
|
1894
|
+
},
|
|
1895
|
+
singleArgumentUnchanged: false
|
|
1896
|
+
},
|
|
1897
|
+
["details", "options"]
|
|
1898
|
+
);
|
|
1899
|
+
sideEffects?.onError?.(err);
|
|
1900
|
+
throw transformedError;
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1823
1903
|
async function createMultiServiceBooking2(bookings, options) {
|
|
1824
1904
|
const { httpClient, sideEffects } = arguments[2];
|
|
1825
1905
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -2181,64 +2261,6 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
|
|
|
2181
2261
|
throw transformedError;
|
|
2182
2262
|
}
|
|
2183
2263
|
}
|
|
2184
|
-
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
2185
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2186
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2187
|
-
bookingId,
|
|
2188
|
-
paymentStatus: options?.paymentStatus
|
|
2189
|
-
});
|
|
2190
|
-
const reqOpts = confirmOrDeclineBooking(payload);
|
|
2191
|
-
sideEffects?.onSiteCall?.();
|
|
2192
|
-
try {
|
|
2193
|
-
const result = await httpClient.request(reqOpts);
|
|
2194
|
-
sideEffects?.onSuccess?.(result);
|
|
2195
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2196
|
-
} catch (err) {
|
|
2197
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
2198
|
-
err,
|
|
2199
|
-
{
|
|
2200
|
-
spreadPathsToArguments: {},
|
|
2201
|
-
explicitPathsToArguments: {
|
|
2202
|
-
bookingId: "$[0]",
|
|
2203
|
-
paymentStatus: "$[1].paymentStatus"
|
|
2204
|
-
},
|
|
2205
|
-
singleArgumentUnchanged: false
|
|
2206
|
-
},
|
|
2207
|
-
["bookingId", "options"]
|
|
2208
|
-
);
|
|
2209
|
-
sideEffects?.onError?.(err);
|
|
2210
|
-
throw transformedError;
|
|
2211
|
-
}
|
|
2212
|
-
}
|
|
2213
|
-
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
2214
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2215
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2216
|
-
details,
|
|
2217
|
-
returnEntity: options?.returnEntity
|
|
2218
|
-
});
|
|
2219
|
-
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
2220
|
-
sideEffects?.onSiteCall?.();
|
|
2221
|
-
try {
|
|
2222
|
-
const result = await httpClient.request(reqOpts);
|
|
2223
|
-
sideEffects?.onSuccess?.(result);
|
|
2224
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2225
|
-
} catch (err) {
|
|
2226
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
2227
|
-
err,
|
|
2228
|
-
{
|
|
2229
|
-
spreadPathsToArguments: {},
|
|
2230
|
-
explicitPathsToArguments: {
|
|
2231
|
-
details: "$[0]",
|
|
2232
|
-
returnEntity: "$[1].returnEntity"
|
|
2233
|
-
},
|
|
2234
|
-
singleArgumentUnchanged: false
|
|
2235
|
-
},
|
|
2236
|
-
["details", "options"]
|
|
2237
|
-
);
|
|
2238
|
-
sideEffects?.onError?.(err);
|
|
2239
|
-
throw transformedError;
|
|
2240
|
-
}
|
|
2241
|
-
}
|
|
2242
2264
|
async function createBooking2(booking, options) {
|
|
2243
2265
|
const { httpClient, sideEffects } = arguments[2];
|
|
2244
2266
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -2712,6 +2734,31 @@ async function getBookingAnonymously2(token) {
|
|
|
2712
2734
|
throw transformedError;
|
|
2713
2735
|
}
|
|
2714
2736
|
}
|
|
2737
|
+
async function getSchedulingUrl2(serviceId) {
|
|
2738
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2739
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2740
|
+
serviceId
|
|
2741
|
+
});
|
|
2742
|
+
const reqOpts = getSchedulingUrl(payload);
|
|
2743
|
+
sideEffects?.onSiteCall?.();
|
|
2744
|
+
try {
|
|
2745
|
+
const result = await httpClient.request(reqOpts);
|
|
2746
|
+
sideEffects?.onSuccess?.(result);
|
|
2747
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2748
|
+
} catch (err) {
|
|
2749
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
2750
|
+
err,
|
|
2751
|
+
{
|
|
2752
|
+
spreadPathsToArguments: {},
|
|
2753
|
+
explicitPathsToArguments: { serviceId: "$[0]" },
|
|
2754
|
+
singleArgumentUnchanged: false
|
|
2755
|
+
},
|
|
2756
|
+
["serviceId"]
|
|
2757
|
+
);
|
|
2758
|
+
sideEffects?.onError?.(err);
|
|
2759
|
+
throw transformedError;
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2715
2762
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2716
2763
|
0 && (module.exports = {
|
|
2717
2764
|
Actor,
|
|
@@ -2747,6 +2794,7 @@ async function getBookingAnonymously2(token) {
|
|
|
2747
2794
|
getBookingAnonymously,
|
|
2748
2795
|
getMultiServiceBooking,
|
|
2749
2796
|
getMultiServiceBookingAvailability,
|
|
2797
|
+
getSchedulingUrl,
|
|
2750
2798
|
markBookingAsPending,
|
|
2751
2799
|
markMultiServiceBookingAsPending,
|
|
2752
2800
|
removeBookingsFromMultiServiceBooking,
|