@wix/auto_sdk_bookings_multi-service-availability-time-slots 1.0.134 → 1.0.136

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 (130) hide show
  1. package/build/{cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts → bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal-B2t3dqyF.d.mts} +154 -33
  2. package/build/{internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts → bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal-B2t3dqyF.d.ts} +154 -33
  3. package/build/{es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.d.ts → index.d.mts} +11 -8
  4. package/build/{internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.d.ts → index.d.ts} +11 -8
  5. package/build/index.js +350 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +324 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/{es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts → internal/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal-B2t3dqyF.d.mts} +154 -33
  10. package/build/internal/{es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts → bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal-B2t3dqyF.d.ts} +154 -33
  11. package/build/{cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.d.ts → internal/index.d.mts} +11 -8
  12. package/build/internal/{cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.d.ts → index.d.ts} +11 -8
  13. package/build/internal/index.js +350 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +324 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +539 -0
  18. package/build/internal/meta.d.ts +539 -0
  19. package/build/internal/meta.js +270 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +242 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +539 -0
  24. package/build/meta.d.ts +539 -0
  25. package/build/meta.js +270 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +242 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.d.ts +0 -6
  40. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.js +0 -10
  41. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.js.map +0 -1
  42. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.d.ts +0 -111
  43. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js +0 -304
  44. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js.map +0 -1
  45. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.d.ts +0 -14
  46. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js +0 -66
  47. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js.map +0 -1
  48. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js +0 -20
  49. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js.map +0 -1
  50. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js +0 -14
  51. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +0 -1
  52. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +0 -1217
  53. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js +0 -294
  54. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/package.json +0 -3
  65. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.d.ts +0 -6
  66. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.js +0 -6
  67. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.js.map +0 -1
  68. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.d.ts +0 -111
  69. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js +0 -299
  70. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js.map +0 -1
  71. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.d.ts +0 -14
  72. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js +0 -38
  73. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js.map +0 -1
  74. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js +0 -14
  75. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js.map +0 -1
  76. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js +0 -11
  77. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +0 -1
  78. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +0 -1217
  79. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js +0 -266
  80. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -1
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.d.ts +0 -6
  91. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.js +0 -10
  92. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.js.map +0 -1
  93. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.d.ts +0 -111
  94. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js +0 -304
  95. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js.map +0 -1
  96. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.d.ts +0 -14
  97. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js +0 -66
  98. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js.map +0 -1
  99. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js +0 -20
  100. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js.map +0 -1
  101. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js +0 -14
  102. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +0 -1
  103. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +0 -1217
  104. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js +0 -294
  105. package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +0 -1
  106. package/build/internal/es/index.d.ts +0 -1
  107. package/build/internal/es/index.js +0 -2
  108. package/build/internal/es/index.js.map +0 -1
  109. package/build/internal/es/index.typings.d.ts +0 -1
  110. package/build/internal/es/index.typings.js +0 -2
  111. package/build/internal/es/index.typings.js.map +0 -1
  112. package/build/internal/es/meta.d.ts +0 -1
  113. package/build/internal/es/meta.js +0 -2
  114. package/build/internal/es/meta.js.map +0 -1
  115. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.d.ts +0 -6
  116. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.js +0 -6
  117. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.js.map +0 -1
  118. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.d.ts +0 -111
  119. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js +0 -299
  120. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js.map +0 -1
  121. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.d.ts +0 -14
  122. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js +0 -38
  123. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js.map +0 -1
  124. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js +0 -14
  125. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js.map +0 -1
  126. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js +0 -11
  127. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +0 -1
  128. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +0 -1217
  129. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js +0 -266
  130. package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +0 -1
