@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
@@ -319,6 +319,57 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
319
319
  };
320
320
  return resolveUrl(Object.assign(opts, { domainToMappings }));
321
321
  }
322
+ function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
323
+ const domainToMappings = {
324
+ "www.wixapis.com": [
325
+ {
326
+ srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
327
+ destPath: "/v2/bookings/confirmation"
328
+ },
329
+ {
330
+ srcPath: "/bookings/v2/confirmation",
331
+ destPath: "/v2/confirmation"
332
+ },
333
+ {
334
+ srcPath: "/bookings/v2/bulk/confirmation",
335
+ destPath: "/v2/bulk/confirmation"
336
+ },
337
+ {
338
+ srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
339
+ destPath: "/v2/bulk/bookings/confirmOrDecline"
340
+ },
341
+ {
342
+ srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
343
+ destPath: "/v2/bulk/confirmation"
344
+ },
345
+ {
346
+ srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
347
+ destPath: "/v2/bulk/bookings/confirmOrDecline"
348
+ }
349
+ ],
350
+ "*.dev.wix-code.com": [
351
+ {
352
+ srcPath: "/bookings/v2/confirmation",
353
+ destPath: "/v2/confirmation"
354
+ },
355
+ {
356
+ srcPath: "/bookings/v2/bulk/bookings",
357
+ destPath: "/v2/bulk/bookings"
358
+ }
359
+ ],
360
+ _: [
361
+ {
362
+ srcPath: "/bookings/v2/confirmation",
363
+ destPath: "/v2/confirmation"
364
+ },
365
+ {
366
+ srcPath: "/bookings/v2/bulk/bookings",
367
+ destPath: "/v2/bulk/bookings"
368
+ }
369
+ ]
370
+ };
371
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
372
+ }
322
373
  function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
323
374
  const domainToMappings = {
324
375
  _: [
@@ -472,142 +523,7 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
472
523
  };
473
524
  return resolveUrl(Object.assign(opts, { domainToMappings }));
474
525
  }
475
- function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
476
- const domainToMappings = {
477
- "www.wixapis.com": [
478
- {
479
- srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
480
- destPath: "/v2/bookings/confirmation"
481
- },
482
- {
483
- srcPath: "/bookings/v2/confirmation",
484
- destPath: "/v2/confirmation"
485
- },
486
- {
487
- srcPath: "/bookings/v2/bulk/confirmation",
488
- destPath: "/v2/bulk/confirmation"
489
- },
490
- {
491
- srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
492
- destPath: "/v2/bulk/bookings/confirmOrDecline"
493
- },
494
- {
495
- srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
496
- destPath: "/v2/bulk/confirmation"
497
- },
498
- {
499
- srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
500
- destPath: "/v2/bulk/bookings/confirmOrDecline"
501
- }
502
- ],
503
- "*.dev.wix-code.com": [
504
- {
505
- srcPath: "/bookings/v2/confirmation",
506
- destPath: "/v2/confirmation"
507
- },
508
- {
509
- srcPath: "/bookings/v2/bulk/bookings",
510
- destPath: "/v2/bulk/bookings"
511
- }
512
- ],
513
- _: [
514
- {
515
- srcPath: "/bookings/v2/confirmation",
516
- destPath: "/v2/confirmation"
517
- },
518
- {
519
- srcPath: "/bookings/v2/bulk/bookings",
520
- destPath: "/v2/bulk/bookings"
521
- }
522
- ]
523
- };
524
- return resolveUrl(Object.assign(opts, { domainToMappings }));
525
- }
526
526
  var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
