@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
|
@@ -319,6 +319,57 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
|
|
|
319
319
|
};
|
|
320
320
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
321
321
|
}
|
|
322
|
+
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
323
|
+
const domainToMappings = {
|
|
324
|
+
"www.wixapis.com": [
|
|
325
|
+
{
|
|
326
|
+
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
327
|
+
destPath: "/v2/bookings/confirmation"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
srcPath: "/bookings/v2/confirmation",
|
|
331
|
+
destPath: "/v2/confirmation"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
srcPath: "/bookings/v2/bulk/confirmation",
|
|
335
|
+
destPath: "/v2/bulk/confirmation"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
339
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
343
|
+
destPath: "/v2/bulk/confirmation"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
347
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"*.dev.wix-code.com": [
|
|
351
|
+
{
|
|
352
|
+
srcPath: "/bookings/v2/confirmation",
|
|
353
|
+
destPath: "/v2/confirmation"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
357
|
+
destPath: "/v2/bulk/bookings"
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
_: [
|
|
361
|
+
{
|
|
362
|
+
srcPath: "/bookings/v2/confirmation",
|
|
363
|
+
destPath: "/v2/confirmation"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
367
|
+
destPath: "/v2/bulk/bookings"
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
};
|
|
371
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
372
|
+
}
|
|
322
373
|
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
323
374
|
const domainToMappings = {
|
|
324
375
|
_: [
|
|
@@ -472,142 +523,7 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
|
472
523
|
};
|
|
473
524
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
474
525
|
}
|
|
475
|
-
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
476
|
-
const domainToMappings = {
|
|
477
|
-
"www.wixapis.com": [
|
|
478
|
-
{
|
|
479
|
-
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
480
|
-
destPath: "/v2/bookings/confirmation"
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
srcPath: "/bookings/v2/confirmation",
|
|
484
|
-
destPath: "/v2/confirmation"
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
srcPath: "/bookings/v2/bulk/confirmation",
|
|
488
|
-
destPath: "/v2/bulk/confirmation"
|
|
489
|
-
},
|
|
490
|
-
{
|
|
491
|
-
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
492
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
496
|
-
destPath: "/v2/bulk/confirmation"
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
500
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
501
|
-
}
|
|
502
|
-
],
|
|
503
|
-
"*.dev.wix-code.com": [
|
|
504
|
-
{
|
|
505
|
-
srcPath: "/bookings/v2/confirmation",
|
|
506
|
-
destPath: "/v2/confirmation"
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
510
|
-
destPath: "/v2/bulk/bookings"
|
|
511
|
-
}
|
|
512
|
-
],
|
|
513
|
-
_: [
|
|
514
|
-
{
|
|
515
|
-
srcPath: "/bookings/v2/confirmation",
|
|
516
|
-
destPath: "/v2/confirmation"
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
520
|
-
destPath: "/v2/bulk/bookings"
|
|
521
|
-
}
|
|
522
|
-
]
|
|
523
|
-
};
|
|
524
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
525
|
-
}
|
|
526
526
|
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
|
|
527
|
-
function confirmOrDeclineBooking(payload) {
|
|
528
|
-
function __confirmOrDeclineBooking({ host }) {
|
|
529
|
-
const metadata = {
|
|
530
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
531
|
-
method: "POST",
|
|
532
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
533
|
-
packageName: PACKAGE_NAME,
|
|
534
|
-
migrationOptions: {
|
|
535
|
-
optInTransformResponse: true
|
|
536
|
-
},
|
|
537
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
538
|
-
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
539
|
-
data: payload,
|
|
540
|
-
host
|
|
541
|
-
}),
|
|
542
|
-
data: payload,
|
|
543
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
544
|
-
{
|
|
545
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
546
|
-
paths: [
|
|
547
|
-
{ path: "booking.createdDate" },
|
|
548
|
-
{ path: "booking.startDate" },
|
|
549
|
-
{ path: "booking.endDate" },
|
|
550
|
-
{ path: "booking.updatedDate" },
|
|
551
|
-
{ path: "booking.canceledDate" }
|
|
552
|
-
]
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
transformFn: transformRESTFloatToSDKFloat,
|
|
556
|
-
paths: [
|
|
557
|
-
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
558
|
-
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
559
|
-
]
|
|
560
|
-
}
|
|
561
|
-
])
|
|
562
|
-
};
|
|
563
|
-
return metadata;
|
|
564
|
-
}
|
|
565
|
-
return __confirmOrDeclineBooking;
|
|
566
|
-
}
|
|
567
|
-
function bulkConfirmOrDeclineBooking(payload) {
|
|
568
|
-
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
569
|
-
const metadata = {
|
|
570
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
571
|
-
method: "POST",
|
|
572
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
573
|
-
packageName: PACKAGE_NAME,
|
|
574
|
-
migrationOptions: {
|
|
575
|
-
optInTransformResponse: true
|
|
576
|
-
},
|
|
577
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
578
|
-
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
579
|
-
data: payload,
|
|
580
|
-
host
|
|
581
|
-
}),
|
|
582
|
-
data: payload,
|
|
583
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
584
|
-
{
|
|
585
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
586
|
-
paths: [
|
|
587
|
-
{ path: "results.item.createdDate" },
|
|
588
|
-
{ path: "results.item.startDate" },
|
|
589
|
-
{ path: "results.item.endDate" },
|
|
590
|
-
{ path: "results.item.updatedDate" },
|
|
591
|
-
{ path: "results.item.canceledDate" }
|
|
592
|
-
]
|
|
593
|
-
},
|
|
594
|
-
{
|
|
595
|
-
transformFn: transformRESTFloatToSDKFloat,
|
|
596
|
-
paths: [
|
|
597
|
-
{
|
|
598
|
-
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
602
|
-
}
|
|
603
|
-
]
|
|
604
|
-
}
|
|
605
|
-
])
|
|
606
|
-
};
|
|
607
|
-
return metadata;
|
|
608
|
-
}
|
|
609
|
-
return __bulkConfirmOrDeclineBooking;
|
|
610
|
-
}
|
|
611
527
|
function createMultiServiceBooking(payload) {
|
|
612
528
|
function __createMultiServiceBooking({ host }) {
|
|
613
529
|
const serializedData = transformPaths(payload, [
|
|
@@ -1065,6 +981,90 @@ function removeBookingsFromMultiServiceBooking(payload) {
|
|
|
1065
981
|
}
|
|
1066
982
|
return __removeBookingsFromMultiServiceBooking;
|
|
1067
983
|
}
|
|
984
|
+
function confirmOrDeclineBooking(payload) {
|
|
985
|
+
function __confirmOrDeclineBooking({ host }) {
|
|
986
|
+
const metadata = {
|
|
987
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
988
|
+
method: "POST",
|
|
989
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
990
|
+
packageName: PACKAGE_NAME,
|
|
991
|
+
migrationOptions: {
|
|
992
|
+
optInTransformResponse: true
|
|
993
|
+
},
|
|
994
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
995
|
+
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
996
|
+
data: payload,
|
|
997
|
+
host
|
|
998
|
+
}),
|
|
999
|
+
data: payload,
|
|
1000
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1001
|
+
{
|
|
1002
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1003
|
+
paths: [
|
|
1004
|
+
{ path: "booking.createdDate" },
|
|
1005
|
+
{ path: "booking.startDate" },
|
|
1006
|
+
{ path: "booking.endDate" },
|
|
1007
|
+
{ path: "booking.updatedDate" },
|
|
1008
|
+
{ path: "booking.canceledDate" }
|
|
1009
|
+
]
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1013
|
+
paths: [
|
|
1014
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
1015
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
1016
|
+
]
|
|
1017
|
+
}
|
|
1018
|
+
])
|
|
1019
|
+
};
|
|
1020
|
+
return metadata;
|
|
1021
|
+
}
|
|
1022
|
+
return __confirmOrDeclineBooking;
|
|
1023
|
+
}
|
|
1024
|
+
function bulkConfirmOrDeclineBooking(payload) {
|
|
1025
|
+
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
1026
|
+
const metadata = {
|
|
1027
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1028
|
+
method: "POST",
|
|
1029
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
1030
|
+
packageName: PACKAGE_NAME,
|
|
1031
|
+
migrationOptions: {
|
|
1032
|
+
optInTransformResponse: true
|
|
1033
|
+
},
|
|
1034
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1035
|
+
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
1036
|
+
data: payload,
|
|
1037
|
+
host
|
|
1038
|
+
}),
|
|
1039
|
+
data: payload,
|
|
1040
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1041
|
+
{
|
|
1042
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1043
|
+
paths: [
|
|
1044
|
+
{ path: "results.item.createdDate" },
|
|
1045
|
+
{ path: "results.item.startDate" },
|
|
1046
|
+
{ path: "results.item.endDate" },
|
|
1047
|
+
{ path: "results.item.updatedDate" },
|
|
1048
|
+
{ path: "results.item.canceledDate" }
|
|
1049
|
+
]
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1053
|
+
paths: [
|
|
1054
|
+
{
|
|
1055
|
+
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
1059
|
+
}
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
])
|
|
1063
|
+
};
|
|
1064
|
+
return metadata;
|
|
1065
|
+
}
|
|
1066
|
+
return __bulkConfirmOrDeclineBooking;
|
|
1067
|
+
}
|
|
1068
1068
|
function createBooking(payload) {
|
|
1069
1069
|
function __createBooking({ host }) {
|
|
1070
1070
|
const serializedData = transformPaths(payload, [
|
|
@@ -1654,6 +1654,27 @@ function getBookingAnonymously(payload) {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
return __getBookingAnonymously;
|
|
1656
1656
|
}
|
|
1657
|
+
function getSchedulingUrl(payload) {
|
|
1658
|
+
function __getSchedulingUrl({ host }) {
|
|
1659
|
+
const metadata = {
|
|
1660
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1661
|
+
method: "GET",
|
|
1662
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.AnonymousBookingActions.GetSchedulingUrl",
|
|
1663
|
+
packageName: PACKAGE_NAME,
|
|
1664
|
+
migrationOptions: {
|
|
1665
|
+
optInTransformResponse: true
|
|
1666
|
+
},
|
|
1667
|
+
url: resolveComWixpressBookingsBookingsV2AnonymousBookingActionsUrl({
|
|
1668
|
+
protoPath: "/v2/bookings/scheduling-url",
|
|
1669
|
+
data: payload,
|
|
1670
|
+
host
|
|
1671
|
+
}),
|
|
1672
|
+
params: toURLSearchParams(payload)
|
|
1673
|
+
};
|
|
1674
|
+
return metadata;
|
|
1675
|
+
}
|
|
1676
|
+
return __getSchedulingUrl;
|
|
1677
|
+
}
|
|
1657
1678
|
|
|
1658
1679
|
// src/bookings-v2-booking-bookings.universal.ts
|
|
1659
1680
|
var MultiServiceBookingType = /* @__PURE__ */ ((MultiServiceBookingType2) => {
|
|
@@ -1756,64 +1777,6 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1756
1777
|
SortOrder2["DESC"] = "DESC";
|
|
1757
1778
|
return SortOrder2;
|
|
1758
1779
|
})(SortOrder || {});
|
|
1759
|
-
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1760
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1761
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1762
|
-
bookingId,
|
|
1763
|
-
paymentStatus: options?.paymentStatus
|
|
1764
|
-
});
|
|
1765
|
-
const reqOpts = confirmOrDeclineBooking(payload);
|
|
1766
|
-
sideEffects?.onSiteCall?.();
|
|
1767
|
-
try {
|
|
1768
|
-
const result = await httpClient.request(reqOpts);
|
|
1769
|
-
sideEffects?.onSuccess?.(result);
|
|
1770
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1771
|
-
} catch (err) {
|
|
1772
|
-
const transformedError = sdkTransformError(
|
|
1773
|
-
err,
|
|
1774
|
-
{
|
|
1775
|
-
spreadPathsToArguments: {},
|
|
1776
|
-
explicitPathsToArguments: {
|
|
1777
|
-
bookingId: "$[0]",
|
|
1778
|
-
paymentStatus: "$[1].paymentStatus"
|
|
1779
|
-
},
|
|
1780
|
-
singleArgumentUnchanged: false
|
|
1781
|
-
},
|
|
1782
|
-
["bookingId", "options"]
|
|
1783
|
-
);
|
|
1784
|
-
sideEffects?.onError?.(err);
|
|
1785
|
-
throw transformedError;
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
1789
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1790
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1791
|
-
details,
|
|
1792
|
-
returnEntity: options?.returnEntity
|
|
1793
|
-
});
|
|
1794
|
-
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
1795
|
-
sideEffects?.onSiteCall?.();
|
|
1796
|
-
try {
|
|
1797
|
-
const result = await httpClient.request(reqOpts);
|
|
1798
|
-
sideEffects?.onSuccess?.(result);
|
|
1799
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1800
|
-
} catch (err) {
|
|
1801
|
-
const transformedError = sdkTransformError(
|
|
1802
|
-
err,
|
|
1803
|
-
{
|
|
1804
|
-
spreadPathsToArguments: {},
|
|
1805
|
-
explicitPathsToArguments: {
|
|
1806
|
-
details: "$[0]",
|
|
1807
|
-
returnEntity: "$[1].returnEntity"
|
|
1808
|
-
},
|
|
1809
|
-
singleArgumentUnchanged: false
|
|
1810
|
-
},
|
|
1811
|
-
["details", "options"]
|
|
1812
|
-
);
|
|
1813
|
-
sideEffects?.onError?.(err);
|
|
1814
|
-
throw transformedError;
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
1780
|
async function createMultiServiceBooking2(bookings, options) {
|
|
1818
1781
|
const { httpClient, sideEffects } = arguments[2];
|
|
1819
1782
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -2175,6 +2138,64 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
|
|
|
2175
2138
|
throw transformedError;
|
|
2176
2139
|
}
|
|
2177
2140
|
}
|
|
2141
|
+
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
2142
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2143
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2144
|
+
bookingId,
|
|
2145
|
+
paymentStatus: options?.paymentStatus
|
|
2146
|
+
});
|
|
2147
|
+
const reqOpts = confirmOrDeclineBooking(payload);
|
|
2148
|
+
sideEffects?.onSiteCall?.();
|
|
2149
|
+
try {
|
|
2150
|
+
const result = await httpClient.request(reqOpts);
|
|
2151
|
+
sideEffects?.onSuccess?.(result);
|
|
2152
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2153
|
+
} catch (err) {
|
|
2154
|
+
const transformedError = sdkTransformError(
|
|
2155
|
+
err,
|
|
2156
|
+
{
|
|
2157
|
+
spreadPathsToArguments: {},
|
|
2158
|
+
explicitPathsToArguments: {
|
|
2159
|
+
bookingId: "$[0]",
|
|
2160
|
+
paymentStatus: "$[1].paymentStatus"
|
|
2161
|
+
},
|
|
2162
|
+
singleArgumentUnchanged: false
|
|
2163
|
+
},
|
|
2164
|
+
["bookingId", "options"]
|
|
2165
|
+
);
|
|
2166
|
+
sideEffects?.onError?.(err);
|
|
2167
|
+
throw transformedError;
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
2171
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2172
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2173
|
+
details,
|
|
2174
|
+
returnEntity: options?.returnEntity
|
|
2175
|
+
});
|
|
2176
|
+
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
2177
|
+
sideEffects?.onSiteCall?.();
|
|
2178
|
+
try {
|
|
2179
|
+
const result = await httpClient.request(reqOpts);
|
|
2180
|
+
sideEffects?.onSuccess?.(result);
|
|
2181
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2182
|
+
} catch (err) {
|
|
2183
|
+
const transformedError = sdkTransformError(
|
|
2184
|
+
err,
|
|
2185
|
+
{
|
|
2186
|
+
spreadPathsToArguments: {},
|
|
2187
|
+
explicitPathsToArguments: {
|
|
2188
|
+
details: "$[0]",
|
|
2189
|
+
returnEntity: "$[1].returnEntity"
|
|
2190
|
+
},
|
|
2191
|
+
singleArgumentUnchanged: false
|
|
2192
|
+
},
|
|
2193
|
+
["details", "options"]
|
|
2194
|
+
);
|
|
2195
|
+
sideEffects?.onError?.(err);
|
|
2196
|
+
throw transformedError;
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2178
2199
|
async function createBooking2(booking, options) {
|
|
2179
2200
|
const { httpClient, sideEffects } = arguments[2];
|
|
2180
2201
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -2648,6 +2669,31 @@ async function getBookingAnonymously2(token) {
|
|
|
2648
2669
|
throw transformedError;
|
|
2649
2670
|
}
|
|
2650
2671
|
}
|
|
2672
|
+
async function getSchedulingUrl2(serviceId) {
|
|
2673
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2674
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2675
|
+
serviceId
|
|
2676
|
+
});
|
|
2677
|
+
const reqOpts = getSchedulingUrl(payload);
|
|
2678
|
+
sideEffects?.onSiteCall?.();
|
|
2679
|
+
try {
|
|
2680
|
+
const result = await httpClient.request(reqOpts);
|
|
2681
|
+
sideEffects?.onSuccess?.(result);
|
|
2682
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2683
|
+
} catch (err) {
|
|
2684
|
+
const transformedError = sdkTransformError(
|
|
2685
|
+
err,
|
|
2686
|
+
{
|
|
2687
|
+
spreadPathsToArguments: {},
|
|
2688
|
+
explicitPathsToArguments: { serviceId: "$[0]" },
|
|
2689
|
+
singleArgumentUnchanged: false
|
|
2690
|
+
},
|
|
2691
|
+
["serviceId"]
|
|
2692
|
+
);
|
|
2693
|
+
sideEffects?.onError?.(err);
|
|
2694
|
+
throw transformedError;
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2651
2697
|
export {
|
|
2652
2698
|
Actor,
|
|
2653
2699
|
BookingStatus,
|
|
@@ -2682,6 +2728,7 @@ export {
|
|
|
2682
2728
|
getBookingAnonymously2 as getBookingAnonymously,
|
|
2683
2729
|
getMultiServiceBooking2 as getMultiServiceBooking,
|
|
2684
2730
|
getMultiServiceBookingAvailability2 as getMultiServiceBookingAvailability,
|
|
2731
|
+
getSchedulingUrl2 as getSchedulingUrl,
|
|
2685
2732
|
markBookingAsPending2 as markBookingAsPending,
|
|
2686
2733
|
markMultiServiceBookingAsPending2 as markMultiServiceBookingAsPending,
|
|
2687
2734
|
removeBookingsFromMultiServiceBooking2 as removeBookingsFromMultiServiceBooking,
|