@wix/auto_sdk_bookings_bookings 1.0.121 → 1.0.123

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 +73 -73
  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 +371 -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 +333 -333
  8. package/build/cjs/meta.js +171 -171
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +73 -73
  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 +371 -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 +333 -333
  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 +73 -73
  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 +371 -371
  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 +333 -333
  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 +73 -73
  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 +371 -371
  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 +333 -333
  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
@@ -384,6 +384,57 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
384
384
  };
385
385
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
386
386
  }
387
+ function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
388
+ const domainToMappings = {
389
+ "www.wixapis.com": [
390
+ {
391
+ srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
392
+ destPath: "/v2/bookings/confirmation"
393
+ },
394
+ {
395
+ srcPath: "/bookings/v2/confirmation",
396
+ destPath: "/v2/confirmation"
397
+ },
398
+ {
399
+ srcPath: "/bookings/v2/bulk/confirmation",
400
+ destPath: "/v2/bulk/confirmation"
401
+ },
402
+ {
403
+ srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
404
+ destPath: "/v2/bulk/bookings/confirmOrDecline"
405
+ },
406
+ {
407
+ srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
408
+ destPath: "/v2/bulk/confirmation"
409
+ },
410
+ {
411
+ srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
412
+ destPath: "/v2/bulk/bookings/confirmOrDecline"
413
+ }
414
+ ],
415
+ "*.dev.wix-code.com": [
416
+ {
417
+ srcPath: "/bookings/v2/confirmation",
418
+ destPath: "/v2/confirmation"
419
+ },
420
+ {
421
+ srcPath: "/bookings/v2/bulk/bookings",
422
+ destPath: "/v2/bulk/bookings"
423
+ }
424
+ ],
425
+ _: [
426
+ {
427
+ srcPath: "/bookings/v2/confirmation",
428
+ destPath: "/v2/confirmation"
429
+ },
430
+ {
431
+ srcPath: "/bookings/v2/bulk/bookings",
432
+ destPath: "/v2/bulk/bookings"
433
+ }
434
+ ]
435
+ };
436
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
437
+ }
387
438
  function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
388
439
  const domainToMappings = {
389
440
  _: [
@@ -537,142 +588,7 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
537
588
  };
538
589
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
539
590
  }
540
- function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
541
- const domainToMappings = {
542
- "www.wixapis.com": [
543
- {
544
- srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
545
- destPath: "/v2/bookings/confirmation"
546
- },
547
- {
548
- srcPath: "/bookings/v2/confirmation",
549
- destPath: "/v2/confirmation"
550
- },
551
- {
552
- srcPath: "/bookings/v2/bulk/confirmation",
553
- destPath: "/v2/bulk/confirmation"
554
- },
555
- {
556
- srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
557
- destPath: "/v2/bulk/bookings/confirmOrDecline"
558
- },
559
- {
560
- srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
561
- destPath: "/v2/bulk/confirmation"
562
- },
563
- {
564
- srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
565
- destPath: "/v2/bulk/bookings/confirmOrDecline"
566
- }
567
- ],
568
- "*.dev.wix-code.com": [
569
- {
570
- srcPath: "/bookings/v2/confirmation",
571
- destPath: "/v2/confirmation"
572
- },
573
- {
574
- srcPath: "/bookings/v2/bulk/bookings",
575
- destPath: "/v2/bulk/bookings"
576
- }
577
- ],
578
- _: [
579
- {
580
- srcPath: "/bookings/v2/confirmation",
581
- destPath: "/v2/confirmation"
582
- },
583
- {
584
- srcPath: "/bookings/v2/bulk/bookings",
585
- destPath: "/v2/bulk/bookings"
586
- }
587
- ]
588
- };
589
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
590
- }
591
591
  var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
