@wix/auto_sdk_bookings_bookings 1.0.107 → 1.0.109

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 +83 -83
  2. package/build/cjs/index.js +211 -211
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +386 -371
  5. package/build/cjs/index.typings.js +193 -193
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +266 -251
  8. package/build/cjs/meta.js +171 -171
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +83 -83
  11. package/build/es/index.mjs +211 -211
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +386 -371
  14. package/build/es/index.typings.mjs +193 -193
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +266 -251
  17. package/build/es/meta.mjs +171 -171
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +83 -83
  20. package/build/internal/cjs/index.js +211 -211
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +378 -385
  23. package/build/internal/cjs/index.typings.js +193 -193
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +266 -251
  26. package/build/internal/cjs/meta.js +171 -171
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +83 -83
  29. package/build/internal/es/index.mjs +211 -211
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +378 -385
  32. package/build/internal/es/index.typings.mjs +193 -193
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +266 -251
  35. package/build/internal/es/meta.mjs +171 -171
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -383,57 +383,6 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
383
383
  };
384
384
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
385
385
  }
386
- function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
387
- const domainToMappings = {
388
- "www.wixapis.com": [
389
- {
390
- srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
391
- destPath: "/v2/bookings/confirmation"
392
- },
393
- {
394
- srcPath: "/bookings/v2/confirmation",
395
- destPath: "/v2/confirmation"
396
- },
397
- {
398
- srcPath: "/bookings/v2/bulk/confirmation",
399
- destPath: "/v2/bulk/confirmation"
400
- },
401
- {
402
- srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
403
- destPath: "/v2/bulk/bookings/confirmOrDecline"
404
- },
405
- {
406
- srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
407
- destPath: "/v2/bulk/confirmation"
408
- },
409
- {
410
- srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
411
- destPath: "/v2/bulk/bookings/confirmOrDecline"
412
- }
413
- ],
414
- "*.dev.wix-code.com": [
415
- {
416
- srcPath: "/bookings/v2/confirmation",
417
- destPath: "/v2/confirmation"
418
- },
419
- {
420
- srcPath: "/bookings/v2/bulk/bookings",
421
- destPath: "/v2/bulk/bookings"
422
- }
423
- ],
424
- _: [
425
- {
426
- srcPath: "/bookings/v2/confirmation",
427
- destPath: "/v2/confirmation"
428
- },
429
- {
430
- srcPath: "/bookings/v2/bulk/bookings",
431
- destPath: "/v2/bulk/bookings"
432
- }
433
- ]
434
- };
435
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
436
- }
437
386
  function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
438
387
  const domainToMappings = {
439
388
  _: [
@@ -587,7 +536,142 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
587
536
  };
588
537
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
589
538
  }
539
+ function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
540
+ const domainToMappings = {
541
+ "www.wixapis.com": [
542
+ {
543
+ srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
544
+ destPath: "/v2/bookings/confirmation"
545
+ },
546
+ {
547
+ srcPath: "/bookings/v2/confirmation",
548
+ destPath: "/v2/confirmation"
549
+ },
550
+ {
551
+ srcPath: "/bookings/v2/bulk/confirmation",
552
+ destPath: "/v2/bulk/confirmation"
553
+ },
554
+ {
555
+ srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
556
+ destPath: "/v2/bulk/bookings/confirmOrDecline"
557
+ },
558
+ {
559
+ srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
560
+ destPath: "/v2/bulk/confirmation"
561
+ },
562
+ {
563
+ srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
564
+ destPath: "/v2/bulk/bookings/confirmOrDecline"
565
+ }
566
+ ],
567
+ "*.dev.wix-code.com": [
568
+ {
569
+ srcPath: "/bookings/v2/confirmation",
570
+ destPath: "/v2/confirmation"
571
+ },
572
+ {
573
+ srcPath: "/bookings/v2/bulk/bookings",
574
+ destPath: "/v2/bulk/bookings"
575
+ }
576
+ ],
577
+ _: [
578
+ {
579
+ srcPath: "/bookings/v2/confirmation",
580
+ destPath: "/v2/confirmation"
581
+ },
582
+ {
583
+ srcPath: "/bookings/v2/bulk/bookings",
584
+ destPath: "/v2/bulk/bookings"
585
+ }
586
+ ]
587
+ };
588
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
589
+ }
590
590
  var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
