@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
|
@@ -319,57 +319,6 @@ 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
|
-
}
|
|
373
322
|
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
374
323
|
const domainToMappings = {
|
|
375
324
|
_: [
|
|
@@ -523,7 +472,142 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
|
523
472
|
};
|
|
524
473
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
525
474
|
}
|
|
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
|
+
}
|
|
527
611
|
function createMultiServiceBooking(payload) {
|
|
528
612
|
function __createMultiServiceBooking({ host }) {
|
|
529
613
|
const serializedData = transformPaths(payload, [
|
|
@@ -981,90 +1065,6 @@ function removeBookingsFromMultiServiceBooking(payload) {
|
|
|
981
1065
|
}
|
|
982
1066
|
return __removeBookingsFromMultiServiceBooking;
|
|
983
1067
|
}
|
|
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,6 +1777,64 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1756
1777
|
SortOrder2["DESC"] = "DESC";
|
|
1757
1778
|
return SortOrder2;
|
|
1758
1779
|
})(SortOrder || {});
|
|
1780
|
+
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1781
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1782
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1783
|
+
bookingId,
|
|
1784
|
+
paymentStatus: options?.paymentStatus
|
|
1785
|
+
});
|
|
1786
|
+
const reqOpts = confirmOrDeclineBooking(payload);
|
|
1787
|
+
sideEffects?.onSiteCall?.();
|
|
1788
|
+
try {
|
|
1789
|
+
const result = await httpClient.request(reqOpts);
|
|
1790
|
+
sideEffects?.onSuccess?.(result);
|
|
1791
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1792
|
+
} catch (err) {
|
|
1793
|
+
const transformedError = sdkTransformError(
|
|
1794
|
+
err,
|
|
1795
|
+
{
|
|
1796
|
+
spreadPathsToArguments: {},
|
|
1797
|
+
explicitPathsToArguments: {
|
|
1798
|
+
bookingId: "$[0]",
|
|
1799
|
+
paymentStatus: "$[1].paymentStatus"
|
|
1800
|
+
},
|
|
1801
|
+
singleArgumentUnchanged: false
|
|
1802
|
+
},
|
|
1803
|
+
["bookingId", "options"]
|
|
1804
|
+
);
|
|
1805
|
+
sideEffects?.onError?.(err);
|
|
1806
|
+
throw transformedError;
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
1810
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1811
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1812
|
+
details,
|
|
1813
|
+
returnEntity: options?.returnEntity
|
|
1814
|
+
});
|
|
1815
|
+
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
1816
|
+
sideEffects?.onSiteCall?.();
|
|
1817
|
+
try {
|
|
1818
|
+
const result = await httpClient.request(reqOpts);
|
|
1819
|
+
sideEffects?.onSuccess?.(result);
|
|
1820
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1821
|
+
} catch (err) {
|
|
1822
|
+
const transformedError = sdkTransformError(
|
|
1823
|
+
err,
|
|
1824
|
+
{
|
|
1825
|
+
spreadPathsToArguments: {},
|
|
1826
|
+
explicitPathsToArguments: {
|
|
1827
|
+
details: "$[0]",
|
|
1828
|
+
returnEntity: "$[1].returnEntity"
|
|
1829
|
+
},
|
|
1830
|
+
singleArgumentUnchanged: false
|
|
1831
|
+
},
|
|
1832
|
+
["details", "options"]
|
|
1833
|
+
);
|
|
1834
|
+
sideEffects?.onError?.(err);
|
|
1835
|
+
throw transformedError;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1759
1838
|
async function createMultiServiceBooking2(bookings, options) {
|
|
1760
1839
|
const { httpClient, sideEffects } = arguments[2];
|
|
1761
1840
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -2117,64 +2196,6 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
|
|
|
2117
2196
|
throw transformedError;
|
|
2118
2197
|
}
|
|
2119
2198
|
}
|
|
2120
|
-
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
2121
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2122
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2123
|
-
bookingId,
|
|
2124
|
-
paymentStatus: options?.paymentStatus
|
|
2125
|
-
});
|
|
2126
|
-
const reqOpts = confirmOrDeclineBooking(payload);
|
|
2127
|
-
sideEffects?.onSiteCall?.();
|
|
2128
|
-
try {
|
|
2129
|
-
const result = await httpClient.request(reqOpts);
|
|
2130
|
-
sideEffects?.onSuccess?.(result);
|
|
2131
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2132
|
-
} catch (err) {
|
|
2133
|
-
const transformedError = sdkTransformError(
|
|
2134
|
-
err,
|
|
2135
|
-
{
|
|
2136
|
-
spreadPathsToArguments: {},
|
|
2137
|
-
explicitPathsToArguments: {
|
|
2138
|
-
bookingId: "$[0]",
|
|
2139
|
-
paymentStatus: "$[1].paymentStatus"
|
|
2140
|
-
},
|
|
2141
|
-
singleArgumentUnchanged: false
|
|
2142
|
-
},
|
|
2143
|
-
["bookingId", "options"]
|
|
2144
|
-
);
|
|
2145
|
-
sideEffects?.onError?.(err);
|
|
2146
|
-
throw transformedError;
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
2150
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2151
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2152
|
-
details,
|
|
2153
|
-
returnEntity: options?.returnEntity
|
|
2154
|
-
});
|
|
2155
|
-
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
2156
|
-
sideEffects?.onSiteCall?.();
|
|
2157
|
-
try {
|
|
2158
|
-
const result = await httpClient.request(reqOpts);
|
|
2159
|
-
sideEffects?.onSuccess?.(result);
|
|
2160
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2161
|
-
} catch (err) {
|
|
2162
|
-
const transformedError = sdkTransformError(
|
|
2163
|
-
err,
|
|
2164
|
-
{
|
|
2165
|
-
spreadPathsToArguments: {},
|
|
2166
|
-
explicitPathsToArguments: {
|
|
2167
|
-
details: "$[0]",
|
|
2168
|
-
returnEntity: "$[1].returnEntity"
|
|
2169
|
-
},
|
|
2170
|
-
singleArgumentUnchanged: false
|
|
2171
|
-
},
|
|
2172
|
-
["details", "options"]
|
|
2173
|
-
);
|
|
2174
|
-
sideEffects?.onError?.(err);
|
|
2175
|
-
throw transformedError;
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
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,
|