592
- function confirmOrDeclineBooking(payload) {
593
- function __confirmOrDeclineBooking({ host }) {
594
- const metadata = {
595
- entityFqdn: "wix.bookings.v2.booking",
596
- method: "POST",
597
- methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
598
- packageName: PACKAGE_NAME,
599
- migrationOptions: {
600
- optInTransformResponse: true
601
- },
602
- url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
603
- protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
604
- data: payload,
605
- host
606
- }),
607
- data: payload,
608
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
609
- {
610
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
611
- paths: [
612
- { path: "booking.createdDate" },
613
- { path: "booking.startDate" },
614
- { path: "booking.endDate" },
615
- { path: "booking.updatedDate" },
616
- { path: "booking.canceledDate" }
617
- ]
618
- },
619
- {
620
- transformFn: import_float2.transformRESTFloatToSDKFloat,
621
- paths: [
622
- { path: "booking.contactDetails.fullAddress.geocode.latitude" },
623
- { path: "booking.contactDetails.fullAddress.geocode.longitude" }
624
- ]
625
- }
626
- ])
627
- };
628
- return metadata;
629
- }
630
- return __confirmOrDeclineBooking;
631
- }
632
- function bulkConfirmOrDeclineBooking(payload) {
633
- function __bulkConfirmOrDeclineBooking({ host }) {
634
- const metadata = {
635
- entityFqdn: "wix.bookings.v2.booking",
636
- method: "POST",
637
- methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
638
- packageName: PACKAGE_NAME,
639
- migrationOptions: {
640
- optInTransformResponse: true
641
- },
642
- url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
643
- protoPath: "/v2/bulk/bookings/confirmOrDecline",
644
- data: payload,
645
- host
646
- }),
647
- data: payload,
648
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
649
- {
650
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
651
- paths: [
652
- { path: "results.item.createdDate" },
653
- { path: "results.item.startDate" },
654
- { path: "results.item.endDate" },
655
- { path: "results.item.updatedDate" },
656
- { path: "results.item.canceledDate" }
657
- ]
658
- },
659
- {
660
- transformFn: import_float2.transformRESTFloatToSDKFloat,
661
- paths: [
662
- {
663
- path: "results.item.contactDetails.fullAddress.geocode.latitude"
664
- },
665
- {
666
- path: "results.item.contactDetails.fullAddress.geocode.longitude"
667
- }
668
- ]
669
- }
670
- ])
671
- };
672
- return metadata;
673
- }
674
- return __bulkConfirmOrDeclineBooking;
675
- }
676
592
  function createMultiServiceBooking(payload) {
677
593
  function __createMultiServiceBooking({ host }) {
678
594
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -1130,6 +1046,90 @@ function removeBookingsFromMultiServiceBooking(payload) {
1130
1046
  }
1131
1047
  return __removeBookingsFromMultiServiceBooking;
1132
1048
  }
1049
+ function confirmOrDeclineBooking(payload) {
1050
+ function __confirmOrDeclineBooking({ host }) {
1051
+ const metadata = {
1052
+ entityFqdn: "wix.bookings.v2.booking",
1053
+ method: "POST",
1054
+ methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
1055
+ packageName: PACKAGE_NAME,
1056
+ migrationOptions: {
1057
+ optInTransformResponse: true
1058
+ },
1059
+ url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
1060
+ protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
1061
+ data: payload,
1062
+ host
1063
+ }),
1064
+ data: payload,
1065
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1066
+ {
1067
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1068
+ paths: [
1069
+ { path: "booking.createdDate" },
1070
+ { path: "booking.startDate" },
1071
+ { path: "booking.endDate" },
1072
+ { path: "booking.updatedDate" },
1073
+ { path: "booking.canceledDate" }
1074
+ ]
1075
+ },
1076
+ {
1077
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
1078
+ paths: [
1079
+ { path: "booking.contactDetails.fullAddress.geocode.latitude" },
1080
+ { path: "booking.contactDetails.fullAddress.geocode.longitude" }
1081
+ ]
1082
+ }
1083
+ ])
1084
+ };
1085
+ return metadata;
1086
+ }
1087
+ return __confirmOrDeclineBooking;
1088
+ }
1089
+ function bulkConfirmOrDeclineBooking(payload) {
1090
+ function __bulkConfirmOrDeclineBooking({ host }) {
1091
+ const metadata = {
1092
+ entityFqdn: "wix.bookings.v2.booking",
1093
+ method: "POST",
1094
+ methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
1095
+ packageName: PACKAGE_NAME,
1096
+ migrationOptions: {
1097
+ optInTransformResponse: true
1098
+ },
1099
+ url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
1100
+ protoPath: "/v2/bulk/bookings/confirmOrDecline",
1101
+ data: payload,
1102
+ host
1103
+ }),
1104
+ data: payload,
1105
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1106
+ {
1107
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1108
+ paths: [
1109
+ { path: "results.item.createdDate" },
1110
+ { path: "results.item.startDate" },
1111
+ { path: "results.item.endDate" },
1112
+ { path: "results.item.updatedDate" },
1113
+ { path: "results.item.canceledDate" }
1114
+ ]
1115
+ },
1116
+ {
1117
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
1118
+ paths: [
1119
+ {
1120
+ path: "results.item.contactDetails.fullAddress.geocode.latitude"
1121
+ },
1122
+ {
1123
+ path: "results.item.contactDetails.fullAddress.geocode.longitude"
1124
+ }
1125
+ ]
1126
+ }
1127
+ ])
1128
+ };
1129
+ return metadata;
1130
+ }
1131
+ return __bulkConfirmOrDeclineBooking;
1132
+ }
1133
1133
  function createBooking(payload) {
1134
1134
  function __createBooking({ host }) {
1135
1135
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -1842,64 +1842,6 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
1842
1842
  SortOrder2["DESC"] = "DESC";
1843
1843
  return SortOrder2;
1844
1844
  })(SortOrder || {});