591
+ function confirmOrDeclineBooking(payload) {
592
+ function __confirmOrDeclineBooking({ host }) {
593
+ const metadata = {
594
+ entityFqdn: "wix.bookings.v2.booking",
595
+ method: "POST",
596
+ methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
597
+ packageName: PACKAGE_NAME,
598
+ migrationOptions: {
599
+ optInTransformResponse: true
600
+ },
601
+ url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
602
+ protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
603
+ data: payload,
604
+ host
605
+ }),
606
+ data: payload,
607
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
608
+ {
609
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
610
+ paths: [
611
+ { path: "booking.createdDate" },
612
+ { path: "booking.startDate" },
613
+ { path: "booking.endDate" },
614
+ { path: "booking.updatedDate" },
615
+ { path: "booking.canceledDate" }
616
+ ]
617
+ },
618
+ {
619
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
620
+ paths: [
621
+ { path: "booking.contactDetails.fullAddress.geocode.latitude" },
622
+ { path: "booking.contactDetails.fullAddress.geocode.longitude" }
623
+ ]
624
+ }
625
+ ])
626
+ };
627
+ return metadata;
628
+ }
629
+ return __confirmOrDeclineBooking;
630
+ }
631
+ function bulkConfirmOrDeclineBooking(payload) {
632
+ function __bulkConfirmOrDeclineBooking({ host }) {
633
+ const metadata = {
634
+ entityFqdn: "wix.bookings.v2.booking",
635
+ method: "POST",
636
+ methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
637
+ packageName: PACKAGE_NAME,
638
+ migrationOptions: {
639
+ optInTransformResponse: true
640
+ },
641
+ url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
642
+ protoPath: "/v2/bulk/bookings/confirmOrDecline",
643
+ data: payload,
644
+ host
645
+ }),
646
+ data: payload,
647
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
648
+ {
649
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
650
+ paths: [
651
+ { path: "results.item.createdDate" },
652
+ { path: "results.item.startDate" },
653
+ { path: "results.item.endDate" },
654
+ { path: "results.item.updatedDate" },
655
+ { path: "results.item.canceledDate" }
656
+ ]
657
+ },
658
+ {
659
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
660
+ paths: [
661
+ {
662
+ path: "results.item.contactDetails.fullAddress.geocode.latitude"
663
+ },
664
+ {
665
+ path: "results.item.contactDetails.fullAddress.geocode.longitude"
666
+ }
667
+ ]
668
+ }
669
+ ])
670
+ };
671
+ return metadata;
672
+ }
673
+ return __bulkConfirmOrDeclineBooking;
674
+ }
591
675
  function createMultiServiceBooking(payload) {
592
676
  function __createMultiServiceBooking({ host }) {
593
677
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -1045,90 +1129,6 @@ function removeBookingsFromMultiServiceBooking(payload) {
1045
1129
  }
1046
1130
  return __removeBookingsFromMultiServiceBooking;
1047
1131
  }
1048
- function confirmOrDeclineBooking(payload) {
1049
- function __confirmOrDeclineBooking({ host }) {
1050
- const metadata = {
1051
- entityFqdn: "wix.bookings.v2.booking",
1052
- method: "POST",
1053
- methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
1054
- packageName: PACKAGE_NAME,
1055
- migrationOptions: {
1056
- optInTransformResponse: true
1057
- },
1058
- url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
1059
- protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
1060
- data: payload,
1061
- host
1062
- }),
1063
- data: payload,
1064
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1065
- {
1066
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1067
- paths: [
1068
- { path: "booking.createdDate" },
1069
- { path: "booking.startDate" },
1070
- { path: "booking.endDate" },
1071
- { path: "booking.updatedDate" },
1072
- { path: "booking.canceledDate" }
1073
- ]
1074
- },
1075
- {
1076
- transformFn: import_float2.transformRESTFloatToSDKFloat,
1077
- paths: [
1078
- { path: "booking.contactDetails.fullAddress.geocode.latitude" },
1079
- { path: "booking.contactDetails.fullAddress.geocode.longitude" }
1080
- ]
1081
- }
1082
- ])
1083
- };
1084
- return metadata;
1085
- }
1086
- return __confirmOrDeclineBooking;
1087
- }
1088
- function bulkConfirmOrDeclineBooking(payload) {
1089
- function __bulkConfirmOrDeclineBooking({ host }) {
1090
- const metadata = {
1091
- entityFqdn: "wix.bookings.v2.booking",
1092
- method: "POST",
1093
- methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
1094
- packageName: PACKAGE_NAME,
1095
- migrationOptions: {
1096
- optInTransformResponse: true
1097
- },
1098
- url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
1099
- protoPath: "/v2/bulk/bookings/confirmOrDecline",
1100
- data: payload,
1101
- host
1102
- }),
1103
- data: payload,
1104
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1105
- {
1106
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1107
- paths: [
1108
- { path: "results.item.createdDate" },
1109
- { path: "results.item.startDate" },
1110
- { path: "results.item.endDate" },
1111
- { path: "results.item.updatedDate" },
1112
- { path: "results.item.canceledDate" }
1113
- ]
1114
- },
1115
- {
1116
- transformFn: import_float2.transformRESTFloatToSDKFloat,
1117
- paths: [
1118
- {
1119
- path: "results.item.contactDetails.fullAddress.geocode.latitude"
1120
- },
1121
- {
1122
- path: "results.item.contactDetails.fullAddress.geocode.longitude"
1123
- }
1124
- ]
1125
- }
1126
- ])
1127
- };
1128
- return metadata;
1129
- }
1130
- return __bulkConfirmOrDeclineBooking;
1131
- }
1132
1132
  function createBooking(payload) {
1133
1133
  function __createBooking({ host }) {
1134
1134
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -1820,6 +1820,64 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
1820
1820
  SortOrder2["DESC"] = "DESC";
1821
1821
  return SortOrder2;
1822
1822
  })(SortOrder || {});
