@wix/auto_sdk_bookings_bookings 1.0.81 → 1.0.83
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 +41 -58
- package/build/cjs/index.js +442 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +100 -121
- package/build/cjs/index.typings.js +407 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +50 -63
- package/build/cjs/meta.js +374 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +41 -58
- package/build/es/index.mjs +438 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +100 -121
- package/build/es/index.typings.mjs +403 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +50 -63
- package/build/es/meta.mjs +370 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +94 -60
- package/build/internal/cjs/index.js +442 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +146 -121
- package/build/internal/cjs/index.typings.js +407 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +50 -63
- package/build/internal/cjs/meta.js +374 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +94 -60
- package/build/internal/es/index.mjs +438 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +146 -121
- package/build/internal/es/index.typings.mjs +403 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +50 -63
- package/build/internal/es/meta.mjs +370 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -39,6 +39,7 @@ __export(index_exports, {
|
|
|
39
39
|
bulkCreateBooking: () => bulkCreateBooking4,
|
|
40
40
|
bulkGetMultiServiceBookingAllowedActions: () => bulkGetMultiServiceBookingAllowedActions4,
|
|
41
41
|
cancelBooking: () => cancelBooking3,
|
|
42
|
+
cancelBookingAnonymously: () => cancelBookingAnonymously4,
|
|
42
43
|
cancelMultiServiceBooking: () => cancelMultiServiceBooking4,
|
|
43
44
|
confirmBooking: () => confirmBooking3,
|
|
44
45
|
confirmMultiServiceBooking: () => confirmMultiServiceBooking4,
|
|
@@ -47,6 +48,8 @@ __export(index_exports, {
|
|
|
47
48
|
createMultiServiceBooking: () => createMultiServiceBooking4,
|
|
48
49
|
declineBooking: () => declineBooking3,
|
|
49
50
|
declineMultiServiceBooking: () => declineMultiServiceBooking4,
|
|
51
|
+
getAnonymousActionDetails: () => getAnonymousActionDetails4,
|
|
52
|
+
getBookingAnonymously: () => getBookingAnonymously4,
|
|
50
53
|
getMultiServiceBooking: () => getMultiServiceBooking4,
|
|
51
54
|
getMultiServiceBookingAvailability: () => getMultiServiceBookingAvailability4,
|
|
52
55
|
markBookingAsPending: () => markBookingAsPending4,
|
|
@@ -60,6 +63,7 @@ __export(index_exports, {
|
|
|
60
63
|
onBookingUpdated: () => onBookingUpdated2,
|
|
61
64
|
removeBookingsFromMultiServiceBooking: () => removeBookingsFromMultiServiceBooking4,
|
|
62
65
|
rescheduleBooking: () => rescheduleBooking4,
|
|
66
|
+
rescheduleBookingAnonymously: () => rescheduleBookingAnonymously4,
|
|
63
67
|
rescheduleMultiServiceBooking: () => rescheduleMultiServiceBooking4,
|
|
64
68
|
setBookingSubmissionId: () => setBookingSubmissionId4,
|
|
65
69
|
updateExtendedFields: () => updateExtendedFields4,
|
|
@@ -443,7 +447,301 @@ function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
|
443
447
|
};
|
|
444
448
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
445
449
|
}
|
|
450
|
+
function resolveComWixpressBookingsBookingsV2AnonymousBookingActionsUrl(opts) {
|
|
451
|
+
const domainToMappings = {
|
|
452
|
+
_: [
|
|
453
|
+
{
|
|
454
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
455
|
+
destPath: "/v2/bookings"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
459
|
+
destPath: "/v2/bulk/bookings"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
srcPath: "/_api/bookings-service/v2/multi_service_bookings",
|
|
463
|
+
destPath: "/v2/multi_service_bookings"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
srcPath: "/_api/bookings-service/v2/bulk/multi_service_bookings",
|
|
467
|
+
destPath: "/v2/bulk/multi_service_bookings"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings",
|
|
471
|
+
destPath: "/v2/multi_service_bookings"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
|
|
475
|
+
destPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
srcPath: "/bookings/bookings/v2/bulk/bookings",
|
|
479
|
+
destPath: "/v2/bulk/bookings"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
srcPath: "/bookings/multiServiceBookings/v2/bulk/multi_service_bookings/get_allowed_actions",
|
|
483
|
+
destPath: "/v2/bulk/multi_service_bookings/get_allowed_actions"
|
|
484
|
+
}
|
|
485
|
+
],
|
|
486
|
+
"manage._base_domain_": [
|
|
487
|
+
{
|
|
488
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
489
|
+
destPath: "/v2/bookings"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
493
|
+
destPath: "/v2/bulk/bookings"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
srcPath: "/_api/bookings-service/v2/multi_service_bookings",
|
|
497
|
+
destPath: "/v2/multi_service_bookings"
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
srcPath: "/_api/bookings-service/v2/bulk/multi_service_bookings",
|
|
501
|
+
destPath: "/v2/bulk/multi_service_bookings"
|
|
502
|
+
}
|
|
503
|
+
],
|
|
504
|
+
"www.wixapis.com": [
|
|
505
|
+
{
|
|
506
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
507
|
+
destPath: "/v2/bookings"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
srcPath: "/bookings/v2/bookings",
|
|
511
|
+
destPath: "/v2/bookings"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
515
|
+
destPath: "/v2/bulk/bookings"
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
srcPath: "/_api/bookings-service/v2/multi_service_bookings",
|
|
519
|
+
destPath: "/v2/multi_service_bookings"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings",
|
|
523
|
+
destPath: "/v2/multi_service_bookings"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
|
|
527
|
+
destPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
srcPath: "/bookings/bookings/v2/bulk/bookings",
|
|
531
|
+
destPath: "/v2/bulk/bookings"
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
srcPath: "/bookings/multiServiceBookings/v2/bulk/multi_service_bookings/get_allowed_actions",
|
|
535
|
+
destPath: "/v2/bulk/multi_service_bookings/get_allowed_actions"
|
|
536
|
+
}
|
|
537
|
+
],
|
|
538
|
+
"www._base_domain_": [
|
|
539
|
+
{
|
|
540
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
541
|
+
destPath: "/v2/bulk/bookings"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
545
|
+
destPath: "/v2/bookings"
|
|
546
|
+
}
|
|
547
|
+
],
|
|
548
|
+
"bo._base_domain_": [
|
|
549
|
+
{
|
|
550
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
551
|
+
destPath: "/v2/bulk/bookings"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
555
|
+
destPath: "/v2/bookings"
|
|
556
|
+
}
|
|
557
|
+
],
|
|
558
|
+
"wixbo.ai": [
|
|
559
|
+
{
|
|
560
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
561
|
+
destPath: "/v2/bulk/bookings"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
565
|
+
destPath: "/v2/bookings"
|
|
566
|
+
}
|
|
567
|
+
],
|
|
568
|
+
"wix-bo.com": [
|
|
569
|
+
{
|
|
570
|
+
srcPath: "/_api/bookings-service/v2/bulk/bookings",
|
|
571
|
+
destPath: "/v2/bulk/bookings"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
srcPath: "/_api/bookings-service/v2/bookings",
|
|
575
|
+
destPath: "/v2/bookings"
|
|
576
|
+
}
|
|
577
|
+
],
|
|
578
|
+
"*.dev.wix-code.com": [
|
|
579
|
+
{
|
|
580
|
+
srcPath: "/_api/bookings-service",
|
|
581
|
+
destPath: "/v2/bookings"
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings",
|
|
585
|
+
destPath: "/v2/multi_service_bookings"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
|
|
589
|
+
destPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking"
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
srcPath: "/bookings/bookings/v2/bulk/bookings",
|
|
593
|
+
destPath: "/v2/bulk/bookings"
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
srcPath: "/bookings/multiServiceBookings/v2/bulk/multi_service_bookings/get_allowed_actions",
|
|
597
|
+
destPath: "/v2/bulk/multi_service_bookings/get_allowed_actions"
|
|
598
|
+
}
|
|
599
|
+
]
|
|
600
|
+
};
|
|
601
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
602
|
+
}
|
|
446
603
|
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
|
|
604
|
+
function getAnonymousActionDetails(payload) {
|
|
605
|
+
function __getAnonymousActionDetails({ host }) {
|
|
606
|
+
const metadata = {
|
|
607
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
608
|
+
method: "GET",
|
|
609
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.AnonymousBookingActions.GetAnonymousActionDetails",
|
|
610
|
+
packageName: PACKAGE_NAME,
|
|
611
|
+
migrationOptions: {
|
|
612
|
+
optInTransformResponse: true
|
|
613
|
+
},
|
|
614
|
+
url: resolveComWixpressBookingsBookingsV2AnonymousBookingActionsUrl({
|
|
615
|
+
protoPath: "/v2/bookings/anonymous-actions-details",
|
|
616
|
+
data: payload,
|
|
617
|
+
host
|
|
618
|
+
}),
|
|
619
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
620
|
+
};
|
|
621
|
+
return metadata;
|
|
622
|
+
}
|
|
623
|
+
return __getAnonymousActionDetails;
|
|
624
|
+
}
|
|
625
|
+
function cancelBookingAnonymously(payload) {
|
|
626
|
+
function __cancelBookingAnonymously({ host }) {
|
|
627
|
+
const metadata = {
|
|
628
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
629
|
+
method: "POST",
|
|
630
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.AnonymousBookingActions.CancelBookingAnonymously",
|
|
631
|
+
packageName: PACKAGE_NAME,
|
|
632
|
+
migrationOptions: {
|
|
633
|
+
optInTransformResponse: true
|
|
634
|
+
},
|
|
635
|
+
url: resolveComWixpressBookingsBookingsV2AnonymousBookingActionsUrl({
|
|
636
|
+
protoPath: "/v2/bookings/{token}/anonymous-cancel",
|
|
637
|
+
data: payload,
|
|
638
|
+
host
|
|
639
|
+
}),
|
|
640
|
+
data: payload,
|
|
641
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
642
|
+
{
|
|
643
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
644
|
+
paths: [
|
|
645
|
+
{ path: "booking.createdDate" },
|
|
646
|
+
{ path: "booking.startDate" },
|
|
647
|
+
{ path: "booking.endDate" },
|
|
648
|
+
{ path: "booking.updatedDate" },
|
|
649
|
+
{ path: "booking.canceledDate" }
|
|
650
|
+
]
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
654
|
+
paths: [
|
|
655
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
656
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
657
|
+
]
|
|
658
|
+
}
|
|
659
|
+
])
|
|
660
|
+
};
|
|
661
|
+
return metadata;
|
|
662
|
+
}
|
|
663
|
+
return __cancelBookingAnonymously;
|
|
664
|
+
}
|
|
665
|
+
function rescheduleBookingAnonymously(payload) {
|
|
666
|
+
function __rescheduleBookingAnonymously({ host }) {
|
|
667
|
+
const metadata = {
|
|
668
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
669
|
+
method: "POST",
|
|
670
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.AnonymousBookingActions.RescheduleBookingAnonymously",
|
|
671
|
+
packageName: PACKAGE_NAME,
|
|
672
|
+
migrationOptions: {
|
|
673
|
+
optInTransformResponse: true
|
|
674
|
+
},
|
|
675
|
+
url: resolveComWixpressBookingsBookingsV2AnonymousBookingActionsUrl({
|
|
676
|
+
protoPath: "/v2/bookings/{token}/anonymous-reschedule",
|
|
677
|
+
data: payload,
|
|
678
|
+
host
|
|
679
|
+
}),
|
|
680
|
+
data: payload,
|
|
681
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
682
|
+
{
|
|
683
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
684
|
+
paths: [
|
|
685
|
+
{ path: "booking.createdDate" },
|
|
686
|
+
{ path: "booking.startDate" },
|
|
687
|
+
{ path: "booking.endDate" },
|
|
688
|
+
{ path: "booking.updatedDate" },
|
|
689
|
+
{ path: "booking.canceledDate" }
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
694
|
+
paths: [
|
|
695
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
696
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
697
|
+
]
|
|
698
|
+
}
|
|
699
|
+
])
|
|
700
|
+
};
|
|
701
|
+
return metadata;
|
|
702
|
+
}
|
|
703
|
+
return __rescheduleBookingAnonymously;
|
|
704
|
+
}
|
|
705
|
+
function getBookingAnonymously(payload) {
|
|
706
|
+
function __getBookingAnonymously({ host }) {
|
|
707
|
+
const metadata = {
|
|
708
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
709
|
+
method: "GET",
|
|
710
|
+
methodFqn: "com.wixpress.bookings.bookings.v2.AnonymousBookingActions.GetBookingAnonymously",
|
|
711
|
+
packageName: PACKAGE_NAME,
|
|
712
|
+
migrationOptions: {
|
|
713
|
+
optInTransformResponse: true
|
|
714
|
+
},
|
|
715
|
+
url: resolveComWixpressBookingsBookingsV2AnonymousBookingActionsUrl({
|
|
716
|
+
protoPath: "/v2/bookings/{token}/anonymous-get",
|
|
717
|
+
data: payload,
|
|
718
|
+
host
|
|
719
|
+
}),
|
|
720
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
721
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
722
|
+
{
|
|
723
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
724
|
+
paths: [
|
|
725
|
+
{ path: "booking.createdDate" },
|
|
726
|
+
{ path: "booking.startDate" },
|
|
727
|
+
{ path: "booking.endDate" },
|
|
728
|
+
{ path: "booking.updatedDate" },
|
|
729
|
+
{ path: "booking.canceledDate" }
|
|
730
|
+
]
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
734
|
+
paths: [
|
|
735
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
736
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
737
|
+
]
|
|
738
|
+
}
|
|
739
|
+
])
|
|
740
|
+
};
|
|
741
|
+
return metadata;
|
|
742
|
+
}
|
|
743
|
+
return __getBookingAnonymously;
|
|
744
|
+
}
|
|
447
745
|
function confirmOrDeclineBooking(payload) {
|
|
448
746
|
function __confirmOrDeclineBooking({ host }) {
|
|
449
747
|
const metadata = {
|
|
@@ -1514,6 +1812,111 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1514
1812
|
SortOrder2["DESC"] = "DESC";
|
|
1515
1813
|
return SortOrder2;
|
|
1516
1814
|
})(SortOrder || {});
|
|
1815
|
+
async function getAnonymousActionDetails2(options) {
|
|
1816
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1817
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1818
|
+
bookingId: options?.bookingId
|
|
1819
|
+
});
|
|
1820
|
+
const reqOpts = getAnonymousActionDetails(payload);
|
|
1821
|
+
sideEffects?.onSiteCall?.();
|
|
1822
|
+
try {
|
|
1823
|
+
const result = await httpClient.request(reqOpts);
|
|
1824
|
+
sideEffects?.onSuccess?.(result);
|
|
1825
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1826
|
+
} catch (err) {
|
|
1827
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1828
|
+
err,
|
|
1829
|
+
{
|
|
1830
|
+
spreadPathsToArguments: {},
|
|
1831
|
+
explicitPathsToArguments: { bookingId: "$[0].bookingId" },
|
|
1832
|
+
singleArgumentUnchanged: false
|
|
1833
|
+
},
|
|
1834
|
+
["options"]
|
|
1835
|
+
);
|
|
1836
|
+
sideEffects?.onError?.(err);
|
|
1837
|
+
throw transformedError;
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
async function cancelBookingAnonymously2(token, options) {
|
|
1841
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1842
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1843
|
+
token,
|
|
1844
|
+
revision: options?.revision
|
|
1845
|
+
});
|
|
1846
|
+
const reqOpts = cancelBookingAnonymously(payload);
|
|
1847
|
+
sideEffects?.onSiteCall?.();
|
|
1848
|
+
try {
|
|
1849
|
+
const result = await httpClient.request(reqOpts);
|
|
1850
|
+
sideEffects?.onSuccess?.(result);
|
|
1851
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1852
|
+
} catch (err) {
|
|
1853
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1854
|
+
err,
|
|
1855
|
+
{
|
|
1856
|
+
spreadPathsToArguments: {},
|
|
1857
|
+
explicitPathsToArguments: { token: "$[0]", revision: "$[1].revision" },
|
|
1858
|
+
singleArgumentUnchanged: false
|
|
1859
|
+
},
|
|
1860
|
+
["token", "options"]
|
|
1861
|
+
);
|
|
1862
|
+
sideEffects?.onError?.(err);
|
|
1863
|
+
throw transformedError;
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
async function rescheduleBookingAnonymously2(token, slot, options) {
|
|
1867
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1868
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1869
|
+
token,
|
|
1870
|
+
slot,
|
|
1871
|
+
revision: options?.revision
|
|
1872
|
+
});
|
|
1873
|
+
const reqOpts = rescheduleBookingAnonymously(payload);
|
|
1874
|
+
sideEffects?.onSiteCall?.();
|
|
1875
|
+
try {
|
|
1876
|
+
const result = await httpClient.request(reqOpts);
|
|
1877
|
+
sideEffects?.onSuccess?.(result);
|
|
1878
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1879
|
+
} catch (err) {
|
|
1880
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1881
|
+
err,
|
|
1882
|
+
{
|
|
1883
|
+
spreadPathsToArguments: {},
|
|
1884
|
+
explicitPathsToArguments: {
|
|
1885
|
+
token: "$[0]",
|
|
1886
|
+
slot: "$[1]",
|
|
1887
|
+
revision: "$[2].revision"
|
|
1888
|
+
},
|
|
1889
|
+
singleArgumentUnchanged: false
|
|
1890
|
+
},
|
|
1891
|
+
["token", "slot", "options"]
|
|
1892
|
+
);
|
|
1893
|
+
sideEffects?.onError?.(err);
|
|
1894
|
+
throw transformedError;
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
async function getBookingAnonymously2(token) {
|
|
1898
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1899
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ token });
|
|
1900
|
+
const reqOpts = getBookingAnonymously(payload);
|
|
1901
|
+
sideEffects?.onSiteCall?.();
|
|
1902
|
+
try {
|
|
1903
|
+
const result = await httpClient.request(reqOpts);
|
|
1904
|
+
sideEffects?.onSuccess?.(result);
|
|
1905
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1906
|
+
} catch (err) {
|
|
1907
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1908
|
+
err,
|
|
1909
|
+
{
|
|
1910
|
+
spreadPathsToArguments: {},
|
|
1911
|
+
explicitPathsToArguments: { token: "$[0]" },
|
|
1912
|
+
singleArgumentUnchanged: false
|
|
1913
|
+
},
|
|
1914
|
+
["token"]
|
|
1915
|
+
);
|
|
1916
|
+
sideEffects?.onError?.(err);
|
|
1917
|
+
throw transformedError;
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1517
1920
|
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1518
1921
|
const { httpClient, sideEffects } = arguments[2];
|
|
1519
1922
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -2274,6 +2677,37 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
|
|
|
2274
2677
|
}
|
|
2275
2678
|
|
|
2276
2679
|
// src/bookings-v2-booking-bookings.public.ts
|
|
2680
|
+
function getAnonymousActionDetails3(httpClient) {
|
|
2681
|
+
return (options) => getAnonymousActionDetails2(
|
|
2682
|
+
options,
|
|
2683
|
+
// @ts-ignore
|
|
2684
|
+
{ httpClient }
|
|
2685
|
+
);
|
|
2686
|
+
}
|
|
2687
|
+
function cancelBookingAnonymously3(httpClient) {
|
|
2688
|
+
return (token, options) => cancelBookingAnonymously2(
|
|
2689
|
+
token,
|
|
2690
|
+
options,
|
|
2691
|
+
// @ts-ignore
|
|
2692
|
+
{ httpClient }
|
|
2693
|
+
);
|
|
2694
|
+
}
|
|
2695
|
+
function rescheduleBookingAnonymously3(httpClient) {
|
|
2696
|
+
return (token, slot, options) => rescheduleBookingAnonymously2(
|
|
2697
|
+
token,
|
|
2698
|
+
slot,
|
|
2699
|
+
options,
|
|
2700
|
+
// @ts-ignore
|
|
2701
|
+
{ httpClient }
|
|
2702
|
+
);
|
|
2703
|
+
}
|
|
2704
|
+
function getBookingAnonymously3(httpClient) {
|
|
2705
|
+
return (token) => getBookingAnonymously2(
|
|
2706
|
+
token,
|
|
2707
|
+
// @ts-ignore
|
|
2708
|
+
{ httpClient }
|
|
2709
|
+
);
|
|
2710
|
+
}
|
|
2277
2711
|
function confirmOrDeclineBooking3(httpClient) {
|
|
2278
2712
|
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2279
2713
|
bookingId,
|
|
@@ -2669,6 +3103,10 @@ var onBookingUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
2669
3103
|
// src/bookings-v2-booking-bookings.context.ts
|
|
2670
3104
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
2671
3105
|
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
3106
|
+
var getAnonymousActionDetails4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAnonymousActionDetails3);
|
|
3107
|
+
var cancelBookingAnonymously4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cancelBookingAnonymously3);
|
|
3108
|
+
var rescheduleBookingAnonymously4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(rescheduleBookingAnonymously3);
|
|
3109
|
+
var getBookingAnonymously4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getBookingAnonymously3);
|
|
2672
3110
|
var confirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(confirmOrDeclineBooking3);
|
|
2673
3111
|
var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkConfirmOrDeclineBooking3);
|
|
2674
3112
|
var createBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createBooking3);
|
|
@@ -2726,6 +3164,7 @@ var onBookingUpdated2 = (0, import_event_definition_modules.createEventModule)(o
|
|
|
2726
3164
|
bulkCreateBooking,
|
|
2727
3165
|
bulkGetMultiServiceBookingAllowedActions,
|
|
2728
3166
|
cancelBooking,
|
|
3167
|
+
cancelBookingAnonymously,
|
|
2729
3168
|
cancelMultiServiceBooking,
|
|
2730
3169
|
confirmBooking,
|
|
2731
3170
|
confirmMultiServiceBooking,
|
|
@@ -2734,6 +3173,8 @@ var onBookingUpdated2 = (0, import_event_definition_modules.createEventModule)(o
|
|
|
2734
3173
|
createMultiServiceBooking,
|
|
2735
3174
|
declineBooking,
|
|
2736
3175
|
declineMultiServiceBooking,
|
|
3176
|
+
getAnonymousActionDetails,
|
|
3177
|
+
getBookingAnonymously,
|
|
2737
3178
|
getMultiServiceBooking,
|
|
2738
3179
|
getMultiServiceBookingAvailability,
|
|
2739
3180
|
markBookingAsPending,
|
|
@@ -2747,6 +3188,7 @@ var onBookingUpdated2 = (0, import_event_definition_modules.createEventModule)(o
|
|
|
2747
3188
|
onBookingUpdated,
|
|
2748
3189
|
removeBookingsFromMultiServiceBooking,
|
|
2749
3190
|
rescheduleBooking,
|
|
3191
|
+
rescheduleBookingAnonymously,
|
|
2750
3192
|
rescheduleMultiServiceBooking,
|
|
2751
3193
|
setBookingSubmissionId,
|
|
2752
3194
|
updateExtendedFields,
|