1845
- async function confirmOrDeclineBooking2(bookingId, options) {
1846
- const { httpClient, sideEffects } = arguments[2];
1847
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1848
- bookingId,
1849
- paymentStatus: options?.paymentStatus
1850
- });
1851
- const reqOpts = confirmOrDeclineBooking(payload);
1852
- sideEffects?.onSiteCall?.();
1853
- try {
1854
- const result = await httpClient.request(reqOpts);
1855
- sideEffects?.onSuccess?.(result);
1856
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1857
- } catch (err) {
1858
- const transformedError = (0, import_transform_error.transformError)(
1859
- err,
1860
- {
1861
- spreadPathsToArguments: {},
1862
- explicitPathsToArguments: {
1863
- bookingId: "$[0]",
1864
- paymentStatus: "$[1].paymentStatus"
1865
- },
1866
- singleArgumentUnchanged: false
1867
- },
1868
- ["bookingId", "options"]
1869
- );
1870
- sideEffects?.onError?.(err);
1871
- throw transformedError;
1872
- }
1873
- }
1874
- async function bulkConfirmOrDeclineBooking2(details, options) {
1875
- const { httpClient, sideEffects } = arguments[2];
1876
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1877
- details,
1878
- returnEntity: options?.returnEntity
1879
- });
1880
- const reqOpts = bulkConfirmOrDeclineBooking(payload);
1881
- sideEffects?.onSiteCall?.();
1882
- try {
1883
- const result = await httpClient.request(reqOpts);
1884
- sideEffects?.onSuccess?.(result);
1885
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1886
- } catch (err) {
1887
- const transformedError = (0, import_transform_error.transformError)(
1888
- err,
1889
- {
1890
- spreadPathsToArguments: {},
1891
- explicitPathsToArguments: {
1892
- details: "$[0]",
1893
- returnEntity: "$[1].returnEntity"
1894
- },
1895
- singleArgumentUnchanged: false
1896
- },
1897
- ["details", "options"]
1898
- );
1899
- sideEffects?.onError?.(err);
1900
- throw transformedError;
1901
- }
1902
- }
1903
1845
  async function createMultiServiceBooking2(bookings, options) {
1904
1846
  const { httpClient, sideEffects } = arguments[2];
1905
1847
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -2261,6 +2203,64 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
2261
2203
  throw transformedError;
2262
2204
  }
2263
2205
  }
2206
+ async function confirmOrDeclineBooking2(bookingId, options) {
2207
+ const { httpClient, sideEffects } = arguments[2];
2208
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2209
+ bookingId,
2210
+ paymentStatus: options?.paymentStatus
2211
+ });
2212
+ const reqOpts = confirmOrDeclineBooking(payload);
2213
+ sideEffects?.onSiteCall?.();
2214
+ try {
2215
+ const result = await httpClient.request(reqOpts);
2216
+ sideEffects?.onSuccess?.(result);
2217
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2218
+ } catch (err) {
2219
+ const transformedError = (0, import_transform_error.transformError)(
2220
+ err,
2221
+ {
2222
+ spreadPathsToArguments: {},
2223
+ explicitPathsToArguments: {
2224
+ bookingId: "$[0]",
2225
+ paymentStatus: "$[1].paymentStatus"
2226
+ },
2227
+ singleArgumentUnchanged: false
2228
+ },
2229
+ ["bookingId", "options"]
2230
+ );
2231
+ sideEffects?.onError?.(err);
2232
+ throw transformedError;
2233
+ }
2234
+ }
2235
+ async function bulkConfirmOrDeclineBooking2(details, options) {
2236
+ const { httpClient, sideEffects } = arguments[2];
2237
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2238
+ details,
2239
+ returnEntity: options?.returnEntity
2240
+ });
2241
+ const reqOpts = bulkConfirmOrDeclineBooking(payload);
2242
+ sideEffects?.onSiteCall?.();
2243
+ try {
2244
+ const result = await httpClient.request(reqOpts);
2245
+ sideEffects?.onSuccess?.(result);
2246
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2247
+ } catch (err) {
2248
+ const transformedError = (0, import_transform_error.transformError)(
2249
+ err,
2250
+ {
2251
+ spreadPathsToArguments: {},
2252
+ explicitPathsToArguments: {
2253
+ details: "$[0]",
2254
+ returnEntity: "$[1].returnEntity"
2255
+ },
2256
+ singleArgumentUnchanged: false
2257
+ },
2258
+ ["details", "options"]
2259
+ );
2260
+ sideEffects?.onError?.(err);
2261
+ throw transformedError;
2262
+ }
2263
+ }
2264
2264
  async function createBooking2(booking, options) {
2265
2265
  const { httpClient, sideEffects } = arguments[2];
2266
2266
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({