1823
+ async function confirmOrDeclineBooking2(bookingId, options) {
1824
+ const { httpClient, sideEffects } = arguments[2];
1825
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1826
+ bookingId,
1827
+ paymentStatus: options?.paymentStatus
1828
+ });
1829
+ const reqOpts = confirmOrDeclineBooking(payload);
1830
+ sideEffects?.onSiteCall?.();
1831
+ try {
1832
+ const result = await httpClient.request(reqOpts);
1833
+ sideEffects?.onSuccess?.(result);
1834
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1835
+ } catch (err) {
1836
+ const transformedError = (0, import_transform_error.transformError)(
1837
+ err,
1838
+ {
1839
+ spreadPathsToArguments: {},
1840
+ explicitPathsToArguments: {
1841
+ bookingId: "$[0]",
1842
+ paymentStatus: "$[1].paymentStatus"
1843
+ },
1844
+ singleArgumentUnchanged: false
1845
+ },
1846
+ ["bookingId", "options"]
1847
+ );
1848
+ sideEffects?.onError?.(err);
1849
+ throw transformedError;
1850
+ }
1851
+ }
1852
+ async function bulkConfirmOrDeclineBooking2(details, options) {
1853
+ const { httpClient, sideEffects } = arguments[2];
1854
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1855
+ details,
1856
+ returnEntity: options?.returnEntity
1857
+ });
1858
+ const reqOpts = bulkConfirmOrDeclineBooking(payload);
1859
+ sideEffects?.onSiteCall?.();
1860
+ try {
1861
+ const result = await httpClient.request(reqOpts);
1862
+ sideEffects?.onSuccess?.(result);
1863
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1864
+ } catch (err) {
1865
+ const transformedError = (0, import_transform_error.transformError)(
1866
+ err,
1867
+ {
1868
+ spreadPathsToArguments: {},
1869
+ explicitPathsToArguments: {
1870
+ details: "$[0]",
1871
+ returnEntity: "$[1].returnEntity"
1872
+ },
1873
+ singleArgumentUnchanged: false
1874
+ },
1875
+ ["details", "options"]
1876
+ );
1877
+ sideEffects?.onError?.(err);
1878
+ throw transformedError;
1879
+ }
1880
+ }
1823
1881
  async function createMultiServiceBooking2(bookings, options) {
1824
1882
  const { httpClient, sideEffects } = arguments[2];
1825
1883
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -2181,64 +2239,6 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
2181
2239
  throw transformedError;
2182
2240
  }
2183
2241
  }
2184
- async function confirmOrDeclineBooking2(bookingId, options) {
2185
- const { httpClient, sideEffects } = arguments[2];
2186
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2187
- bookingId,
2188
- paymentStatus: options?.paymentStatus
2189
- });
2190
- const reqOpts = confirmOrDeclineBooking(payload);
2191
- sideEffects?.onSiteCall?.();
2192
- try {
2193
- const result = await httpClient.request(reqOpts);
2194
- sideEffects?.onSuccess?.(result);
2195
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2196
- } catch (err) {
2197
- const transformedError = (0, import_transform_error.transformError)(
2198
- err,
2199
- {
2200
- spreadPathsToArguments: {},
2201
- explicitPathsToArguments: {
2202
- bookingId: "$[0]",
2203
- paymentStatus: "$[1].paymentStatus"
2204
- },
2205
- singleArgumentUnchanged: false
2206
- },
2207
- ["bookingId", "options"]
2208
- );
2209
- sideEffects?.onError?.(err);
2210
- throw transformedError;
2211
- }
2212
- }
2213
- async function bulkConfirmOrDeclineBooking2(details, options) {
2214
- const { httpClient, sideEffects } = arguments[2];
2215
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2216
- details,
2217
- returnEntity: options?.returnEntity
2218
- });
2219
- const reqOpts = bulkConfirmOrDeclineBooking(payload);
2220
- sideEffects?.onSiteCall?.();
2221
- try {
2222
- const result = await httpClient.request(reqOpts);
2223
- sideEffects?.onSuccess?.(result);
2224
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2225
- } catch (err) {
2226
- const transformedError = (0, import_transform_error.transformError)(
2227
- err,
2228
- {
2229
- spreadPathsToArguments: {},
2230
- explicitPathsToArguments: {
2231
- details: "$[0]",
2232
- returnEntity: "$[1].returnEntity"
2233
- },
2234
- singleArgumentUnchanged: false
2235
- },
2236
- ["details", "options"]
2237
- );
2238
- sideEffects?.onError?.(err);
2239
- throw transformedError;
2240
- }
2241
- }
2242
2242
  async function createBooking2(booking, options) {
2243
2243
  const { httpClient, sideEffects } = arguments[2];
2244
2244
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({