@wix/auto_sdk_bookings_bookings 1.0.113 → 1.0.115

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +81 -72
  2. package/build/cjs/index.js +247 -247
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +365 -346
  5. package/build/cjs/index.typings.js +217 -217
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +261 -255
  8. package/build/cjs/meta.js +195 -195
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +81 -72
  11. package/build/es/index.mjs +247 -247
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +365 -346
  14. package/build/es/index.typings.mjs +217 -217
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +261 -255
  17. package/build/es/meta.mjs +195 -195
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +81 -72
  20. package/build/internal/cjs/index.js +247 -247
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +365 -346
  23. package/build/internal/cjs/index.typings.js +217 -217
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +261 -255
  26. package/build/internal/cjs/meta.js +195 -195
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +81 -72
  29. package/build/internal/es/index.mjs +247 -247
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +365 -346
  32. package/build/internal/es/index.typings.mjs +217 -217
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +261 -255
  35. package/build/internal/es/meta.mjs +195 -195
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -39,15 +39,15 @@ __export(index_exports, {
39
39
  bulkConfirmOrDeclineBooking: () => bulkConfirmOrDeclineBooking4,
40
40
  bulkCreateBooking: () => bulkCreateBooking4,
41
41
  bulkGetMultiServiceBookingAllowedActions: () => bulkGetMultiServiceBookingAllowedActions4,
42
- cancelBooking: () => cancelBooking3,
42
+ cancelBooking: () => cancelBooking4,
43
43
  cancelBookingAnonymously: () => cancelBookingAnonymously4,
44
44
  cancelMultiServiceBooking: () => cancelMultiServiceBooking4,
45
- confirmBooking: () => confirmBooking3,
45
+ confirmBooking: () => confirmBooking4,
46
46
  confirmMultiServiceBooking: () => confirmMultiServiceBooking4,
47
47
  confirmOrDeclineBooking: () => confirmOrDeclineBooking4,
48
48
  createBooking: () => createBooking4,
49
49
  createMultiServiceBooking: () => createMultiServiceBooking4,
50
- declineBooking: () => declineBooking3,
50
+ declineBooking: () => declineBooking4,
51
51
  declineMultiServiceBooking: () => declineMultiServiceBooking4,
52
52
  getAnonymousActionDetails: () => getAnonymousActionDetails4,
53
53
  getBookingAnonymously: () => getBookingAnonymously4,
@@ -70,7 +70,7 @@ __export(index_exports, {
70
70
  rescheduleMultiServiceBooking: () => rescheduleMultiServiceBooking4,
71
71
  setBookingSubmissionId: () => setBookingSubmissionId4,
72
72
  updateExtendedFields: () => updateExtendedFields4,
73
- updateNumberOfParticipants: () => updateNumberOfParticipants3
73
+ updateNumberOfParticipants: () => updateNumberOfParticipants4
74
74
  });
75
75
  module.exports = __toCommonJS(index_exports);
76
76
 
@@ -399,57 +399,6 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
399
399
  };
400
400
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
401
401
  }
402
- function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
403
- const domainToMappings = {
404
- "www.wixapis.com": [
405
- {
406
- srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
407
- destPath: "/v2/bookings/confirmation"
408
- },
409
- {
410
- srcPath: "/bookings/v2/confirmation",
411
- destPath: "/v2/confirmation"
412
- },
413
- {
414
- srcPath: "/bookings/v2/bulk/confirmation",
415
- destPath: "/v2/bulk/confirmation"
416
- },
417
- {
418
- srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
419
- destPath: "/v2/bulk/bookings/confirmOrDecline"
420
- },
421
- {
422
- srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
423
- destPath: "/v2/bulk/confirmation"
424
- },
425
- {
426
- srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
427
- destPath: "/v2/bulk/bookings/confirmOrDecline"
428
- }
429
- ],
430
- "*.dev.wix-code.com": [
431
- {
432
- srcPath: "/bookings/v2/confirmation",
433
- destPath: "/v2/confirmation"
434
- },
435
- {
436
- srcPath: "/bookings/v2/bulk/bookings",
437
- destPath: "/v2/bulk/bookings"
438
- }
439
- ],
440
- _: [
441
- {
442
- srcPath: "/bookings/v2/confirmation",
443
- destPath: "/v2/confirmation"
444
- },
445
- {
446
- srcPath: "/bookings/v2/bulk/bookings",
447
- destPath: "/v2/bulk/bookings"
448
- }
449
- ]
450
- };
451
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
452
- }
453
402
  function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
