@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
|
@@ -326,57 +326,6 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
|
|
|
326
326
|
};
|
|
327
327
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
328
328
|
}
|
|
329
|
-
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
330
|
-
const domainToMappings = {
|
|
331
|
-
"www.wixapis.com": [
|
|
332
|
-
{
|
|
333
|
-
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
334
|
-
destPath: "/v2/bookings/confirmation"
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
srcPath: "/bookings/v2/confirmation",
|
|
338
|
-
destPath: "/v2/confirmation"
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
srcPath: "/bookings/v2/bulk/confirmation",
|
|
342
|
-
destPath: "/v2/bulk/confirmation"
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
346
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
350
|
-
destPath: "/v2/bulk/confirmation"
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
354
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
355
|
-
}
|
|
356
|
-
],
|
|
357
|
-
"*.dev.wix-code.com": [
|
|
358
|
-
{
|
|
359
|
-
srcPath: "/bookings/v2/confirmation",
|
|
360
|
-
destPath: "/v2/confirmation"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
364
|
-
destPath: "/v2/bulk/bookings"
|
|
365
|
-
}
|
|
366
|
-
],
|
|
367
|
-
_: [
|
|
368
|
-
{
|
|
369
|
-
srcPath: "/bookings/v2/confirmation",
|
|
370
|
-
destPath: "/v2/confirmation"
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
374
|
-
destPath: "/v2/bulk/bookings"
|
|
375
|
-
}
|
|
376
|
-
]
|
|
377
|
-
};
|
|
378
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
379
|
-
}
|
|
380
329
|
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
381
330
|
const domainToMappings = {
|
|
382
331
|
_: [
|
|
@@ -530,7 +479,142 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
|
530
479
|
};
|
|
531
480
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
532
481
|
}
|
|
482
|
+
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
483
|
+
const domainToMappings = {
|
|
484
|
+
"www.wixapis.com": [
|
|
485
|
+
{
|
|
486
|
+
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
487
|
+
destPath: "/v2/bookings/confirmation"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
srcPath: "/bookings/v2/confirmation",
|
|
491
|
+
destPath: "/v2/confirmation"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
srcPath: "/bookings/v2/bulk/confirmation",
|
|
495
|
+
destPath: "/v2/bulk/confirmation"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
499
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
503
|
+
destPath: "/v2/bulk/confirmation"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
507
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
508
|
+
}
|
|
509
|
+
],
|
|
510
|
+
"*.dev.wix-code.com": [
|
|
511
|
+
{
|
|
512
|
+
srcPath: "/bookings/v2/confirmation",
|
|
513
|
+
destPath: "/v2/confirmation"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
517
|
+
destPath: "/v2/bulk/bookings"
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
_: [
|
|
521
|
+
{
|
|
522
|
+
srcPath: "/bookings/v2/confirmation",
|
|
523
|
+
destPath: "/v2/confirmation"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
527
|
+
destPath: "/v2/bulk/bookings"
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
};
|
|
531
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
532
|
+
}
|
|
533
533
|
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
|
|
534
|
+
function confirmOrDeclineBooking(payload) {
|
|
535
|
+
function __confirmOrDeclineBooking({ host }) {
|
|
536
|
+
const metadata = {
|
|
537
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
538
|
+
method: "POST",
|
|
539
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
540
|
+
packageName: PACKAGE_NAME,
|
|
541
|
+
migrationOptions: {
|
|
542
|
+
optInTransformResponse: true
|
|
543
|
+
},
|
|
544
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
545
|
+
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
546
|
+
data: payload,
|
|
547
|
+
host
|
|
548
|
+
}),
|
|
549
|
+
data: payload,
|
|
550
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
551
|
+
{
|
|
552
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
553
|
+
paths: [
|
|
554
|
+
{ path: "booking.createdDate" },
|
|
555
|
+
{ path: "booking.startDate" },
|
|
556
|
+
{ path: "booking.endDate" },
|
|
557
|
+
{ path: "booking.updatedDate" },
|
|
558
|
+
{ path: "booking.canceledDate" }
|
|
559
|
+
]
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
563
|
+
paths: [
|
|
564
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
565
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
566
|
+
]
|
|
567
|
+
}
|
|
568
|
+
])
|
|
569
|
+
};
|
|
570
|
+
return metadata;
|
|
571
|
+
}
|
|
572
|
+
return __confirmOrDeclineBooking;
|
|
573
|
+
}
|
|
574
|
+
function bulkConfirmOrDeclineBooking(payload) {
|
|
575
|
+
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
576
|
+
const metadata = {
|
|
577
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
578
|
+
method: "POST",
|
|
579
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
580
|
+
packageName: PACKAGE_NAME,
|
|
581
|
+
migrationOptions: {
|
|
582
|
+
optInTransformResponse: true
|
|
583
|
+
},
|
|
584
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
585
|
+
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
586
|
+
data: payload,
|
|
587
|
+
host
|
|
588
|
+
}),
|
|
589
|
+
data: payload,
|
|
590
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
591
|
+
{
|
|
592
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
593
|
+
paths: [
|
|
594
|
+
{ path: "results.item.createdDate" },
|
|
595
|
+
{ path: "results.item.startDate" },
|
|
596
|
+
{ path: "results.item.endDate" },
|
|
597
|
+
{ path: "results.item.updatedDate" },
|
|
598
|
+
{ path: "results.item.canceledDate" }
|
|
599
|
+
]
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
603
|
+
paths: [
|
|
604
|
+
{
|
|
605
|
+
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
609
|
+
}
|
|
610
|
+
]
|
|
611
|
+
}
|
|
612
|
+
])
|
|
613
|
+
};
|
|
614
|
+
return metadata;
|
|
615
|
+
}
|
|
616
|
+
return __bulkConfirmOrDeclineBooking;
|
|
617
|
+
}
|
|
534
618
|
function createMultiServiceBooking(payload) {
|
|
535
619
|
function __createMultiServiceBooking({ host }) {
|
|
536
620
|
const serializedData = transformPaths(payload, [
|
|
@@ -988,90 +1072,6 @@ function removeBookingsFromMultiServiceBooking(payload) {
|
|
|
988
1072
|
}
|
|
989
1073
|
return __removeBookingsFromMultiServiceBooking;
|
|
990
1074
|
}
|
|
991
|
-
function confirmOrDeclineBooking(payload) {
|
|
992
|
-
function __confirmOrDeclineBooking({ host }) {
|
|
993
|
-
const metadata = {
|
|
994
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
995
|
-
method: "POST",
|
|
996
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
997
|
-
packageName: PACKAGE_NAME,
|
|
998
|
-
migrationOptions: {
|
|
999
|
-
optInTransformResponse: true
|
|
1000
|
-
},
|
|
1001
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1002
|
-
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
1003
|
-
data: payload,
|
|
1004
|
-
host
|
|
1005
|
-
}),
|
|
1006
|
-
data: payload,
|
|
1007
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1008
|
-
{
|
|
1009
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1010
|
-
paths: [
|
|
1011
|
-
{ path: "booking.createdDate" },
|
|
1012
|
-
{ path: "booking.startDate" },
|
|
1013
|
-
{ path: "booking.endDate" },
|
|
1014
|
-
{ path: "booking.updatedDate" },
|
|
1015
|
-
{ path: "booking.canceledDate" }
|
|
1016
|
-
]
|
|
1017
|
-
},
|
|
1018
|
-
{
|
|
1019
|
-
transformFn: transformRESTFloatToSDKFloat,
|
|
1020
|
-
paths: [
|
|
1021
|
-
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
1022
|
-
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
1023
|
-
]
|
|
1024
|
-
}
|
|
1025
|
-
])
|
|
1026
|
-
};
|
|
1027
|
-
return metadata;
|
|
1028
|
-
}
|
|
1029
|
-
return __confirmOrDeclineBooking;
|
|
1030
|
-
}
|
|
1031
|
-
function bulkConfirmOrDeclineBooking(payload) {
|
|
1032
|
-
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
1033
|
-
const metadata = {
|
|
1034
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
1035
|
-
method: "POST",
|
|
1036
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
1037
|
-
packageName: PACKAGE_NAME,
|
|
1038
|
-
migrationOptions: {
|
|
1039
|
-
optInTransformResponse: true
|
|
1040
|
-
},
|
|
1041
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1042
|
-
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
1043
|
-
data: payload,
|
|
1044
|
-
host
|
|
1045
|
-
}),
|
|
1046
|
-
data: payload,
|
|
1047
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1048
|
-
{
|
|
1049
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1050
|
-
paths: [
|
|
1051
|
-
{ path: "results.item.createdDate" },
|
|
1052
|
-
{ path: "results.item.startDate" },
|
|
1053
|
-
{ path: "results.item.endDate" },
|
|
1054
|
-
{ path: "results.item.updatedDate" },
|
|
1055
|
-
{ path: "results.item.canceledDate" }
|
|
1056
|
-
]
|
|
1057
|
-
},
|
|
1058
|
-
{
|
|
1059
|
-
transformFn: transformRESTFloatToSDKFloat,
|
|
1060
|
-
paths: [
|
|
1061
|
-
{
|
|
1062
|
-
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
1063
|
-
},
|
|
1064
|
-
{
|
|
1065
|
-
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
1066
|
-
}
|
|
1067
|
-
]
|
|
1068
|
-
}
|
|
1069
|
-
])
|
|
1070
|
-
};
|
|
1071
|
-
return metadata;
|
|
1072
|
-
}
|
|
1073
|
-
return __bulkConfirmOrDeclineBooking;
|
|
1074
|
-
}
|
|
1075
1075
|
function createBooking(payload) {
|
|
1076
1076
|
function __createBooking({ host }) {
|
|
1077
1077
|
const serializedData = transformPaths(payload, [
|
|
@@ -1661,6 +1661,27 @@ function getBookingAnonymously(payload) {
|
|
|
1661
1661
|
}
|
|
1662
1662
|
return __getBookingAnonymously;
|
|
1663
1663
|
}
|
|
1664
|
+
function getSchedulingUrl(payload) {
|
|
1665
|
+
function __getSchedulingUrl({ host }) {
|
|
1666
|
+
const metadata = {
|
|
1667
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
1668
|
+
method: "GET",
|
|
1669
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.AnonymousBookingActions.GetSchedulingUrl",
|
|
1670
|
+
packageName: PACKAGE_NAME,
|
|
1671
|
+
migrationOptions: {
|
|
1672
|
+
optInTransformResponse: true
|
|
1673
|
+
},
|
|
1674
|
+
url: resolveComWixpressBookingsBookingsV2AnonymousBookingActionsUrl({
|
|
1675
|
+
protoPath: "/v2/bookings/scheduling-url",
|
|
1676
|
+
data: payload,
|
|
1677
|
+
host
|
|
1678
|
+
}),
|
|
1679
|
+
params: toURLSearchParams(payload)
|
|
1680
|
+
};
|
|
1681
|
+
return metadata;
|
|
1682
|
+
}
|
|
1683
|
+
return __getSchedulingUrl;
|
|
1684
|
+
}
|
|
1664
1685
|
|
|
1665
1686
|
// src/bookings-v2-booking-bookings.universal.ts
|
|
1666
1687
|
var MultiServiceBookingType = /* @__PURE__ */ ((MultiServiceBookingType2) => {
|
|
@@ -1763,6 +1784,64 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1763
1784
|
SortOrder2["DESC"] = "DESC";
|
|
1764
1785
|
return SortOrder2;
|
|
1765
1786
|
})(SortOrder || {});
|
|
1787
|
+
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1788
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1789
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1790
|
+
bookingId,
|
|
1791
|
+
paymentStatus: options?.paymentStatus
|
|
1792
|
+
});
|
|
1793
|
+
const reqOpts = confirmOrDeclineBooking(payload);
|
|
1794
|
+
sideEffects?.onSiteCall?.();
|
|
1795
|
+
try {
|
|
1796
|
+
const result = await httpClient.request(reqOpts);
|
|
1797
|
+
sideEffects?.onSuccess?.(result);
|
|
1798
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1799
|
+
} catch (err) {
|
|
1800
|
+
const transformedError = sdkTransformError(
|
|
1801
|
+
err,
|
|
1802
|
+
{
|
|
1803
|
+
spreadPathsToArguments: {},
|
|
1804
|
+
explicitPathsToArguments: {
|
|
1805
|
+
bookingId: "$[0]",
|
|
1806
|
+
paymentStatus: "$[1].paymentStatus"
|
|
1807
|
+
},
|
|
1808
|
+
singleArgumentUnchanged: false
|
|
1809
|
+
},
|
|
1810
|
+
["bookingId", "options"]
|
|
1811
|
+
);
|
|
1812
|
+
sideEffects?.onError?.(err);
|
|
1813
|
+
throw transformedError;
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
1817
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1818
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1819
|
+
details,
|
|
1820
|
+
returnEntity: options?.returnEntity
|
|
1821
|
+
});
|
|
1822
|
+
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
1823
|
+
sideEffects?.onSiteCall?.();
|
|
1824
|
+
try {
|
|
1825
|
+
const result = await httpClient.request(reqOpts);
|
|
1826
|
+
sideEffects?.onSuccess?.(result);
|
|
1827
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1828
|
+
} catch (err) {
|
|
1829
|
+
const transformedError = sdkTransformError(
|
|
1830
|
+
err,
|
|
1831
|
+
{
|
|
1832
|
+
spreadPathsToArguments: {},
|
|
1833
|
+
explicitPathsToArguments: {
|
|
1834
|
+
details: "$[0]",
|
|
1835
|
+
returnEntity: "$[1].returnEntity"
|
|
1836
|
+
},
|
|
1837
|
+
singleArgumentUnchanged: false
|
|
1838
|
+
},
|
|
1839
|
+
["details", "options"]
|
|
1840
|
+
);
|
|
1841
|
+
sideEffects?.onError?.(err);
|
|
1842
|
+
throw transformedError;
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1766
1845
|
async function createMultiServiceBooking2(bookings, options) {
|
|
1767
1846
|
const { httpClient, sideEffects } = arguments[2];
|
|
1768
1847
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -2124,64 +2203,6 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
|
|
|
2124
2203
|
throw transformedError;
|
|
2125
2204
|
}
|
|
2126
2205
|
}
|
|
2127
|
-
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
2128
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2129
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2130
|
-
bookingId,
|
|
2131
|
-
paymentStatus: options?.paymentStatus
|
|
2132
|
-
});
|
|
2133
|
-
const reqOpts = confirmOrDeclineBooking(payload);
|
|
2134
|
-
sideEffects?.onSiteCall?.();
|
|
2135
|
-
try {
|
|
2136
|
-
const result = await httpClient.request(reqOpts);
|
|
2137
|
-
sideEffects?.onSuccess?.(result);
|
|
2138
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2139
|
-
} catch (err) {
|
|
2140
|
-
const transformedError = sdkTransformError(
|
|
2141
|
-
err,
|
|
2142
|
-
{
|
|
2143
|
-
spreadPathsToArguments: {},
|
|
2144
|
-
explicitPathsToArguments: {
|
|
2145
|
-
bookingId: "$[0]",
|
|
2146
|
-
paymentStatus: "$[1].paymentStatus"
|
|
2147
|
-
},
|
|
2148
|
-
singleArgumentUnchanged: false
|
|
2149
|
-
},
|
|
2150
|
-
["bookingId", "options"]
|
|
2151
|
-
);
|
|
2152
|
-
sideEffects?.onError?.(err);
|
|
2153
|
-
throw transformedError;
|
|
2154
|
-
}
|
|
2155
|
-
}
|
|
2156
|
-
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
2157
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2158
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2159
|
-
details,
|
|
2160
|
-
returnEntity: options?.returnEntity
|
|
2161
|
-
});
|
|
2162
|
-
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
2163
|
-
sideEffects?.onSiteCall?.();
|
|
2164
|
-
try {
|
|
2165
|
-
const result = await httpClient.request(reqOpts);
|
|
2166
|
-
sideEffects?.onSuccess?.(result);
|
|
2167
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2168
|
-
} catch (err) {
|
|
2169
|
-
const transformedError = sdkTransformError(
|
|
2170
|
-
err,
|
|
2171
|
-
{
|
|
2172
|
-
spreadPathsToArguments: {},
|
|
2173
|
-
explicitPathsToArguments: {
|
|
2174
|
-
details: "$[0]",
|
|
2175
|
-
returnEntity: "$[1].returnEntity"
|
|
2176
|
-
},
|
|
2177
|
-
singleArgumentUnchanged: false
|
|
2178
|
-
},
|
|
2179
|
-
["details", "options"]
|
|
2180
|
-
);
|
|
2181
|
-
sideEffects?.onError?.(err);
|
|
2182
|
-
throw transformedError;
|
|
2183
|
-
}
|
|
2184
|
-
}
|
|
2185
2206
|
async function createBooking2(booking, options) {
|
|
2186
2207
|
const { httpClient, sideEffects } = arguments[2];
|
|
2187
2208
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -2655,8 +2676,49 @@ async function getBookingAnonymously2(token) {
|
|
|
2655
2676
|
throw transformedError;
|
|
2656
2677
|
}
|
|
2657
2678
|
}
|
|
2679
|
+
async function getSchedulingUrl2(serviceId) {
|
|
2680
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2681
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2682
|
+
serviceId
|
|
2683
|
+
});
|
|
2684
|
+
const reqOpts = getSchedulingUrl(payload);
|
|
2685
|
+
sideEffects?.onSiteCall?.();
|
|
2686
|
+
try {
|
|
2687
|
+
const result = await httpClient.request(reqOpts);
|
|
2688
|
+
sideEffects?.onSuccess?.(result);
|
|
2689
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2690
|
+
} catch (err) {
|
|
2691
|
+
const transformedError = sdkTransformError(
|
|
2692
|
+
err,
|
|
2693
|
+
{
|
|
2694
|
+
spreadPathsToArguments: {},
|
|
2695
|
+
explicitPathsToArguments: { serviceId: "$[0]" },
|
|
2696
|
+
singleArgumentUnchanged: false
|
|
2697
|
+
},
|
|
2698
|
+
["serviceId"]
|
|
2699
|
+
);
|
|
2700
|
+
sideEffects?.onError?.(err);
|
|
2701
|
+
throw transformedError;
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2658
2704
|
|
|
2659
2705
|
// src/bookings-v2-booking-bookings.public.ts
|
|
2706
|
+
function confirmOrDeclineBooking3(httpClient) {
|
|
2707
|
+
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2708
|
+
bookingId,
|
|
2709
|
+
options,
|
|
2710
|
+
// @ts-ignore
|
|
2711
|
+
{ httpClient }
|
|
2712
|
+
);
|
|
2713
|
+
}
|
|
2714
|
+
function bulkConfirmOrDeclineBooking3(httpClient) {
|
|
2715
|
+
return (details, options) => bulkConfirmOrDeclineBooking2(
|
|
2716
|
+
details,
|
|
2717
|
+
options,
|
|
2718
|
+
// @ts-ignore
|
|
2719
|
+
{ httpClient }
|
|
2720
|
+
);
|
|
2721
|
+
}
|
|
2660
2722
|
function createMultiServiceBooking3(httpClient) {
|
|
2661
2723
|
return (bookings, options) => createMultiServiceBooking2(
|
|
2662
2724
|
bookings,
|
|
@@ -2743,22 +2805,6 @@ function removeBookingsFromMultiServiceBooking3(httpClient) {
|
|
|
2743
2805
|
{ httpClient }
|
|
2744
2806
|
);
|
|
2745
2807
|
}
|
|
2746
|
-
function confirmOrDeclineBooking3(httpClient) {
|
|
2747
|
-
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2748
|
-
bookingId,
|
|
2749
|
-
options,
|
|
2750
|
-
// @ts-ignore
|
|
2751
|
-
{ httpClient }
|
|
2752
|
-
);
|
|
2753
|
-
}
|
|
2754
|
-
function bulkConfirmOrDeclineBooking3(httpClient) {
|
|
2755
|
-
return (details, options) => bulkConfirmOrDeclineBooking2(
|
|
2756
|
-
details,
|
|
2757
|
-
options,
|
|
2758
|
-
// @ts-ignore
|
|
2759
|
-
{ httpClient }
|
|
2760
|
-
);
|
|
2761
|
-
}
|
|
2762
2808
|
function createBooking3(httpClient) {
|
|
2763
2809
|
return (booking, options) => createBooking2(
|
|
2764
2810
|
booking,
|
|
@@ -2882,6 +2928,13 @@ function getBookingAnonymously3(httpClient) {
|
|
|
2882
2928
|
{ httpClient }
|
|
2883
2929
|
);
|
|
2884
2930
|
}
|
|
2931
|
+
function getSchedulingUrl3(httpClient) {
|
|
2932
|
+
return (serviceId) => getSchedulingUrl2(
|
|
2933
|
+
serviceId,
|
|
2934
|
+
// @ts-ignore
|
|
2935
|
+
{ httpClient }
|
|
2936
|
+
);
|
|
2937
|
+
}
|
|
2885
2938
|
var onBookingCanceled = EventDefinition(
|
|
2886
2939
|
"wix.bookings.v2.booking_canceled",
|
|
2887
2940
|
true,
|
|
@@ -3131,6 +3184,8 @@ var onBookingNumberOfParticipantsUpdated = EventDefinition(
|
|
|
3131
3184
|
// src/bookings-v2-booking-bookings.context.ts
|
|
3132
3185
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
3133
3186
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
3187
|
+
var confirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(confirmOrDeclineBooking3);
|
|
3188
|
+
var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(bulkConfirmOrDeclineBooking3);
|
|
3134
3189
|
var createMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(createMultiServiceBooking3);
|
|
3135
3190
|
var rescheduleMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(rescheduleMultiServiceBooking3);
|
|
3136
3191
|
var getMultiServiceBookingAvailability4 = /* @__PURE__ */ createRESTModule(getMultiServiceBookingAvailability3);
|
|
@@ -3144,8 +3199,6 @@ var bulkGetMultiServiceBookingAllowedActions4 = /* @__PURE__ */ createRESTModule
|
|
|
3144
3199
|
var getMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(getMultiServiceBooking3);
|
|
3145
3200
|
var addBookingsToMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(addBookingsToMultiServiceBooking3);
|
|
3146
3201
|
var removeBookingsFromMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(removeBookingsFromMultiServiceBooking3);
|
|
3147
|
-
var confirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(confirmOrDeclineBooking3);
|
|
3148
|
-
var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(bulkConfirmOrDeclineBooking3);
|
|
3149
3202
|
var createBooking4 = /* @__PURE__ */ createRESTModule(createBooking3);
|
|
3150
3203
|
var bulkCreateBooking4 = /* @__PURE__ */ createRESTModule(bulkCreateBooking3);
|
|
3151
3204
|
var rescheduleBooking4 = /* @__PURE__ */ createRESTModule(rescheduleBooking3);
|
|
@@ -3161,6 +3214,7 @@ var getAnonymousActionDetails4 = /* @__PURE__ */ createRESTModule(getAnonymousAc
|
|
|
3161
3214
|
var cancelBookingAnonymously4 = /* @__PURE__ */ createRESTModule(cancelBookingAnonymously3);
|
|
3162
3215
|
var rescheduleBookingAnonymously4 = /* @__PURE__ */ createRESTModule(rescheduleBookingAnonymously3);
|
|
3163
3216
|
var getBookingAnonymously4 = /* @__PURE__ */ createRESTModule(getBookingAnonymously3);
|
|
3217
|
+
var getSchedulingUrl4 = /* @__PURE__ */ createRESTModule(getSchedulingUrl3);
|
|
3164
3218
|
var onBookingCanceled2 = createEventModule(onBookingCanceled);
|
|
3165
3219
|
var onBookingConfirmed2 = createEventModule(onBookingConfirmed);
|
|
3166
3220
|
var onBookingCreated2 = createEventModule(onBookingCreated);
|
|
@@ -3209,6 +3263,7 @@ export {
|
|
|
3209
3263
|
getBookingAnonymously4 as getBookingAnonymously,
|
|
3210
3264
|
getMultiServiceBooking4 as getMultiServiceBooking,
|
|
3211
3265
|
getMultiServiceBookingAvailability4 as getMultiServiceBookingAvailability,
|
|
3266
|
+
getSchedulingUrl4 as getSchedulingUrl,
|
|
3212
3267
|
markBookingAsPending4 as markBookingAsPending,
|
|
3213
3268
|
markMultiServiceBookingAsPending4 as markMultiServiceBookingAsPending,
|
|
3214
3269
|
onBookingCanceled2 as onBookingCanceled,
|