@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
|
@@ -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,6 +384,57 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
|
|
|
383
384
|
};
|
|
384
385
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
385
386
|
}
|
|
387
|
+
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
388
|
+
const domainToMappings = {
|
|
389
|
+
"www.wixapis.com": [
|
|
390
|
+
{
|
|
391
|
+
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
392
|
+
destPath: "/v2/bookings/confirmation"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
srcPath: "/bookings/v2/confirmation",
|
|
396
|
+
destPath: "/v2/confirmation"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
srcPath: "/bookings/v2/bulk/confirmation",
|
|
400
|
+
destPath: "/v2/bulk/confirmation"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
404
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
408
|
+
destPath: "/v2/bulk/confirmation"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
412
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
"*.dev.wix-code.com": [
|
|
416
|
+
{
|
|
417
|
+
srcPath: "/bookings/v2/confirmation",
|
|
418
|
+
destPath: "/v2/confirmation"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
422
|
+
destPath: "/v2/bulk/bookings"
|
|
423
|
+
}
|
|
424
|
+
],
|
|
425
|
+
_: [
|
|
426
|
+
{
|
|
427
|
+
srcPath: "/bookings/v2/confirmation",
|
|
428
|
+
destPath: "/v2/confirmation"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
432
|
+
destPath: "/v2/bulk/bookings"
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
};
|
|
436
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
437
|
+
}
|
|
386
438
|
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
387
439
|
const domainToMappings = {
|
|
388
440
|
_: [
|
|
@@ -536,142 +588,7 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
|
536
588
|
};
|
|
537
589
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
538
590
|
}
|
|
539
|
-
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
540
|
-
const domainToMappings = {
|
|
541
|
-
"www.wixapis.com": [
|
|
542
|
-
{
|
|
543
|
-
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
544
|
-
destPath: "/v2/bookings/confirmation"
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
srcPath: "/bookings/v2/confirmation",
|
|
548
|
-
destPath: "/v2/confirmation"
|
|
549
|
-
},
|
|
550
|
-
{
|
|
551
|
-
srcPath: "/bookings/v2/bulk/confirmation",
|
|
552
|
-
destPath: "/v2/bulk/confirmation"
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
556
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
560
|
-
destPath: "/v2/bulk/confirmation"
|
|
561
|
-
},
|
|
562
|
-
{
|
|
563
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
564
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
565
|
-
}
|
|
566
|
-
],
|
|
567
|
-
"*.dev.wix-code.com": [
|
|
568
|
-
{
|
|
569
|
-
srcPath: "/bookings/v2/confirmation",
|
|
570
|
-
destPath: "/v2/confirmation"
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
574
|
-
destPath: "/v2/bulk/bookings"
|
|
575
|
-
}
|
|
576
|
-
],
|
|
577
|
-
_: [
|
|
578
|
-
{
|
|
579
|
-
srcPath: "/bookings/v2/confirmation",
|
|
580
|
-
destPath: "/v2/confirmation"
|
|
581
|
-
},
|
|
582
|
-
{
|
|
583
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
584
|
-
destPath: "/v2/bulk/bookings"
|
|
585
|
-
}
|
|
586
|
-
]
|
|
587
|
-
};
|
|
588
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
589
|
-
}
|
|
590
591
|
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
|
|
591
|
-
function confirmOrDeclineBooking(payload) {
|
|
592
|
-
function __confirmOrDeclineBooking({ host }) {
|
|
593
|
-
const metadata = {
|
|
594
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
595
|
-
method: "POST",
|
|
596
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
597
|
-
packageName: PACKAGE_NAME,
|
|
598
|
-
migrationOptions: {
|
|
599
|
-
optInTransformResponse: true
|
|
600
|
-
},
|
|
601
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
602
|
-
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
603
|
-
data: payload,
|
|
604
|
-
host
|
|
605
|
-
}),
|
|
606
|
-
data: payload,
|
|
607
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
608
|
-
{
|
|
609
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
610
|
-
paths: [
|
|
611
|
-
{ path: "booking.createdDate" },
|
|
612
|
-
{ path: "booking.startDate" },
|
|
613
|
-
{ path: "booking.endDate" },
|
|
614
|
-
{ path: "booking.updatedDate" },
|
|
615
|
-
{ path: "booking.canceledDate" }
|
|
616
|
-
]
|
|
617
|
-
},
|
|
618
|
-
{
|
|
619
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
620
|
-
paths: [
|
|
621
|
-
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
622
|
-
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
623
|
-
]
|
|
624
|
-
}
|
|
625
|
-
])
|
|
626
|
-
};
|
|
627
|
-
return metadata;
|
|
628
|
-
}
|
|
629
|
-
return __confirmOrDeclineBooking;
|
|
630
|
-
}
|
|
631
|
-
function bulkConfirmOrDeclineBooking(payload) {
|
|
632
|
-
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
633
|
-
const metadata = {
|
|
634
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
635
|
-
method: "POST",
|
|
636
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
637
|
-
packageName: PACKAGE_NAME,
|
|
638
|
-
migrationOptions: {
|
|
639
|
-
optInTransformResponse: true
|
|
640
|
-
},
|
|
641
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
642
|
-
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
643
|
-
data: payload,
|
|
644
|
-
host
|
|
645
|
-
}),
|
|
646
|
-
data: payload,
|
|
647
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
648
|
-
{
|
|
649
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
650
|
-
paths: [
|
|
651
|
-
{ path: "results.item.createdDate" },
|
|
652
|
-
{ path: "results.item.startDate" },
|
|
653
|
-
{ path: "results.item.endDate" },
|
|
654
|
-
{ path: "results.item.updatedDate" },
|
|
655
|
-
{ path: "results.item.canceledDate" }
|
|
656
|
-
]
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
660
|
-
paths: [
|
|
661
|
-
{
|
|
662
|
-
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
666
|
-
}
|
|
667
|
-
]
|
|
668
|
-
}
|
|
669
|
-
])
|
|
670
|
-
};
|
|
671
|
-
return metadata;
|
|
672
|
-
}
|
|
673
|
-
return __bulkConfirmOrDeclineBooking;
|
|
674
|
-
}
|
|
675
592
|
function createMultiServiceBooking(payload) {
|
|
676
593
|
function __createMultiServiceBooking({ host }) {
|
|
677
594
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1129,6 +1046,90 @@ function removeBookingsFromMultiServiceBooking(payload) {
|
|
|
1129
1046
|
}
|
|
1130
1047
|
return __removeBookingsFromMultiServiceBooking;
|
|
1131
1048
|
}
|
|
1049
|
+
function confirmOrDeclineBooking(payload) {
|
|
1050
|
+
function __confirmOrDeclineBooking({ host }) {
|
|
1051
|
+
const metadata = {
|
|
1052
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1053
|
+
method: "POST",
|
|
1054
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
1055
|
+
packageName: PACKAGE_NAME,
|
|
1056
|
+
migrationOptions: {
|
|
1057
|
+
optInTransformResponse: true
|
|
1058
|
+
},
|
|
1059
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1060
|
+
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
1061
|
+
data: payload,
|
|
1062
|
+
host
|
|
1063
|
+
}),
|
|
1064
|
+
data: payload,
|
|
1065
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
1066
|
+
{
|
|
1067
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
1068
|
+
paths: [
|
|
1069
|
+
{ path: "booking.createdDate" },
|
|
1070
|
+
{ path: "booking.startDate" },
|
|
1071
|
+
{ path: "booking.endDate" },
|
|
1072
|
+
{ path: "booking.updatedDate" },
|
|
1073
|
+
{ path: "booking.canceledDate" }
|
|
1074
|
+
]
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
1078
|
+
paths: [
|
|
1079
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
1080
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
1081
|
+
]
|
|
1082
|
+
}
|
|
1083
|
+
])
|
|
1084
|
+
};
|
|
1085
|
+
return metadata;
|
|
1086
|
+
}
|
|
1087
|
+
return __confirmOrDeclineBooking;
|
|
1088
|
+
}
|
|
1089
|
+
function bulkConfirmOrDeclineBooking(payload) {
|
|
1090
|
+
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
1091
|
+
const metadata = {
|
|
1092
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1093
|
+
method: "POST",
|
|
1094
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
1095
|
+
packageName: PACKAGE_NAME,
|
|
1096
|
+
migrationOptions: {
|
|
1097
|
+
optInTransformResponse: true
|
|
1098
|
+
},
|
|
1099
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1100
|
+
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
1101
|
+
data: payload,
|
|
1102
|
+
host
|
|
1103
|
+
}),
|
|
1104
|
+
data: payload,
|
|
1105
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
1106
|
+
{
|
|
1107
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
1108
|
+
paths: [
|
|
1109
|
+
{ path: "results.item.createdDate" },
|
|
1110
|
+
{ path: "results.item.startDate" },
|
|
1111
|
+
{ path: "results.item.endDate" },
|
|
1112
|
+
{ path: "results.item.updatedDate" },
|
|
1113
|
+
{ path: "results.item.canceledDate" }
|
|
1114
|
+
]
|
|
1115
|
+
},
|
|
1116
|
+
{
|
|
1117
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
1118
|
+
paths: [
|
|
1119
|
+
{
|
|
1120
|
+
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
1124
|
+
}
|
|
1125
|
+
]
|
|
1126
|
+
}
|
|
1127
|
+
])
|
|
1128
|
+
};
|
|
1129
|
+
return metadata;
|
|
1130
|
+
}
|
|
1131
|
+
return __bulkConfirmOrDeclineBooking;
|
|
1132
|
+
}
|
|
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,64 +1842,6 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1820
1842
|
SortOrder2["DESC"] = "DESC";
|
|
1821
1843
|
return SortOrder2;
|
|
1822
1844
|
})(SortOrder || {});
|
|
1823
|
-
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1824
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1825
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1826
|
-
bookingId,
|
|
1827
|
-
paymentStatus: options?.paymentStatus
|
|
1828
|
-
});
|
|
1829
|
-
const reqOpts = confirmOrDeclineBooking(payload);
|
|
1830
|
-
sideEffects?.onSiteCall?.();
|
|
1831
|
-
try {
|
|
1832
|
-
const result = await httpClient.request(reqOpts);
|
|
1833
|
-
sideEffects?.onSuccess?.(result);
|
|
1834
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1835
|
-
} catch (err) {
|
|
1836
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1837
|
-
err,
|
|
1838
|
-
{
|
|
1839
|
-
spreadPathsToArguments: {},
|
|
1840
|
-
explicitPathsToArguments: {
|
|
1841
|
-
bookingId: "$[0]",
|
|
1842
|
-
paymentStatus: "$[1].paymentStatus"
|
|
1843
|
-
},
|
|
1844
|
-
singleArgumentUnchanged: false
|
|
1845
|
-
},
|
|
1846
|
-
["bookingId", "options"]
|
|
1847
|
-
);
|
|
1848
|
-
sideEffects?.onError?.(err);
|
|
1849
|
-
throw transformedError;
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
1853
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1854
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1855
|
-
details,
|
|
1856
|
-
returnEntity: options?.returnEntity
|
|
1857
|
-
});
|
|
1858
|
-
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
1859
|
-
sideEffects?.onSiteCall?.();
|
|
1860
|
-
try {
|
|
1861
|
-
const result = await httpClient.request(reqOpts);
|
|
1862
|
-
sideEffects?.onSuccess?.(result);
|
|
1863
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1864
|
-
} catch (err) {
|
|
1865
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1866
|
-
err,
|
|
1867
|
-
{
|
|
1868
|
-
spreadPathsToArguments: {},
|
|
1869
|
-
explicitPathsToArguments: {
|
|
1870
|
-
details: "$[0]",
|
|
1871
|
-
returnEntity: "$[1].returnEntity"
|
|
1872
|
-
},
|
|
1873
|
-
singleArgumentUnchanged: false
|
|
1874
|
-
},
|
|
1875
|
-
["details", "options"]
|
|
1876
|
-
);
|
|
1877
|
-
sideEffects?.onError?.(err);
|
|
1878
|
-
throw transformedError;
|
|
1879
|
-
}
|
|
1880
|
-
}
|
|
1881
1845
|
async function createMultiServiceBooking2(bookings, options) {
|
|
1882
1846
|
const { httpClient, sideEffects } = arguments[2];
|
|
1883
1847
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -2239,6 +2203,64 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
|
|
|
2239
2203
|
throw transformedError;
|
|
2240
2204
|
}
|
|
2241
2205
|
}
|
|
2206
|
+
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
2207
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2208
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2209
|
+
bookingId,
|
|
2210
|
+
paymentStatus: options?.paymentStatus
|
|
2211
|
+
});
|
|
2212
|
+
const reqOpts = confirmOrDeclineBooking(payload);
|
|
2213
|
+
sideEffects?.onSiteCall?.();
|
|
2214
|
+
try {
|
|
2215
|
+
const result = await httpClient.request(reqOpts);
|
|
2216
|
+
sideEffects?.onSuccess?.(result);
|
|
2217
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2218
|
+
} catch (err) {
|
|
2219
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
2220
|
+
err,
|
|
2221
|
+
{
|
|
2222
|
+
spreadPathsToArguments: {},
|
|
2223
|
+
explicitPathsToArguments: {
|
|
2224
|
+
bookingId: "$[0]",
|
|
2225
|
+
paymentStatus: "$[1].paymentStatus"
|
|
2226
|
+
},
|
|
2227
|
+
singleArgumentUnchanged: false
|
|
2228
|
+
},
|
|
2229
|
+
["bookingId", "options"]
|
|
2230
|
+
);
|
|
2231
|
+
sideEffects?.onError?.(err);
|
|
2232
|
+
throw transformedError;
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
2236
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2237
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2238
|
+
details,
|
|
2239
|
+
returnEntity: options?.returnEntity
|
|
2240
|
+
});
|
|
2241
|
+
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
2242
|
+
sideEffects?.onSiteCall?.();
|
|
2243
|
+
try {
|
|
2244
|
+
const result = await httpClient.request(reqOpts);
|
|
2245
|
+
sideEffects?.onSuccess?.(result);
|
|
2246
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2247
|
+
} catch (err) {
|
|
2248
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
2249
|
+
err,
|
|
2250
|
+
{
|
|
2251
|
+
spreadPathsToArguments: {},
|
|
2252
|
+
explicitPathsToArguments: {
|
|
2253
|
+
details: "$[0]",
|
|
2254
|
+
returnEntity: "$[1].returnEntity"
|
|
2255
|
+
},
|
|
2256
|
+
singleArgumentUnchanged: false
|
|
2257
|
+
},
|
|
2258
|
+
["details", "options"]
|
|
2259
|
+
);
|
|
2260
|
+
sideEffects?.onError?.(err);
|
|
2261
|
+
throw transformedError;
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
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,
|