454
403
  const domainToMappings = {
455
404
  _: [
@@ -603,7 +552,142 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
603
552
  };
604
553
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
605
554
  }
555
+ function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
556
+ const domainToMappings = {
557
+ "www.wixapis.com": [
558
+ {
559
+ srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
560
+ destPath: "/v2/bookings/confirmation"
561
+ },
562
+ {
563
+ srcPath: "/bookings/v2/confirmation",
564
+ destPath: "/v2/confirmation"
565
+ },
566
+ {
567
+ srcPath: "/bookings/v2/bulk/confirmation",
568
+ destPath: "/v2/bulk/confirmation"
569
+ },
570
+ {
571
+ srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
572
+ destPath: "/v2/bulk/bookings/confirmOrDecline"
573
+ },
574
+ {
575
+ srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
576
+ destPath: "/v2/bulk/confirmation"
577
+ },
578
+ {
579
+ srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
580
+ destPath: "/v2/bulk/bookings/confirmOrDecline"
581
+ }
582
+ ],
583
+ "*.dev.wix-code.com": [
584
+ {
585
+ srcPath: "/bookings/v2/confirmation",
586
+ destPath: "/v2/confirmation"
587
+ },
588
+ {
589
+ srcPath: "/bookings/v2/bulk/bookings",
590
+ destPath: "/v2/bulk/bookings"
591
+ }
592
+ ],
593
+ _: [
594
+ {
595
+ srcPath: "/bookings/v2/confirmation",
596
+ destPath: "/v2/confirmation"
597
+ },
598
+ {
599
+ srcPath: "/bookings/v2/bulk/bookings",
600
+ destPath: "/v2/bulk/bookings"
601
+ }
602
+ ]
603
+ };
604
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
605
+ }
606
606
  var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