527
- function confirmOrDeclineBooking(payload) {
528
- function __confirmOrDeclineBooking({ host }) {
529
- const metadata = {
530
- entityFqdn: "wix.bookings.v2.booking",
531
- method: "POST",
532
- methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
533
- packageName: PACKAGE_NAME,
534
- migrationOptions: {
535
- optInTransformResponse: true
536
- },
537
- url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
538
- protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
539
- data: payload,
540
- host
541
- }),
542
- data: payload,
543
- transformResponse: (payload2) => transformPaths(payload2, [
544
- {
545
- transformFn: transformRESTTimestampToSDKTimestamp,
546
- paths: [
547
- { path: "booking.createdDate" },
548
- { path: "booking.startDate" },
549
- { path: "booking.endDate" },
550
- { path: "booking.updatedDate" },
551
- { path: "booking.canceledDate" }
552
- ]
553
- },
554
- {
555
- transformFn: transformRESTFloatToSDKFloat,
556
- paths: [
557
- { path: "booking.contactDetails.fullAddress.geocode.latitude" },
558
- { path: "booking.contactDetails.fullAddress.geocode.longitude" }
559
- ]
560
- }
561
- ])
562
- };
563
- return metadata;
564
- }
565
- return __confirmOrDeclineBooking;
566
- }
567
- function bulkConfirmOrDeclineBooking(payload) {
568
- function __bulkConfirmOrDeclineBooking({ host }) {
569
- const metadata = {
570
- entityFqdn: "wix.bookings.v2.booking",
571
- method: "POST",
572
- methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
573
- packageName: PACKAGE_NAME,
574
- migrationOptions: {
575
- optInTransformResponse: true
576
- },
577
- url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
578
- protoPath: "/v2/bulk/bookings/confirmOrDecline",
579
- data: payload,
580
- host
581
- }),
582
- data: payload,
583
- transformResponse: (payload2) => transformPaths(payload2, [
584
- {
585
- transformFn: transformRESTTimestampToSDKTimestamp,
586
- paths: [
587
- { path: "results.item.createdDate" },
588
- { path: "results.item.startDate" },
589
- { path: "results.item.endDate" },
590
- { path: "results.item.updatedDate" },
591
- { path: "results.item.canceledDate" }
592
- ]
593
- },
594
- {
595
- transformFn: transformRESTFloatToSDKFloat,
596
- paths: [
597
- {
598
- path: "results.item.contactDetails.fullAddress.geocode.latitude"
599
- },
600
- {
601
- path: "results.item.contactDetails.fullAddress.geocode.longitude"
602
- }
603
- ]
604
- }
605
- ])
606
- };
607
- return metadata;
608
- }
609
- return __bulkConfirmOrDeclineBooking;
610
- }
611
527
  function createMultiServiceBooking(payload) {
612
528
  function __createMultiServiceBooking({ host }) {
613
529
  const serializedData = transformPaths(payload, [
@@ -1065,6 +981,90 @@ function removeBookingsFromMultiServiceBooking(payload) {
1065
981
  }
1066
982
  return __removeBookingsFromMultiServiceBooking;
1067
983
  }
984
+ function confirmOrDeclineBooking(payload) {
985
+ function __confirmOrDeclineBooking({ host }) {
986
+ const metadata = {
987
+ entityFqdn: "wix.bookings.v2.booking",
988
+ method: "POST",
989
+ methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
990
+ packageName: PACKAGE_NAME,
991
+ migrationOptions: {
992
+ optInTransformResponse: true
993
+ },
994
+ url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
995
+ protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
996
+ data: payload,
997
+ host
998
+ }),
999
+ data: payload,
1000
+ transformResponse: (payload2) => transformPaths(payload2, [
1001
+ {
1002
+ transformFn: transformRESTTimestampToSDKTimestamp,
1003
+ paths: [
1004
+ { path: "booking.createdDate" },
1005
+ { path: "booking.startDate" },
1006
+ { path: "booking.endDate" },
1007
+ { path: "booking.updatedDate" },
1008
+ { path: "booking.canceledDate" }
1009
+ ]
1010
+ },
1011
+ {
1012
+ transformFn: transformRESTFloatToSDKFloat,
1013
+ paths: [
1014
+ { path: "booking.contactDetails.fullAddress.geocode.latitude" },
1015
+ { path: "booking.contactDetails.fullAddress.geocode.longitude" }
1016
+ ]
1017
+ }
1018
+ ])
1019
+ };
1020
+ return metadata;
1021
+ }
1022
+ return __confirmOrDeclineBooking;
1023
+ }
1024
+ function bulkConfirmOrDeclineBooking(payload) {
1025
+ function __bulkConfirmOrDeclineBooking({ host }) {
1026
+ const metadata = {
1027
+ entityFqdn: "wix.bookings.v2.booking",
1028
+ method: "POST",
1029
+ methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
1030
+ packageName: PACKAGE_NAME,
1031
+ migrationOptions: {
1032
+ optInTransformResponse: true
1033
+ },
1034
+ url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
1035
+ protoPath: "/v2/bulk/bookings/confirmOrDecline",
1036
+ data: payload,
1037
+ host
1038
+ }),
1039
+ data: payload,
1040
+ transformResponse: (payload2) => transformPaths(payload2, [
1041
+ {
1042
+ transformFn: transformRESTTimestampToSDKTimestamp,
1043
+ paths: [
1044
+ { path: "results.item.createdDate" },
1045
+ { path: "results.item.startDate" },
1046
+ { path: "results.item.endDate" },
1047
+ { path: "results.item.updatedDate" },
1048
+ { path: "results.item.canceledDate" }
1049
+ ]
1050
+ },
1051
+ {
1052
+ transformFn: transformRESTFloatToSDKFloat,
1053
+ paths: [
1054
+ {
1055
+ path: "results.item.contactDetails.fullAddress.geocode.latitude"
1056
+ },
1057
+ {
1058
+ path: "results.item.contactDetails.fullAddress.geocode.longitude"
1059
+ }
1060
+ ]
1061
+ }
1062
+ ])
1063
+ };
1064
+ return metadata;
1065
+ }
1066
+ return __bulkConfirmOrDeclineBooking;
1067
+ }
1068
1068
  function createBooking(payload) {
1069
1069
  function __createBooking({ host }) {
1070
1070
  const serializedData = transformPaths(payload, [
@@ -1777,64 +1777,6 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
1777
1777
  SortOrder2["DESC"] = "DESC";
1778
1778
  return SortOrder2;
1779
1779
  })(SortOrder || {});
1780
- async function confirmOrDeclineBooking2(bookingId, options) {
1781
- const { httpClient, sideEffects } = arguments[2];
1782
- const payload = renameKeysFromSDKRequestToRESTRequest({
1783
- bookingId,
1784
- paymentStatus: options?.paymentStatus
1785
- });
1786
- const reqOpts = confirmOrDeclineBooking(payload);
1787
- sideEffects?.onSiteCall?.();
1788
- try {
1789
- const result = await httpClient.request(reqOpts);
1790
- sideEffects?.onSuccess?.(result);
1791
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1792
- } catch (err) {
1793
- const transformedError = sdkTransformError(
1794
- err,
1795
- {
1796
- spreadPathsToArguments: {},
1797
- explicitPathsToArguments: {
1798
- bookingId: "$[0]",
1799
- paymentStatus: "$[1].paymentStatus"
1800
- },
1801
- singleArgumentUnchanged: false
1802
- },
1803
- ["bookingId", "options"]
1804
- );
1805
- sideEffects?.onError?.(err);
1806
- throw transformedError;
1807
- }
1808
- }
1809
- async function bulkConfirmOrDeclineBooking2(details, options) {
1810
- const { httpClient, sideEffects } = arguments[2];
1811
- const payload = renameKeysFromSDKRequestToRESTRequest({
1812
- details,
1813
- returnEntity: options?.returnEntity
1814
- });
1815
- const reqOpts = bulkConfirmOrDeclineBooking(payload);
1816
- sideEffects?.onSiteCall?.();
1817
- try {
1818
- const result = await httpClient.request(reqOpts);
1819
- sideEffects?.onSuccess?.(result);
1820
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1821
- } catch (err) {
1822
- const transformedError = sdkTransformError(
1823
- err,
1824
- {
1825
- spreadPathsToArguments: {},
1826
- explicitPathsToArguments: {
1827
- details: "$[0]",
1828
- returnEntity: "$[1].returnEntity"
1829
- },
1830
- singleArgumentUnchanged: false
1831
- },
1832
- ["details", "options"]
1833
- );
1834
- sideEffects?.onError?.(err);
1835
- throw transformedError;
1836
- }
1837
- }
1838
1780
  async function createMultiServiceBooking2(bookings, options) {
1839
1781
  const { httpClient, sideEffects } = arguments[2];
1840
1782
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -2196,6 +2138,64 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
2196
2138
  throw transformedError;
2197
2139
  }
2198
2140
  }
2141
+ async function confirmOrDeclineBooking2(bookingId, options) {
2142
+ const { httpClient, sideEffects } = arguments[2];
2143
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2144
+ bookingId,
2145
+ paymentStatus: options?.paymentStatus
2146
+ });
2147
+ const reqOpts = confirmOrDeclineBooking(payload);
2148
+ sideEffects?.onSiteCall?.();
2149
+ try {
2150
+ const result = await httpClient.request(reqOpts);
2151
+ sideEffects?.onSuccess?.(result);
2152
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2153
+ } catch (err) {
2154
+ const transformedError = sdkTransformError(
2155
+ err,
2156
+ {
2157
+ spreadPathsToArguments: {},
2158
+ explicitPathsToArguments: {
2159
+ bookingId: "$[0]",
2160
+ paymentStatus: "$[1].paymentStatus"
2161
+ },
2162
+ singleArgumentUnchanged: false
2163
+ },
2164
+ ["bookingId", "options"]
2165
+ );
2166
+ sideEffects?.onError?.(err);
2167
+ throw transformedError;
2168
+ }
2169
+ }
2170
+ async function bulkConfirmOrDeclineBooking2(details, options) {
2171
+ const { httpClient, sideEffects } = arguments[2];
2172
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2173
+ details,
2174
+ returnEntity: options?.returnEntity
2175
+ });
2176
+ const reqOpts = bulkConfirmOrDeclineBooking(payload);
2177
+ sideEffects?.onSiteCall?.();
2178
+ try {
2179
+ const result = await httpClient.request(reqOpts);
2180
+ sideEffects?.onSuccess?.(result);
2181
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2182
+ } catch (err) {
2183
+ const transformedError = sdkTransformError(
2184
+ err,
2185
+ {
2186
+ spreadPathsToArguments: {},
2187
+ explicitPathsToArguments: {
2188
+ details: "$[0]",
2189
+ returnEntity: "$[1].returnEntity"
2190
+ },
2191
+ singleArgumentUnchanged: false
2192
+ },
2193
+ ["details", "options"]
2194
+ );
2195
+ sideEffects?.onError?.(err);
2196
+ throw transformedError;
2197
+ }
2198
+ }
2199
2199
  async function createBooking2(booking, options) {
2200
2200
  const { httpClient, sideEffects } = arguments[2];
2201
2201
  const payload = renameKeysFromSDKRequestToRESTRequest({