@@ -1,266 +0,0 @@
1
- import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
- import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
- import * as ambassadorWixBookingsAvailabilityV2TimeSlot from './bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js';
4
- export var LocationType;
5
- (function (LocationType) {
6
- LocationType["UNKNOWN_LOCATION_TYPE"] = "UNKNOWN_LOCATION_TYPE";
7
- /** A business location, either the default business address, or locations defined for the business by the Business Info. */
8
- LocationType["BUSINESS"] = "BUSINESS";
9
- /** The location is unique to this service and isn't defined as one of the business locations. */
10
- LocationType["CUSTOM"] = "CUSTOM";
11
- /** The location can be determined by the customer and is not set up beforehand. */
12
- LocationType["CUSTOMER"] = "CUSTOMER";
13
- })(LocationType || (LocationType = {}));
14
- /**
15
- * Retrieves a list of multiService `TimeSlot`s that match the provided filters.
16
- *
17
- * <blockquote class="important">
18
- * <p><strong>Important:</strong><br/>
19
- * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
20
- * </blockquote>
21
- *
22
- * The request body __must__ include either:
23
- * + All of the following filters: `service`.`serviceId`, `fromLocalDate`, `toLocalDate`, `location`, and `timeZone`. You may add additional filters as you wish.
24
- * + A `cursorPaging` with a valid `cursor` from previous response.
25
- *
26
- *
27
- * Each [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response
28
- * represents the availability of the given sequence of services in a specific order, location, and within a given range of time.
29
- *
30
- * Each `TimeSlot`.`NestedTimeSlot` represents a single service from the given list. The order of the `NestedTimeSlots` is the same as the order
31
- * of the given services in request.
32
- * The first `NestedTimeSlot` has `localStartDate` within the given `fromLocalDate` and `toLocalDate` exclusive,
33
- * and each following `NestedTimeSlot` has a `localStartDate` that equals to the previous `NestedTimeSlot`'s `localEndDate`.
34
- *
35
- * By default,
36
- * the response contains at most 1000 results.
37
- * If there are more than 1000 results, we return a `cursorPagingMetadata` with
38
- * a cursor for the next page of results, regardless of whether a `cursorPaging`
39
- * was provided in request.
40
- *
41
- * > __Notes:__
42
- * > + All nested time slots share the same location.
43
- * > + You can pass up to 8 services in request.
44
- *
45
- * ### AvailableResources in response:
46
- * The `TimeSlot`.`NestedTimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service
47
- * within the `NestedTimeSlot` range of time. Each `AvailableResources` contains information about available resources of the same type.
48
- *
49
- * <blockquote class="important">
50
- * <p><strong>Important:</strong><br/>
51
- * By default,
52
- * if you don't specify <code class="grey-background">service</code>.<code class="grey-background">includeResourceTypeIds</code>
53
- * or <code class="grey-background">service</code>.<code class="grey-background">resourceIds</code> filters in request,
54
- * we return TimeSlots with <code class="grey-background">NestedTimeSlot</code>s with an empty <code class="grey-background">AvailableResources</code>.
55
- * <br/><strong>Note:</strong><br/> Not specifying resources filters can be handy in case you want to avoid large response in flows that only
56
- * interested of whether the time slots are available. [Finding the next available slot within the next 3 months](https://bo.wix.com/wix-docs/rest/all-apis/service-availability/multi-service-availability-time-slots/sample-flows?localViewerId=inbari#all-apis_service-availability_multi-service-availability-time-slots_sample-flows_find-the-first-date-within-the-next-3-months-that-all-selected-services-are-available-for)
57
- * is an example for such flow.
58
- * </p>
59
- * </blockquote>
60
- *
61
- *
62
- * If you wish to get a list of available resources for a `TimeSlot`.`NestedTimeSlot` you should either:
63
- * + provide `service`.`resourceIds` in request.
64
- * + provide `service`.`includeResourceTypeIds` in request.
65
- *
66
- * __Notes:__
67
- * + In both cases the returned `TimeSlot`.`NestedTimeSlot` contains __up__ to 10 `AvailableResources` that match the provided filters. Each `AvailableResources` contains __up__ to 10 available `resources` of the same type that match the provided filters.
68
- * + If an `AvailableResources` has more available resources which are not listed within it, we return `AvailableResources`.`hasMoreAvailableResources` as true.
69
- * + If you wish to get the full available resources list for all `NestedTimeSlot` of a specific `TimeSlot`, you should call [GetMultiServiceAvailabilityTimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/multi-service-availability-time-slots/get-multi-service-availability-time-slot).
70
- *
71
- *
72
- * ### Availability VS Bookability
73
- * An `available` time slot is not necessarily `bookable`.
74
- * The `bookable` field of a `TimeSlot` indicates whether the customer can book all of the of the services within the given time slot,
75
- * at a specific period of time.
76
- * Read more about [Availability VS Bookability](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/multi-service-availability-time-slots/introduction#all-apis_wix-service-availability_multi-service-availability-time-slots_introduction_availability-vs-bookability).
77
- *
78
- * By default,
79
- * + The response does not contains `unavailable` TimeSlots.For example, if there are no available resources to provide one of the services from `2024-01-30T14:30:00` to `2024-01-30T15:30:00`, we don't return TimeSlots with `NestedTimeSlot`.`localStartDate` within this range for this service.
80
- * + The response contains both `bookable` and `un-bookable` TimeSlots.For example, if one of the services has a booking policy which enforces booking the service up to 10 minutes before the session starts, we return TimeSlots with the violating `NestedTimeSlot`.`localStartDate`, with `bookable` as `false`. If you want to list only __bookable__ TimeSlots you should pass `bookable` as `true`.
81
- * + If booking one of the `NestedTimeSlot`s violates one of the corresponding service's booking policies, the `TimeSlot` returns with `bookable` as false. There is no indication which service's policy was violated.
82
- *
83
- * <blockquote class="important">
84
- * <p><strong>Important:</strong>
85
- * Because of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.
86
- * Read more about <a href="https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/multi-service-availability-time-slots/introduction#all-apis_wix-service-availability_multi-service-availability-time-slots_introduction_daylight-saving-time-dst-handling">DST Handling</a></p>
87
- * </blockquote>
88
- *
89
- * ### ListAvailabilityTimeSlots runs with the following defaults:
90
- * + `localStartDate` is sorted in `ASC` order.
91
- * + `cursorPaging`.`limit` is `1000`.
92
- * @public
93
- * @documentationMaturity preview
94
- * @permissionId BOOKINGS.AVAILABILITY_READ_MULTI_SERVICE_TIME_SLOTS
95
- * @permissionScope Manage Stores
96
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
97
- * @permissionScope Read Bookings - Public Data
98
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
99
- * @permissionScope Manage Bookings Services and Settings
100
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
101
- * @permissionScope Manage Bookings
102
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
103
- * @permissionScope Read Bookings - Including Participants
104
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
105
- * @permissionScope Read Bookings - all read permissions
106
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
107
- * @permissionScope Read Bookings Calendar Availability
108
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR
109
- * @permissionScope Manage Bookings - all permissions
110
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
111
- * @applicableIdentity APP
112
- * @applicableIdentity VISITOR
113
- * @fqn com.wixpress.bookings.availability.v2.MultiServiceAvailabilityTimeSlots.ListMultiServiceAvailabilityTimeSlots
114
- */
115
- export async function listMultiServiceAvailabilityTimeSlots(options) {
116
- // @ts-ignore
117
- const { httpClient, sideEffects } = arguments[1];
118
- const payload = renameKeysFromSDKRequestToRESTRequest({
119
- services: options?.services,
120
- fromLocalDate: options?.fromLocalDate,
121
- toLocalDate: options?.toLocalDate,
122
- timeZone: options?.timeZone,
123
- location: options?.location,
124
- bookable: options?.bookable,
125
- bookingPolicyViolations: options?.bookingPolicyViolations,
126
- timeSlotsPerDay: options?.timeSlotsPerDay,
127
- cursorPaging: options?.cursorPaging,
128
- });
129
- const reqOpts = ambassadorWixBookingsAvailabilityV2TimeSlot.listMultiServiceAvailabilityTimeSlots(payload);
130
- sideEffects?.onSiteCall?.();
131
- try {
132
- const result = await httpClient.request(reqOpts);
133
- sideEffects?.onSuccess?.(result);
134
- return renameKeysFromRESTResponseToSDKResponse(result.data);
135
- }
136
- catch (err) {
137
- const transformedError = sdkTransformError(err, {
138
- spreadPathsToArguments: {},
139
- explicitPathsToArguments: {
140
- services: '$[0].services',
141
- fromLocalDate: '$[0].fromLocalDate',
142
- toLocalDate: '$[0].toLocalDate',
143
- timeZone: '$[0].timeZone',
144
- location: '$[0].location',
145
- bookable: '$[0].bookable',
146
- bookingPolicyViolations: '$[0].bookingPolicyViolations',
147
- timeSlotsPerDay: '$[0].timeSlotsPerDay',
148
- cursorPaging: '$[0].cursorPaging',
149
- },
150
- singleArgumentUnchanged: false,
151
- }, ['options']);
152
- sideEffects?.onError?.(err);
153
- throw transformedError;
154
- }
155
- }
156
- /**
157
- * Retrieves an available multiService `TimeSlot` that match the provided filters.
158
- *
159
- * Throws `SlotNotFound` if there is no such available time slot.
160
- *
161
- * <blockquote class="important">
162
- * <p><strong>Important:</strong><br/>
163
- * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
164
- * </blockquote>
165
- *
166
- * By default,
167
- * if you don't provide a `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,
168
- * we return for each `TimeSlot`.`NestedTimeSlot` all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide
169
- * the corresponding service within the time slot.
170
- *
171
- * If you specify `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,
172
- * the returned `TimeSlot`.`NestedTimeSlot` for this service will contain only `AvailableResources` with at least one available resource
173
- * which match the given resources filters,
174
- * each contains all available resources out of those requested.
175
- *
176
- * + Notes:
177
- * + All nested time slots share the same location.
178
- * + You can pass up to 8 services.
179
- *
180
- * <blockquote class="tip">
181
- * <p><strong>Tip:</strong><br/>
182
- * Use this API in order to get the availability of a specific <code class="grey-background">TimeSlot</code> out of those returned from <code class="grey-background">ListMultiServiceAvailabilityTimeSlots</code> API.</p>
183
- * </blockquote>
184
- * @param services - Services for which the multiService TimeSlots are being returned for.
185
- * Each service contains its own resources filters within.
186
- *
187
- * MinSize: 2.
188
- * MaxSize: 8.
189
- * @param localStartDate - Local start date of the time slot, in ISO-8601 format.
190
- * For example, "2024-01-30T13:30:00".
191
- * @param localEndDate - Local end date of the time slot, in ISO-8601 format.
192
- * For example, "2024-01-30T14:30:00".
193
- * @param timeZone - Time zone, in IANA time zone format.
194
- * @param location - The location of the time slot.
195
- *
196
- * You must provide a specific `locationType`.
197
- * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.
198
- *
199
- * <blockquote class="warning">
200
- * <p>Supports filtering by location type, or by location ID.
201
- * Other fields like <code class="grey-background">name</code> are ignored.</p>
202
- * </blockquote>
203
- * @public
204
- * @documentationMaturity preview
205
- * @requiredField localEndDate
206
- * @requiredField localStartDate
207
- * @requiredField location
208
- * @requiredField location.locationType
209
- * @requiredField services
210
- * @requiredField services.serviceId
211
- * @requiredField timeZone
212
- * @permissionId BOOKINGS.AVAILABILITY_READ_MULTI_SERVICE_TIME_SLOTS
213
- * @permissionScope Manage Stores
214
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
215
- * @permissionScope Read Bookings - Public Data
216
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
217
- * @permissionScope Manage Bookings Services and Settings
218
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
219
- * @permissionScope Manage Bookings
220
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
221
- * @permissionScope Read Bookings - Including Participants
222
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
223
- * @permissionScope Read Bookings - all read permissions
224
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
225
- * @permissionScope Read Bookings Calendar Availability
226
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR
227
- * @permissionScope Manage Bookings - all permissions
228
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
229
- * @applicableIdentity APP
230
- * @applicableIdentity VISITOR
231
- * @fqn com.wixpress.bookings.availability.v2.MultiServiceAvailabilityTimeSlots.GetMultiServiceAvailabilityTimeSlot
232
- */
233
- export async function getMultiServiceAvailabilityTimeSlot(services, localStartDate, localEndDate, timeZone, location) {
234
- // @ts-ignore
235
- const { httpClient, sideEffects } = arguments[5];
236
- const payload = renameKeysFromSDKRequestToRESTRequest({
237
- services: services,
238
- localStartDate: localStartDate,
239
- localEndDate: localEndDate,
240
- timeZone: timeZone,
241
- location: location,
242
- });
243
- const reqOpts = ambassadorWixBookingsAvailabilityV2TimeSlot.getMultiServiceAvailabilityTimeSlot(payload);
244
- sideEffects?.onSiteCall?.();
245
- try {
246
- const result = await httpClient.request(reqOpts);
247
- sideEffects?.onSuccess?.(result);
248
- return renameKeysFromRESTResponseToSDKResponse(result.data);
249
- }
250
- catch (err) {
251
- const transformedError = sdkTransformError(err, {
252
- spreadPathsToArguments: {},
253
- explicitPathsToArguments: {
254
- services: '$[0]',
255
- localStartDate: '$[1]',
256
- localEndDate: '$[2]',
257
- timeZone: '$[3]',
258
- location: '$[4]',
259
- },
260
- singleArgumentUnchanged: false,
261
- }, ['services', 'localStartDate', 'localEndDate', 'timeZone', 'location']);
262
- sideEffects?.onError?.(err);
263
- throw transformedError;
264
- }
265
- }
266
- //# sourceMappingURL=bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js","sourceRoot":"","sources":["../../../../src/bookings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