607
+ function confirmOrDeclineBooking(payload) {
608
+ function __confirmOrDeclineBooking({ host }) {
609
+ const metadata = {
610
+ entityFqdn: "wix.bookings.v2.booking",
611
+ method: "POST",
612
+ methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
613
+ packageName: PACKAGE_NAME,
614
+ migrationOptions: {
615
+ optInTransformResponse: true
616
+ },
617
+ url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
618
+ protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
619
+ data: payload,
620
+ host
621
+ }),
622
+ data: payload,
623
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
624
+ {
625
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
626
+ paths: [
627
+ { path: "booking.createdDate" },
628
+ { path: "booking.startDate" },
629
+ { path: "booking.endDate" },
630
+ { path: "booking.updatedDate" },
631
+ { path: "booking.canceledDate" }
632
+ ]
633
+ },
634
+ {
635
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
636
+ paths: [
637
+ { path: "booking.contactDetails.fullAddress.geocode.latitude" },
638
+ { path: "booking.contactDetails.fullAddress.geocode.longitude" }
639
+ ]
640
+ }
641
+ ])
642
+ };
643
+ return metadata;
644
+ }
645
+ return __confirmOrDeclineBooking;
646
+ }
647
+ function bulkConfirmOrDeclineBooking(payload) {
648
+ function __bulkConfirmOrDeclineBooking({ host }) {
649
+ const metadata = {
650
+ entityFqdn: "wix.bookings.v2.booking",
651
+ method: "POST",
652
+ methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
653
+ packageName: PACKAGE_NAME,
654
+ migrationOptions: {
655
+ optInTransformResponse: true
656
+ },
657
+ url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
658
+ protoPath: "/v2/bulk/bookings/confirmOrDecline",
659
+ data: payload,
660
+ host
661
+ }),
662
+ data: payload,
663
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
664
+ {
665
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
666
+ paths: [
667
+ { path: "results.item.createdDate" },
668
+ { path: "results.item.startDate" },
669
+ { path: "results.item.endDate" },
670
+ { path: "results.item.updatedDate" },
671
+ { path: "results.item.canceledDate" }
672
+ ]
673
+ },
674
+ {
675
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
676
+ paths: [
677
+ {
678
+ path: "results.item.contactDetails.fullAddress.geocode.latitude"
679
+ },
680
+ {
681
+ path: "results.item.contactDetails.fullAddress.geocode.longitude"
682
+ }
683
+ ]
684
+ }
685
+ ])
686
+ };
687
+ return metadata;
688
+ }
689
+ return __bulkConfirmOrDeclineBooking;
690
+ }
607
691
  function createMultiServiceBooking(payload) {
608
692
  function __createMultiServiceBooking({ host }) {
609
693
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -1061,90 +1145,6 @@ function removeBookingsFromMultiServiceBooking(payload) {
1061
1145
  }
1062
1146
  return __removeBookingsFromMultiServiceBooking;
1063
1147
  }
1064
- function confirmOrDeclineBooking(payload) {
1065
- function __confirmOrDeclineBooking({ host }) {
1066
- const metadata = {
1067
- entityFqdn: "wix.bookings.v2.booking",
1068
- method: "POST",
1069
- methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
1070
- packageName: PACKAGE_NAME,
1071
- migrationOptions: {
1072
- optInTransformResponse: true
1073
- },
1074
- url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
1075
- protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
1076
- data: payload,
1077
- host
1078
- }),
1079
- data: payload,
1080
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1081
- {
1082
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1083
- paths: [
1084
- { path: "booking.createdDate" },
1085
- { path: "booking.startDate" },
1086
- { path: "booking.endDate" },
1087
- { path: "booking.updatedDate" },
1088
- { path: "booking.canceledDate" }
1089
- ]
1090
- },
1091
- {
1092
- transformFn: import_float2.transformRESTFloatToSDKFloat,
1093
- paths: [
1094
- { path: "booking.contactDetails.fullAddress.geocode.latitude" },
1095
- { path: "booking.contactDetails.fullAddress.geocode.longitude" }
1096
- ]
1097
- }
1098
- ])
1099
- };
1100
- return metadata;
1101
- }
1102
- return __confirmOrDeclineBooking;
1103
- }
1104
- function bulkConfirmOrDeclineBooking(payload) {
1105
- function __bulkConfirmOrDeclineBooking({ host }) {
1106
- const metadata = {
1107
- entityFqdn: "wix.bookings.v2.booking",
1108
- method: "POST",
1109
- methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
1110
- packageName: PACKAGE_NAME,
1111
- migrationOptions: {
1112
- optInTransformResponse: true
1113
- },
1114
- url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
1115
- protoPath: "/v2/bulk/bookings/confirmOrDecline",
1116
- data: payload,
1117
- host
1118
- }),
1119
- data: payload,
1120
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1121
- {
1122
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1123
- paths: [
1124
- { path: "results.item.createdDate" },
1125
- { path: "results.item.startDate" },
1126
- { path: "results.item.endDate" },
1127
- { path: "results.item.updatedDate" },
1128
- { path: "results.item.canceledDate" }
1129
- ]
1130
- },
1131
- {
1132
- transformFn: import_float2.transformRESTFloatToSDKFloat,
1133
- paths: [
1134
- {
1135
- path: "results.item.contactDetails.fullAddress.geocode.latitude"
1136
- },
1137
- {
1138
- path: "results.item.contactDetails.fullAddress.geocode.longitude"
1139
- }
1140
- ]
1141
- }
1142
- ])
1143
- };
1144
- return metadata;
1145
- }
1146
- return __bulkConfirmOrDeclineBooking;
1147
- }
1148
1148
  function createBooking(payload) {
1149
1149
  function __createBooking({ host }) {
1150
1150
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -1311,8 +1311,8 @@ function rescheduleBooking(payload) {
1311
1311
  }
1312
1312
  return __rescheduleBooking;
1313
1313
  }
1314
- function bookingsConfirmBooking(payload) {
1315
- function __bookingsConfirmBooking({ host }) {
1314
+ function confirmBooking(payload) {
1315
+ function __confirmBooking({ host }) {
1316
1316
  const metadata = {
1317
1317
  entityFqdn: "wix.bookings.v2.booking",
1318
1318
  method: "POST",
@@ -1349,7 +1349,7 @@ function bookingsConfirmBooking(payload) {
1349
1349
  };
1350
1350
  return metadata;
1351
1351
  }
1352
- return __bookingsConfirmBooking;
1352
+ return __confirmBooking;
1353
1353
  }
1354
1354
  function setBookingSubmissionId(payload) {
1355
1355
  function __setBookingSubmissionId({ host }) {
@@ -1412,8 +1412,8 @@ function updateExtendedFields(payload) {
1412
1412
  }
1413
1413
  return __updateExtendedFields;
1414
1414
  }
1415
- function bookingsDeclineBooking(payload) {
1416
- function __bookingsDeclineBooking({ host }) {
1415
+ function declineBooking(payload) {
1416
+ function __declineBooking({ host }) {
1417
1417
  const metadata = {
1418
1418
  entityFqdn: "wix.bookings.v2.booking",
1419
1419
  method: "POST",
@@ -1450,10 +1450,10 @@ function bookingsDeclineBooking(payload) {
1450
1450
  };
1451
1451
  return metadata;
1452
1452
  }
1453
- return __bookingsDeclineBooking;
1453
+ return __declineBooking;
1454
1454
  }
1455
- function bookingsCancelBooking(payload) {
1456
- function __bookingsCancelBooking({ host }) {
1455
+ function cancelBooking(payload) {
1456
+ function __cancelBooking({ host }) {
1457
1457
  const metadata = {
1458
1458
  entityFqdn: "wix.bookings.v2.booking",
1459
1459
  method: "POST",
@@ -1490,10 +1490,10 @@ function bookingsCancelBooking(payload) {
1490
1490
  };
1491
1491
  return metadata;
1492
1492
  }
1493
- return __bookingsCancelBooking;
1493
+ return __cancelBooking;
1494
1494
  }
1495
- function bookingsUpdateNumberOfParticipants(payload) {
1496
- function __bookingsUpdateNumberOfParticipants({ host }) {
1495
+ function updateNumberOfParticipants(payload) {
1496
+ function __updateNumberOfParticipants({ host }) {
1497
1497
  const metadata = {
1498
1498
  entityFqdn: "wix.bookings.v2.booking",
1499
1499
  method: "POST",
@@ -1530,7 +1530,7 @@ function bookingsUpdateNumberOfParticipants(payload) {
1530
1530
  };
1531
1531
  return metadata;
1532
1532
  }
1533
- return __bookingsUpdateNumberOfParticipants;
1533
+ return __updateNumberOfParticipants;
1534
1534
  }
1535
1535
  function bulkCalculateAllowedActions(payload) {
1536
1536
  function __bulkCalculateAllowedActions({ host }) {
@@ -1857,6 +1857,64 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
1857
1857
  SortOrder2["DESC"] = "DESC";
1858
1858
  return SortOrder2;
1859
1859
  })(SortOrder || {});
1860
+ async function confirmOrDeclineBooking2(bookingId, options) {
1861
+ const { httpClient, sideEffects } = arguments[2];
1862
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1863
+ bookingId,
1864
+ paymentStatus: options?.paymentStatus
1865
+ });
1866
+ const reqOpts = confirmOrDeclineBooking(payload);
1867
+ sideEffects?.onSiteCall?.();
1868
+ try {
1869
+ const result = await httpClient.request(reqOpts);
1870
+ sideEffects?.onSuccess?.(result);
1871
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1872
+ } catch (err) {
1873
+ const transformedError = (0, import_transform_error.transformError)(
1874
+ err,
1875
+ {
1876
+ spreadPathsToArguments: {},
1877
+ explicitPathsToArguments: {
1878
+ bookingId: "$[0]",
1879
+ paymentStatus: "$[1].paymentStatus"
1880
+ },
1881
+ singleArgumentUnchanged: false
1882
+ },
1883
+ ["bookingId", "options"]
1884
+ );
1885
+ sideEffects?.onError?.(err);
1886
+ throw transformedError;
1887
+ }
1888
+ }
1889
+ async function bulkConfirmOrDeclineBooking2(details, options) {
1890
+ const { httpClient, sideEffects } = arguments[2];
1891
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1892
+ details,
1893
+ returnEntity: options?.returnEntity
1894
+ });
1895
+ const reqOpts = bulkConfirmOrDeclineBooking(payload);
1896
+ sideEffects?.onSiteCall?.();
1897
+ try {
1898
+ const result = await httpClient.request(reqOpts);
1899
+ sideEffects?.onSuccess?.(result);
1900
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1901
+ } catch (err) {
1902
+ const transformedError = (0, import_transform_error.transformError)(
1903
+ err,
1904
+ {
1905
+ spreadPathsToArguments: {},
1906
+ explicitPathsToArguments: {
1907
+ details: "$[0]",
1908
+ returnEntity: "$[1].returnEntity"
1909
+ },
1910
+ singleArgumentUnchanged: false
1911
+ },
1912
+ ["details", "options"]
1913
+ );
1914
+ sideEffects?.onError?.(err);
1915
+ throw transformedError;
1916
+ }
1917
+ }
1860
1918
  async function createMultiServiceBooking2(bookings, options) {
1861
1919
  const { httpClient, sideEffects } = arguments[2];
1862
1920
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -2218,64 +2276,6 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
2218
2276
  throw transformedError;
2219
2277
  }
2220
2278
  }
2221
- async function confirmOrDeclineBooking2(bookingId, options) {
2222
- const { httpClient, sideEffects } = arguments[2];
2223
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2224
- bookingId,
2225
- paymentStatus: options?.paymentStatus
2226
- });
2227
- const reqOpts = confirmOrDeclineBooking(payload);
2228
- sideEffects?.onSiteCall?.();
2229
- try {
2230
- const result = await httpClient.request(reqOpts);
2231
- sideEffects?.onSuccess?.(result);
2232
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2233
- } catch (err) {
2234
- const transformedError = (0, import_transform_error.transformError)(
2235
- err,
2236
- {
2237
- spreadPathsToArguments: {},
2238
- explicitPathsToArguments: {
2239
- bookingId: "$[0]",
2240
- paymentStatus: "$[1].paymentStatus"
2241
- },
2242
- singleArgumentUnchanged: false
2243
- },
2244
- ["bookingId", "options"]
2245
- );
2246
- sideEffects?.onError?.(err);
2247
- throw transformedError;
2248
- }
2249
- }
2250
- async function bulkConfirmOrDeclineBooking2(details, options) {
2251
- const { httpClient, sideEffects } = arguments[2];
2252
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2253
- details,
2254
- returnEntity: options?.returnEntity
2255
- });
2256
- const reqOpts = bulkConfirmOrDeclineBooking(payload);
2257
- sideEffects?.onSiteCall?.();
2258
- try {
2259
- const result = await httpClient.request(reqOpts);
2260
- sideEffects?.onSuccess?.(result);
2261
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2262
- } catch (err) {
2263
- const transformedError = (0, import_transform_error.transformError)(
2264
- err,
2265
- {
2266
- spreadPathsToArguments: {},
2267
- explicitPathsToArguments: {
2268
- details: "$[0]",
2269
- returnEntity: "$[1].returnEntity"
2270
- },
2271
- singleArgumentUnchanged: false
2272
- },
2273
- ["details", "options"]
2274
- );
2275
- sideEffects?.onError?.(err);
2276
- throw transformedError;
2277
- }
2278
- }
2279
2279
  async function createBooking2(booking, options) {
2280
2280
  const { httpClient, sideEffects } = arguments[2];
2281
2281
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -2381,7 +2381,7 @@ async function rescheduleBooking2(bookingId, slot, options) {
2381
2381
  throw transformedError;
2382
2382
  }
2383
2383
  }
2384
- async function confirmBooking(bookingId, revision, options) {
2384
+ async function confirmBooking2(bookingId, revision, options) {
2385
2385
  const { httpClient, sideEffects } = arguments[3];
2386
2386
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2387
2387
  bookingId,
@@ -2392,7 +2392,7 @@ async function confirmBooking(bookingId, revision, options) {
2392
2392
  doubleBooked: options?.doubleBooked,
2393
2393
  flowControlSettings: options?.flowControlSettings
2394
2394
  });
2395
- const reqOpts = bookingsConfirmBooking(payload);
2395
+ const reqOpts = confirmBooking(payload);
2396
2396
  sideEffects?.onSiteCall?.();
2397
2397
  try {
2398
2398
  const result = await httpClient.request(reqOpts);
@@ -2477,7 +2477,7 @@ async function updateExtendedFields2(_id, namespace, options) {
2477
2477
  throw transformedError;
2478
2478
  }
2479
2479
  }
2480
- async function declineBooking(bookingId, revision, options) {
2480
+ async function declineBooking2(bookingId, revision, options) {
2481
2481
  const { httpClient, sideEffects } = arguments[3];
2482
2482
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2483
2483
  bookingId,
@@ -2487,7 +2487,7 @@ async function declineBooking(bookingId, revision, options) {
2487
2487
  doubleBooked: options?.doubleBooked,
2488
2488
  flowControlSettings: options?.flowControlSettings
2489
2489
  });
2490
- const reqOpts = bookingsDeclineBooking(payload);
2490
+ const reqOpts = declineBooking(payload);
2491
2491
  sideEffects?.onSiteCall?.();
2492
2492
  try {
2493
2493
  const result = await httpClient.request(reqOpts);
@@ -2514,7 +2514,7 @@ async function declineBooking(bookingId, revision, options) {
2514
2514
  throw transformedError;
2515
2515
  }
2516
2516
  }
2517
- async function cancelBooking(bookingId, options) {
2517
+ async function cancelBooking2(bookingId, options) {
2518
2518
  const { httpClient, sideEffects } = arguments[2];
2519
2519
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2520
2520
  bookingId,
@@ -2522,7 +2522,7 @@ async function cancelBooking(bookingId, options) {
2522
2522
  flowControlSettings: options?.flowControlSettings,
2523
2523
  revision: options?.revision
2524
2524
  });
2525
- const reqOpts = bookingsCancelBooking(payload);
2525
+ const reqOpts = cancelBooking(payload);
2526
2526
  sideEffects?.onSiteCall?.();
2527
2527
  try {
2528
2528
  const result = await httpClient.request(reqOpts);
@@ -2547,7 +2547,7 @@ async function cancelBooking(bookingId, options) {
2547
2547
  throw transformedError;
2548
2548
  }
2549
2549
  }
2550
- async function updateNumberOfParticipants(bookingId, options) {
2550
+ async function updateNumberOfParticipants2(bookingId, options) {
2551
2551
  const { httpClient, sideEffects } = arguments[2];
2552
2552
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2553
2553
  bookingId,
@@ -2555,7 +2555,7 @@ async function updateNumberOfParticipants(bookingId, options) {
2555
2555
  totalParticipants: options?.totalParticipants,
2556
2556
  participantsChoices: options?.participantsChoices
2557
2557
  });
2558
- const reqOpts = bookingsUpdateNumberOfParticipants(payload);
2558
+ const reqOpts = updateNumberOfParticipants(payload);
2559
2559
  sideEffects?.onSiteCall?.();
2560
2560
  try {
2561
2561
  const result = await httpClient.request(reqOpts);
@@ -2776,6 +2776,22 @@ async function getSchedulingUrl2(serviceId) {
2776
2776
  }
2777
2777
 
2778
2778
  // src/bookings-v2-booking-bookings.public.ts
2779
+ function confirmOrDeclineBooking3(httpClient) {
2780
+ return (bookingId, options) => confirmOrDeclineBooking2(
2781
+ bookingId,
2782
+ options,
2783
+ // @ts-ignore
2784
+ { httpClient }
2785
+ );
2786
+ }
2787
+ function bulkConfirmOrDeclineBooking3(httpClient) {
2788
+ return (details, options) => bulkConfirmOrDeclineBooking2(
2789
+ details,
2790
+ options,
2791
+ // @ts-ignore
2792
+ { httpClient }
2793
+ );
2794
+ }
2779
2795
  function createMultiServiceBooking3(httpClient) {
2780
2796
  return (bookings, options) => createMultiServiceBooking2(
2781
2797
  bookings,
@@ -2862,22 +2878,6 @@ function removeBookingsFromMultiServiceBooking3(httpClient) {
2862
2878
  { httpClient }
2863
2879
  );
2864
2880
  }
2865
- function confirmOrDeclineBooking3(httpClient) {
2866
- return (bookingId, options) => confirmOrDeclineBooking2(
2867
- bookingId,
2868
- options,
2869
- // @ts-ignore
2870
- { httpClient }
2871
- );
2872
- }
2873
- function bulkConfirmOrDeclineBooking3(httpClient) {
2874
- return (details, options) => bulkConfirmOrDeclineBooking2(
2875
- details,
2876
- options,
2877
- // @ts-ignore
2878
- { httpClient }
2879
- );
2880
- }
2881
2881
  function createBooking3(httpClient) {
2882
2882
  return (booking, options) => createBooking2(
2883
2883
  booking,
@@ -2903,8 +2903,8 @@ function rescheduleBooking3(httpClient) {
2903
2903
  { httpClient }
2904
2904
  );
2905
2905
  }
2906
- function confirmBooking2(httpClient) {
2907
- return (bookingId, revision, options) => confirmBooking(
2906
+ function confirmBooking3(httpClient) {
2907
+ return (bookingId, revision, options) => confirmBooking2(
2908
2908
  bookingId,
2909
2909
  revision,
2910
2910
  options,
@@ -2929,8 +2929,8 @@ function updateExtendedFields3(httpClient) {
2929
2929
  { httpClient }
2930
2930
  );
2931
2931
  }
2932
- function declineBooking2(httpClient) {
2933
- return (bookingId, revision, options) => declineBooking(
2932
+ function declineBooking3(httpClient) {
2933
+ return (bookingId, revision, options) => declineBooking2(
2934
2934
  bookingId,
2935
2935
  revision,
2936
2936
  options,
@@ -2938,16 +2938,16 @@ function declineBooking2(httpClient) {
2938
2938
  { httpClient }
2939
2939
  );
2940
2940
  }
2941
- function cancelBooking2(httpClient) {
2942
- return (bookingId, options) => cancelBooking(
2941
+ function cancelBooking3(httpClient) {
2942
+ return (bookingId, options) => cancelBooking2(
2943
2943
  bookingId,
2944
2944
  options,
2945
2945
  // @ts-ignore
2946
2946
  { httpClient }
2947
2947
  );
2948
2948
  }
2949
- function updateNumberOfParticipants2(httpClient) {
2950
- return (bookingId, options) => updateNumberOfParticipants(
2949
+ function updateNumberOfParticipants3(httpClient) {
2950
+ return (bookingId, options) => updateNumberOfParticipants2(
2951
2951
  bookingId,
2952
2952
  options,
2953
2953
  // @ts-ignore
@@ -3257,6 +3257,8 @@ var onBookingNumberOfParticipantsUpdated = (0, import_sdk_types.EventDefinition)
3257
3257
  // src/bookings-v2-booking-bookings.context.ts
3258
3258
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
3259
3259
  var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
3260
+ var confirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(confirmOrDeclineBooking3);
3261
+ var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkConfirmOrDeclineBooking3);
3260
3262
  var createMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createMultiServiceBooking3);
3261
3263
  var rescheduleMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(rescheduleMultiServiceBooking3);
3262
3264
  var getMultiServiceBookingAvailability4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMultiServiceBookingAvailability3);
@@ -3270,17 +3272,15 @@ var bulkGetMultiServiceBookingAllowedActions4 = /* @__PURE__ */ (0, import_rest_
3270
3272
  var getMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMultiServiceBooking3);
3271
3273
  var addBookingsToMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addBookingsToMultiServiceBooking3);
3272
3274
  var removeBookingsFromMultiServiceBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeBookingsFromMultiServiceBooking3);
3273
- var confirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(confirmOrDeclineBooking3);
3274
- var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkConfirmOrDeclineBooking3);
3275
3275
  var createBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createBooking3);
3276
3276
  var bulkCreateBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateBooking3);
3277
3277
  var rescheduleBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(rescheduleBooking3);
3278
- var confirmBooking3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(confirmBooking2);
3278
+ var confirmBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(confirmBooking3);
3279
3279
  var setBookingSubmissionId4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setBookingSubmissionId3);
3280
3280
  var updateExtendedFields4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateExtendedFields3);
3281
- var declineBooking3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(declineBooking2);
3282
- var cancelBooking3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cancelBooking2);
3283
- var updateNumberOfParticipants3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateNumberOfParticipants2);
3281
+ var declineBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(declineBooking3);
3282
+ var cancelBooking4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cancelBooking3);
3283
+ var updateNumberOfParticipants4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateNumberOfParticipants3);
3284
3284
  var bulkCalculateAllowedActions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCalculateAllowedActions3);
3285
3285
  var markBookingAsPending4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(markBookingAsPending3);
3286
3286
  var getAnonymousActionDetails4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAnonymousActionDetails3);